From chizotz at mchsi.com Thu Mar 3 11:34:32 2005 From: chizotz at mchsi.com (chizotz at mchsi.com) Date: Thu, 03 Mar 2005 17:34:32 +0000 Subject: [dba-SQLServer] Runaway Log File Questions Message-ID: <030320051734.24734.42274AA8000D08D60000609E2197913363969B019607080C@mchsi.com> I have several questions that I'm trying to answer, and any assistance is appreciated. I have a SQL Server 2000 database that has a data file of 180 meg and a log file of over 72 gig. The db was set up basically using all of the defaults, and it is aparently logging every transaction. That degree of logging is not really necessary, at least I don't believe it is and almost certainly not at the moment when I'm essentially the only developer/user of the db. So my questions are: 1) What is the correct way to delete that huge log file and start the log over? 2) What is the correct way to limit the size of the log file? If I set the max log file size to, say, 10 gig, what happens when the log reaches 10 gig? Does it delete the oldest records and keep logging new stuff, or does it just choke? 3) What is the correct way to estimate what max size the log file "should" be? 4) I've seen mention of "filtering" development activity out of the log so it doesn't get clogged up with uneeded junk, but so far I see no explanation of how this is accomplished. I've looked at the BOL but either I haven't found the correct topic yet or I'm not "getting" it yet. I also have "SQL Server Fast Answers for DBAs and Developers" by Joseph Sack, but I'm either missing the correct section or not understanding it yet. I think this is a good book, but perhaps assumes a level of experience that I don't quite have yet. As you can tell, I'm relatively inexperienced with SQL Server administration, but I'm learning. I'm going to go tonight and see what other books are available and try to get a good reference work to have handy. Any suggestions on a specific book or two to look for? Thank you, Ron Allen From clopez at AirAuto.COM Thu Mar 3 11:51:53 2005 From: clopez at AirAuto.COM (Carolina Lopez) Date: Thu, 03 Mar 2005 10:51:53 -0700 Subject: [dba-SQLServer] Runaway Log File Questions In-Reply-To: <030320051734.24734.42274AA8000D08D60000609E2197913363969B019607080C@mchsi.com> Message-ID: Hi! Well for starters, SQL Server is a hog and will take whatever you let it. The logs must be truncated on a regular basis, depending on how much data you need and if you need to be able to restore to a point in time. We don't need the logs so whenever we load data we immediately truncate the logs. We back up every night and our data is in loader files that we also keep for disaster recovery. We do to things to keep our logs in check: This is run after a long running query that blows our logs way up. Our logs are set to 100 megs and when we shrink them we use 100MB to specify how far down to shrink them or else they'll go back to the default of growing unlimited. DUMP TRAN tempdb with no_log -- Shrink Log Files DBCC SHRINKFILE(dbName_log, 100) You can also use the dump tran script to empty out a log that is way too big, your best bet would be to start there. Check out BOL under BACKUP and look for the section on transaction logs. Carolina -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of chizotz at mchsi.com Sent: Thursday, March 03, 2005 10:35 AM To: dba-SQLServer at databaseadvisors.com Subject: [dba-SQLServer] Runaway Log File Questions I have several questions that I'm trying to answer, and any assistance is appreciated. I have a SQL Server 2000 database that has a data file of 180 meg and a log file of over 72 gig. The db was set up basically using all of the defaults, and it is aparently logging every transaction. That degree of logging is not really necessary, at least I don't believe it is and almost certainly not at the moment when I'm essentially the only developer/user of the db. So my questions are: 1) What is the correct way to delete that huge log file and start the log over? 2) What is the correct way to limit the size of the log file? If I set the max log file size to, say, 10 gig, what happens when the log reaches 10 gig? Does it delete the oldest records and keep logging new stuff, or does it just choke? 3) What is the correct way to estimate what max size the log file "should" be? 4) I've seen mention of "filtering" development activity out of the log so it doesn't get clogged up with uneeded junk, but so far I see no explanation of how this is accomplished. I've looked at the BOL but either I haven't found the correct topic yet or I'm not "getting" it yet. I also have "SQL Server Fast Answers for DBAs and Developers" by Joseph Sack, but I'm either missing the correct section or not understanding it yet. I think this is a good book, but perhaps assumes a level of experience that I don't quite have yet. As you can tell, I'm relatively inexperienced with SQL Server administration, but I'm learning. I'm going to go tonight and see what other books are available and try to get a good reference work to have handy. Any suggestions on a specific book or two to look for? Thank you, Ron Allen _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From ebarro at afsweb.com Thu Mar 3 11:52:02 2005 From: ebarro at afsweb.com (Eric Barro) Date: Thu, 3 Mar 2005 09:52:02 -0800 Subject: [dba-SQLServer] Runaway Log File Questions In-Reply-To: <030320051734.24734.42274AA8000D08D60000609E2197913363969B019607080C@mchsi.com> Message-ID: Ron, The basic transaction log "dance" you have to do to maintain a small log file are the following. 1. Make sure that the log file setting limits file growth to a manageable level commensurate with your disk capacity. 2. Set up a schedule to backup the log file and then shrink it at certain intervals of the day. For a heavy traffic site you might want to run the schedule every 30 mins or an hour. 3. To get maximum performance ensure that the logs are being written to a separate disk from where the data gets written using a separate disk controller if at all possible. Now to get from the 72G you have to a more manageable level you need to do the following: 1. Create a backup device 2. Backup the database (data and log files) 3. Shrink the database and log file - this operation may have to be performed several times 4. When the log file reaches the limit you want it at, set up steps 1 and 2 above. Alternatively you can detach the database, delete the log file and then reattach it. You will of course lose the ability to restore the data from the log file. Make a backup first before you do so. :) Eric -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of chizotz at mchsi.com Sent: Thursday, March 03, 2005 9:35 AM To: dba-SQLServer at databaseadvisors.com Subject: [dba-SQLServer] Runaway Log File Questions I have several questions that I'm trying to answer, and any assistance is appreciated. I have a SQL Server 2000 database that has a data file of 180 meg and a log file of over 72 gig. The db was set up basically using all of the defaults, and it is aparently logging every transaction. That degree of logging is not really necessary, at least I don't believe it is and almost certainly not at the moment when I'm essentially the only developer/user of the db. So my questions are: 1) What is the correct way to delete that huge log file and start the log over? 2) What is the correct way to limit the size of the log file? If I set the max log file size to, say, 10 gig, what happens when the log reaches 10 gig? Does it delete the oldest records and keep logging new stuff, or does it just choke? 3) What is the correct way to estimate what max size the log file "should" be? 4) I've seen mention of "filtering" development activity out of the log so it doesn't get clogged up with uneeded junk, but so far I see no explanation of how this is accomplished. I've looked at the BOL but either I haven't found the correct topic yet or I'm not "getting" it yet. I also have "SQL Server Fast Answers for DBAs and Developers" by Joseph Sack, but I'm either missing the correct section or not understanding it yet. I think this is a good book, but perhaps assumes a level of experience that I don't quite have yet. As you can tell, I'm relatively inexperienced with SQL Server administration, but I'm learning. I'm going to go tonight and see what other books are available and try to get a good reference work to have handy. Any suggestions on a specific book or two to look for? Thank you, Ron Allen _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com ---------------------------------------------------------------- The information contained in this e-mail message and any file, document, previous e-mail message and/or attachment transmitted herewith is confidential and may be legally privileged. It is intended solely for the private use of the addressee and must not be disclosed to or used by anyone other than the addressee. If you receive this transmission by error, please immediately notify the sender by reply e-mail and destroy the original transmission and its attachments without reading or saving it in any manner. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of any of the information contained in or attached to this transmission is STRICTLY PROHIBITED. E-mail transmission cannot be guaranteed to be secure or error free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of email transmission. Users and employees of the e-mail system are expressly required not to make defamatory statements and not to infringe or authorize any infringement of copyright or any other legal right by email communications. Any such communication is contrary to company policy. The company will not accept any liability in respect of such communication. From chizotz at mchsi.com Thu Mar 3 19:52:43 2005 From: chizotz at mchsi.com (Ron Allen) Date: Thu, 3 Mar 2005 19:52:43 -0600 Subject: [dba-SQLServer] Runaway Log File Questions In-Reply-To: References: <030320051734.24734.42274AA8000D08D60000609E2197913363969B019607080C@mchsi.com> Message-ID: <1919955919.20050303195243@mchsi.com> Hello Carolina, Thanks for the response and the good ideas. I've got the db backing up now, shut it down and doing a straight copy of the folder the files are in. Tomorrow morning I'm going to start putting the suggestions I got here into action. Ron Thursday, March 3, 2005, 11:51:53 AM, you wrote: CL> Hi! CL> Well for starters, SQL Server is a hog and will take whatever you let it. CL> The logs must be truncated on a regular basis, depending on how much data CL> you need and if you need to be able to restore to a point in time. CL> We don't need the logs so whenever we load data we immediately truncate the CL> logs. We back up every night and our data is in loader files that we also CL> keep for disaster recovery. From chizotz at mchsi.com Thu Mar 3 19:53:30 2005 From: chizotz at mchsi.com (Ron Allen) Date: Thu, 3 Mar 2005 19:53:30 -0600 Subject: [dba-SQLServer] Runaway Log File Questions In-Reply-To: References: <030320051734.24734.42274AA8000D08D60000609E2197913363969B019607080C@mchsi.com> Message-ID: <8666382.20050303195330@mchsi.com> Hello Eric, The backup is running now, and I'll be working on this in the morning. Thanks for the answers! Ron Thursday, March 3, 2005, 11:52:02 AM, you wrote: EB> Ron, EB> The basic transaction log "dance" you have to do to maintain EB> a small log file are the following. EB> 1. Make sure that the log file setting limits file growth to EB> a manageable level commensurate with your disk capacity. EB> 2. Set up a schedule to backup the log file and then shrink EB> it at certain intervals of the day. For a heavy traffic site you EB> might want to run the schedule every 30 mins or an hour. EB> 3. To get maximum performance ensure that the logs are being EB> written to a separate disk from where the data gets written using EB> a separate disk controller if at all possible. EB> Now to get from the 72G you have to a more manageable level you need to do the following: EB> 1. Create a backup device EB> 2. Backup the database (data and log files) EB> 3. Shrink the database and log file - this operation may have to be performed several times EB> 4. When the log file reaches the limit you want it at, set up steps 1 and 2 above. EB> Alternatively you can detach the database, delete the log EB> file and then reattach it. You will of course lose the ability to EB> restore the data from the log file. EB> Make a backup first before you do so. :) From JRojas at tnco-inc.com Mon Mar 7 10:20:02 2005 From: JRojas at tnco-inc.com (Joe Rojas) Date: Mon, 7 Mar 2005 11:20:02 -0500 Subject: [dba-SQLServer] Setting permissions in SQL Server 7 Message-ID: <0CC84C9461AE6445AD5A602001C41C4B05A165@mercury.tnco-inc.com> Hello, Is there a way to tell SQL Server 7 that a user has access to all stored procedures without have to open each SP and clicking on the permissions button? Also, it would be nice if a user automatically got the correct permissions to any new SP. Thanks, JR This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. From fhtapia at gmail.com Mon Mar 7 11:23:13 2005 From: fhtapia at gmail.com (Francisco Tapia) Date: Mon, 7 Mar 2005 09:23:13 -0800 Subject: [dba-SQLServer] Setting permissions in SQL Server 7 In-Reply-To: <0CC84C9461AE6445AD5A602001C41C4B05A165@mercury.tnco-inc.com> References: <0CC84C9461AE6445AD5A602001C41C4B05A165@mercury.tnco-inc.com> Message-ID: Joe, I recommend you read the section in BOL (Books on line) re: Roles. This will make it easy for you to add new users with the desired permissions. On Mon, 7 Mar 2005 11:20:02 -0500, Joe Rojas wrote: > Hello, > > Is there a way to tell SQL Server 7 that a user has access to all stored > procedures without have to open each SP and clicking on the permissions > button? > Also, it would be nice if a user automatically got the correct permissions > to any new SP. > > Thanks, > > JR -- -Francisco http://pcthis.blogspot.com | PC news with out the jargon! http://sqlthis.blogspot.com | Tsql and More... From artful at rogers.com Thu Mar 10 14:14:38 2005 From: artful at rogers.com (Arthur Fuller) Date: Thu, 10 Mar 2005 15:14:38 -0500 Subject: [dba-SQLServer] Quick Poll on Logins, Roles and Users In-Reply-To: <39cb22f30502130832460fd5df@mail.gmail.com> References: <39cb22f30502130832460fd5df@mail.gmail.com> Message-ID: <4230AAAE.1090507@rogers.com> I would like to take a quick poll on these questions, to get a feel (albeit insufficient evidence for objectivity) for what my colleagues do: 1. Do you use integrated security, or Windows logins + SQL logins? 2. Do you use roles, or just users? TIA, Arthur > > From mikedorism at adelphia.net Thu Mar 10 14:22:00 2005 From: mikedorism at adelphia.net (Mike & Doris Manning) Date: Thu, 10 Mar 2005 15:22:00 -0500 Subject: [dba-SQLServer] Quick Poll on Logins, Roles and Users In-Reply-To: <4230AAAE.1090507@rogers.com> Message-ID: <000401c525ae$d2de7a20$0b08a845@hargrove.internal> 1. Integrated security. 2. Neither Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Thursday, March 10, 2005 3:15 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Quick Poll on Logins, Roles and Users I would like to take a quick poll on these questions, to get a feel (albeit insufficient evidence for objectivity) for what my colleagues do: 1. Do you use integrated security, or Windows logins + SQL logins? 2. Do you use roles, or just users? TIA, Arthur > > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From accessd at shaw.ca Thu Mar 10 15:49:38 2005 From: accessd at shaw.ca (Jim Lawrence) Date: Thu, 10 Mar 2005 13:49:38 -0800 Subject: [dba-SQLServer] Quick Poll on Logins, Roles and Users In-Reply-To: <4230AAAE.1090507@rogers.com> Message-ID: <0ID50086XOMQLU@l-daemon> Hi Arthur: 1. Integrated security. 2. Neither. Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Thursday, March 10, 2005 12:15 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Quick Poll on Logins, Roles and Users I would like to take a quick poll on these questions, to get a feel (albeit insufficient evidence for objectivity) for what my colleagues do: 1. Do you use integrated security, or Windows logins + SQL logins? 2. Do you use roles, or just users? TIA, Arthur > > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From JRojas at tnco-inc.com Thu Mar 10 17:29:40 2005 From: JRojas at tnco-inc.com (Joe Rojas) Date: Thu, 10 Mar 2005 18:29:40 -0500 Subject: [dba-SQLServer] Quick Poll on Logins, Roles and Users Message-ID: <0CC84C9461AE6445AD5A602001C41C4B05A18A@mercury.tnco-inc.com> You and Jim use neither Roles nor Users? How do you allow access to you data? -----Original Message----- From: Mike & Doris Manning [mailto:mikedorism at adelphia.net] Sent: Thursday, March 10, 2005 3:22 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] Quick Poll on Logins, Roles and Users 1. Integrated security. 2. Neither Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Thursday, March 10, 2005 3:15 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Quick Poll on Logins, Roles and Users I would like to take a quick poll on these questions, to get a feel (albeit insufficient evidence for objectivity) for what my colleagues do: 1. Do you use integrated security, or Windows logins + SQL logins? 2. Do you use roles, or just users? TIA, Arthur > > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. From accessd at shaw.ca Thu Mar 10 18:05:44 2005 From: accessd at shaw.ca (Jim Lawrence) Date: Thu, 10 Mar 2005 16:05:44 -0800 Subject: [dba-SQLServer] Quick Poll on Logins, Roles and Users In-Reply-To: <0CC84C9461AE6445AD5A602001C41C4B05A18A@mercury.tnco-inc.com> Message-ID: <0ID500433UXKM5@l-daemon> Hi Joe: I use user groups through active-directory. Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Joe Rojas Sent: Thursday, March 10, 2005 3:30 PM To: 'dba-sqlserver at databaseadvisors.com' Subject: RE: [dba-SQLServer] Quick Poll on Logins, Roles and Users You and Jim use neither Roles nor Users? How do you allow access to you data? -----Original Message----- From: Mike & Doris Manning [mailto:mikedorism at adelphia.net] Sent: Thursday, March 10, 2005 3:22 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] Quick Poll on Logins, Roles and Users 1. Integrated security. 2. Neither Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Thursday, March 10, 2005 3:15 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Quick Poll on Logins, Roles and Users I would like to take a quick poll on these questions, to get a feel (albeit insufficient evidence for objectivity) for what my colleagues do: 1. Do you use integrated security, or Windows logins + SQL logins? 2. Do you use roles, or just users? TIA, Arthur > > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From michael at ddisolutions.com.au Thu Mar 10 18:37:33 2005 From: michael at ddisolutions.com.au (Michael Maddison) Date: Fri, 11 Mar 2005 11:37:33 +1100 Subject: [dba-SQLServer] Quick Poll on Logins, Roles and Users Message-ID: <59A61174B1F5B54B97FD4ADDE71E7D0107C90A@ddi-01.DDI.local> 1. Prefer integrated. I mostly install in mixed mode, but rarely use SA. Only if client won't give me admin on the server, which is rare. 2. Roles, always. cheers Michael M I would like to take a quick poll on these questions, to get a feel (albeit insufficient evidence for objectivity) for what my colleagues do: 1. Do you use integrated security, or Windows logins + SQL logins? 2. Do you use roles, or just users? TIA, Arthur > > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From fhtapia at gmail.com Thu Mar 10 21:13:50 2005 From: fhtapia at gmail.com (Francisco Tapia) Date: Thu, 10 Mar 2005 19:13:50 -0800 Subject: [dba-SQLServer] Quick Poll on Logins, Roles and Users In-Reply-To: <4230AAAE.1090507@rogers.com> References: <39cb22f30502130832460fd5df@mail.gmail.com> <4230AAAE.1090507@rogers.com> Message-ID: 1) customized SQL logins What I use is a generic account that double authenticates the user and password. what this in turn does is, it creates a random uid and pwd that are passed to the client to use for a one life connection, as soon as the user disconnects, SQL kills the user and it is as if he never existed... Internally I am using something I call "Virtual Users". I generated this because it minimizes generic UIDs that people want such as ftapia, which is easy to guess, or something like jsmith. of course there is always the SA account, but we can always lock that down with extra strong pwds. This also leverages the ability to login reguardless of OS. 2) roles. Active Directory is a great tool, and using windows authentication I see the power of using this setup when you have a diligent DBA and sysAdmin, in my work environment, this is not the case, so I control it via roles. On Thu, 10 Mar 2005 15:14:38 -0500, Arthur Fuller wrote: > I would like to take a quick poll on these questions, to get a feel > (albeit insufficient evidence for objectivity) for what my colleagues do: > > 1. Do you use integrated security, or Windows logins + SQL logins? > 2. Do you use roles, or just users? > > TIA, > Arthur > > > > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > -- -Francisco http://pcthis.blogspot.com | PC news with out the jargon! http://sqlthis.blogspot.com | Tsql and More... From tuxedo_man at hotmail.com Fri Mar 11 00:22:42 2005 From: tuxedo_man at hotmail.com (Billy Pang) Date: Fri, 11 Mar 2005 06:22:42 +0000 Subject: [dba-SQLServer] Quick Poll on Logins, Roles and Users In-Reply-To: <4230AAAE.1090507@rogers.com> Message-ID: 1. Both windows logins and sql logins 2. Both roles and users >From: Arthur Fuller >Reply-To: dba-sqlserver at databaseadvisors.com >To: dba-sqlserver at databaseadvisors.com >Subject: [dba-SQLServer] Quick Poll on Logins, Roles and Users >Date: Thu, 10 Mar 2005 15:14:38 -0500 > >I would like to take a quick poll on these questions, to get a feel (albeit >insufficient evidence for objectivity) for what my colleagues do: > >1. Do you use integrated security, or Windows logins + SQL logins? >2. Do you use roles, or just users? > >TIA, >Arthur > >> >> >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > From erbachs at gmail.com Fri Mar 11 07:51:53 2005 From: erbachs at gmail.com (Steve Erbach) Date: Fri, 11 Mar 2005 07:51:53 -0600 Subject: [dba-SQLServer] Update query through Access ADP Message-ID: <39cb22f3050311055164bdfd7b@mail.gmail.com> Dear Group, I've been looking through some of a client's ASP application with a view to making some slight modifications. (There are almost 800 ASP files. Yikes!) The back end is SQL Server and I've been using Access 2003 to construct views and stored procedures. I've been working on a COPY of the tables on my own SQL Server rather than the customer's live data. What's got me curious is this: I've been working with an sproc that updates a column containing an email address. It looks something like this: UPDATE Projects2 SET ContactEmail = NULL WHERE (Contact = '') OR (Contact = ' ') OR (Contact IS NULL) So if the Contact name doesn't have anything in it, I want the Contact's email address to be NULL. At present, there's a default e-mail address in every row. After the sproc runs I look at the table itself. Well, this table has 133,000 records in it. Access 2003 shows me the first 10,000 by default. But when I go past the 10,000th record, the e-mail column still has addresses in it even though the Contact field is empty. Is there something I'm missing in the sproc? Something like a command that says, "OK, I really, REALLY want to update the rows beyond 10,000, too." Regards, Steve Erbach Scientific Marketing Neenah, WI www.swerbach.com Security Page: www.swerbach.com/security From erbachs at gmail.com Fri Mar 11 07:58:13 2005 From: erbachs at gmail.com (Steve Erbach) Date: Fri, 11 Mar 2005 07:58:13 -0600 Subject: [dba-SQLServer] Re: Update query through Access ADP In-Reply-To: <39cb22f3050311055164bdfd7b@mail.gmail.com> References: <39cb22f3050311055164bdfd7b@mail.gmail.com> Message-ID: <39cb22f305031105586aaf151c@mail.gmail.com> Dear Group, I went ahead and used Query Analyzer to do the job for me. I'm just curious what it is about my Access ADP that stopped the UPDATE after only 10,000 rows? Steve Erbach On Fri, 11 Mar 2005 07:51:53 -0600, Steve Erbach wrote: > Dear Group, > > I've been looking through some of a client's ASP application with a > view to making some slight modifications. (There are almost 800 ASP > files. Yikes!) > > The back end is SQL Server and I've been using Access 2003 to > construct views and stored procedures. I've been working on a COPY of > the tables on my own SQL Server rather than the customer's live data. > > What's got me curious is this: I've been working with an sproc that > updates a column containing an email address. It looks something like > this: > > UPDATE Projects2 > SET ContactEmail = NULL > WHERE (Contact = '') OR (Contact = ' ') OR (Contact IS NULL) > > So if the Contact name doesn't have anything in it, I want the > Contact's email address to be NULL. At present, there's a default > e-mail address in every row. > > After the sproc runs I look at the table itself. Well, this table has > 133,000 records in it. Access 2003 shows me the first 10,000 by > default. But when I go past the 10,000th record, the e-mail column > still has addresses in it even though the Contact field is empty. > > Is there something I'm missing in the sproc? Something like a command > that says, "OK, I really, REALLY want to update the rows beyond > 10,000, too." > > Regards, > > Steve Erbach > Scientific Marketing > Neenah, WI > www.swerbach.com > Security Page: www.swerbach.com/security > -- Regards, Steve Erbach Scientific Marketing Neenah, WI www.swerbach.com Security Page: www.swerbach.com/security From rl_stewart at highstream.net Fri Mar 11 08:06:33 2005 From: rl_stewart at highstream.net (Robert L. Stewart) Date: Fri, 11 Mar 2005 08:06:33 -0600 Subject: [dba-SQLServer] Re: Update query through Access ADP In-Reply-To: <200503111358.j2BDwRi17450@databaseadvisors.com> Message-ID: <5.1.0.14.2.20050311080455.0356d918@pop3.highstream.net> Steve, There is a property of the query where you can set the number of rows it returns. The default is 10,000. You just need to change it to 1,000,000 so that you will always get all of them. Robert At 07:58 AM 3/11/2005 -0600, you wrote: >Date: Fri, 11 Mar 2005 07:51:53 -0600 >From: Steve Erbach >Subject: [dba-SQLServer] Update query through Access ADP >To: dba-sqlserver at databaseadvisors.com >Message-ID: <39cb22f3050311055164bdfd7b at mail.gmail.com> >Content-Type: text/plain; charset=US-ASCII > >Dear Group, > >I've been looking through some of a client's ASP application with a >view to making some slight modifications. (There are almost 800 ASP >files. Yikes!) > >The back end is SQL Server and I've been using Access 2003 to >construct views and stored procedures. I've been working on a COPY of >the tables on my own SQL Server rather than the customer's live data. > >What's got me curious is this: I've been working with an sproc that >updates a column containing an email address. It looks something like >this: > >UPDATE Projects2 >SET ContactEmail = NULL >WHERE (Contact = '') OR (Contact = ' ') OR (Contact IS NULL) > >So if the Contact name doesn't have anything in it, I want the >Contact's email address to be NULL. At present, there's a default >e-mail address in every row. > >After the sproc runs I look at the table itself. Well, this table has >133,000 records in it. Access 2003 shows me the first 10,000 by >default. But when I go past the 10,000th record, the e-mail column >still has addresses in it even though the Contact field is empty. > >Is there something I'm missing in the sproc? Something like a command >that says, "OK, I really, REALLY want to update the rows beyond >10,000, too." > >Regards, > >Steve Erbach From mikedorism at adelphia.net Fri Mar 11 08:54:35 2005 From: mikedorism at adelphia.net (Mike & Doris Manning) Date: Fri, 11 Mar 2005 09:54:35 -0500 Subject: [dba-SQLServer] Quick Poll on Logins, Roles and Users In-Reply-To: <0CC84C9461AE6445AD5A602001C41C4B05A18A@mercury.tnco-inc.com> Message-ID: <000101c5264a$3fcb2340$0b08a845@hargrove.internal> My user groups are still developing and identifying themselves because my application is a mixed bag -- some parts are still in the design phase, some parts are under construction, and other parts just need routine maintenance. For right now, I still handle all the roles and permissions within the FE. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Joe Rojas Sent: Thursday, March 10, 2005 6:30 PM To: 'dba-sqlserver at databaseadvisors.com' Subject: RE: [dba-SQLServer] Quick Poll on Logins, Roles and Users You and Jim use neither Roles nor Users? How do you allow access to you data? -----Original Message----- From: Mike & Doris Manning [mailto:mikedorism at adelphia.net] Sent: Thursday, March 10, 2005 3:22 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] Quick Poll on Logins, Roles and Users 1. Integrated security. 2. Neither Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Thursday, March 10, 2005 3:15 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Quick Poll on Logins, Roles and Users I would like to take a quick poll on these questions, to get a feel (albeit insufficient evidence for objectivity) for what my colleagues do: 1. Do you use integrated security, or Windows logins + SQL logins? 2. Do you use roles, or just users? TIA, Arthur > > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From erbachs at gmail.com Fri Mar 11 09:10:09 2005 From: erbachs at gmail.com (Steve Erbach) Date: Fri, 11 Mar 2005 09:10:09 -0600 Subject: [dba-SQLServer] Re: Update query through Access ADP In-Reply-To: <5.1.0.14.2.20050311080455.0356d918@pop3.highstream.net> References: <200503111358.j2BDwRi17450@databaseadvisors.com> <5.1.0.14.2.20050311080455.0356d918@pop3.highstream.net> Message-ID: <39cb22f3050311071028a924a0@mail.gmail.com> Robert, I now see two separate places where that sort of thing can be done: 1) Under Tools | Options | Advanced | Client-server settings, I can change the 'Default max records' to some huge number, like a billion. 2) In the query's properties under View | Top, I can enter the percentage of rows to return. It's set at 10% as a default. Thank you. I should have looked further before posting the question. Steve Erbach P.S. Has anyone offered you Gmail address yet? If not, let me be the first. I have a bunch of "invitations" to hand out, if you'd care for one. I've been very happy with it overall. On Fri, 11 Mar 2005 08:06:33 -0600, Robert L. Stewart wrote: > Steve, > > There is a property of the query where you can set the number of rows it > returns. The default is 10,000. You just need to change it to 1,000,000 > so that you will always get all of them. > > Robert From artful at rogers.com Fri Mar 11 11:35:17 2005 From: artful at rogers.com (Arthur Fuller) Date: Fri, 11 Mar 2005 12:35:17 -0500 Subject: [dba-SQLServer] Quick Poll on Logins, Roles and Users In-Reply-To: <0ID500433UXKM5@l-daemon> References: <0ID500433UXKM5@l-daemon> Message-ID: <4231D6D5.8010202@rogers.com> Does this mean that you assign permissions to various dbs and db objects by referencing the groups? If so, please explain how to do this. Arthur Jim Lawrence wrote: >Hi Joe: > >I use user groups through active-directory. > >Jim > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Joe Rojas >Sent: Thursday, March 10, 2005 3:30 PM >To: 'dba-sqlserver at databaseadvisors.com' >Subject: RE: [dba-SQLServer] Quick Poll on Logins, Roles and Users > >You and Jim use neither Roles nor Users? >How do you allow access to you data? > > >-----Original Message----- >From: Mike & Doris Manning [mailto:mikedorism at adelphia.net] >Sent: Thursday, March 10, 2005 3:22 PM >To: dba-sqlserver at databaseadvisors.com >Subject: RE: [dba-SQLServer] Quick Poll on Logins, Roles and Users > >1. Integrated security. >2. Neither > >Doris Manning >Database Administrator >Hargrove Inc. >www.hargroveinc.com > > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur >Fuller >Sent: Thursday, March 10, 2005 3:15 PM >To: dba-sqlserver at databaseadvisors.com >Subject: [dba-SQLServer] Quick Poll on Logins, Roles and Users > > >I would like to take a quick poll on these questions, to get a feel >(albeit insufficient evidence for objectivity) for what my colleagues do: > >1. Do you use integrated security, or Windows logins + SQL logins? 2. Do you >use roles, or just users? > >TIA, >Arthur > > > >> >> >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > > >This electronic transmission is strictly confidential to TNCO, Inc. and >intended solely for the addressee. It may contain information which is >covered by legal, professional, or other privileges. If you are not the >intended addressee, or someone authorized by the intended addressee to >receive transmissions on behalf of the addressee, you must not retain, >disclose in any form, copy, or take any action in reliance on this >transmission. If you have received this transmission in error, please notify >the sender as soon as possible and destroy this message. While TNCO, Inc. >uses virus protection, the recipient should check this email and any >attachments for the presence of viruses. TNCO, Inc. accepts no liability for >any damage caused by any virus transmitted by this email. >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > > > > From dmcafee at pacbell.net Fri Mar 11 12:14:27 2005 From: dmcafee at pacbell.net (dmcafee at pacbell.net) Date: Fri, 11 Mar 2005 10:14:27 -0800 Subject: [dba-SQLServer] Update query through Access ADP In-Reply-To: <39cb22f3050311055164bdfd7b@mail.gmail.com> Message-ID: Steven since you have the answer to your question, I'd like to chime in to let you know that you can also do something like this: UPDATE Projects2 SET ContactEmail = NULL WHERE LEN(Contact) = 0 D -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Steve Erbach Sent: Friday, March 11, 2005 5:52 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Update query through Access ADP Dear Group, I've been looking through some of a client's ASP application with a view to making some slight modifications. (There are almost 800 ASP files. Yikes!) The back end is SQL Server and I've been using Access 2003 to construct views and stored procedures. I've been working on a COPY of the tables on my own SQL Server rather than the customer's live data. What's got me curious is this: I've been working with an sproc that updates a column containing an email address. It looks something like this: UPDATE Projects2 SET ContactEmail = NULL WHERE (Contact = '') OR (Contact = ' ') OR (Contact IS NULL) So if the Contact name doesn't have anything in it, I want the Contact's email address to be NULL. At present, there's a default e-mail address in every row. After the sproc runs I look at the table itself. Well, this table has 133,000 records in it. Access 2003 shows me the first 10,000 by default. But when I go past the 10,000th record, the e-mail column still has addresses in it even though the Contact field is empty. Is there something I'm missing in the sproc? Something like a command that says, "OK, I really, REALLY want to update the rows beyond 10,000, too." Regards, Steve Erbach Scientific Marketing Neenah, WI www.swerbach.com Security Page: www.swerbach.com/security _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From fhtapia at gmail.com Fri Mar 11 13:05:34 2005 From: fhtapia at gmail.com (Francisco Tapia) Date: Fri, 11 Mar 2005 11:05:34 -0800 Subject: [dba-SQLServer] Re: Update query through Access ADP In-Reply-To: <5.1.0.14.2.20050311080455.0356d918@pop3.highstream.net> References: <200503111358.j2BDwRi17450@databaseadvisors.com> <5.1.0.14.2.20050311080455.0356d918@pop3.highstream.net> Message-ID: IIRC you can set it to 0 for all records On Fri, 11 Mar 2005 08:06:33 -0600, Robert L. Stewart wrote: > Steve, > > There is a property of the query where you can set the number of rows it > returns. The default is 10,000. You just need to change it to 1,000,000 > so that you will always get all of them. > > Robert > > At 07:58 AM 3/11/2005 -0600, you wrote: > >Date: Fri, 11 Mar 2005 07:51:53 -0600 > >From: Steve Erbach > >Subject: [dba-SQLServer] Update query through Access ADP > >To: dba-sqlserver at databaseadvisors.com > >Message-ID: <39cb22f3050311055164bdfd7b at mail.gmail.com> > >Content-Type: text/plain; charset=US-ASCII > > > >Dear Group, > > > >I've been looking through some of a client's ASP application with a > >view to making some slight modifications. (There are almost 800 ASP > >files. Yikes!) > > > >The back end is SQL Server and I've been using Access 2003 to > >construct views and stored procedures. I've been working on a COPY of > >the tables on my own SQL Server rather than the customer's live data. > > > >What's got me curious is this: I've been working with an sproc that > >updates a column containing an email address. It looks something like > >this: > > > >UPDATE Projects2 > >SET ContactEmail = NULL > >WHERE (Contact = '') OR (Contact = ' ') OR (Contact IS NULL) > > > >So if the Contact name doesn't have anything in it, I want the > >Contact's email address to be NULL. At present, there's a default > >e-mail address in every row. > > > >After the sproc runs I look at the table itself. Well, this table has > >133,000 records in it. Access 2003 shows me the first 10,000 by > >default. But when I go past the 10,000th record, the e-mail column > >still has addresses in it even though the Contact field is empty. > > > >Is there something I'm missing in the sproc? Something like a command > >that says, "OK, I really, REALLY want to update the rows beyond > >10,000, too." > > > >Regards, > > > >Steve Erbach > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > -- -Francisco http://pcthis.blogspot.com | PC news with out the jargon! http://sqlthis.blogspot.com | Tsql and More... From artful at rogers.com Fri Mar 11 13:15:47 2005 From: artful at rogers.com (Arthur Fuller) Date: Fri, 11 Mar 2005 14:15:47 -0500 Subject: [dba-SQLServer] Change db Owner In-Reply-To: <4231D6D5.8010202@rogers.com> References: <0ID500433UXKM5@l-daemon> <4231D6D5.8010202@rogers.com> Message-ID: <4231EE63.1010002@rogers.com> Is there a simple slick way to do this? I have browsed and searched BOL and done various other things, finally resorting to these steps (which work): 1. create a new db owned by the desired new owner 2. create a DTS package that exports the data from old_db to new_db 3. run it This sucks. I want something as simple as sp_changeobjectowner, which allows you to change the owner of a database object, but not the db itself. Arthur > From artful at rogers.com Fri Mar 11 13:18:07 2005 From: artful at rogers.com (Arthur Fuller) Date: Fri, 11 Mar 2005 14:18:07 -0500 Subject: [dba-SQLServer] Setting permissions in SQL Server 7 In-Reply-To: References: <0CC84C9461AE6445AD5A602001C41C4B05A165@mercury.tnco-inc.com> Message-ID: <4231EEEF.3090103@rogers.com> Re: my previous question and this subsequent one... LOL. Francisco Tapia wrote: >Joe, > I recommend you read the section in BOL (Books on line) re: Roles. >This will make it easy for you to add new users with the desired >permissions. > > > > > >On Mon, 7 Mar 2005 11:20:02 -0500, Joe Rojas wrote: > > >>Hello, >> >>Is there a way to tell SQL Server 7 that a user has access to all stored >>procedures without have to open each SP and clicking on the permissions >>button? >>Also, it would be nice if a user automatically got the correct permissions >>to any new SP. >> >>Thanks, >> >>JR >> >> From dmcafee at pacbell.net Fri Mar 11 13:21:57 2005 From: dmcafee at pacbell.net (dmcafee at pacbell.net) Date: Fri, 11 Mar 2005 11:21:57 -0800 Subject: [dba-SQLServer] Update query through Access ADP In-Reply-To: Message-ID: WHERE LEN(Contact) = 0 would return a null when Contact is null, not a zero. the following below will take care of nulls, '', ' ', ' ' and variations of spaces UPDATE Projects2 SET ContactEmail = NULL WHERE ISNULL(LTRIM(RTRIM(@X)),'') = '' -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of dmcafee at pacbell.net Sent: Friday, March 11, 2005 10:14 AM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] Update query through Access ADP Steven since you have the answer to your question, I'd like to chime in to let you know that you can also do something like this: UPDATE Projects2 SET ContactEmail = NULL WHERE LEN(Contact) = 0 D -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Steve Erbach Sent: Friday, March 11, 2005 5:52 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Update query through Access ADP Dear Group, I've been looking through some of a client's ASP application with a view to making some slight modifications. (There are almost 800 ASP files. Yikes!) The back end is SQL Server and I've been using Access 2003 to construct views and stored procedures. I've been working on a COPY of the tables on my own SQL Server rather than the customer's live data. What's got me curious is this: I've been working with an sproc that updates a column containing an email address. It looks something like this: UPDATE Projects2 SET ContactEmail = NULL WHERE (Contact = '') OR (Contact = ' ') OR (Contact IS NULL) So if the Contact name doesn't have anything in it, I want the Contact's email address to be NULL. At present, there's a default e-mail address in every row. After the sproc runs I look at the table itself. Well, this table has 133,000 records in it. Access 2003 shows me the first 10,000 by default. But when I go past the 10,000th record, the e-mail column still has addresses in it even though the Contact field is empty. Is there something I'm missing in the sproc? Something like a command that says, "OK, I really, REALLY want to update the rows beyond 10,000, too." Regards, Steve Erbach Scientific Marketing Neenah, WI www.swerbach.com Security Page: www.swerbach.com/security _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From artful at rogers.com Fri Mar 11 23:46:32 2005 From: artful at rogers.com (Arthur Fuller) Date: Sat, 12 Mar 2005 00:46:32 -0500 Subject: [dba-SQLServer] Was... Update query through Access ADP... extended now In-Reply-To: References: Message-ID: <42328238.3040001@rogers.com> Time to get on my high horse.... I, Arthur, son of Uther Pendragon, defeater of the Saxons, lord over Allllll Briton, do declare... Let us never mistake nulls for zeroes. This is a BAD idea. JFC's zeroth row argument notwithstanding, in fact I have banished him from the roundtable for his insistence on this foolish opinion. Null is null. It is NOT zero. These two values should never be confused, nor should they be conflated by making the default value of a column zero. This is BAD design. Nulls mean "I don't know." Zeroes mean (as in how many children do you have?) zero. Big difference! Plugging zeroes into nulls is BAD BAD BAD. SPANK! Don't do it again or I shall have to send you to a correctional school run by deviant priests. Don't do it! Don't ever do it. Don't believe JC's zero'th row argument, he is deluded and has simply found a comfortable workaround his inability to comprehend joins. That's all there is to it. Nulls are nulls. Zeroes are zeroes. Arthur dmcafee at pacbell.net wrote: > > >WHERE LEN(Contact) = 0 > >would return a null when Contact is null, not a zero. > >the following below will take care of nulls, '', ' ', ' ' and variations >of spaces > > >UPDATE Projects2 >SET ContactEmail = NULL >WHERE ISNULL(LTRIM(RTRIM(@X)),'') = '' > > > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of >dmcafee at pacbell.net >Sent: Friday, March 11, 2005 10:14 AM >To: dba-sqlserver at databaseadvisors.com >Subject: RE: [dba-SQLServer] Update query through Access ADP > > >Steven since you have the answer to your question, I'd like to chime in to >let you know that you can also do something like this: > >UPDATE Projects2 >SET ContactEmail = NULL >WHERE LEN(Contact) = 0 > >D > > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Steve >Erbach >Sent: Friday, March 11, 2005 5:52 AM >To: dba-sqlserver at databaseadvisors.com >Subject: [dba-SQLServer] Update query through Access ADP > > >Dear Group, > >I've been looking through some of a client's ASP application with a >view to making some slight modifications. (There are almost 800 ASP >files. Yikes!) > >The back end is SQL Server and I've been using Access 2003 to >construct views and stored procedures. I've been working on a COPY of >the tables on my own SQL Server rather than the customer's live data. > >What's got me curious is this: I've been working with an sproc that >updates a column containing an email address. It looks something like >this: > >UPDATE Projects2 >SET ContactEmail = NULL >WHERE (Contact = '') OR (Contact = ' ') OR (Contact IS NULL) > >So if the Contact name doesn't have anything in it, I want the >Contact's email address to be NULL. At present, there's a default >e-mail address in every row. > >After the sproc runs I look at the table itself. Well, this table has >133,000 records in it. Access 2003 shows me the first 10,000 by >default. But when I go past the 10,000th record, the e-mail column >still has addresses in it even though the Contact field is empty. > >Is there something I'm missing in the sproc? Something like a command >that says, "OK, I really, REALLY want to update the rows beyond >10,000, too." > >Regards, > >Steve Erbach >Scientific Marketing >Neenah, WI >www.swerbach.com >Security Page: www.swerbach.com/security >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > > > > From dmcafee at pacbell.net Sat Mar 12 00:33:41 2005 From: dmcafee at pacbell.net (dmcafee at pacbell.net) Date: Fri, 11 Mar 2005 22:33:41 -0800 Subject: [dba-SQLServer] Was... Update query through Access ADP... extendednow In-Reply-To: <42328238.3040001@rogers.com> Message-ID: ouch, my wrist still stings from the slap :( -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Arthur Fuller Sent: Friday, March 11, 2005 9:47 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Was... Update query through Access ADP... extendednow Time to get on my high horse.... I, Arthur, son of Uther Pendragon, defeater of the Saxons, lord over Allllll Briton, do declare... Let us never mistake nulls for zeroes. This is a BAD idea. JFC's zeroth row argument notwithstanding, in fact I have banished him from the roundtable for his insistence on this foolish opinion. Null is null. It is NOT zero. These two values should never be confused, nor should they be conflated by making the default value of a column zero. This is BAD design. Nulls mean "I don't know." Zeroes mean (as in how many children do you have?) zero. Big difference! Plugging zeroes into nulls is BAD BAD BAD. SPANK! Don't do it again or I shall have to send you to a correctional school run by deviant priests. Don't do it! Don't ever do it. Don't believe JC's zero'th row argument, he is deluded and has simply found a comfortable workaround his inability to comprehend joins. That's all there is to it. Nulls are nulls. Zeroes are zeroes. Arthur dmcafee at pacbell.net wrote: > > >WHERE LEN(Contact) = 0 > >would return a null when Contact is null, not a zero. > >the following below will take care of nulls, '', ' ', ' ' and variations >of spaces > > >UPDATE Projects2 >SET ContactEmail = NULL >WHERE ISNULL(LTRIM(RTRIM(@X)),'') = '' > > > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of >dmcafee at pacbell.net >Sent: Friday, March 11, 2005 10:14 AM >To: dba-sqlserver at databaseadvisors.com >Subject: RE: [dba-SQLServer] Update query through Access ADP > > >Steven since you have the answer to your question, I'd like to chime in to >let you know that you can also do something like this: > >UPDATE Projects2 >SET ContactEmail = NULL >WHERE LEN(Contact) = 0 > >D > > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Steve >Erbach >Sent: Friday, March 11, 2005 5:52 AM >To: dba-sqlserver at databaseadvisors.com >Subject: [dba-SQLServer] Update query through Access ADP > > >Dear Group, > >I've been looking through some of a client's ASP application with a >view to making some slight modifications. (There are almost 800 ASP >files. Yikes!) > >The back end is SQL Server and I've been using Access 2003 to >construct views and stored procedures. I've been working on a COPY of >the tables on my own SQL Server rather than the customer's live data. > >What's got me curious is this: I've been working with an sproc that >updates a column containing an email address. It looks something like >this: > >UPDATE Projects2 >SET ContactEmail = NULL >WHERE (Contact = '') OR (Contact = ' ') OR (Contact IS NULL) > >So if the Contact name doesn't have anything in it, I want the >Contact's email address to be NULL. At present, there's a default >e-mail address in every row. > >After the sproc runs I look at the table itself. Well, this table has >133,000 records in it. Access 2003 shows me the first 10,000 by >default. But when I go past the 10,000th record, the e-mail column >still has addresses in it even though the Contact field is empty. > >Is there something I'm missing in the sproc? Something like a command >that says, "OK, I really, REALLY want to update the rows beyond >10,000, too." > >Regards, > >Steve Erbach >Scientific Marketing >Neenah, WI >www.swerbach.com >Security Page: www.swerbach.com/security >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > > > > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Sat Mar 12 12:36:29 2005 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Sat, 12 Mar 2005 13:36:29 -0500 Subject: [dba-SQLServer] Was... Update query through Access ADP... extendednow In-Reply-To: <42328238.3040001@rogers.com> Message-ID: <003401c52732$6c2db4f0$697aa8c0@ColbyM6805> LOL. ARTHUR! I have simply started my own round table to deal with those who cling to simplistic ideas at the expense of reality. Null = "I don't know" "I don't know" = "I don't know" "I don't know" = NULL I am NOT, nor have I ever espoused using a ZERO (or any other VALUE) for a null. I AM and I espouse using a record that specifically says "I don't know". I do so for a very specific reason, as a workaround to a common problem; We are trying to select a value from a combo to fill in a field. Suppose that you have a person who has a valid address. They live in California. You select California as their state. Suppose you discover that person no longer lives at that address but you DON'T KNOW where she lives? What do you do? You have four choices: 1) Delete the person from your database 2) Ignore the fact that the person does not live at the old address and just leave the old address in there. 3) Create a "I don't know" answer in the state table. 4) Add code to every such combo, use a UNION to get an "I don't know" in the combo, then add code to delete out the existing value in the field when that "I don't know" is selected. Can you say Mickey Mouse? Choice three exactly and completely correlates to, corresponds to, replaces a null value. Null means "I don't know". My "zeroth record" means "I don't know". Now one of our esteemed colleagues made some silly claim several years ago that null could mean many different things, such as "I never got the information" or "I had to delete the information" or ... Hmmm it was so silly I didn't follow the logic any further. In any event, once stored in a table, a null means nothing more than "I don't know". So, Arthur of the Foolish Clan, I simply place a record in my database that explicitly means "I don't know". That RECORD replaces the null value. If you need to explicitly denote "I don't know" when asked what color eyes, what state, what model car, what ... (insert your favorite question / lookup table here) simply select the "I don't know" answer from the required table. Where your confusion comes from is the fact that I insert this record as the "zeroth" value in the PK field. I am NOT equating a zero to NULL, I am creating an "I don't know" record at PKID value zero! I do that as a convenience. Access (and SQL Server IIRC) start their identity value with 1 and work up if it is a linear ID. That leaves a "hole" at the zero value where I can insert a record. I literally append a record into the table with a ZERO for the PK (I always use an autonumber as the PK) and fill in "I don't know" for the value (if the value displayed is a piece of text). If having a null is so danged important to you, then insert a null in the value. I find that having the text "I don't know" tells the user that this is the "I don't know" record but you are the master of your databases. Nulls stored in PK values can work to your advantage, or be a royal PITA. Nulls cause inner joins on that field to fail to pull a record. If you want to pull a value you now have to (remember to) use an outer join. That's fine if you KNOW that there will be nulls but it is just a PITA to me. I have to assume that you use outer joins everywhere since any column may have nulls in them? At any rate, you can see that I do NOT equate a zero to a null. I know perfectly well that a null is not a zero, zeros have a specific meaning and NULLS have a specific meaning. And I understand joins perfectly well thank you. I am NOT going to apply for membership back in to your round table! I have my OWN round table thank you. ;-) John W. Colby www.ColbyConsulting.com Contribute your unused CPU cycles to a good cause: http://folding.stanford.edu/ -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, March 12, 2005 12:47 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Was... Update query through Access ADP... extendednow Time to get on my high horse.... I, Arthur, son of Uther Pendragon, defeater of the Saxons, lord over Allllll Briton, do declare... Let us never mistake nulls for zeroes. This is a BAD idea. JFC's zeroth row argument notwithstanding, in fact I have banished him from the roundtable for his insistence on this foolish opinion. Null is null. It is NOT zero. These two values should never be confused, nor should they be conflated by making the default value of a column zero. This is BAD design. Nulls mean "I don't know." Zeroes mean (as in how many children do you have?) zero. Big difference! Plugging zeroes into nulls is BAD BAD BAD. SPANK! Don't do it again or I shall have to send you to a correctional school run by deviant priests. Don't do it! Don't ever do it. Don't believe JC's zero'th row argument, he is deluded and has simply found a comfortable workaround his inability to comprehend joins. That's all there is to it. Nulls are nulls. Zeroes are zeroes. Arthur dmcafee at pacbell.net wrote: > > >WHERE LEN(Contact) = 0 > >would return a null when Contact is null, not a zero. > >the following below will take care of nulls, '', ' ', ' ' and variations >of spaces > > >UPDATE Projects2 >SET ContactEmail = NULL >WHERE ISNULL(LTRIM(RTRIM(@X)),'') = '' > > > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of >dmcafee at pacbell.net >Sent: Friday, March 11, 2005 10:14 AM >To: dba-sqlserver at databaseadvisors.com >Subject: RE: [dba-SQLServer] Update query through Access ADP > > >Steven since you have the answer to your question, I'd like to chime in >to let you know that you can also do something like this: > >UPDATE Projects2 >SET ContactEmail = NULL >WHERE LEN(Contact) = 0 > >D > > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Steve >Erbach >Sent: Friday, March 11, 2005 5:52 AM >To: dba-sqlserver at databaseadvisors.com >Subject: [dba-SQLServer] Update query through Access ADP > > >Dear Group, > >I've been looking through some of a client's ASP application with a >view to making some slight modifications. (There are almost 800 ASP >files. Yikes!) > >The back end is SQL Server and I've been using Access 2003 to construct >views and stored procedures. I've been working on a COPY of the tables >on my own SQL Server rather than the customer's live data. > >What's got me curious is this: I've been working with an sproc that >updates a column containing an email address. It looks something like >this: > >UPDATE Projects2 >SET ContactEmail = NULL >WHERE (Contact = '') OR (Contact = ' ') OR (Contact IS NULL) > >So if the Contact name doesn't have anything in it, I want the >Contact's email address to be NULL. At present, there's a default >e-mail address in every row. > >After the sproc runs I look at the table itself. Well, this table has >133,000 records in it. Access 2003 shows me the first 10,000 by >default. But when I go past the 10,000th record, the e-mail column >still has addresses in it even though the Contact field is empty. > >Is there something I'm missing in the sproc? Something like a command >that says, "OK, I really, REALLY want to update the rows beyond 10,000, >too." > >Regards, > >Steve Erbach >Scientific Marketing >Neenah, WI >www.swerbach.com >Security Page: www.swerbach.com/security >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > > > > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From andrew.haslett at ilc.gov.au Sun Mar 13 17:56:43 2005 From: andrew.haslett at ilc.gov.au (Haslett, Andrew) Date: Mon, 14 Mar 2005 10:26:43 +1030 Subject: [dba-SQLServer] Change db Owner Message-ID: <0A870603A2A816459078203FC07F4CD2013ABB@adl01s055.ilcorp.gov.au> Would you like us to kick you, or would you like to do it yourself? ;=) How about: sp_changedbowner Cheers, A ________________________________ From: dba-sqlserver-bounces at databaseadvisors.com on behalf of Arthur Fuller Sent: Sat 12/03/2005 5:45 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Change db Owner Is there a simple slick way to do this? I have browsed and searched BOL and done various other things, finally resorting to these steps (which work): 1. create a new db owned by the desired new owner 2. create a DTS package that exports the data from old_db to new_db 3. run it This sucks. I want something as simple as sp_changeobjectowner, which allows you to change the owner of a database object, but not the db itself. Arthur > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From Jeff at outbaktech.com Wed Mar 16 07:01:29 2005 From: Jeff at outbaktech.com (Jeff Barrows) Date: Wed, 16 Mar 2005 07:01:29 -0600 Subject: [dba-SQLServer] Log P.I. Message-ID: Has anyone heard of / tried Log P.I.? I am thinking that it might be useful at a couple of client sites. http://www.logpi.com/ Jeff Barrows MCP, MCAD, MCSD Outbak Technologies, LLC Racine, WI jeff at outbaktech.com From HARVEYF1 at WESTAT.com Thu Mar 24 15:29:10 2005 From: HARVEYF1 at WESTAT.com (Francis Harvey) Date: Thu, 24 Mar 2005 16:29:10 -0500 Subject: [dba-SQLServer] Was... Update query through Access ADP...extendednow Message-ID: <446DDE75CFC7E1438061462F85557B0F099216F0@remail2.westat.com> John, I question both the esteemed and silly part of your assertions. Fortunately, I don't require your esteem, and I didn't even have to start my own round table as there were already plenty of members of an existing order whose needs extend far beyond John's simple requirements. Stating the matter differently, and more accurately I am afraid than John's summary, null often needs to mean more than I don't know. Extending John's state example, what if it makes a difference knowing whether the state is simply unknown at this point in time or whether it was never known. This could be quite important to know when making decisions like the selection of individuals to receive a survey from a million person mailing list. Given the great expense, you might rule out somebody who never provided a valid address while deciding to perform further tracing to find a correct address for an individual whose previous address has been invalidated but who had previously been willing to participate by providing a complete address. Unfortunately, John has never been able to grasp this relatively simple concept. But really what can one expect with logic like: Null = "I don't know" "I don't know" = "I don't know" "I don't know" = NULL Date and Codd would probably shudder at the gross inadequateness of this supposed tautology. Nulls from the apples table are not the same as nulls in the oranges table however you interpret their meaning. In practical terms, my approach simply equates to an avoiding an overreliance on special gimmicks like 0 acquiring a special meaning. Whenever I need to have a special detail associated with a lookup value, I simply add an additional flag and set it when appropriate. Similarly, if I needed to know a lookup value required interpretation as a null, I would add a flag for this fact as well. Unsurprisingly, this works well for both John's pedestrian purposes and the more complicated survey and research study tracking that I have to do. Personally, I find myself wishing somebody would implement Codd's maybe join when I work with nulls. It would save so much hassle. Francis R Harvey III WB 303, (301)294-3952 harveyf1 at westat.com > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] > Sent: Saturday, March 12, 2005 1:36 PM > To: dba-sqlserver at databaseadvisors.com > Subject: RE: [dba-SQLServer] Was... Update query through > Access ADP...extendednow > > > LOL. ARTHUR! I have simply started my own round table to > deal with those > who cling to simplistic ideas at the expense of reality. > > Null = "I don't know" > > "I don't know" = "I don't know" > > "I don't know" = NULL > > I am NOT, nor have I ever espoused using a ZERO (or any other > VALUE) for a > null. > > I AM and I espouse using a record that specifically says "I > don't know". > > I do so for a very specific reason, as a workaround to a > common problem; We > are trying to select a value from a combo to fill in a field. > > Suppose that you have a person who has a valid address. They live in > California. You select California as their state. Suppose > you discover > that person no longer lives at that address but you DON'T > KNOW where she > lives? What do you do? You have four choices: > > 1) Delete the person from your database > 2) Ignore the fact that the person does not live at the old > address and just > leave the old address in there. > 3) Create a "I don't know" answer in the state table. > 4) Add code to every such combo, use a UNION to get an "I > don't know" in the > combo, then add code to delete out the existing value in the > field when that > "I don't know" is selected. Can you say Mickey Mouse? > > Choice three exactly and completely correlates to, > corresponds to, replaces > a null value. Null means "I don't know". My "zeroth record" > means "I don't > know". > > Now one of our esteemed colleagues made some silly claim > several years ago > that null could mean many different things, such as "I never got the > information" or "I had to delete the information" or ... Hmmm > it was so > silly I didn't follow the logic any further. In any event, > once stored in a > table, a null means nothing more than "I don't know". > > So, Arthur of the Foolish Clan, I simply place a record in my > database that > explicitly means "I don't know". That RECORD replaces the > null value. If > you need to explicitly denote "I don't know" when asked what > color eyes, > what state, what model car, what ... (insert your favorite > question / lookup > table here) simply select the "I don't know" answer from the > required table. > > Where your confusion comes from is the fact that I insert > this record as the > "zeroth" value in the PK field. I am NOT equating a zero to > NULL, I am > creating an "I don't know" record at PKID value zero! > > I do that as a convenience. Access (and SQL Server IIRC) start their > identity value with 1 and work up if it is a linear ID. That leaves a > "hole" at the zero value where I can insert a record. I > literally append a > record into the table with a ZERO for the PK (I always use an > autonumber as > the PK) and fill in "I don't know" for the value (if the > value displayed is > a piece of text). If having a null is so danged important to > you, then > insert a null in the value. I find that having the text "I > don't know" > tells the user that this is the "I don't know" record but you > are the master > of your databases. > > Nulls stored in PK values can work to your advantage, or be a > royal PITA. > Nulls cause inner joins on that field to fail to pull a > record. If you want > to pull a value you now have to (remember to) use an outer > join. That's > fine if you KNOW that there will be nulls but it is just a > PITA to me. I > have to assume that you use outer joins everywhere since any > column may have > nulls in them? > > At any rate, you can see that I do NOT equate a zero to a > null. I know > perfectly well that a null is not a zero, zeros have a > specific meaning and > NULLS have a specific meaning. And I understand joins > perfectly well thank > you. > > I am NOT going to apply for membership back in to your round > table! I have > my OWN round table thank you. > > ;-) > > John W. Colby > www.ColbyConsulting.com > > Contribute your unused CPU cycles to a good cause: > http://folding.stanford.edu/ From accessd at shaw.ca Thu Mar 24 17:59:31 2005 From: accessd at shaw.ca (Jim Lawrence) Date: Thu, 24 Mar 2005 15:59:31 -0800 Subject: [dba-SQLServer] Was... Update query through AccessADP...extendednow In-Reply-To: <446DDE75CFC7E1438061462F85557B0F099216F0@remail2.westat.com> Message-ID: <0IDV00D42S0A4F@l-daemon> Hi All: I have always had some difficulty evaluating the subtle difference in the way data is conceived and described. For a field/column without data in it the field can hold three states/values. 1. Null - there has never been data in this field or the field has been set to null. 2. Empty - the field has had data in it before but the contents were cleared or removed. This is most likely a string field but it can be a numeric. 3. Zero - this only applies to numeric fields but has a similar scope to an 'empty' field. Many times, when referring to the fields/columns these three descriptions are used as synonymous qualifiers and confusion reigns supreme. That is my two cents worth. Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Francis Harvey Sent: Thursday, March 24, 2005 1:29 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] Was... Update query through AccessADP...extendednow John, I question both the esteemed and silly part of your assertions. Fortunately, I don't require your esteem, and I didn't even have to start my own round table as there were already plenty of members of an existing order whose needs extend far beyond John's simple requirements. Stating the matter differently, and more accurately I am afraid than John's summary, null often needs to mean more than I don't know. Extending John's state example, what if it makes a difference knowing whether the state is simply unknown at this point in time or whether it was never known. This could be quite important to know when making decisions like the selection of individuals to receive a survey from a million person mailing list. Given the great expense, you might rule out somebody who never provided a valid address while deciding to perform further tracing to find a correct address for an individual whose previous address has been invalidated but who had previously been willing to participate by providing a complete address. Unfortunately, John has never been able to grasp this relatively simple concept. But really what can one expect with logic like: Null = "I don't know" "I don't know" = "I don't know" "I don't know" = NULL Date and Codd would probably shudder at the gross inadequateness of this supposed tautology. Nulls from the apples table are not the same as nulls in the oranges table however you interpret their meaning. In practical terms, my approach simply equates to an avoiding an overreliance on special gimmicks like 0 acquiring a special meaning. Whenever I need to have a special detail associated with a lookup value, I simply add an additional flag and set it when appropriate. Similarly, if I needed to know a lookup value required interpretation as a null, I would add a flag for this fact as well. Unsurprisingly, this works well for both John's pedestrian purposes and the more complicated survey and research study tracking that I have to do. Personally, I find myself wishing somebody would implement Codd's maybe join when I work with nulls. It would save so much hassle. Francis R Harvey III WB 303, (301)294-3952 harveyf1 at westat.com > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] > Sent: Saturday, March 12, 2005 1:36 PM > To: dba-sqlserver at databaseadvisors.com > Subject: RE: [dba-SQLServer] Was... Update query through > Access ADP...extendednow > > > LOL. ARTHUR! I have simply started my own round table to > deal with those > who cling to simplistic ideas at the expense of reality. > > Null = "I don't know" > > "I don't know" = "I don't know" > > "I don't know" = NULL > > I am NOT, nor have I ever espoused using a ZERO (or any other > VALUE) for a > null. > > I AM and I espouse using a record that specifically says "I > don't know". > > I do so for a very specific reason, as a workaround to a > common problem; We > are trying to select a value from a combo to fill in a field. > > Suppose that you have a person who has a valid address. They live in > California. You select California as their state. Suppose > you discover > that person no longer lives at that address but you DON'T > KNOW where she > lives? What do you do? You have four choices: > > 1) Delete the person from your database > 2) Ignore the fact that the person does not live at the old > address and just > leave the old address in there. > 3) Create a "I don't know" answer in the state table. > 4) Add code to every such combo, use a UNION to get an "I > don't know" in the > combo, then add code to delete out the existing value in the > field when that > "I don't know" is selected. Can you say Mickey Mouse? > > Choice three exactly and completely correlates to, > corresponds to, replaces > a null value. Null means "I don't know". My "zeroth record" > means "I don't > know". > > Now one of our esteemed colleagues made some silly claim > several years ago > that null could mean many different things, such as "I never got the > information" or "I had to delete the information" or ... Hmmm > it was so > silly I didn't follow the logic any further. In any event, > once stored in a > table, a null means nothing more than "I don't know". > > So, Arthur of the Foolish Clan, I simply place a record in my > database that > explicitly means "I don't know". That RECORD replaces the > null value. If > you need to explicitly denote "I don't know" when asked what > color eyes, > what state, what model car, what ... (insert your favorite > question / lookup > table here) simply select the "I don't know" answer from the > required table. > > Where your confusion comes from is the fact that I insert > this record as the > "zeroth" value in the PK field. I am NOT equating a zero to > NULL, I am > creating an "I don't know" record at PKID value zero! > > I do that as a convenience. Access (and SQL Server IIRC) start their > identity value with 1 and work up if it is a linear ID. That leaves a > "hole" at the zero value where I can insert a record. I > literally append a > record into the table with a ZERO for the PK (I always use an > autonumber as > the PK) and fill in "I don't know" for the value (if the > value displayed is > a piece of text). If having a null is so danged important to > you, then > insert a null in the value. I find that having the text "I > don't know" > tells the user that this is the "I don't know" record but you > are the master > of your databases. > > Nulls stored in PK values can work to your advantage, or be a > royal PITA. > Nulls cause inner joins on that field to fail to pull a > record. If you want > to pull a value you now have to (remember to) use an outer > join. That's > fine if you KNOW that there will be nulls but it is just a > PITA to me. I > have to assume that you use outer joins everywhere since any > column may have > nulls in them? > > At any rate, you can see that I do NOT equate a zero to a > null. I know > perfectly well that a null is not a zero, zeros have a > specific meaning and > NULLS have a specific meaning. And I understand joins > perfectly well thank > you. > > I am NOT going to apply for membership back in to your round > table! I have > my OWN round table thank you. > > ;-) > > John W. Colby > www.ColbyConsulting.com > > Contribute your unused CPU cycles to a good cause: > http://folding.stanford.edu/ _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From artful at rogers.com Sat Mar 26 10:56:07 2005 From: artful at rogers.com (Arthur Fuller) Date: Sat, 26 Mar 2005 11:56:07 -0500 Subject: [dba-SQLServer] Shameless Plug In-Reply-To: <0IDV00D42S0A4F@l-daemon> References: <0IDV00D42S0A4F@l-daemon> Message-ID: <42459427.60307@rogers.com> Our MySQL book is now up as a web site. (Our = Peter Brawley and Arthur Fuller). Visit http://www.artfulsoftware.com/ for a free download of sample chapters and a paid download of the remainder. I hope you enjoy what you read for free. Arthur > > From accessd at shaw.ca Sat Mar 26 19:40:19 2005 From: accessd at shaw.ca (Jim Lawrence) Date: Sat, 26 Mar 2005 17:40:19 -0800 Subject: [dba-SQLServer] Shameless Plug In-Reply-To: <42459427.60307@rogers.com> Message-ID: <0IDZ00029LZ2U6@l-daemon> Hi Arthur: Definitely a shameless plug. Congratulations; looks like the book to get if you are a MySQL programmer. Great work Arthur Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Saturday, March 26, 2005 8:56 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Shameless Plug Our MySQL book is now up as a web site. (Our = Peter Brawley and Arthur Fuller). Visit http://www.artfulsoftware.com/ for a free download of sample chapters and a paid download of the remainder. I hope you enjoy what you read for free. Arthur > > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From artful at rogers.com Sun Mar 27 07:56:03 2005 From: artful at rogers.com (Arthur Fuller) Date: Sun, 27 Mar 2005 08:56:03 -0500 Subject: [dba-SQLServer] Shameless Plug In-Reply-To: <0IDZ00029LZ2U6@l-daemon> References: <0IDZ00029LZ2U6@l-daemon> Message-ID: <4246BB73.7040700@rogers.com> Thanks, Jim! Jim Lawrence wrote: >Hi Arthur: > >Definitely a shameless plug. Congratulations; looks like the book to get if >you are a MySQL programmer. > >Great work Arthur >Jim > > > > From andy at minstersystems.co.uk Sun Mar 27 08:02:16 2005 From: andy at minstersystems.co.uk (Andy Lacey) Date: Sun, 27 Mar 2005 15:02:16 +0100 Subject: [dba-SQLServer] Shameless Plug In-Reply-To: <4246BB73.7040700@rogers.com> Message-ID: <002e01c532d5$959770c0$b274d0d5@minster33c3r25> Congratulations Arthur. I've huge admiration for anyone who can pull off a project like this. -- Andy Lacey http://www.minstersystems.co.uk > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf > Of Arthur Fuller > Sent: 27 March 2005 14:56 > To: dba-sqlserver at databaseadvisors.com > Subject: Re: [dba-SQLServer] Shameless Plug > > > Thanks, Jim! > > Jim Lawrence wrote: > > >Hi Arthur: > > > >Definitely a shameless plug. Congratulations; looks like the book to > >get if you are a MySQL programmer. > > > >Great work Arthur > >Jim > > > > > > > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > > From artful at rogers.com Mon Mar 28 10:21:50 2005 From: artful at rogers.com (Arthur Fuller) Date: Mon, 28 Mar 2005 11:21:50 -0500 Subject: [dba-SQLServer] Shameless Plug In-Reply-To: <002e01c532d5$959770c0$b274d0d5@minster33c3r25> References: <002e01c532d5$959770c0$b274d0d5@minster33c3r25> Message-ID: <42482F1E.7080500@rogers.com> Thanks for the compliment, Andy. To be fair to my partner, best friend and esteemed colleague, Peter Brawley, he did much more work than I on the project. He is a very brilliant man and a hard worker as well. (You may see the occasional post from him on the dbaTech list and the dbaSQL list.) What I find intriguing is that only occasionally can I tell right away which one of us wrote a given paragraph. We've been pals and partners for so long and influenced each other's writing (and perhaps also thinking) style that I often can't tell who wrote what, especially after some months have elapsed. One guideline, should you care to try to distinguish the writer of any given unit, is that Peter knows way more about math and statistics than I, so the more the topic veers into that turf, the more sure you can be that he wrote it. Arthur Andy Lacey wrote: >Congratulations Arthur. I've huge admiration for anyone who can pull off a >project like this. > >-- Andy Lacey >http://www.minstersystems.co.uk > > > >>-----Original Message----- >>From: dba-sqlserver-bounces at databaseadvisors.com >>[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf >>Of Arthur Fuller >>Sent: 27 March 2005 14:56 >>To: dba-sqlserver at databaseadvisors.com >>Subject: Re: [dba-SQLServer] Shameless Plug >> >> >>Thanks, Jim! >> >>Jim Lawrence wrote: >> >> >> >>>Hi Arthur: >>> >>>Definitely a shameless plug. Congratulations; looks like the book to >>>get if you are a MySQL programmer. >>> >>>Great work Arthur >>>Jim >>> >>> >>> >>> >>> >>> >>_______________________________________________ >>dba-SQLServer mailing list >>dba-SQLServer at databaseadvisors.com >>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >>http://www.databaseadvisors.com >> >> >> >> >> > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > > > From newsgrps at dalyn.co.nz Mon Mar 28 14:15:32 2005 From: newsgrps at dalyn.co.nz (David Emerson) Date: Tue, 29 Mar 2005 08:15:32 +1200 Subject: [dba-SQLServer] Tables in Other Databases Message-ID: <6.2.1.2.0.20050329081526.03210b60@mail.dalyn.co.nz> Access XP ADE, SQL2000. I have two databases that are identical in table structure. Some of the tables also have identical data in them. I am in the process of changing the sprocs so that the identical data tables are only included in one database and both databases use these (so that the data only needs to be updated in one place). Updating of data in these identical tables needs to be able to be done from either front end. I understand that to reference the tables in the first database from the second one all I need to do is prefix the table name with the database name (eg database1.dbo.table). Q1. Is there any way to ensure referential integrity is maintained between the two databases? If not, is the only solution to prevent deletions so that there is no risk of orphaned records in the second database? Q2. Are there any other things I should be aware of with this arrangement? From artful at rogers.com Mon Mar 28 15:31:58 2005 From: artful at rogers.com (Arthur Fuller) Date: Mon, 28 Mar 2005 16:31:58 -0500 Subject: [dba-SQLServer] Tables in Other Databases In-Reply-To: <6.2.1.2.0.20050329081526.03210b60@mail.dalyn.co.nz> References: <6.2.1.2.0.20050329081526.03210b60@mail.dalyn.co.nz> Message-ID: <424877CE.7080203@rogers.com> I recently purchased software from Red-Gate Software, including SQL Compare, SQL Data Compare, and DTS Compare. Perhaps you were looking for a free solution. I have tried to write same several times, with some success but not bulletproof and also problematic. In the end I opted for Red-Gate's solutions. As it happens, I have three remote clients to whom I connect directly using EM (i.e. I set up a new server, enter the IP -- which requires that they set me up as a Windows user with appropriate permissions), then I load and go. Red-Gate's software works superbly. I can connect to Vancouver or Kingston or two sites in Toronto and compare the structs and data with my local development copy. Typically, the case is that I have made changes locally, while they have entered data into their version of the db. Red-Gate handles both situations magnificently. I have no relationship with Red-Gate except as a satisfied customer. Compared to the hours I might have spent rolling my own version of their stuff, the few hundred dollars and the instant download and install were well worth the money. To cite just one among many cool features, when you do a SQL Compare it shows you the tables, sprocs and views that differ, in two windows. It's like grep, showing you that two sprocs are identical except for these three lines in db A as compared with db B. You can update in one direction or both. Splendid software. I don't say that often. Arthur David Emerson wrote: > Access XP ADE, SQL2000. > > I have two databases that are identical in table structure. Some of > the tables also have identical data in them. I am in the process of > changing the sprocs so that the identical data tables are only > included in one database and both databases use these (so that the > data only needs to be updated in one place). Updating of data in > these identical tables needs to be able to be done from either front end. > > I understand that to reference the tables in the first database from > the second one all I need to do is prefix the table name with the > database name (eg database1.dbo.table). > > Q1. Is there any way to ensure referential integrity is maintained > between the two databases? If not, is the only solution to prevent > deletions so that there is no risk of orphaned records in the second > database? > > Q2. Are there any other things I should be aware of with this > arrangement? > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From artful at rogers.com Mon Mar 28 15:33:46 2005 From: artful at rogers.com (Arthur Fuller) Date: Mon, 28 Mar 2005 16:33:46 -0500 Subject: [dba-SQLServer] XML setting files In-Reply-To: References: <4204FECC.7040401@rogers.com> <000d01c50c9e$55304500$b274d0d5@minster33c3r25> Message-ID: <4248783A.4020502@rogers.com> LOL. It helps that I am a ni-dan in Shotokan karate. The alligators are unused to advanced technique. A. Bryan Carbonnell wrote: >On Sun, 6 Feb 2005 22:51:02 -0000, Andy Lacey wrote: > > >>>I've got 4 alligators left to kill. >>> >>> >>??????????????????????????? >> >> > >Was up to his a** in aligators and is now down to only 4 ???? > > > From artful at rogers.com Mon Mar 28 15:40:58 2005 From: artful at rogers.com (Arthur Fuller) Date: Mon, 28 Mar 2005 16:40:58 -0500 Subject: [dba-SQLServer] Percent Rank Function in SQL In-Reply-To: <01B619CB8F6C8C478EDAC39191AEC51E04151247@doesefpeml02.eus.fldoe.int> References: <01B619CB8F6C8C478EDAC39191AEC51E04151247@doesefpeml02.eus.fldoe.int> Message-ID: <424879EA.40309@rogers.com> This is an old message but I don't see any responses to it, sorting by subject. Have you got your answer yet? If not, I will investigate. If so, please direct me to the response that solved your problem. Arthur Klos, Susan wrote: >I need to use a Percent Rank function to determine which students are in the >lowest 25% of a school. We sort then rank the prior year developmental >scale score by previous year's grade level. Any ties need to be ranked >down. Then we flag the students whose rank is 25.44 or below as in the >lowest 25%. We do this for each grade level of the school (grade 3 - 10). >If there are less than 30 students in the lowest 25% of the school then we >need to resort all of the rankings in the school and flag the lowest 30 >students. This is a separate calculation and only really needs to be done >if the lowest 25% does not contain enough students. I hope this explanation >is good enough to get someone to put me on the track of finding a Percent >rank function. Thanks for all your help. > > > >Susan Klos > >Senior Database Analyst > >Evaluation and Reporting > >Florida Department of Education > >850-245-0708 > >sc 205-0708 > > > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > > > > From artful at rogers.com Mon Mar 28 15:49:59 2005 From: artful at rogers.com (Arthur Fuller) Date: Mon, 28 Mar 2005 16:49:59 -0500 Subject: [dba-SQLServer] TicketMaster-like Timer In-Reply-To: <0I9B0000BJ4KTC@l-daemon> References: <0I9B0000BJ4KTC@l-daemon> Message-ID: <42487C07.4010305@rogers.com> Just to close off this thread, what I ended up doing (and which works) is this: One table is called OnLineOrders, with a column called DateTimeEntered and another called BookingExpires, which defaults to GetDate() + 10 minutes. The table where the inventory is kept is called TicketAllocations. Any entry in OLO has a TicketAllocationID. I subtract the tickets allocated in OLO from the number of tickets available in TicketAllocations. A simple UDF handles the details, returning the number of tickets currently available both to the Access app and to the web app. A sproc runs every five minutes, although the "window" is 10 minutes. Any row in OLO older than 10 minutes is flagged as "dead". The subtraction above ignores these rows. It was decided by the PTB (powers that be) that we should preserve these rows for followup by a human, so I don't delete them, just flag them. It seems to work so far. No complaints yet LOL. Arthur Jim Lawrence wrote: >Hi Arthur: > >On an application, I was involved with, that required a specific time, the >purchase was recorded down to the hundredth of a second. The time was >recorded from the moment that the individual started the actual purchase >event but the first person who completed the payment transaction was the >individual that was recorded. The system was setup to simply roll-back any >process that did complete on time, against a particular product and display >some message like 'The transaction could not completed, please try again.' >In the couple of years that followed the roll-out, I never heard of a >transaction that had to be aborted part way through, by the system. The time >between the start of the session and the completion could be 10 plus >minutes... > >My thought on the subject is that the first person who's card transaction >completes get the tickets ... 'you snooze you loose'. > >Jim > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur >Fuller >Sent: Saturday, December 25, 2004 10:06 AM >To: dba-sqlserver at databaseadvisors.com >Subject: Re: [dba-SQLServer] TicketMaster-like Timer > >In this particular case, it is not serialized inventory. In fact, we >often don't know the particular seat numbers when we go on sale. Rather, >what we know is that we are guaranteed possession of say 200 GA tickets, >200 Silver and 200 Gold. And also that they are in the best half of said >blocks. For example, our U2 stuff goes up for sale on Jan. 6, which is >when the tour will be officially announced. You might be buying tickets >to a concert in July. We won't actually get the tickets in our hands >until sometime in June, but since we're partnering with U2 on this tour >we know we'll get the tickets. The customer receives a voucher etc. and >depending on the package she buys, perhaps also a hotel voucher and >maybe a limo voucher etc. > >So what we are concerned about is the number of tickets of each quality >that is available. > >When you're dealing with serialized inventory, particularly reserved >seat tickets, there are lots of issues that are pretty difficult for >software to handle, but rather simple for a human. For example, you have >to be very careful about selling single tickets, because you most >definitely don't want to sell one seat from a group of 4 adjacent seats, >although you will sell one on either end of a group of 5 adjacent seats. >The general rule is that only losers go to concerts alone, so devote >your efforts to the groups of tickets, first by even numbers and then by >odd numbers. Another cute wrinkle in this situation is that you may want >4 tickets and I have no groups of 4 left, but I do have two "vertically" >adjacent pairs (row 6, seats 7 and 8, row 7, seats 7 and 8). On its >face, that requirement is not all that tough to meet with software, but >then you have to factor in the fact that there are several different >numbering systems in use at the various venues, a couple of which seem >to have been designed by people in serious need of professional help. > >Anyway, those are not my concerns with this app. I'm concerned only with >the timer-issue. So the specific problem is: > >a) User #1 requests N tickets. >b) Software subtracts N from Available Inventory. >c) Start a 5-minute timer. >d) User either completes the transaction or the timer times out. In the >latter case, add N tickets back to Available Inventory. > >This sequence can occur for an indefinite number of users at once. Call >that number P. So I need a method of setting up P timers. Lately I've >been thinking that a trigger might be the way to go with this. Or a >sproc that executes every minute. I haven't looked into the granularity >of the schedule thing, dunno yet if you can go down as far as one >minute. It certainly wouldn't hurt performance to run such a sproc once >a minute, given that all it has to do is delete rows whose timestamp is >older than Now - 5 minutes. > >Arthur > >P.S. >It's Christmas day and you can see that I have no life. > > >John W. Colby wrote: > > > >>Arthur, >> >>The thing here is that you are selling SPECIFIC inventory items, i.e. >>specific seat numbers in specific locations, not a generic telephone or >>laptop. Thus you have specific inventory records, and can reserve those >>with a date stamp field in that specific record and some field that says >>what "user" owns the seat. Set the date stamp, then clear it and the >>"owner" X minutes later. >> >>John W. Colby >>www.ColbyConsulting.com >> >>Contribute your unused CPU cycles to a good cause: >>http://folding.stanford.edu/ >> >>-----Original Message----- >>From: dba-sqlserver-bounces at databaseadvisors.com >>[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur >>Fuller >>Sent: Saturday, December 25, 2004 12:06 AM >>To: dba-sqlserver at databaseadvisors.com >>Subject: Re: [dba-SQLServer] TicketMaster-like Timer >> >> >>Regardless of the particular inventory stocked, assume that it moves >>quickly and that there are a finite number of objects available. Looking >>at the TicketMaster layout, you have 5 minutes to comple an order or >>it's cancelled. Which means, I think, that some magic happens in the >>back end that subtracts the number of tickets requested from the >>available inventory, counts ticks, and if you don't press Submit quickly >>enough your order is toast. This is the part that is giving me >>conceptual problems. Assume 49 people are logged on and there are 100 >>inventory objects available. How do I set up 49 timers and roll them >>back after exactly N minutes? >> >>A. >> >>Mark Breen wrote: >> >> >> >> >> >>>Hello Andy, >>> >>>I hear what you are saying but.... >>> >>>1) If you delay long enough on an Airline site, do you believe that you >>>will retain the seat >>>2) If you delay long enough on a Dell site, do you really think that >>>the PC is being 'held' for you. >>> >>>The reality is that you either disappoint many customers by having the >>>stock all tied up with enquiries or people that do not have the ability >>>to pay for it, versus, once in a blue moon, you have to display a >>>message that "this product has just gone out of stock, but we would now >>>like to offer you this as an alternative", depending on the scenario, >>>you could even offer it as a free upgrade. >>> >>>I accept we are only talking in general terms here, we do not know >>>whether Authur is talking about Blood donations or Candy bars in a >>>store. But my point is just to consider the implications of tying up >>>stock with mere prospects rather than customers. >>> >>>I did not get as far as suggesting, but Authur could also consider more >>>sophisticated means of pooling the enquiries and limiting them to >>>10-20% of the stock, so that all enquiries are seeing the same pool. >>> >>>All this is difficult without knowing the business in detail (which is >>>not the intention here), but I still say that it is be be considered. >>> >>>Perhaps it is a B2B model within one company and in that case, it is OK >>>to hold the stock in advance. >>> >>>Cheers and have a good Christmas, >>> >>>Mark >>> >>> >>> >>> >>> >>>On Mon, 20 Dec 2004 11:26:26 +0100, Andy Lacey >>> wrote: >>> >>> >>> >>> >>> >>> >>>>As a customer of these kind of sites (and I am) I'd soon stop using it >>>>if it told me there were tickets, I said I'll take 1, went to the >>>>trouble of putting in my details, then my cc details, then it told me >>>>my tickets had been sold to someone else. It may sound like business >>>>sense not to hold that stock, but the longer term good business is not >>>>to aggravate your customers. >>>> >>>>-- >>>>Andy Lacey >>>>http://www.minstersystems.co.uk >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>_______________________________________________ >>>dba-SQLServer mailing list >>>dba-SQLServer at databaseadvisors.com >>>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >>>http://www.databaseadvisors.com >>> >>> >>> >>> >>> >>> >>> >>> >>> >> >> >> >> > > > > From newsgrps at dalyn.co.nz Mon Mar 28 15:57:31 2005 From: newsgrps at dalyn.co.nz (David Emerson) Date: Tue, 29 Mar 2005 09:57:31 +1200 Subject: [dba-SQLServer] Tables in Other Databases In-Reply-To: <424877CE.7080203@rogers.com> References: <6.2.1.2.0.20050329081526.03210b60@mail.dalyn.co.nz> <424877CE.7080203@rogers.com> Message-ID: <6.2.1.2.0.20050329094915.032142a0@mail.dalyn.co.nz> Thanks Arthur, That might come in useful. However, most of the data is the same. Both databases are on the same server - the company has two sub companies that have separate clients and need to be kept physically separate for company structure reasons, but many of the tables have identical information (for example supplier details and costs). What I am in the process of doing is changing the sprocs etc so that both databases use the same data from the main database (the second database will then not need the tables). Q1. Is there any way to ensure referential integrity is maintained between the two databases? If not, is the only solution to prevent deletions so that there is no risk of orphaned records in the second database? Q2. Are there any other things I should be aware of with this arrangement? David At 29/03/2005, Arthur Fuller wrote: >I recently purchased software from Red-Gate Software, including SQL >Compare, SQL Data Compare, and DTS Compare. Perhaps you were looking for a >free solution. I have tried to write same several times, with some success >but not bulletproof and also problematic. In the end I opted for >Red-Gate's solutions. > >As it happens, I have three remote clients to whom I connect directly >using EM (i.e. I set up a new server, enter the IP -- which requires that >they set me up as a Windows user with appropriate permissions), then I >load and go. Red-Gate's software works superbly. I can connect to >Vancouver or Kingston or two sites in Toronto and compare the structs and >data with my local development copy. Typically, the case is that I have >made changes locally, while they have entered data into their version of >the db. Red-Gate handles both situations magnificently. > >I have no relationship with Red-Gate except as a satisfied customer. >Compared to the hours I might have spent rolling my own version of their >stuff, the few hundred dollars and the instant download and install were >well worth the money. > >To cite just one among many cool features, when you do a SQL Compare it >shows you the tables, sprocs and views that differ, in two windows. It's >like grep, showing you that two sprocs are identical except for these >three lines in db A as compared with db B. You can update in one direction >or both. > >Splendid software. I don't say that often. > >Arthur > >David Emerson wrote: > >>Access XP ADE, SQL2000. >> >>I have two databases that are identical in table structure. Some of the >>tables also have identical data in them. I am in the process of changing >>the sprocs so that the identical data tables are only included in one >>database and both databases use these (so that the data only needs to be >>updated in one place). Updating of data in these identical tables needs >>to be able to be done from either front end. >> >>I understand that to reference the tables in the first database from the >>second one all I need to do is prefix the table name with the database >>name (eg database1.dbo.table). >> >>Q1. Is there any way to ensure referential integrity is maintained >>between the two databases? If not, is the only solution to prevent >>deletions so that there is no risk of orphaned records in the second database? >> >>Q2. Are there any other things I should be aware of with this arrangement? >> >>_______________________________________________ >>dba-SQLServer mailing list >>dba-SQLServer at databaseadvisors.com >>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >>http://www.databaseadvisors.com >> >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > From artful at rogers.com Mon Mar 28 16:27:57 2005 From: artful at rogers.com (Arthur Fuller) Date: Mon, 28 Mar 2005 17:27:57 -0500 Subject: [dba-SQLServer] Tables in Other Databases In-Reply-To: <6.2.1.2.0.20050329094915.032142a0@mail.dalyn.co.nz> References: <6.2.1.2.0.20050329081526.03210b60@mail.dalyn.co.nz> <424877CE.7080203@rogers.com> <6.2.1.2.0.20050329094915.032142a0@mail.dalyn.co.nz> Message-ID: <424884ED.9010508@rogers.com> I think you can do this with triggers. I haven't actually tried it but I see no apparent reason why triggers wouldn't work. You need to reference the second db in your trigger of course. You could also link the servers, but I think that for your app as described that is not necessary. (To check this out, search for Linked Servers in BOL.) Linked Servers might be your solution. You might also look at the docs on Replicaton in BOL. A. David Emerson wrote: > Thanks Arthur, > > That might come in useful. However, most of the data is the same. > Both databases are on the same server - the company has two sub > companies that have separate clients and need to be kept physically > separate for company structure reasons, but many of the tables have > identical information (for example supplier details and costs). What I > am in the process of doing is changing the sprocs etc so that both > databases use the same data from the main database (the second > database will then not need the tables). > > Q1. Is there any way to ensure referential integrity is maintained > between the two databases? If not, is the only solution to prevent > deletions so that there is no risk of orphaned records in the second > database? > > Q2. Are there any other things I should be aware of with this > arrangement? > > David > > At 29/03/2005, Arthur Fuller wrote: > >> I recently purchased software from Red-Gate Software, including SQL >> Compare, SQL Data Compare, and DTS Compare. Perhaps you were looking >> for a free solution. I have tried to write same several times, with >> some success but not bulletproof and also problematic. In the end I >> opted for Red-Gate's solutions. >> >> As it happens, I have three remote clients to whom I connect directly >> using EM (i.e. I set up a new server, enter the IP -- which requires >> that they set me up as a Windows user with appropriate permissions), >> then I load and go. Red-Gate's software works superbly. I can connect >> to Vancouver or Kingston or two sites in Toronto and compare the >> structs and data with my local development copy. Typically, the case >> is that I have made changes locally, while they have entered data >> into their version of the db. Red-Gate handles both situations >> magnificently. >> >> I have no relationship with Red-Gate except as a satisfied customer. >> Compared to the hours I might have spent rolling my own version of >> their stuff, the few hundred dollars and the instant download and >> install were well worth the money. >> >> To cite just one among many cool features, when you do a SQL Compare >> it shows you the tables, sprocs and views that differ, in two >> windows. It's like grep, showing you that two sprocs are identical >> except for these three lines in db A as compared with db B. You can >> update in one direction or both. >> >> Splendid software. I don't say that often. >> >> Arthur >> >> David Emerson wrote: >> >>> Access XP ADE, SQL2000. >>> >>> I have two databases that are identical in table structure. Some of >>> the tables also have identical data in them. I am in the process of >>> changing the sprocs so that the identical data tables are only >>> included in one database and both databases use these (so that the >>> data only needs to be updated in one place). Updating of data in >>> these identical tables needs to be able to be done from either front >>> end. >>> >>> I understand that to reference the tables in the first database from >>> the second one all I need to do is prefix the table name with the >>> database name (eg database1.dbo.table). >>> >>> Q1. Is there any way to ensure referential integrity is maintained >>> between the two databases? If not, is the only solution to prevent >>> deletions so that there is no risk of orphaned records in the second >>> database? >>> >>> Q2. Are there any other things I should be aware of with this >>> arrangement? >>> >>> _______________________________________________ >>> dba-SQLServer mailing list >>> dba-SQLServer at databaseadvisors.com >>> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >>> http://www.databaseadvisors.com >>> >> _______________________________________________ >> dba-SQLServer mailing list >> dba-SQLServer at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >> http://www.databaseadvisors.com >> >> > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From newsgrps at dalyn.co.nz Mon Mar 28 16:54:30 2005 From: newsgrps at dalyn.co.nz (David Emerson) Date: Tue, 29 Mar 2005 10:54:30 +1200 Subject: [dba-SQLServer] Tables in Other Databases In-Reply-To: <424884ED.9010508@rogers.com> References: <6.2.1.2.0.20050329081526.03210b60@mail.dalyn.co.nz> <424877CE.7080203@rogers.com> <6.2.1.2.0.20050329094915.032142a0@mail.dalyn.co.nz> <424884ED.9010508@rogers.com> Message-ID: <6.2.1.2.0.20050329104934.0324e600@mail.dalyn.co.nz> Thanks again Arthur, Triggers is certainly one area I will look into. BOL seems to indicate that my situation is exactly one of their purposes. I am not sure that linked servers will help. Because the sprocs in question will be a mixture of local tables and the common ones I will need to keep separate copies of the sprocs in each database (no big deal because I can use extended referencing to include the database name and for the tables with different data I can leave the database name out so that the local table will be used). Replication is not required because we only want one set of tables - we don't need them replicated in two places. David At 29/03/2005, you wrote: >I think you can do this with triggers. I haven't actually tried it but I >see no apparent reason why triggers wouldn't work. You need to reference >the second db in your trigger of course. You could also link the servers, >but I think that for your app as described that is not necessary. (To >check this out, search for Linked Servers in BOL.) > >Linked Servers might be your solution. You might also look at the docs on >Replicaton in BOL. > >A. > > >David Emerson wrote: > >>Thanks Arthur, >> >>That might come in useful. However, most of the data is the same. >>Both databases are on the same server - the company has two sub companies >>that have separate clients and need to be kept physically separate for >>company structure reasons, but many of the tables have identical >>information (for example supplier details and costs). What I am in the >>process of doing is changing the sprocs etc so that both databases use >>the same data from the main database (the second database will then not >>need the tables). >> >>Q1. Is there any way to ensure referential integrity is maintained >>between the two databases? If not, is the only solution to prevent >>deletions so that there is no risk of orphaned records in the second database? >> >>Q2. Are there any other things I should be aware of with this arrangement? >> >>David >> >>At 29/03/2005, Arthur Fuller wrote: >> >>>I recently purchased software from Red-Gate Software, including SQL >>>Compare, SQL Data Compare, and DTS Compare. Perhaps you were looking for >>>a free solution. I have tried to write same several times, with some >>>success but not bulletproof and also problematic. In the end I opted for >>>Red-Gate's solutions. >>> >>>As it happens, I have three remote clients to whom I connect directly >>>using EM (i.e. I set up a new server, enter the IP -- which requires >>>that they set me up as a Windows user with appropriate permissions), >>>then I load and go. Red-Gate's software works superbly. I can connect to >>>Vancouver or Kingston or two sites in Toronto and compare the structs >>>and data with my local development copy. Typically, the case is that I >>>have made changes locally, while they have entered data into their >>>version of the db. Red-Gate handles both situations magnificently. >>> >>>I have no relationship with Red-Gate except as a satisfied customer. >>>Compared to the hours I might have spent rolling my own version of their >>>stuff, the few hundred dollars and the instant download and install were >>>well worth the money. >>> >>>To cite just one among many cool features, when you do a SQL Compare it >>>shows you the tables, sprocs and views that differ, in two windows. It's >>>like grep, showing you that two sprocs are identical except for these >>>three lines in db A as compared with db B. You can update in one >>>direction or both. >>> >>>Splendid software. I don't say that often. >>> >>>Arthur >>> >>>David Emerson wrote: >>> >>>>Access XP ADE, SQL2000. >>>> >>>>I have two databases that are identical in table structure. Some of >>>>the tables also have identical data in them. I am in the process of >>>>changing the sprocs so that the identical data tables are only included >>>>in one database and both databases use these (so that the data only >>>>needs to be updated in one place). Updating of data in these identical >>>>tables needs to be able to be done from either front end. >>>> >>>>I understand that to reference the tables in the first database from >>>>the second one all I need to do is prefix the table name with the >>>>database name (eg database1.dbo.table). >>>> >>>>Q1. Is there any way to ensure referential integrity is maintained >>>>between the two databases? If not, is the only solution to prevent >>>>deletions so that there is no risk of orphaned records in the second database? >>>> >>>>Q2. Are there any other things I should be aware of with this arrangement? >>>> >>>>_______________________________________________ >>>>dba-SQLServer mailing list >>>>dba-SQLServer at databaseadvisors.com >>>>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >>>>http://www.databaseadvisors.com >>>_______________________________________________ >>>dba-SQLServer mailing list >>>dba-SQLServer at databaseadvisors.com >>>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >>>http://www.databaseadvisors.com >>> >> >>_______________________________________________ >>dba-SQLServer mailing list >>dba-SQLServer at databaseadvisors.com >>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >>http://www.databaseadvisors.com >> >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > From fhtapia at gmail.com Mon Mar 28 17:10:00 2005 From: fhtapia at gmail.com (Francisco Tapia) Date: Mon, 28 Mar 2005 15:10:00 -0800 Subject: [dba-SQLServer] Tables in Other Databases In-Reply-To: <6.2.1.2.0.20050329104934.0324e600@mail.dalyn.co.nz> References: <6.2.1.2.0.20050329081526.03210b60@mail.dalyn.co.nz> <424877CE.7080203@rogers.com> <6.2.1.2.0.20050329094915.032142a0@mail.dalyn.co.nz> <424884ED.9010508@rogers.com> <6.2.1.2.0.20050329104934.0324e600@mail.dalyn.co.nz> Message-ID: thinking outloud, it might be useful to have 3 dbs... db1 = company contact lists 1, db2 company2 contact lists 2. and db 3 would have all the comminallities between both in addition you can store all the sprocs/views that need to reach accross the dbs here. I'm more concerned in what you'll need to do for security tho for accross db owner chaining etc. often when you run a course like this you have to create views to tables and join the new user roles to that, that way users can still run the sprocs that touch other dbs. see database owner chaining in BOL. On Tue, 29 Mar 2005 10:54:30 +1200, David Emerson wrote: > Thanks again Arthur, > > Triggers is certainly one area I will look into. BOL seems to indicate > that my situation is exactly one of their purposes. > > I am not sure that linked servers will help. Because the sprocs in question > will be a mixture of local tables and the common ones I will need to keep > separate copies of the sprocs in each database (no big deal because I can > use extended referencing to include the database name and for the tables > with different data I can leave the database name out so that the local > table will be used). > > Replication is not required because we only want one set of tables - we > don't need them replicated in two places. > > David > > At 29/03/2005, you wrote: > >I think you can do this with triggers. I haven't actually tried it but I > >see no apparent reason why triggers wouldn't work. You need to reference > >the second db in your trigger of course. You could also link the servers, > >but I think that for your app as described that is not necessary. (To > >check this out, search for Linked Servers in BOL.) > > > >Linked Servers might be your solution. You might also look at the docs on > >Replicaton in BOL. > > > >A. > > > > > >David Emerson wrote: > > > >>Thanks Arthur, > >> > >>That might come in useful. However, most of the data is the same. > >>Both databases are on the same server - the company has two sub companies > >>that have separate clients and need to be kept physically separate for > >>company structure reasons, but many of the tables have identical > >>information (for example supplier details and costs). What I am in the > >>process of doing is changing the sprocs etc so that both databases use > >>the same data from the main database (the second database will then not > >>need the tables). > >> > >>Q1. Is there any way to ensure referential integrity is maintained > >>between the two databases? If not, is the only solution to prevent > >>deletions so that there is no risk of orphaned records in the second database? > >> > >>Q2. Are there any other things I should be aware of with this arrangement? > >> > >>David > >> > >>At 29/03/2005, Arthur Fuller wrote: > >> > >>>I recently purchased software from Red-Gate Software, including SQL > >>>Compare, SQL Data Compare, and DTS Compare. Perhaps you were looking for > >>>a free solution. I have tried to write same several times, with some > >>>success but not bulletproof and also problematic. In the end I opted for > >>>Red-Gate's solutions. > >>> > >>>As it happens, I have three remote clients to whom I connect directly > >>>using EM (i.e. I set up a new server, enter the IP -- which requires > >>>that they set me up as a Windows user with appropriate permissions), > >>>then I load and go. Red-Gate's software works superbly. I can connect to > >>>Vancouver or Kingston or two sites in Toronto and compare the structs > >>>and data with my local development copy. Typically, the case is that I > >>>have made changes locally, while they have entered data into their > >>>version of the db. Red-Gate handles both situations magnificently. > >>> > >>>I have no relationship with Red-Gate except as a satisfied customer. > >>>Compared to the hours I might have spent rolling my own version of their > >>>stuff, the few hundred dollars and the instant download and install were > >>>well worth the money. > >>> > >>>To cite just one among many cool features, when you do a SQL Compare it > >>>shows you the tables, sprocs and views that differ, in two windows. It's > >>>like grep, showing you that two sprocs are identical except for these > >>>three lines in db A as compared with db B. You can update in one > >>>direction or both. > >>> > >>>Splendid software. I don't say that often. > >>> > >>>Arthur > >>> > >>>David Emerson wrote: > >>> > >>>>Access XP ADE, SQL2000. > >>>> > >>>>I have two databases that are identical in table structure. Some of > >>>>the tables also have identical data in them. I am in the process of > >>>>changing the sprocs so that the identical data tables are only included > >>>>in one database and both databases use these (so that the data only > >>>>needs to be updated in one place). Updating of data in these identical > >>>>tables needs to be able to be done from either front end. > >>>> > >>>>I understand that to reference the tables in the first database from > >>>>the second one all I need to do is prefix the table name with the > >>>>database name (eg database1.dbo.table). > >>>> > >>>>Q1. Is there any way to ensure referential integrity is maintained > >>>>between the two databases? If not, is the only solution to prevent > >>>>deletions so that there is no risk of orphaned records in the second database? > >>>> > >>>>Q2. Are there any other things I should be aware of with this arrangement? > >>>> > >>>>_______________________________________________ > >>>>dba-SQLServer mailing list > >>>>dba-SQLServer at databaseadvisors.com > >>>>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > >>>>http://www.databaseadvisors.com > >>>_______________________________________________ > >>>dba-SQLServer mailing list > >>>dba-SQLServer at databaseadvisors.com > >>>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > >>>http://www.databaseadvisors.com > >>> > >> > >>_______________________________________________ > >>dba-SQLServer mailing list > >>dba-SQLServer at databaseadvisors.com > >>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > >>http://www.databaseadvisors.com > >> > >_______________________________________________ > >dba-SQLServer mailing list > >dba-SQLServer at databaseadvisors.com > >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > >http://www.databaseadvisors.com > > > > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > -- -Francisco http://pcthis.blogspot.com | PC news with out the jargon! http://sqlthis.blogspot.com | Tsql and More... From artful at rogers.com Mon Mar 28 18:00:28 2005 From: artful at rogers.com (Arthur Fuller) Date: Mon, 28 Mar 2005 19:00:28 -0500 Subject: [dba-SQLServer] MySQL Users In-Reply-To: References: <6.2.1.2.0.20050329081526.03210b60@mail.dalyn.co.nz> <424877CE.7080203@rogers.com> <6.2.1.2.0.20050329094915.032142a0@mail.dalyn.co.nz> <424884ED.9010508@rogers.com> <6.2.1.2.0.20050329104934.0324e600@mail.dalyn.co.nz> Message-ID: <42489A9C.5050600@rogers.com> Would anyone on this list who a) uses MySQL or b) is considering its use, please contact me privately? artful at rogers.com. Arthur > > From newsgrps at dalyn.co.nz Mon Mar 28 18:12:41 2005 From: newsgrps at dalyn.co.nz (David Emerson) Date: Tue, 29 Mar 2005 12:12:41 +1200 Subject: [dba-SQLServer] Tables in Other Databases In-Reply-To: References: <6.2.1.2.0.20050329081526.03210b60@mail.dalyn.co.nz> <424877CE.7080203@rogers.com> <6.2.1.2.0.20050329094915.032142a0@mail.dalyn.co.nz> <424884ED.9010508@rogers.com> <6.2.1.2.0.20050329104934.0324e600@mail.dalyn.co.nz> Message-ID: <6.2.1.2.0.20050329115632.03240a80@mail.dalyn.co.nz> Thanks Francisco, At 29/03/2005, you wrote: >thinking outloud, it might be useful to have 3 dbs... db1 = company >contact lists 1, db2 company2 contact lists 2. and db 3 would have all >the comminallities between both > >in addition you can store all the sprocs/views that need to reach >accross the dbs here. One problem I can see with having the sprocs etc in a 3rd database - if I have the following: SELECT DBase1be.dbo.tblSupplier.SupplierName, dbo.tblSupplierCharge.Price FROM dbo.tblSupplierCharge INNER JOIN DBase1be.dbo.tblSupplier ON dbo.tblSupplierCharge.SupplierIDNo = DBase1be.dbo.tblSupplier.SupplierID I can have this in either DBase1 or DBase2 and it will use the tblSupplierCharge from the local database. If I had the sproc in DBase3 then I would need 2 sprocs - one for each DBase. >I'm more concerned in what you'll need to do for security tho for accross >db owner chaining etc. > >often when you run a course like this you have to create views to >tables and join the new user roles to that, that way users can still >run the sprocs that touch other dbs. see database owner chaining in >BOL. This is not an issue (I don't think) because none of the users have direct access to the database and cannot create any views/sprocs etc. It is all through a runtime ade in Terminal Server. All objects are created by dbo and the front end itself uses the users windows login in conjunction with SQL roles to determine what parts of the program that they can access. David >On Tue, 29 Mar 2005 10:54:30 +1200, David Emerson >wrote: > > Thanks again Arthur, > > > > Triggers is certainly one area I will look into. BOL seems to indicate > > that my situation is exactly one of their purposes. > > > > I am not sure that linked servers will help. Because the sprocs in question > > will be a mixture of local tables and the common ones I will need to keep > > separate copies of the sprocs in each database (no big deal because I can > > use extended referencing to include the database name and for the tables > > with different data I can leave the database name out so that the local > > table will be used). > > > > Replication is not required because we only want one set of tables - we > > don't need them replicated in two places. > > > > David > > > > At 29/03/2005, you wrote: > > >I think you can do this with triggers. I haven't actually tried it but I > > >see no apparent reason why triggers wouldn't work. You need to reference > > >the second db in your trigger of course. You could also link the servers, > > >but I think that for your app as described that is not necessary. (To > > >check this out, search for Linked Servers in BOL.) > > > > > >Linked Servers might be your solution. You might also look at the docs on > > >Replicaton in BOL. > > > > > >A. > > > > > > > > >David Emerson wrote: > > > > > >>Thanks Arthur, > > >> > > >>That might come in useful. However, most of the data is the same. > > >>Both databases are on the same server - the company has two sub companies > > >>that have separate clients and need to be kept physically separate for > > >>company structure reasons, but many of the tables have identical > > >>information (for example supplier details and costs). What I am in the > > >>process of doing is changing the sprocs etc so that both databases use > > >>the same data from the main database (the second database will then not > > >>need the tables). > > >> > > >>Q1. Is there any way to ensure referential integrity is maintained > > >>between the two databases? If not, is the only solution to prevent > > >>deletions so that there is no risk of orphaned records in the second > database? > > >> > > >>Q2. Are there any other things I should be aware of with this > arrangement? > > >> > > >>David > > >> > > >>At 29/03/2005, Arthur Fuller wrote: > > >> > > >>>I recently purchased software from Red-Gate Software, including SQL > > >>>Compare, SQL Data Compare, and DTS Compare. Perhaps you were looking for > > >>>a free solution. I have tried to write same several times, with some > > >>>success but not bulletproof and also problematic. In the end I opted for > > >>>Red-Gate's solutions. > > >>> > > >>>As it happens, I have three remote clients to whom I connect directly > > >>>using EM (i.e. I set up a new server, enter the IP -- which requires > > >>>that they set me up as a Windows user with appropriate permissions), > > >>>then I load and go. Red-Gate's software works superbly. I can connect to > > >>>Vancouver or Kingston or two sites in Toronto and compare the structs > > >>>and data with my local development copy. Typically, the case is that I > > >>>have made changes locally, while they have entered data into their > > >>>version of the db. Red-Gate handles both situations magnificently. > > >>> > > >>>I have no relationship with Red-Gate except as a satisfied customer. > > >>>Compared to the hours I might have spent rolling my own version of their > > >>>stuff, the few hundred dollars and the instant download and install were > > >>>well worth the money. > > >>> > > >>>To cite just one among many cool features, when you do a SQL Compare it > > >>>shows you the tables, sprocs and views that differ, in two windows. It's > > >>>like grep, showing you that two sprocs are identical except for these > > >>>three lines in db A as compared with db B. You can update in one > > >>>direction or both. > > >>> > > >>>Splendid software. I don't say that often. > > >>> > > >>>Arthur > > >>> > > >>>David Emerson wrote: > > >>> > > >>>>Access XP ADE, SQL2000. > > >>>> > > >>>>I have two databases that are identical in table structure. Some of > > >>>>the tables also have identical data in them. I am in the process of > > >>>>changing the sprocs so that the identical data tables are only included > > >>>>in one database and both databases use these (so that the data only > > >>>>needs to be updated in one place). Updating of data in these identical > > >>>>tables needs to be able to be done from either front end. > > >>>> > > >>>>I understand that to reference the tables in the first database from > > >>>>the second one all I need to do is prefix the table name with the > > >>>>database name (eg database1.dbo.table). > > >>>> > > >>>>Q1. Is there any way to ensure referential integrity is maintained > > >>>>between the two databases? If not, is the only solution to prevent > > >>>>deletions so that there is no risk of orphaned records in the > second database? > > >>>> > > >>>>Q2. Are there any other things I should be aware of with this > arrangement? From rl_stewart at highstream.net Tue Mar 29 07:14:12 2005 From: rl_stewart at highstream.net (Robert L. Stewart) Date: Tue, 29 Mar 2005 07:14:12 -0600 Subject: [dba-SQLServer] Re: Shameless Plug In-Reply-To: <200503261800.j2QI0fi05728@databaseadvisors.com> Message-ID: <5.1.0.14.2.20050329071221.013b63c0@pop3.highstream.net> Arthur, Since what you have written about is still a beta version according to MySQL's web site, how stable is it? Is it ready for production use? Robert At 12:00 PM 3/26/2005 -0600, you wrote: >Date: Sat, 26 Mar 2005 11:56:07 -0500 >From: Arthur Fuller >Subject: [dba-SQLServer] Shameless Plug >To: dba-sqlserver at databaseadvisors.com >Message-ID: <42459427.60307 at rogers.com> >Content-Type: text/plain; charset=ISO-8859-1; format=flowed > >Our MySQL book is now up as a web site. (Our = Peter Brawley and Arthur >Fuller). Visit http://www.artfulsoftware.com/ for a free download of >sample chapters and a paid download of the remainder. I hope you enjoy >what you read for free. > >Arthur From artful at rogers.com Tue Mar 29 10:41:05 2005 From: artful at rogers.com (Arthur Fuller) Date: Tue, 29 Mar 2005 11:41:05 -0500 Subject: [dba-SQLServer] Re: Shameless Plug In-Reply-To: <5.1.0.14.2.20050329071221.013b63c0@pop3.highstream.net> References: <5.1.0.14.2.20050329071221.013b63c0@pop3.highstream.net> Message-ID: <42498521.3020904@rogers.com> No beta is ready for production use! LOL. Many would argue, in fact, that any software whose minor number is zero is not ready for production. That said, the MySQL crew works hard on their product and issues frequent updates. The big deal in version 5 is stored procedures + views. While writing the e-book, we found a number of problems but I trust that they will address them quickly. They have already addressed several of them. If you want to use MySQL for production, install version 4 on your production box and version 5 on your development box. Use some front end such as Access or the MySQL query manager so you can save your queries. As you might guess, I'm kinda partial to Access. The point is, you want a way to save your queries so that you can quickly turn them into sprocs and views. Depending on the front end you want to go with, you can design your strategy to maximize the payoff once you decide that version 5 is solid enough for production use. Now all we have to do is persuade the MySQL people to implement MS-SQL-style UDFs. That would be a real treat! Robert L. Stewart wrote: > Arthur, > > Since what you have written about is still a beta version according to > MySQL's web site, how stable is it? Is it ready for production use? > > Robert > > At 12:00 PM 3/26/2005 -0600, you wrote: > >> Date: Sat, 26 Mar 2005 11:56:07 -0500 >> From: Arthur Fuller >> Subject: [dba-SQLServer] Shameless Plug >> To: dba-sqlserver at databaseadvisors.com >> Message-ID: <42459427.60307 at rogers.com> >> Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> >> Our MySQL book is now up as a web site. (Our = Peter Brawley and Arthur >> Fuller). Visit http://www.artfulsoftware.com/ for a free download of >> sample chapters and a paid download of the remainder. I hope you enjoy >> what you read for free. >> >> Arthur > > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From kens.programming at verizon.net Tue Mar 29 13:53:29 2005 From: kens.programming at verizon.net (Ken Stoker) Date: Tue, 29 Mar 2005 11:53:29 -0800 Subject: [dba-SQLServer] Adding a default to an existing column Message-ID: <0IE400I33PSVKK00@vms042.mailsrvcs.net> I have put together the following to add a default to an existing table. It is telling me there is a syntax error near CONSTRAINT. I have tried many different things, this being the latest, getting similar problems. ALTER TABLE TableName ALTER COLUMN ColumnName UserDefinedType NULL CONSTRAINT AddOwnerDflt DEFAULT '100000' WITH VALUES GO Thanks for any help. Ken -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.8.4 - Release Date: 3/27/2005 From DavidL at sierranevada.com Wed Mar 30 12:21:39 2005 From: DavidL at sierranevada.com (David Lewis) Date: Wed, 30 Mar 2005 10:21:39 -0800 Subject: [dba-SQLServer] ADD Constraint Message-ID: <9923336B7F4D1A459B983065D95397B9C4BDFB@pale.sierranevada.corp> Not sure, but I think you need ADD CONSTRAINT D. Lewis Message: 1 Date: Tue, 29 Mar 2005 11:53:29 -0800 From: "Ken Stoker" Subject: [dba-SQLServer] Adding a default to an existing column To: Message-ID: <0IE400I33PSVKK00 at vms042.mailsrvcs.net> Content-Type: text/plain; charset="windows-1250" I have put together the following to add a default to an existing table. It is telling me there is a syntax error near CONSTRAINT. I have tried many different things, this being the latest, getting similar problems. ALTER TABLE TableName ALTER COLUMN ColumnName UserDefinedType NULL CONSTRAINT AddOwnerDflt DEFAULT '100000' WITH VALUES GO Thanks for any help. Ken From kens.programming at verizon.net Wed Mar 30 13:19:37 2005 From: kens.programming at verizon.net (Ken Stoker) Date: Wed, 30 Mar 2005 11:19:37 -0800 Subject: [dba-SQLServer] RE: ADD Constraint In-Reply-To: <9923336B7F4D1A459B983065D95397B9C4BDFB@pale.sierranevada.corp> Message-ID: <0IE600LY3IW77CZ0@vms040.mailsrvcs.net> David, Thanks for your reply, but I had tried that already and received and error stating there was a syntax error near ADD. Am I missing a comma or a bracket or something like that? Ken -----Original Message----- From: David Lewis [mailto:DavidL at sierranevada.com] Sent: Wednesday, March 30, 2005 10:22 AM To: dba-sqlserver at databaseadvisors.com Cc: kens.programming at verizon.net Subject: ADD Constraint Not sure, but I think you need ADD CONSTRAINT D. Lewis Message: 1 Date: Tue, 29 Mar 2005 11:53:29 -0800 From: "Ken Stoker" Subject: [dba-SQLServer] Adding a default to an existing column To: Message-ID: <0IE400I33PSVKK00 at vms042.mailsrvcs.net> Content-Type: text/plain; charset="windows-1250" I have put together the following to add a default to an existing table. It is telling me there is a syntax error near CONSTRAINT. I have tried many different things, this being the latest, getting similar problems. ALTER TABLE TableName ALTER COLUMN ColumnName UserDefinedType NULL CONSTRAINT AddOwnerDflt DEFAULT '100000' WITH VALUES GO Thanks for any help. Ken -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.8.6 - Release Date: 3/30/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.8.6 - Release Date: 3/30/2005 From erbachs at gmail.com Wed Mar 30 16:54:57 2005 From: erbachs at gmail.com (Steve Erbach) Date: Wed, 30 Mar 2005 16:54:57 -0600 Subject: [dba-SQLServer] New SQL Server Registration problem Message-ID: <39cb22f3050330145440a38e50@mail.gmail.com> Dear Group, I'm baffled. I have an Access 2000 ADP that connects to a certain SQL Server database. I have an Access 2000 MDB that connects via ODBC to the same SQL Server database. I have an Access 2003 ADP that connects to the same database. I have an ASP.NET project that connects to the same database. My problem is that I can't seem to connect to the database using SQL Server Enterprise Manager. I go to add a new Registration and up pops the 'Registered SQL Server Properties' dialog box. I fill in the IP address of the SQL Server and select the 'Use SQL Server Authentication' button, and type in the Login Name and Password. When I click OK I get the following message: ----------------------------------------------- SQL Server Enterprise Manager ----------------------------------------------- ? SQL Server registration failed because of the connection failure displayed below. Do you wish to Modify anyway? Cannot open user default database. Login failed. ----------------------------------------------- I've used Enterprise Manager to set up four other SQL Server connections that all work fine. Any ideas why I can't get EM to create a new registration? -- Regards, Steve Erbach Scientific Marketing Neenah, WI www.swerbach.com Security Page: www.swerbach.com/security From fhtapia at gmail.com Thu Mar 31 10:35:52 2005 From: fhtapia at gmail.com (Francisco Tapia) Date: Thu, 31 Mar 2005 08:35:52 -0800 Subject: [dba-SQLServer] New SQL Server Registration problem In-Reply-To: <39cb22f3050330145440a38e50@mail.gmail.com> References: <39cb22f3050330145440a38e50@mail.gmail.com> Message-ID: what MDAC version do you have on your pc? (if you do not know for sure visit microsoft and get the component checker) On Wed, 30 Mar 2005 16:54:57 -0600, Steve Erbach wrote: > Dear Group, > > I'm baffled. I have an Access 2000 ADP that connects to a certain SQL > Server database. I have an Access 2000 MDB that connects via ODBC to > the same SQL Server database. I have an Access 2003 ADP that connects > to the same database. I have an ASP.NET project that connects to the > same database. > > My problem is that I can't seem to connect to the database using SQL > Server Enterprise Manager. I go to add a new Registration and up pops > the 'Registered SQL Server Properties' dialog box. I fill in the IP > address of the SQL Server and select the 'Use SQL Server > Authentication' button, and type in the Login Name and Password. When > I click OK I get the following message: > > ----------------------------------------------- > SQL Server Enterprise Manager > ----------------------------------------------- > ? SQL Server registration failed because of the connection failure > displayed below. Do you wish to Modify anyway? > > Cannot open user default database. Login failed. > ----------------------------------------------- > > I've used Enterprise Manager to set up four other SQL Server > connections that all work fine. Any ideas why I can't get EM to create > a new registration? > > -- > Regards, > > Steve Erbach > Scientific Marketing > Neenah, WI > www.swerbach.com > Security Page: www.swerbach.com/security > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > -- -Francisco http://pcthis.blogspot.com | PC news with out the jargon! http://sqlthis.blogspot.com | Tsql and More... From DavidL at sierranevada.com Thu Mar 31 12:25:14 2005 From: DavidL at sierranevada.com (David Lewis) Date: Thu, 31 Mar 2005 10:25:14 -0800 Subject: [dba-SQLServer] Re: Add constraint Message-ID: <9923336B7F4D1A459B983065D95397B9C4BE03@pale.sierranevada.corp> Ken: I have not actually done this, but from BOL: D. Alter a table to add an unverified constraint This example adds a constraint to an existing column in the table. The column has a value that violates the constraint; therefore, WITH NOCHECK is used to prevent the constraint from being validated against existing rows, and to allow the constraint to be added. CREATE TABLE doc_exd ( column_a INT) GO INSERT INTO doc_exd VALUES (-1) GO ALTER TABLE doc_exd WITH NOCHECK ADD CONSTRAINT exd_check CHECK (column_a > 1) GO EXEC sp_help doc_exd GO DROP TABLE doc_exd GO Message: 1 Date: Tue, 29 Mar 2005 11:53:29 -0800 From: "Ken Stoker" Subject: [dba-SQLServer] Adding a default to an existing column To: David, Thanks for your reply, but I had tried that already and received and error stating there was a syntax error near ADD. Am I missing a comma or a bracket or something like that? Ken -----Original Message----- From: David Lewis [mailto:DavidL at sierranevada.com] Sent: Wednesday, March 30, 2005 10:22 AM To: dba-sqlserver at databaseadvisors.com Cc: kens.programming at verizon.net Subject: ADD Constraint Not sure, but I think you need ADD CONSTRAINT D. Lewis Message: 1 Date: Tue, 29 Mar 2005 11:53:29 -0800 From: "Ken Stoker" Subject: [dba-SQLServer] Adding a default to an existing column To: Message-ID: <0IE400I33PSVKK00 at vms042.mailsrvcs.net> Content-Type: text/plain; charset="windows-1250" I have put together the following to add a default to an existing table. It is telling me there is a syntax error near CONSTRAINT. I have tried many different things, this being the latest, getting similar problems. ALTER TABLE TableName ALTER COLUMN ColumnName UserDefinedType NULL CONSTRAINT AddOwnerDflt DEFAULT '100000' WITH VALUES GO Thanks for any help. Ken -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.8.6 - Release Date: 3/30/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.8.6 - Release Date: 3/30/2005 ------------------------------ Message: 3 Date: Wed, 30 Mar 2005 16:54:57 -0600 From: Steve Erbach Subject: [dba-SQLServer] New SQL Server Registration problem To: dba-sqlserver at databaseadvisors.com Message-ID: <39cb22f3050330145440a38e50 at mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Dear Group, I'm baffled. I have an Access 2000 ADP that connects to a certain SQL Server database. I have an Access 2000 MDB that connects via ODBC to the same SQL Server database. I have an Access 2003 ADP that connects to the same database. I have an ASP.NET project that connects to the same database. My problem is that I can't seem to connect to the database using SQL Server Enterprise Manager. I go to add a new Registration and up pops the 'Registered SQL Server Properties' dialog box. I fill in the IP address of the SQL Server and select the 'Use SQL Server Authentication' button, and type in the Login Name and Password. When I click OK I get the following message: ----------------------------------------------- SQL Server Enterprise Manager ----------------------------------------------- ? SQL Server registration failed because of the connection failure displayed below. Do you wish to Modify anyway? Cannot open user default database. Login failed. ----------------------------------------------- I've used Enterprise Manager to set up four other SQL Server connections that all work fine. Any ideas why I can't get EM to create a new registration? -- Regards, Steve Erbach Scientific Marketing Neenah, WI www.swerbach.com Security Page: www.swerbach.com/security ------------------------------ Message: 4 Date: Thu, 31 Mar 2005 08:35:52 -0800 From: Francisco Tapia Subject: Re: [dba-SQLServer] New SQL Server Registration problem To: dba-sqlserver at databaseadvisors.com Message-ID: Content-Type: text/plain; charset=ISO-8859-1 what MDAC version do you have on your pc? (if you do not know for sure visit microsoft and get the component checker) On Wed, 30 Mar 2005 16:54:57 -0600, Steve Erbach wrote: > Dear Group, > > I'm baffled. I have an Access 2000 ADP that connects to a certain SQL > Server database. I have an Access 2000 MDB that connects via ODBC to > the same SQL Server database. I have an Access 2003 ADP that connects > to the same database. I have an ASP.NET project that connects to the > same database. > > My problem is that I can't seem to connect to the database using SQL > Server Enterprise Manager. I go to add a new Registration and up pops > the 'Registered SQL Server Properties' dialog box. I fill in the IP > address of the SQL Server and select the 'Use SQL Server > Authentication' button, and type in the Login Name and Password. When > I click OK I get the following message: > > ----------------------------------------------- > SQL Server Enterprise Manager > ----------------------------------------------- > ? SQL Server registration failed because of the connection failure > displayed below. Do you wish to Modify anyway? > > Cannot open user default database. Login failed. > ----------------------------------------------- > > I've used Enterprise Manager to set up four other SQL Server > connections that all work fine. Any ideas why I can't get EM to create > a new registration? > > -- > Regards, > > Steve Erbach > Scientific Marketing > Neenah, WI > www.swerbach.com > Security Page: www.swerbach.com/security > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > -- -Francisco http://pcthis.blogspot.com | PC news with out the jargon! http://sqlthis.blogspot.com | Tsql and More... ------------------------------ _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver End of dba-SQLServer Digest, Vol 25, Issue 17 ********************************************* From erbachs at gmail.com Thu Mar 31 16:26:36 2005 From: erbachs at gmail.com (Steve Erbach) Date: Thu, 31 Mar 2005 16:26:36 -0600 Subject: [dba-SQLServer] New SQL Server Registration problem In-Reply-To: References: <39cb22f3050330145440a38e50@mail.gmail.com> Message-ID: <39cb22f30503311426340c265a@mail.gmail.com> Francisco, Component checker shows v. 2.8 SP1 for MDAC. I'm running Windows XP SP2. Steve Erbach On Thu, 31 Mar 2005 08:35:52 -0800, Francisco Tapia wrote: > what MDAC version do you have on your pc? (if you do not know for sure > visit microsoft and get the component checker) >