From serbach at new.rr.com Wed Dec 1 07:58:30 2004 From: serbach at new.rr.com (Steven W. Erbach) Date: Wed, 1 Dec 2004 07:58:30 -0600 Subject: [dba-SQLServer] Graphics in SQL Server table In-Reply-To: References: <20041130130504.1719938970.serbach@new.rr.com> Message-ID: <20041201075830.1145678091.serbach@new.rr.com> Jim, I've done no performance testing yet. I made the decision to store the images in the db because I just couldn't face the prospect of having to manage thousands (potentially 10's of thousands) of images in the file system. I'll keep you lot posted on what I find as far as usability. These images are for an industrial therapy database and they show the typical stresses encountered during a factory job: lifting, manipulating, reaching, bending, etc. There will generally be 20 or so images per job description and I'm going to display them just one-at-a-time. Therefore the performance shouldn't be too bad. I recommended GIFs to my client because of storage space considerations. GIF has the most compact requirement with only 256 colors, and the image quality isn't bad. That may sound funny but the original images are captured with a video camera and then frames are taken from the video. The video capture program only saves these images in Windows bitmap format, so they're about 1 MB each to start. I use IrfanView to "rescan" the images to shrink them to a standard size and convert them to GIFs for the db. Steve Erbach Neenah, WI > ------------Original Message------------ > From: "Jim Lawrence (AccessD)" > To: dba-sqlserver at databaseadvisors.com > Date: Tue, Nov-30-2004 5:33 PM > Subject: RE: [dba-SQLServer] Graphics in SQL Server table > > Hi Steve: > > Have you had a chance to test the performanace rates, comparing the > standard storing method (outside the SQL) and new ADO.Stream method. I > would be interested to hear the results from a large 'imbedded' > implementation. > > Just one question: Why were the files all convereted to GIF format > instead of maybe JPG? > > Jim > From serbach at new.rr.com Wed Dec 1 08:15:24 2004 From: serbach at new.rr.com (Steven W. Erbach) Date: Wed, 1 Dec 2004 08:15:24 -0600 Subject: [dba-SQLServer] Graphics in SQL Server table In-Reply-To: <26a96cce041130151525bf1646@mail.gmail.com> References: <20041130130504.1719938970.serbach@new.rr.com> <26a96cce041130151525bf1646@mail.gmail.com> Message-ID: <20041201081524.331575470.serbach@new.rr.com> Mark, If you use the Stream method to store the PDFs then the database "bloat" pretty much goes away. Of course, you need to use the same method to read it back out and then feed it to Acrobat. The main benefits of storing images in the db are: any queries you do will automagically include your images; backup is simplified; organization is simplified (I just couldn't face coming up with a method for keeping track of -- potentially -- 10's of thousands of images in the file system); and security is simplified. For example, your PDFs would need to be separately secured from the possibility of download. The SQL db already has that covered. All for an "overhead" of about 18% as far as I can determine. That is, the table in which the images are stored is just 18% bigger than the combined file sizes. The table, of course, contains a primary key, foreign key, and a description. I can't claim any great proficiency in this area. I'm still feeling my way. But it seems to me that image storage in a SQL Server db isn't that bad an idea. We'll see shortly. Steve Erbach Neenah, WI > ------------Original Message------------ > From: Mark Breen > To: dba-sqlserver at databaseadvisors.com > Date: Tue, Nov-30-2004 5:16 PM > Subject: Re: [dba-SQLServer] Graphics in SQL Server table > > Hello Steve, > > Now that is interesting, but what I would really be interested in for > a potential future project is (and I know this is a solution trying to > find a problem), what do you think of storing a whole lots of PDF's in > SQL? > > Of course I can store them in the file system, but I am going to have > to build a system that will track and print PDF's, your email has made > me wonder whether there is any benefit in attempting to keep them in > the db. > > One thing that I will have to do in have a sort of in-form PDF viewer. > > Again, there is no need to store them in the db, but I just thought it > might be an idea. > > Any thoughts? Are you glad that you stored your gig's in the db, did > you reap any benefit? > > Thanks > > Mark > From Developer at UltraDNT.com Wed Dec 1 10:07:16 2004 From: Developer at UltraDNT.com (Steve Conklin (Developer@UltraDNT)) Date: Wed, 1 Dec 2004 11:07:16 -0500 Subject: [dba-SQLServer] Processes Causing Blockages SQL 2000 In-Reply-To: <20041201081524.331575470.serbach@new.rr.com> Message-ID: <003001c4d7bf$d3ed82e0$0200a8c0@COA3> I have 10-12 Access 2k front-end applications against a SQL 2000 database. There are about 70 users total. Occaisionally, including right now, they perform otherwise normal stuff that randomly causes "blocking" on the server. No one else can do anything when this happens. Make the offenders logout and re-boot, problem goes away for 2-3 weeks. The thing that puzzles me the most is that it is always "unbound" operations that do this (ADO commands and pass-thru queries), never any of the bound forms. I believe it may be latency on the network, but their admins insist that couldn't be the case. Any advice? TIA Steve From martyconnelly at shaw.ca Wed Dec 1 11:57:10 2004 From: martyconnelly at shaw.ca (MartyConnelly) Date: Wed, 01 Dec 2004 09:57:10 -0800 Subject: [dba-SQLServer] Processes Causing Blockages SQL 2000 References: <003001c4d7bf$d3ed82e0$0200a8c0@COA3> Message-ID: <41AE05F6.6020405@shaw.ca> Have a look at DBCC in BOL You could run this SP to determine who or what process is locking and blocking http://www.sommarskog.se/sqlutil/aba_lockinfo.html Steve Conklin (Developer at UltraDNT) wrote: >I have 10-12 Access 2k front-end applications against a SQL 2000 >database. There are about 70 users total. Occaisionally, including >right now, they perform otherwise normal stuff that randomly causes >"blocking" on the server. No one else can do anything when this >happens. Make the offenders logout and re-boot, problem goes away for >2-3 weeks. The thing that puzzles me the most is that it is always >"unbound" operations that do this (ADO commands and pass-thru queries), >never any of the bound forms. > >I believe it may be latency on the network, but their admins insist that >couldn't be the case. >Any advice? > >TIA >Steve > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > > > -- Marty Connelly Victoria, B.C. Canada From Developer at UltraDNT.com Wed Dec 1 12:32:19 2004 From: Developer at UltraDNT.com (Steve Conklin (Developer@UltraDNT)) Date: Wed, 1 Dec 2004 13:32:19 -0500 Subject: [dba-SQLServer] Processes Causing Blockages SQL 2000 In-Reply-To: <41AE05F6.6020405@shaw.ca> Message-ID: <003d01c4d7d4$1756a750$0200a8c0@COA3> Thanks, Marty, but I guess I should be more specific ... Enterprise Manager is telling me who, and what command (that's where I see that it's the ADO and SP calls). Maybe I should x-post, but what I'm really wondering about are root casues. I don't think its my apps, since its always different commands. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of MartyConnelly Sent: Wednesday, December 01, 2004 12:57 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Processes Causing Blockages SQL 2000 Have a look at DBCC in BOL You could run this SP to determine who or what process is locking and blocking http://www.sommarskog.se/sqlutil/aba_lockinfo.html Steve Conklin (Developer at UltraDNT) wrote: >I have 10-12 Access 2k front-end applications against a SQL 2000 >database. There are about 70 users total. Occaisionally, including >right now, they perform otherwise normal stuff that randomly causes >"blocking" on the server. No one else can do anything when this >happens. Make the offenders logout and re-boot, problem goes away for >2-3 weeks. The thing that puzzles me the most is that it is always >"unbound" operations that do this (ADO commands and pass-thru queries), >never any of the bound forms. > >I believe it may be latency on the network, but their admins insist >that couldn't be the case. Any advice? > >TIA >Steve > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > > > -- Marty Connelly Victoria, B.C. Canada _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From mark.breen at gmail.com Wed Dec 1 15:33:03 2004 From: mark.breen at gmail.com (Mark Breen) Date: Wed, 1 Dec 2004 21:33:03 +0000 Subject: [dba-SQLServer] Graphics in SQL Server table In-Reply-To: <20041201081524.331575470.serbach@new.rr.com> References: <20041130130504.1719938970.serbach@new.rr.com> <26a96cce041130151525bf1646@mail.gmail.com> <20041201081524.331575470.serbach@new.rr.com> Message-ID: <26a96cce04120113335703dbe9@mail.gmail.com> Interesting, I will have a look at it if the contract comes up and let you know. Thanks Mark On Wed, 1 Dec 2004 08:15:24 -0600, Steven W. Erbach wrote: > Mark, > > If you use the Stream method to store the PDFs then the database "bloat" pretty much goes away. Of course, you need to use the same method to read it back out and then feed it to Acrobat. > > The main benefits of storing images in the db are: any queries you do will automagically include your images; backup is simplified; organization is simplified (I just couldn't face coming up with a method for keeping track of -- potentially -- 10's of thousands of images in the file system); and security is simplified. For example, your PDFs would need to be separately secured from the possibility of download. The SQL db already has that covered. > > All for an "overhead" of about 18% as far as I can determine. That is, the table in which the images are stored is just 18% bigger than the combined file sizes. The table, of course, contains a primary key, foreign key, and a description. > > I can't claim any great proficiency in this area. I'm still feeling my way. But it seems to me that image storage in a SQL Server db isn't that bad an idea. We'll see shortly. > > > > Steve Erbach > Neenah, WI > > > ------------Original Message------------ > > From: Mark Breen > > To: dba-sqlserver at databaseadvisors.com > > Date: Tue, Nov-30-2004 5:16 PM > > Subject: Re: [dba-SQLServer] Graphics in SQL Server table > > > > Hello Steve, > > > > Now that is interesting, but what I would really be interested in for > > a potential future project is (and I know this is a solution trying to > > find a problem), what do you think of storing a whole lots of PDF's in > > SQL? > > > > Of course I can store them in the file system, but I am going to have > > to build a system that will track and print PDF's, your email has made > > me wonder whether there is any benefit in attempting to keep them in > > the db. > > > > One thing that I will have to do in have a sort of in-form PDF viewer. > > > > Again, there is no need to store them in the db, but I just thought it > > might be an idea. > > > > Any thoughts? Are you glad that you stored your gig's in the db, did > > you reap any benefit? > > > > Thanks > > > > Mark > > > > > _______________________________________________ > > > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From tuxedo_man at hotmail.com Mon Dec 6 22:46:20 2004 From: tuxedo_man at hotmail.com (Billy Pang) Date: Tue, 07 Dec 2004 04:46:20 +0000 Subject: [dba-SQLServer] Informix ODBC datasource Message-ID: Does anyone know a good source for obtaining odbc for an Informix database? thanks in advance, Billy From accessd at shaw.ca Mon Dec 6 23:22:22 2004 From: accessd at shaw.ca (Jim Lawrence (AccessD)) Date: Mon, 06 Dec 2004 21:22:22 -0800 Subject: [dba-SQLServer] Informix ODBC datasource In-Reply-To: Message-ID: Hi Billy: Check the following article out: http://gethelp.devx.com/techtips/info_pro/10min/10min0200/10min0200.asp HTH Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Billy Pang Sent: Monday, December 06, 2004 8:46 PM To: dba-ot at databaseadvisors.com; dba-SQLServer at databaseadvisors.com Subject: [dba-SQLServer] Informix ODBC datasource Does anyone know a good source for obtaining odbc for an Informix database? thanks in advance, Billy _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From rmoore at comtechpst.com Tue Dec 7 09:54:06 2004 From: rmoore at comtechpst.com (Ron Moore) Date: Tue, 7 Dec 2004 10:54:06 -0500 Subject: [dba-SQLServer] IF THEN Logic - DTS or sp?: Message-ID: I need to read a couple of flags from a semi-static table and then 0, 1, or 2 DTS packages accordingly. What's the best method for reading these flags and determining which package(s) to execute? Can IF THEN logic be implemented reliably within a DTS package (I have done so in the past with activeX script testing if an external text file exists - but this would require reading the flag from a SQL table)? Or, can I successfully run a DTS package from a stored procedure ('googling' show a few posts but lots of complaints and lack of success)? TIA, as always, Ron Moore From CMackin at quiznos.com Tue Dec 7 12:56:58 2004 From: CMackin at quiznos.com (Mackin, Christopher) Date: Tue, 7 Dec 2004 11:56:58 -0700 Subject: [dba-SQLServer] Who's using my db? Message-ID: Does anyone have any suggestions on how to track/view a log of users that have accessed information on the Server and specifically at the Database level? There are users authorized to view a particular db with confidential information, and I need to verify that no other users are accessing this data. In this situation it's rather complex because security keeps out the majority of people, but there are certain people with the sa password and admin rights on the server that should not be looking either. Thanks in advance, Chris Mackin From cfoust at infostatsystems.com Tue Dec 7 15:24:52 2004 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 7 Dec 2004 13:24:52 -0800 Subject: [dba-SQLServer] Who's using my db? Message-ID: Um ... You have dbas that can't look at the data?? Charlotte Foust -----Original Message----- From: Mackin, Christopher [mailto:CMackin at quiznos.com] Sent: Tuesday, December 07, 2004 10:57 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Who's using my db? Does anyone have any suggestions on how to track/view a log of users that have accessed information on the Server and specifically at the Database level? There are users authorized to view a particular db with confidential information, and I need to verify that no other users are accessing this data. In this situation it's rather complex because security keeps out the majority of people, but there are certain people with the sa password and admin rights on the server that should not be looking either. Thanks in advance, Chris Mackin _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From CMackin at quiznos.com Tue Dec 7 15:36:35 2004 From: CMackin at quiznos.com (Mackin, Christopher) Date: Tue, 7 Dec 2004 14:36:35 -0700 Subject: [dba-SQLServer] Who's using my db? Message-ID: Um...Yes. The server is owned by one company and the IT infrastructure is maintained by the parent company, the parent company's IT staff has full rights to everything on the server in order to maintain the system as a whole but is not allowed to be looking at the data in specific db's. -Chris Mackin -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Charlotte Foust Sent: Tuesday, December 07, 2004 2:25 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] Who's using my db? Um ... You have dbas that can't look at the data?? Charlotte Foust -----Original Message----- From: Mackin, Christopher [mailto:CMackin at quiznos.com] Sent: Tuesday, December 07, 2004 10:57 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Who's using my db? Does anyone have any suggestions on how to track/view a log of users that have accessed information on the Server and specifically at the Database level? There are users authorized to view a particular db with confidential information, and I need to verify that no other users are accessing this data. In this situation it's rather complex because security keeps out the majority of people, but there are certain people with the sa password and admin rights on the server that should not be looking either. Thanks in advance, Chris Mackin _______________________________________________ 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 tuxedo_man at hotmail.com Wed Dec 8 01:39:52 2004 From: tuxedo_man at hotmail.com (Billy Pang) Date: Wed, 08 Dec 2004 07:39:52 +0000 Subject: [dba-SQLServer] Informix ODBC datasource In-Reply-To: Message-ID: Thanks for the link, Jim. I'll check it out. Billy >From: "Jim Lawrence (AccessD)" >Reply-To: dba-sqlserver at databaseadvisors.com >To: dba-sqlserver at databaseadvisors.com >Subject: RE: [dba-SQLServer] Informix ODBC datasource >Date: Mon, 06 Dec 2004 21:22:22 -0800 > >Hi Billy: > >Check the following article out: >http://gethelp.devx.com/techtips/info_pro/10min/10min0200/10min0200.asp > >HTH >Jim > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Billy >Pang >Sent: Monday, December 06, 2004 8:46 PM >To: dba-ot at databaseadvisors.com; dba-SQLServer at databaseadvisors.com >Subject: [dba-SQLServer] Informix ODBC datasource > > >Does anyone know a good source for obtaining odbc for an Informix database? > >thanks in advance, > >Billy > > >_______________________________________________ >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 rmoore at comtechpst.com Wed Dec 8 12:03:38 2004 From: rmoore at comtechpst.com (Ron Moore) Date: Wed, 8 Dec 2004 13:03:38 -0500 Subject: [dba-SQLServer] ActiveX & DTSTaskExecResult - was [IF THEN Logic - DTS or sp?]: Message-ID: With no response yet, and wanting to avoid the end user's lack of permissions needed for dtsrun or sp_OAccess, I've tried the following. In a DTS package, I've added a data pump to export the flags to an external text file. Then an ActiveX script Task reads the flags from the text file and stuffs them into variables. There is a success and fail path for the script. I also have an IF-THEN-ELSE block in the script that sets the DTSTaskExecResult as Success or Failure. This approach works in another package, but fails here. IF CUST_MD_FLAG = "1" OR MD_FLAG = "1" THEN Main = DTSTaskExecResult_Success ELSE Main = DTSTaskExecResult_Failure END IF End Function Any Ideas? In trouble again, Ron -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Ron Moore Sent: Tuesday, December 07, 2004 10:54 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] IF THEN Logic - DTS or sp?: I need to read a couple of flags from a semi-static table and then 0, 1, or 2 DTS packages accordingly. What's the best method for reading these flags and determining which package(s) to execute? Can IF THEN logic be implemented reliably within a DTS package (I have done so in the past with activeX script testing if an external text file exists - but this would require reading the flag from a SQL table)? Or, can I successfully run a DTS package from a stored procedure ('googling' show a few posts but lots of complaints and lack of success)? TIA, as always, Ron Moore _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From mark.breen at gmail.com Wed Dec 8 13:37:07 2004 From: mark.breen at gmail.com (Mark Breen) Date: Wed, 8 Dec 2004 19:37:07 +0000 Subject: [dba-SQLServer] Who's using my db? In-Reply-To: References: Message-ID: <26a96cce0412081137135b26b2@mail.gmail.com> Hello Christopher, I am very interested in this one also, Charlotte, I think that this is a regular situation, dba's are responsible for a payroll database that I know of, but they really should not be in the tables looking at data. Christopher, I have no answer for you, but I would love to see what you come up with. it strikes me that OS security may be a starting point 'cause with sa, we really do not know who it is. Cheers Mark in wet but not freezing cold Ireland. ( I am just back from a weeking in Belgium, boy is it cold over there, it gets down to close to freezing at night) I had to wear a coat and a hat at times. On Tue, 7 Dec 2004 14:36:35 -0700, Mackin, Christopher wrote: > Um...Yes. > > The server is owned by one company and the IT infrastructure is maintained by the parent company, the parent company's IT staff has full rights to everything on the server in order to maintain the system as a whole but is not allowed to be looking at the data in specific db's. > > -Chris Mackin > > > > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of > Charlotte Foust > Sent: Tuesday, December 07, 2004 2:25 PM > To: dba-sqlserver at databaseadvisors.com > Subject: RE: [dba-SQLServer] Who's using my db? > > Um ... You have dbas that can't look at the data?? > > Charlotte Foust > > -----Original Message----- > From: Mackin, Christopher [mailto:CMackin at quiznos.com] > Sent: Tuesday, December 07, 2004 10:57 AM > To: dba-sqlserver at databaseadvisors.com > Subject: [dba-SQLServer] Who's using my db? > > Does anyone have any suggestions on how to track/view a log of users > that have accessed information on the Server and specifically at the > Database level? > > There are users authorized to view a particular db with confidential > information, and I need to verify that no other users are accessing this > data. In this situation it's rather complex because security keeps out > the majority of people, but there are certain people with the sa > password and admin rights on the server that should not be looking > either. > > Thanks in advance, > Chris Mackin > _______________________________________________ > 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 CMackin at quiznos.com Wed Dec 8 15:50:37 2004 From: CMackin at quiznos.com (Mackin, Christopher) Date: Wed, 8 Dec 2004 14:50:37 -0700 Subject: [dba-SQLServer] Who's using my db? Message-ID: If I could somehow grab either the computer name or windows login name then I'd fine, waht is eluding me is how to trigger an event when a connection to the server or database is created, or even if that information is already stored somewhere. Mark, I will let you know if I come up with a viable solution to this. -Chris Mackin -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Mark Breen Sent: Wednesday, December 08, 2004 12:37 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Who's using my db? Hello Christopher, I am very interested in this one also, Charlotte, I think that this is a regular situation, dba's are responsible for a payroll database that I know of, but they really should not be in the tables looking at data. Christopher, I have no answer for you, but I would love to see what you come up with. it strikes me that OS security may be a starting point 'cause with sa, we really do not know who it is. Cheers Mark in wet but not freezing cold Ireland. ( I am just back from a weeking in Belgium, boy is it cold over there, it gets down to close to freezing at night) I had to wear a coat and a hat at times. On Tue, 7 Dec 2004 14:36:35 -0700, Mackin, Christopher wrote: > Um...Yes. > > The server is owned by one company and the IT infrastructure is maintained by the parent company, the parent company's IT staff has full rights to everything on the server in order to maintain the system as a whole but is not allowed to be looking at the data in specific db's. > > -Chris Mackin > > > > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of > Charlotte Foust > Sent: Tuesday, December 07, 2004 2:25 PM > To: dba-sqlserver at databaseadvisors.com > Subject: RE: [dba-SQLServer] Who's using my db? > > Um ... You have dbas that can't look at the data?? > > Charlotte Foust > > -----Original Message----- > From: Mackin, Christopher [mailto:CMackin at quiznos.com] > Sent: Tuesday, December 07, 2004 10:57 AM > To: dba-sqlserver at databaseadvisors.com > Subject: [dba-SQLServer] Who's using my db? > > Does anyone have any suggestions on how to track/view a log of users > that have accessed information on the Server and specifically at the > Database level? > > There are users authorized to view a particular db with confidential > information, and I need to verify that no other users are accessing this > data. In this situation it's rather complex because security keeps out > the majority of people, but there are certain people with the sa > password and admin rights on the server that should not be looking > either. > > Thanks in advance, > Chris Mackin > _______________________________________________ > 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 artful at rogers.com Wed Dec 8 16:57:01 2004 From: artful at rogers.com (Arthur Fuller) Date: Wed, 08 Dec 2004 17:57:01 -0500 Subject: [dba-SQLServer] 2-minute window In-Reply-To: References: Message-ID: <41B786BD.80208@rogers.com> I have to create a situation in which the customer (web) selects an item and I want to put a 2-minute limit on the grab, so if the user fails to click Submit within two minutes the grab is cancelled. I really have no idea how to implement this. In keeping with my general predilections, then I would much prefer that it occur in the db not in the front end, not least because in this app there will be both an Access FE and a web FE, so I would like both to fire a sproc or something to effect this 2-minute window. Maybe I could write the grabs to a new table, but I would need to observe that in the real table the quantity is 10 and in the temp table 4 grabs are currently active, i.e. there are only 2 items remaining... which could change if the 2-minute window expires or the user clicks Cancel. I'm quite unsure how to go about this. Any advice? As stated above, I would much prefer to do it in the BE than the FEs. Arthur > -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.289 / Virus Database: 265.4.7 - Release Date: 12/7/2004 From artful at rogers.com Wed Dec 8 17:03:46 2004 From: artful at rogers.com (Arthur Fuller) Date: Wed, 08 Dec 2004 18:03:46 -0500 Subject: [dba-SQLServer] Who's using my db? In-Reply-To: References: Message-ID: <41B78852.4030103@rogers.com> No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.289 / Virus Database: 265.4.7 - Release Date: 12/7/2004 From CMackin at quiznos.com Wed Dec 8 17:13:11 2004 From: CMackin at quiznos.com (Mackin, Christopher) Date: Wed, 8 Dec 2004 16:13:11 -0700 Subject: [dba-SQLServer] 2-minute window Message-ID: How about setting it up so that the pick process schedules a job to run on the server in 2 minutes that adds the part back into the inventory. If the user wanted to keep the item you would have to either cancel the job or set up a flag that the stored procedure checkls to cancel the addition back in. -Chris Mackin -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Arthur Fuller Sent: Wednesday, December 08, 2004 3:57 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] 2-minute window I have to create a situation in which the customer (web) selects an item and I want to put a 2-minute limit on the grab, so if the user fails to click Submit within two minutes the grab is cancelled. I really have no idea how to implement this. In keeping with my general predilections, then I would much prefer that it occur in the db not in the front end, not least because in this app there will be both an Access FE and a web FE, so I would like both to fire a sproc or something to effect this 2-minute window. Maybe I could write the grabs to a new table, but I would need to observe that in the real table the quantity is 10 and in the temp table 4 grabs are currently active, i.e. there are only 2 items remaining... which could change if the 2-minute window expires or the user clicks Cancel. I'm quite unsure how to go about this. Any advice? As stated above, I would much prefer to do it in the BE than the FEs. Arthur > -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.289 / Virus Database: 265.4.7 - Release Date: 12/7/2004 _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From tuxedo_man at hotmail.com Wed Dec 8 17:31:08 2004 From: tuxedo_man at hotmail.com (Billy Pang) Date: Wed, 08 Dec 2004 23:31:08 +0000 Subject: [dba-SQLServer] 2-minute window In-Reply-To: <41B786BD.80208@rogers.com> Message-ID: how about a new table that stores the temporary grabs. in that table is a column called "expire_datetime". when that table is populated, the "expire_datetime" is set to 2 minutes into the future. A sql server agent that runs every two minutes can remove records that have expired. >From: Arthur Fuller >Reply-To: dba-sqlserver at databaseadvisors.com >To: dba-sqlserver at databaseadvisors.com >Subject: [dba-SQLServer] 2-minute window >Date: Wed, 08 Dec 2004 17:57:01 -0500 > >I have to create a situation in which the customer (web) selects an item >and I want to put a 2-minute limit on the grab, so if the user fails to >click Submit within two minutes the grab is cancelled. > >I really have no idea how to implement this. In keeping with my general >predilections, then I would much prefer that it occur in the db not in the >front end, not least because in this app there will be both an Access FE >and a web FE, so I would like both to fire a sproc or something to effect >this 2-minute window. > >Maybe I could write the grabs to a new table, but I would need to observe >that in the real table the quantity is 10 and in the temp table 4 grabs are >currently active, i.e. there are only 2 items remaining... which could >change if the 2-minute window expires or the user clicks Cancel. > >I'm quite unsure how to go about this. Any advice? As stated above, I would >much prefer to do it in the BE than the FEs. > >Arthur > >> > > >-- >No virus found in this outgoing message. >Checked by AVG Anti-Virus. >Version: 7.0.289 / Virus Database: 265.4.7 - Release Date: 12/7/2004 > >_______________________________________________ >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 Wed Dec 8 20:10:10 2004 From: accessd at shaw.ca (Jim Lawrence (AccessD)) Date: Wed, 08 Dec 2004 18:10:10 -0800 Subject: [dba-SQLServer] Who's using my db? In-Reply-To: <26a96cce0412081137135b26b2@mail.gmail.com> Message-ID: Hi Christopher: Is it not possible to have the data on the SQL only accessed through SPs or views. In each of these SPs there would be a function call that would write a record of it's access to a transaction log table. This technique is done through all POS systems to track the users, access dates, times and any changes made to the invoice records. It all depends on your permissions on the BE. Jim > -----Original Message----- > From: Mackin, Christopher [mailto:CMackin at quiznos.com] > Sent: Tuesday, December 07, 2004 10:57 AM > To: dba-sqlserver at databaseadvisors.com > Subject: [dba-SQLServer] Who's using my db? > > Does anyone have any suggestions on how to track/view a log of users > that have accessed information on the Server and specifically at the > Database level? > > There are users authorized to view a particular db with confidential > information, and I need to verify that no other users are accessing this > data. In this situation it's rather complex because security keeps out > the majority of people, but there are certain people with the sa > password and admin rights on the server that should not be looking > either. > > Thanks in advance, > Chris Mackin From artful at rogers.com Thu Dec 9 01:01:38 2004 From: artful at rogers.com (Arthur Fuller) Date: Thu, 09 Dec 2004 02:01:38 -0500 Subject: [dba-SQLServer] 2-minute window In-Reply-To: References: Message-ID: <41B7F852.8090407@rogers.com> No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.289 / Virus Database: 265.4.7 - Release Date: 12/7/2004 From artful at rogers.com Thu Dec 9 01:02:35 2004 From: artful at rogers.com (Arthur Fuller) Date: Thu, 09 Dec 2004 02:02:35 -0500 Subject: [dba-SQLServer] 2-minute window In-Reply-To: References: Message-ID: <41B7F88B.7030105@rogers.com> Also interesting. I will give this approach a test as well. Thanks, Billy! Billy Pang wrote: > how about a new table that stores the temporary grabs. in that table > is a column called "expire_datetime". when that table is populated, > the "expire_datetime" is set to 2 minutes into the future. A sql > server agent that runs every two minutes can remove records that have > expired. > > > >> From: Arthur Fuller >> Reply-To: dba-sqlserver at databaseadvisors.com >> To: dba-sqlserver at databaseadvisors.com >> Subject: [dba-SQLServer] 2-minute window >> Date: Wed, 08 Dec 2004 17:57:01 -0500 >> >> I have to create a situation in which the customer (web) selects an >> item and I want to put a 2-minute limit on the grab, so if the user >> fails to click Submit within two minutes the grab is cancelled. >> >> I really have no idea how to implement this. In keeping with my >> general predilections, then I would much prefer that it occur in the >> db not in the front end, not least because in this app there will be >> both an Access FE and a web FE, so I would like both to fire a sproc >> or something to effect this 2-minute window. >> >> Maybe I could write the grabs to a new table, but I would need to >> observe that in the real table the quantity is 10 and in the temp >> table 4 grabs are currently active, i.e. there are only 2 items >> remaining... which could change if the 2-minute window expires or the >> user clicks Cancel. >> >> I'm quite unsure how to go about this. Any advice? As stated above, I >> would much prefer to do it in the BE than the FEs. >> >> Arthur >> >>> >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Anti-Virus. >> Version: 7.0.289 / Virus Database: 265.4.7 - Release Date: 12/7/2004 >> >> _______________________________________________ >> 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 > > > -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.289 / Virus Database: 265.4.7 - Release Date: 12/7/2004 From mark.breen at gmail.com Thu Dec 9 01:31:24 2004 From: mark.breen at gmail.com (Mark Breen) Date: Thu, 9 Dec 2004 07:31:24 +0000 Subject: [dba-SQLServer] Who's using my db? In-Reply-To: References: Message-ID: <26a96cce0412082331619b4c64@mail.gmail.com> Hello Christopher, My guess is that unless MS provide this to you, you have no chance to program it. There are so many ways to even connect to SQL, ADO, ODBC, DTS, etc, that you would find it difficult to code it yourself, but aside from that, I have never heard of any type of events that fire when you open a table, or move to a new record etc. So, unless MS log all this (and it would surely be a hugh log file), I fear that it may not be possible. But again, it would be facinating to see if such a feature is available. Mark On Wed, 8 Dec 2004 14:50:37 -0700, Mackin, Christopher wrote: > If I could somehow grab either the computer name or windows login name then I'd fine, waht is eluding me is how to trigger an event when a connection to the server or database is created, or even if that information is already stored somewhere. > > Mark, I will let you know if I come up with a viable solution to this. > > > > -Chris Mackin > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Mark > Breen > Sent: Wednesday, December 08, 2004 12:37 PM > To: dba-sqlserver at databaseadvisors.com > Subject: Re: [dba-SQLServer] Who's using my db? > > Hello Christopher, > > I am very interested in this one also, > > Charlotte, I think that this is a regular situation, dba's are > responsible for a payroll database that I know of, but they really > should not be in the tables looking at data. > > Christopher, I have no answer for you, but I would love to see what > you come up with. it strikes me that OS security may be a starting > point 'cause with sa, we really do not know who it is. > > Cheers > > Mark in wet but not freezing cold Ireland. > ( I am just back from a weeking in Belgium, boy is it cold over there, > it gets down to close to freezing at night) I had to wear a coat and > a hat at times. > > On Tue, 7 Dec 2004 14:36:35 -0700, Mackin, Christopher > wrote: > > Um...Yes. > > > > The server is owned by one company and the IT infrastructure is maintained by the parent company, the parent company's IT staff has full rights to everything on the server in order to maintain the system as a whole but is not allowed to be looking at the data in specific db's. > > > > -Chris Mackin > > > > > > > > > > -----Original Message----- > > From: dba-sqlserver-bounces at databaseadvisors.com > > [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of > > Charlotte Foust > > Sent: Tuesday, December 07, 2004 2:25 PM > > To: dba-sqlserver at databaseadvisors.com > > Subject: RE: [dba-SQLServer] Who's using my db? > > > > Um ... You have dbas that can't look at the data?? > > > > Charlotte Foust > > > > -----Original Message----- > > From: Mackin, Christopher [mailto:CMackin at quiznos.com] > > Sent: Tuesday, December 07, 2004 10:57 AM > > To: dba-sqlserver at databaseadvisors.com > > Subject: [dba-SQLServer] Who's using my db? > > > > Does anyone have any suggestions on how to track/view a log of users > > that have accessed information on the Server and specifically at the > > Database level? > > > > There are users authorized to view a particular db with confidential > > information, and I need to verify that no other users are accessing this > > data. In this situation it's rather complex because security keeps out > > the majority of people, but there are certain people with the sa > > password and admin rights on the server that should not be looking > > either. > > > > Thanks in advance, > > Chris Mackin > > _______________________________________________ > > 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 > > From mark.breen at gmail.com Thu Dec 9 01:39:21 2004 From: mark.breen at gmail.com (Mark Breen) Date: Thu, 9 Dec 2004 07:39:21 +0000 Subject: [dba-SQLServer] Who's using my db? In-Reply-To: References: <26a96cce0412081137135b26b2@mail.gmail.com> Message-ID: <26a96cce04120823391d285603@mail.gmail.com> Hello Jim, If I understand Christopher correctly (and sorry to all if I do not), he is talking about a sys admin person going in using EM or SQL Analyser and reading raw tables. Of course this person has rights to do anything on the SQL server (from a technical perspective) but morally they do not have rights to read the data. This raises a whole other question: Companies employ senior managers to look after highly confidential issues, such as HR or other sensitive and then they employ young guys and gals to be sys admins, paid Euro 25k per annun and the young guy or gal had rights to the entire network. This is wrong, but what are the alternatives? Some young guy comes in off the street, joins the IT department to just install PCs and has access to confidential data. More rights that senior managers in the company. My gripe is not with the unfairness to the senior manager, what I am concerned with it that the industry seems to have overlooked this front door access that we give to this select group of employees without concern to normal security issues. What do you all think On Wed, 08 Dec 2004 18:10:10 -0800, Jim Lawrence (AccessD) wrote: > Hi Christopher: > > Is it not possible to have the data on the SQL only accessed through SPs or > views. In each of these SPs there would be a function call that would write > a record of it's access to a transaction log table. This technique is done > through all POS systems to track the users, access dates, times and any > changes made to the invoice records. > > It all depends on your permissions on the BE. > > Jim > > > > > -----Original Message----- > > From: Mackin, Christopher [mailto:CMackin at quiznos.com] > > Sent: Tuesday, December 07, 2004 10:57 AM > > To: dba-sqlserver at databaseadvisors.com > > Subject: [dba-SQLServer] Who's using my db? > > > > Does anyone have any suggestions on how to track/view a log of users > > that have accessed information on the Server and specifically at the > > Database level? > > > > There are users authorized to view a particular db with confidential > > information, and I need to verify that no other users are accessing this > > data. In this situation it's rather complex because security keeps out > > the majority of people, but there are certain people with the sa > > password and admin rights on the server that should not be looking > > either. > > > > Thanks in advance, > > Chris Mackin > > _______________________________________________ > 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 Dec 9 05:03:03 2004 From: accessd at shaw.ca (Jim Lawrence (AccessD)) Date: Thu, 09 Dec 2004 03:03:03 -0800 Subject: [dba-SQLServer] Who's using my db? In-Reply-To: <26a96cce04120823391d285603@mail.gmail.com> Message-ID: Hi Mark: I think you are right. In some cases the company or government office has decided that the staff should not be able to see the data. So they hire a third-party company to handle their sensitive data. Having been in the position of the third-party company, it becomes ridiculous as even though the company may be 'bonded', any of the techs could have free rein with the data. In my time, having written the program or in charge of maintaining same, I find myself totally entrusted with all of a client's most sensitive data. It is not a responsibility I have taken lightly but given the potential, some terrible leaks could take place. Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Mark Breen Sent: Wednesday, December 08, 2004 11:39 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Who's using my db? Hello Jim, If I understand Christopher correctly (and sorry to all if I do not), he is talking about a sys admin person going in using EM or SQL Analyser and reading raw tables. Of course this person has rights to do anything on the SQL server (from a technical perspective) but morally they do not have rights to read the data. This raises a whole other question: Companies employ senior managers to look after highly confidential issues, such as HR or other sensitive and then they employ young guys and gals to be sys admins, paid Euro 25k per annun and the young guy or gal had rights to the entire network. This is wrong, but what are the alternatives? Some young guy comes in off the street, joins the IT department to just install PCs and has access to confidential data. More rights that senior managers in the company. My gripe is not with the unfairness to the senior manager, what I am concerned with it that the industry seems to have overlooked this front door access that we give to this select group of employees without concern to normal security issues. What do you all think On Wed, 08 Dec 2004 18:10:10 -0800, Jim Lawrence (AccessD) wrote: > Hi Christopher: > > Is it not possible to have the data on the SQL only accessed through SPs or > views. In each of these SPs there would be a function call that would write > a record of it's access to a transaction log table. This technique is done > through all POS systems to track the users, access dates, times and any > changes made to the invoice records. > > It all depends on your permissions on the BE. > > Jim > > > > > -----Original Message----- > > From: Mackin, Christopher [mailto:CMackin at quiznos.com] > > Sent: Tuesday, December 07, 2004 10:57 AM > > To: dba-sqlserver at databaseadvisors.com > > Subject: [dba-SQLServer] Who's using my db? > > > > Does anyone have any suggestions on how to track/view a log of users > > that have accessed information on the Server and specifically at the > > Database level? > > > > There are users authorized to view a particular db with confidential > > information, and I need to verify that no other users are accessing this > > data. In this situation it's rather complex because security keeps out > > the majority of people, but there are certain people with the sa > > password and admin rights on the server that should not be looking > > either. > > > > Thanks in advance, > > Chris Mackin > > _______________________________________________ > 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 DElam at jenkens.com Thu Dec 9 07:37:02 2004 From: DElam at jenkens.com (Elam, Debbie) Date: Thu, 9 Dec 2004 07:37:02 -0600 Subject: [dba-SQLServer] Who's using my db? Message-ID: <7B1961ED924D1A459E378C9B1BB22B4C0248581F@natexch.jenkens.com> I have encountered this too. I had to put together a temporary repository for HR data once. The HR people carefully gave me fake data at first to test so there would be no privacy violations. I told them their diligence was admirable, but useless. I could not administer the system without having access to the data in it anyway. To make it even worse, I had only recently been hired after one of the shortest hiring cycles ever seen. (Told the job existed and had an interview scheduled the next morning, hired that afternoon) This company keeps the payroll computer off of the LAN for just this reason though. Debbie -----Original Message----- From: Mark Breen [mailto:mark.breen at gmail.com] Sent: Thursday, December 09, 2004 1:39 AM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Who's using my db? Hello Jim, If I understand Christopher correctly (and sorry to all if I do not), he is talking about a sys admin person going in using EM or SQL Analyser and reading raw tables. Of course this person has rights to do anything on the SQL server (from a technical perspective) but morally they do not have rights to read the data. This raises a whole other question: Companies employ senior managers to look after highly confidential issues, such as HR or other sensitive and then they employ young guys and gals to be sys admins, paid Euro 25k per annun and the young guy or gal had rights to the entire network. This is wrong, but what are the alternatives? Some young guy comes in off the street, joins the IT department to just install PCs and has access to confidential data. More rights that senior managers in the company. My gripe is not with the unfairness to the senior manager, what I am concerned with it that the industry seems to have overlooked this front door access that we give to this select group of employees without concern to normal security issues. What do you all think On Wed, 08 Dec 2004 18:10:10 -0800, Jim Lawrence (AccessD) wrote: > Hi Christopher: > > Is it not possible to have the data on the SQL only accessed through SPs or > views. In each of these SPs there would be a function call that would write > a record of it's access to a transaction log table. This technique is done > through all POS systems to track the users, access dates, times and any > changes made to the invoice records. > > It all depends on your permissions on the BE. > > Jim > > > > > -----Original Message----- > > From: Mackin, Christopher [mailto:CMackin at quiznos.com] > > Sent: Tuesday, December 07, 2004 10:57 AM > > To: dba-sqlserver at databaseadvisors.com > > Subject: [dba-SQLServer] Who's using my db? > > > > Does anyone have any suggestions on how to track/view a log of users > > that have accessed information on the Server and specifically at the > > Database level? > > > > There are users authorized to view a particular db with confidential > > information, and I need to verify that no other users are accessing this > > data. In this situation it's rather complex because security keeps out > > the majority of people, but there are certain people with the sa > > password and admin rights on the server that should not be looking > > either. > > > > Thanks in advance, > > Chris Mackin > > _______________________________________________ > 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 - JENKENS & GILCHRIST E-MAIL NOTICE - This transmission may be: (1) subject to the Attorney-Client Privilege, (2) an attorney work product, or (3) strictly confidential. If you are not the intended recipient of this message, you may not disclose, print, copy or disseminate this information. If you have received this in error, please reply and notify the sender (only) and delete the message. Unauthorized interception of this e-mail is a violation of federal criminal law. This communication does not reflect an intention by the sender or the sender's client or principal to conduct a transaction or make any agreement by electronic means. Nothing contained in this message or in any attachment shall satisfy the requirements for a writing, and nothing contained herein shall constitute a contract or electronic signature under the Electronic Signatures in Global and National Commerce Act, any version of the Uniform Electronic Transactions Act or any other statute governing electronic transactions. From accessd at shaw.ca Thu Dec 9 09:55:02 2004 From: accessd at shaw.ca (Jim Lawrence (AccessD)) Date: Thu, 09 Dec 2004 07:55:02 -0800 Subject: [dba-SQLServer] Who's using my db? In-Reply-To: <7B1961ED924D1A459E378C9B1BB22B4C0248581F@natexch.jenkens.com> Message-ID: There is a data that is a lot more sensitive than HR information. The government has pools of data such as 'Search Warrants', 'On going Investigation' (local, regional and international), 'Criminal record searchable data', 'Judge Rotation Data', 'Gang investigations', 'Privy Consul seconds' etc... Much of this type of data is not accessible by even senior staff... How would techs be chosen to manage such information? Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Elam, Debbie Sent: Thursday, December 09, 2004 5:37 AM To: 'dba-sqlserver at databaseadvisors.com' Subject: RE: [dba-SQLServer] Who's using my db? I have encountered this too. I had to put together a temporary repository for HR data once. The HR people carefully gave me fake data at first to test so there would be no privacy violations. I told them their diligence was admirable, but useless. I could not administer the system without having access to the data in it anyway. To make it even worse, I had only recently been hired after one of the shortest hiring cycles ever seen. (Told the job existed and had an interview scheduled the next morning, hired that afternoon) This company keeps the payroll computer off of the LAN for just this reason though. Debbie -----Original Message----- From: Mark Breen [mailto:mark.breen at gmail.com] Sent: Thursday, December 09, 2004 1:39 AM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Who's using my db? Hello Jim, If I understand Christopher correctly (and sorry to all if I do not), he is talking about a sys admin person going in using EM or SQL Analyser and reading raw tables. Of course this person has rights to do anything on the SQL server (from a technical perspective) but morally they do not have rights to read the data. This raises a whole other question: Companies employ senior managers to look after highly confidential issues, such as HR or other sensitive and then they employ young guys and gals to be sys admins, paid Euro 25k per annun and the young guy or gal had rights to the entire network. This is wrong, but what are the alternatives? Some young guy comes in off the street, joins the IT department to just install PCs and has access to confidential data. More rights that senior managers in the company. My gripe is not with the unfairness to the senior manager, what I am concerned with it that the industry seems to have overlooked this front door access that we give to this select group of employees without concern to normal security issues. What do you all think On Wed, 08 Dec 2004 18:10:10 -0800, Jim Lawrence (AccessD) wrote: > Hi Christopher: > > Is it not possible to have the data on the SQL only accessed through SPs or > views. In each of these SPs there would be a function call that would write > a record of it's access to a transaction log table. This technique is done > through all POS systems to track the users, access dates, times and any > changes made to the invoice records. > > It all depends on your permissions on the BE. > > Jim > > > > > -----Original Message----- > > From: Mackin, Christopher [mailto:CMackin at quiznos.com] > > Sent: Tuesday, December 07, 2004 10:57 AM > > To: dba-sqlserver at databaseadvisors.com > > Subject: [dba-SQLServer] Who's using my db? > > > > Does anyone have any suggestions on how to track/view a log of users > > that have accessed information on the Server and specifically at the > > Database level? > > > > There are users authorized to view a particular db with confidential > > information, and I need to verify that no other users are accessing this > > data. In this situation it's rather complex because security keeps out > > the majority of people, but there are certain people with the sa > > password and admin rights on the server that should not be looking > > either. > > > > Thanks in advance, > > Chris Mackin > > _______________________________________________ > 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 - JENKENS & GILCHRIST E-MAIL NOTICE - This transmission may be: (1) subject to the Attorney-Client Privilege, (2) an attorney work product, or (3) strictly confidential. If you are not the intended recipient of this message, you may not disclose, print, copy or disseminate this information. If you have received this in error, please reply and notify the sender (only) and delete the message. Unauthorized interception of this e-mail is a violation of federal criminal law. This communication does not reflect an intention by the sender or the sender's client or principal to conduct a transaction or make any agreement by electronic means. Nothing contained in this message or in any attachment shall satisfy the requirements for a writing, and nothing contained herein shall constitute a contract or electronic signature under the Electronic Signatures in Global and National Commerce Act, any version of the Uniform Electronic Transactions Act or any other statute governing electronic transactions. _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From CMackin at quiznos.com Thu Dec 9 10:04:21 2004 From: CMackin at quiznos.com (Mackin, Christopher) Date: Thu, 9 Dec 2004 09:04:21 -0700 Subject: [dba-SQLServer] Who's using my db? Message-ID: Well my data is sensitive, but not life altering, and I don't want to even begin to try to explain the details of the how's and why's of why it is the way it is, but it's going to be that way for the forseeable future. I was specifically looking for EM and QA connections to the database, but there may be nothing on the BE that can facilitate that, I will investigate various traces and see if anything in there helps. Will post the info if I find anything worthwhile. -Chris -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Jim Lawrence (AccessD) Sent: Thursday, December 09, 2004 8:55 AM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] Who's using my db? There is a data that is a lot more sensitive than HR information. The government has pools of data such as 'Search Warrants', 'On going Investigation' (local, regional and international), 'Criminal record searchable data', 'Judge Rotation Data', 'Gang investigations', 'Privy Consul seconds' etc... Much of this type of data is not accessible by even senior staff... How would techs be chosen to manage such information? Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Elam, Debbie Sent: Thursday, December 09, 2004 5:37 AM To: 'dba-sqlserver at databaseadvisors.com' Subject: RE: [dba-SQLServer] Who's using my db? I have encountered this too. I had to put together a temporary repository for HR data once. The HR people carefully gave me fake data at first to test so there would be no privacy violations. I told them their diligence was admirable, but useless. I could not administer the system without having access to the data in it anyway. To make it even worse, I had only recently been hired after one of the shortest hiring cycles ever seen. (Told the job existed and had an interview scheduled the next morning, hired that afternoon) This company keeps the payroll computer off of the LAN for just this reason though. Debbie -----Original Message----- From: Mark Breen [mailto:mark.breen at gmail.com] Sent: Thursday, December 09, 2004 1:39 AM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Who's using my db? Hello Jim, If I understand Christopher correctly (and sorry to all if I do not), he is talking about a sys admin person going in using EM or SQL Analyser and reading raw tables. Of course this person has rights to do anything on the SQL server (from a technical perspective) but morally they do not have rights to read the data. This raises a whole other question: Companies employ senior managers to look after highly confidential issues, such as HR or other sensitive and then they employ young guys and gals to be sys admins, paid Euro 25k per annun and the young guy or gal had rights to the entire network. This is wrong, but what are the alternatives? Some young guy comes in off the street, joins the IT department to just install PCs and has access to confidential data. More rights that senior managers in the company. My gripe is not with the unfairness to the senior manager, what I am concerned with it that the industry seems to have overlooked this front door access that we give to this select group of employees without concern to normal security issues. What do you all think On Wed, 08 Dec 2004 18:10:10 -0800, Jim Lawrence (AccessD) wrote: > Hi Christopher: > > Is it not possible to have the data on the SQL only accessed through SPs or > views. In each of these SPs there would be a function call that would write > a record of it's access to a transaction log table. This technique is done > through all POS systems to track the users, access dates, times and any > changes made to the invoice records. > > It all depends on your permissions on the BE. > > Jim > > > > > -----Original Message----- > > From: Mackin, Christopher [mailto:CMackin at quiznos.com] > > Sent: Tuesday, December 07, 2004 10:57 AM > > To: dba-sqlserver at databaseadvisors.com > > Subject: [dba-SQLServer] Who's using my db? > > > > Does anyone have any suggestions on how to track/view a log of users > > that have accessed information on the Server and specifically at the > > Database level? > > > > There are users authorized to view a particular db with confidential > > information, and I need to verify that no other users are accessing this > > data. In this situation it's rather complex because security keeps out > > the majority of people, but there are certain people with the sa > > password and admin rights on the server that should not be looking > > either. > > > > Thanks in advance, > > Chris Mackin > > _______________________________________________ > 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 - JENKENS & GILCHRIST E-MAIL NOTICE - This transmission may be: (1) subject to the Attorney-Client Privilege, (2) an attorney work product, or (3) strictly confidential. If you are not the intended recipient of this message, you may not disclose, print, copy or disseminate this information. If you have received this in error, please reply and notify the sender (only) and delete the message. Unauthorized interception of this e-mail is a violation of federal criminal law. This communication does not reflect an intention by the sender or the sender's client or principal to conduct a transaction or make any agreement by electronic means. Nothing contained in this message or in any attachment shall satisfy the requirements for a writing, and nothing contained herein shall constitute a contract or electronic signature under the Electronic Signatures in Global and National Commerce Act, any version of the Uniform Electronic Transactions Act or any other statute governing electronic transactions. _______________________________________________ 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 tuxedo_man at hotmail.com Thu Dec 9 11:32:05 2004 From: tuxedo_man at hotmail.com (Billy Pang) Date: Thu, 09 Dec 2004 17:32:05 +0000 Subject: [dba-SQLServer] Who's using my db? In-Reply-To: Message-ID: How about server side traces? The hostname data column can give name of client machine. Not sure if it fits your needs because it can only write to physical file. Billy >From: "Mackin, Christopher" >Reply-To: dba-sqlserver at databaseadvisors.com >To: >Subject: RE: [dba-SQLServer] Who's using my db? >Date: Thu, 9 Dec 2004 09:04:21 -0700 > >Well my data is sensitive, but not life altering, and I don't want to even >begin to try to explain the details of the how's and why's of why it is the >way it is, but it's going to be that way for the forseeable future. > >I was specifically looking for EM and QA connections to the database, but >there may be nothing on the BE that can facilitate that, I will investigate >various traces and see if anything in there helps. Will post the info if I >find anything worthwhile. > >-Chris > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Jim >Lawrence (AccessD) >Sent: Thursday, December 09, 2004 8:55 AM >To: dba-sqlserver at databaseadvisors.com >Subject: RE: [dba-SQLServer] Who's using my db? > > >There is a data that is a lot more sensitive than HR information. The >government has pools of data such as 'Search Warrants', 'On going >Investigation' (local, regional and international), 'Criminal record >searchable data', 'Judge Rotation Data', 'Gang investigations', 'Privy >Consul seconds' etc... > >Much of this type of data is not accessible by even senior staff... How >would techs be chosen to manage such information? > >Jim > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Elam, >Debbie >Sent: Thursday, December 09, 2004 5:37 AM >To: 'dba-sqlserver at databaseadvisors.com' >Subject: RE: [dba-SQLServer] Who's using my db? > > >I have encountered this too. I had to put together a temporary repository >for HR data once. The HR people carefully gave me fake data at first to >test so there would be no privacy violations. I told them their diligence >was admirable, but useless. I could not administer the system without >having access to the data in it anyway. To make it even worse, I had only >recently been hired after one of the shortest hiring cycles ever seen. >(Told the job existed and had an interview scheduled the next morning, >hired >that afternoon) This company keeps the payroll computer off of the LAN for >just this reason though. > >Debbie > >-----Original Message----- >From: Mark Breen [mailto:mark.breen at gmail.com] >Sent: Thursday, December 09, 2004 1:39 AM >To: dba-sqlserver at databaseadvisors.com >Subject: Re: [dba-SQLServer] Who's using my db? > > >Hello Jim, > >If I understand Christopher correctly (and sorry to all if I do not), >he is talking about a sys admin person going in using EM or SQL >Analyser and reading raw tables. Of course this person has rights to >do anything on the SQL server (from a technical perspective) but >morally they do not have rights to read the data. > >This raises a whole other question: Companies employ senior managers >to look after highly confidential issues, such as HR or other >sensitive and then they employ young guys and gals to be sys admins, >paid Euro 25k per annun and the young guy or gal had rights to the >entire network. This is wrong, but what are the alternatives? > >Some young guy comes in off the street, joins the IT department to >just install PCs and has access to confidential data. More rights >that senior managers in the company. My gripe is not with the >unfairness to the senior manager, what I am concerned with it that the >industry seems to have overlooked this front door access that we give >to this select group of employees without concern to normal security >issues. > >What do you all think > > > > >On Wed, 08 Dec 2004 18:10:10 -0800, Jim Lawrence (AccessD) > wrote: > > Hi Christopher: > > > > Is it not possible to have the data on the SQL only accessed through SPs >or > > views. In each of these SPs there would be a function call that would >write > > a record of it's access to a transaction log table. This technique is >done > > through all POS systems to track the users, access dates, times and any > > changes made to the invoice records. > > > > It all depends on your permissions on the BE. > > > > Jim > > > > > > > > > -----Original Message----- > > > From: Mackin, Christopher [mailto:CMackin at quiznos.com] > > > Sent: Tuesday, December 07, 2004 10:57 AM > > > To: dba-sqlserver at databaseadvisors.com > > > Subject: [dba-SQLServer] Who's using my db? > > > > > > Does anyone have any suggestions on how to track/view a log of users > > > that have accessed information on the Server and specifically at the > > > Database level? > > > > > > There are users authorized to view a particular db with confidential > > > information, and I need to verify that no other users are accessing >this > > > data. In this situation it's rather complex because security keeps >out > > > the majority of people, but there are certain people with the sa > > > password and admin rights on the server that should not be looking > > > either. > > > > > > Thanks in advance, > > > Chris Mackin > > > > _______________________________________________ > > 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 >- JENKENS & GILCHRIST E-MAIL NOTICE - This transmission may be: (1) subject >to the Attorney-Client Privilege, (2) an attorney work product, or (3) >strictly confidential. If you are not the intended recipient of this >message, you may not disclose, print, copy or disseminate this information. >If you have received this in error, please reply and notify the sender >(only) and delete the message. Unauthorized interception of this e-mail is >a >violation of federal criminal law. >This communication does not reflect an intention by the sender or the >sender's client or principal to conduct a transaction or make any agreement >by electronic means. Nothing contained in this message or in any >attachment >shall satisfy the requirements for a writing, and nothing contained herein >shall constitute a contract or electronic signature under the Electronic >Signatures in Global and National Commerce Act, any version of the Uniform >Electronic Transactions Act or any other statute governing electronic >transactions. >_______________________________________________ >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 CMackin at quiznos.com Thu Dec 9 11:35:54 2004 From: CMackin at quiznos.com (Mackin, Christopher) Date: Thu, 9 Dec 2004 10:35:54 -0700 Subject: [dba-SQLServer] Who's using my db? Message-ID: That very well may do it, I will look into it. Thanks Billy, Chris -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Billy Pang Sent: Thursday, December 09, 2004 10:32 AM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] Who's using my db? How about server side traces? The hostname data column can give name of client machine. Not sure if it fits your needs because it can only write to physical file. Billy >From: "Mackin, Christopher" >Reply-To: dba-sqlserver at databaseadvisors.com >To: >Subject: RE: [dba-SQLServer] Who's using my db? >Date: Thu, 9 Dec 2004 09:04:21 -0700 > >Well my data is sensitive, but not life altering, and I don't want to even >begin to try to explain the details of the how's and why's of why it is the >way it is, but it's going to be that way for the forseeable future. > >I was specifically looking for EM and QA connections to the database, but >there may be nothing on the BE that can facilitate that, I will investigate >various traces and see if anything in there helps. Will post the info if I >find anything worthwhile. > >-Chris > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Jim >Lawrence (AccessD) >Sent: Thursday, December 09, 2004 8:55 AM >To: dba-sqlserver at databaseadvisors.com >Subject: RE: [dba-SQLServer] Who's using my db? > > >There is a data that is a lot more sensitive than HR information. The >government has pools of data such as 'Search Warrants', 'On going >Investigation' (local, regional and international), 'Criminal record >searchable data', 'Judge Rotation Data', 'Gang investigations', 'Privy >Consul seconds' etc... > >Much of this type of data is not accessible by even senior staff... How >would techs be chosen to manage such information? > >Jim > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Elam, >Debbie >Sent: Thursday, December 09, 2004 5:37 AM >To: 'dba-sqlserver at databaseadvisors.com' >Subject: RE: [dba-SQLServer] Who's using my db? > > >I have encountered this too. I had to put together a temporary repository >for HR data once. The HR people carefully gave me fake data at first to >test so there would be no privacy violations. I told them their diligence >was admirable, but useless. I could not administer the system without >having access to the data in it anyway. To make it even worse, I had only >recently been hired after one of the shortest hiring cycles ever seen. >(Told the job existed and had an interview scheduled the next morning, >hired >that afternoon) This company keeps the payroll computer off of the LAN for >just this reason though. > >Debbie > >-----Original Message----- >From: Mark Breen [mailto:mark.breen at gmail.com] >Sent: Thursday, December 09, 2004 1:39 AM >To: dba-sqlserver at databaseadvisors.com >Subject: Re: [dba-SQLServer] Who's using my db? > > >Hello Jim, > >If I understand Christopher correctly (and sorry to all if I do not), >he is talking about a sys admin person going in using EM or SQL >Analyser and reading raw tables. Of course this person has rights to >do anything on the SQL server (from a technical perspective) but >morally they do not have rights to read the data. > >This raises a whole other question: Companies employ senior managers >to look after highly confidential issues, such as HR or other >sensitive and then they employ young guys and gals to be sys admins, >paid Euro 25k per annun and the young guy or gal had rights to the >entire network. This is wrong, but what are the alternatives? > >Some young guy comes in off the street, joins the IT department to >just install PCs and has access to confidential data. More rights >that senior managers in the company. My gripe is not with the >unfairness to the senior manager, what I am concerned with it that the >industry seems to have overlooked this front door access that we give >to this select group of employees without concern to normal security >issues. > >What do you all think > > > > >On Wed, 08 Dec 2004 18:10:10 -0800, Jim Lawrence (AccessD) > wrote: > > Hi Christopher: > > > > Is it not possible to have the data on the SQL only accessed through SPs >or > > views. In each of these SPs there would be a function call that would >write > > a record of it's access to a transaction log table. This technique is >done > > through all POS systems to track the users, access dates, times and any > > changes made to the invoice records. > > > > It all depends on your permissions on the BE. > > > > Jim > > > > > > > > > -----Original Message----- > > > From: Mackin, Christopher [mailto:CMackin at quiznos.com] > > > Sent: Tuesday, December 07, 2004 10:57 AM > > > To: dba-sqlserver at databaseadvisors.com > > > Subject: [dba-SQLServer] Who's using my db? > > > > > > Does anyone have any suggestions on how to track/view a log of users > > > that have accessed information on the Server and specifically at the > > > Database level? > > > > > > There are users authorized to view a particular db with confidential > > > information, and I need to verify that no other users are accessing >this > > > data. In this situation it's rather complex because security keeps >out > > > the majority of people, but there are certain people with the sa > > > password and admin rights on the server that should not be looking > > > either. > > > > > > Thanks in advance, > > > Chris Mackin > > > > _______________________________________________ > > 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 >- JENKENS & GILCHRIST E-MAIL NOTICE - This transmission may be: (1) subject >to the Attorney-Client Privilege, (2) an attorney work product, or (3) >strictly confidential. If you are not the intended recipient of this >message, you may not disclose, print, copy or disseminate this information. >If you have received this in error, please reply and notify the sender >(only) and delete the message. Unauthorized interception of this e-mail is >a >violation of federal criminal law. >This communication does not reflect an intention by the sender or the >sender's client or principal to conduct a transaction or make any agreement >by electronic means. Nothing contained in this message or in any >attachment >shall satisfy the requirements for a writing, and nothing contained herein >shall constitute a contract or electronic signature under the Electronic >Signatures in Global and National Commerce Act, any version of the Uniform >Electronic Transactions Act or any other statute governing electronic >transactions. >_______________________________________________ >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 Dec 11 23:34:36 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Sun, 12 Dec 2004 00:34:36 -0500 Subject: [dba-SQLServer] Adding indexes programmatically Message-ID: <000001c4e00c$47a3e810$e8dafea9@ColbyM6805> Does anyone have code to add indexes to every field in a table? I am breaking the nVLDB table down into subsets of related fields in smaller tables and need to index each field. The PK field is just that, an integer and unique. The rest are just text fields and non-unique. John W. Colby www.ColbyConsulting.com Contribute your unused CPU cycles to a good cause: http://folding.stanford.edu/ From andy at minstersystems.co.uk Sun Dec 12 04:04:36 2004 From: andy at minstersystems.co.uk (Andy Lacey) Date: Sun, 12 Dec 2004 10:04:36 -0000 Subject: [dba-SQLServer] Adding indexes programmatically In-Reply-To: <000001c4e00c$47a3e810$e8dafea9@ColbyM6805> Message-ID: <000d01c4e031$fd04dc30$b274d0d5@minster33c3r25> Hi John The BEU has code to add indexes. I'm sure you could adapt that to loop through Fields. -- 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 John W. Colby > Sent: 12 December 2004 05:35 > To: SQLServer > Subject: [dba-SQLServer] Adding indexes programmatically > > > Does anyone have code to add indexes to every field in a > table? I am breaking the nVLDB table down into subsets of > related fields in smaller tables and need to index each > field. The PK field is just that, an integer and unique. > The rest are just text fields and non-unique. > > 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 andy at minstersystems.co.uk Sun Dec 12 04:05:58 2004 From: andy at minstersystems.co.uk (Andy Lacey) Date: Sun, 12 Dec 2004 10:05:58 -0000 Subject: [dba-SQLServer] Adding indexes programmatically In-Reply-To: <000001c4e00c$47a3e810$e8dafea9@ColbyM6805> Message-ID: <000e01c4e032$2d890e80$b274d0d5@minster33c3r25> Sorry JC. Just realiswed this is SQL list not Access. -- 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 John W. Colby > Sent: 12 December 2004 05:35 > To: SQLServer > Subject: [dba-SQLServer] Adding indexes programmatically > > > Does anyone have code to add indexes to every field in a > table? I am breaking the nVLDB table down into subsets of > related fields in smaller tables and need to index each > field. The PK field is just that, an integer and unique. > The rest are just text fields and non-unique. > > 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 Sun Dec 12 12:00:41 2004 From: artful at rogers.com (Arthur Fuller) Date: Sun, 12 Dec 2004 13:00:41 -0500 Subject: [dba-SQLServer] Adding indexes programmatically In-Reply-To: <000001c4e00c$47a3e810$e8dafea9@ColbyM6805> References: <000001c4e00c$47a3e810$e8dafea9@ColbyM6805> Message-ID: <41BC8749.7000808@rogers.com> Take a look at the SQL-DMO library. It's got everything you need in it. Walk the databases, the tables, the columns and the properties, all in a pretty cool (IMO) object model. John W. Colby wrote: >Does anyone have code to add indexes to every field in a table? I am >breaking the nVLDB table down into subsets of related fields in smaller >tables and need to index each field. The PK field is just that, an integer >and unique. The rest are just text fields and non-unique. > >John W. Colby >www.ColbyConsulting.com > > > > -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.296 / Virus Database: 265.5.0 - Release Date: 12/9/2004 From andrew.haslett at ilc.gov.au Mon Dec 13 05:00:39 2004 From: andrew.haslett at ilc.gov.au (Haslett, Andrew) Date: Mon, 13 Dec 2004 21:30:39 +1030 Subject: [dba-SQLServer] Adding indexes programmatically Message-ID: <0A870603A2A816459078203FC07F4CD204C7F6@adl01s055.ilcorp.gov.au> Are you sure you need to index every field? There's quite a bit more to it compared to Access where you generally just put an index on every field you think you might search on. Overall performance isn't generally going to improve by adding an index on every field.. Numerous factors come into play such as performance, placement (physically) of indexes, types, disk space etc. especially considering the size of your database.. There's a reason there's a course on this stuff. Probably 3 days of the 5 day admin course covers indexes and its close to the most boring stuff I've ever sat through!! Easiest method is to usually let the wizard decide what indexes you need. -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Sunday, 12 December 2004 4:05 PM To: SQLServer Subject: [dba-SQLServer] Adding indexes programmatically Does anyone have code to add indexes to every field in a table? I am breaking the nVLDB table down into subsets of related fields in smaller tables and need to index each field. The PK field is just that, an integer and unique. The rest are just text fields and non-unique. 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 IMPORTANT - PLEASE READ ******************** This email and any files transmitted with it are confidential and may contain information protected by law from disclosure. If you have received this message in error, please notify the sender immediately and delete this email from your system. No warranty is given that this email or files, if attached to this email, are free from computer viruses or other defects. They are provided on the basis the user assumes all responsibility for loss, damage or consequence resulting directly or indirectly from their use, whether caused by the negligence of the sender or not. From andrew.haslett at ilc.gov.au Mon Dec 13 05:48:58 2004 From: andrew.haslett at ilc.gov.au (Haslett, Andrew) Date: Mon, 13 Dec 2004 22:18:58 +1030 Subject: [dba-SQLServer] Adding indexes programmatically Message-ID: <0A870603A2A816459078203FC07F4CD204C7F7@adl01s055.ilcorp.gov.au> Sorry that should have been; "Overall performance isn't *always* going to improve by adding an index on every field.." -----Original Message----- From: Haslett, Andrew [mailto:andrew.haslett at ilc.gov.au] Sent: Monday, 13 December 2004 9:31 PM To: 'dba-sqlserver at databaseadvisors.com' Subject: RE: [dba-SQLServer] Adding indexes programmatically Are you sure you need to index every field? There's quite a bit more to it compared to Access where you generally just put an index on every field you think you might search on. Overall performance isn't generally going to improve by adding an index on every field.. Numerous factors come into play such as performance, placement (physically) of indexes, types, disk space etc. especially considering the size of your database.. There's a reason there's a course on this stuff. Probably 3 days of the 5 day admin course covers indexes and its close to the most boring stuff I've ever sat through!! Easiest method is to usually let the wizard decide what indexes you need. -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Sunday, 12 December 2004 4:05 PM To: SQLServer Subject: [dba-SQLServer] Adding indexes programmatically Does anyone have code to add indexes to every field in a table? I am breaking the nVLDB table down into subsets of related fields in smaller tables and need to index each field. The PK field is just that, an integer and unique. The rest are just text fields and non-unique. 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 IMPORTANT - PLEASE READ ******************** This email and any files transmitted with it are confidential and may contain information protected by law from disclosure. If you have received this message in error, please notify the sender immediately and delete this email from your system. No warranty is given that this email or files, if attached to this email, are free from computer viruses or other defects. They are provided on the basis the user assumes all responsibility for loss, damage or consequence resulting directly or indirectly from their use, whether caused by the negligence of the sender or not. _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com IMPORTANT - PLEASE READ ******************** This email and any files transmitted with it are confidential and may contain information protected by law from disclosure. If you have received this message in error, please notify the sender immediately and delete this email from your system. No warranty is given that this email or files, if attached to this email, are free from computer viruses or other defects. They are provided on the basis the user assumes all responsibility for loss, damage or consequence resulting directly or indirectly from their use, whether caused by the negligence of the sender or not. From prosoft6 at hotmail.com Mon Dec 13 09:27:15 2004 From: prosoft6 at hotmail.com (Julie Reardon-Taylor) Date: Mon, 13 Dec 2004 10:27:15 -0500 Subject: [dba-SQLServer] Compact and Repair in SQL Server? Message-ID: What is the equivalent to a compact and repair in SQL Server? My database seems to be bloating. Is there a way to schedule a compact of the database? Julie Reardon-Taylor PRO-SOFT OF NY, INC. 108 Franklin Street Watertown, NY 13601 (315) 785-0319 www.pro-soft.net From jwcolby at colbyconsulting.com Mon Dec 13 10:51:42 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Mon, 13 Dec 2004 11:51:42 -0500 Subject: [dba-SQLServer] Adding indexes programmatically In-Reply-To: <0A870603A2A816459078203FC07F4CD204C7F6@adl01s055.ilcorp.gov.au> Message-ID: <002201c4e134$09dfd6f0$e8dafea9@ColbyM6805> In this case performance will ALWAYS improve. Remember that this is a bulk mail database, 640 fields of address info (indexes not needed except on zip) and demographics. All the client ever wants is COUNTS of records with specific demographics. In order to count records you use an index or a table scan. There are 64 MILLION records. A table scan is not an option. If a field is going to be used in a where clause to count records, it absolutely must must must have an index. I have run a test and it takes approximately 1 minute 30 seconds to get a count of records using a where on an indexed field. It takes OVER 24 hours to get the same count with no index. Imagine having to do a where on 7 fields with no index. "Yea, I can count that for you, I'll send it in a week ok?" 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 Haslett, Andrew Sent: Monday, December 13, 2004 6:01 AM To: 'dba-sqlserver at databaseadvisors.com' Subject: RE: [dba-SQLServer] Adding indexes programmatically Are you sure you need to index every field? There's quite a bit more to it compared to Access where you generally just put an index on every field you think you might search on. Overall performance isn't generally going to improve by adding an index on every field.. Numerous factors come into play such as performance, placement (physically) of indexes, types, disk space etc. especially considering the size of your database.. There's a reason there's a course on this stuff. Probably 3 days of the 5 day admin course covers indexes and its close to the most boring stuff I've ever sat through!! Easiest method is to usually let the wizard decide what indexes you need. -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Sunday, 12 December 2004 4:05 PM To: SQLServer Subject: [dba-SQLServer] Adding indexes programmatically Does anyone have code to add indexes to every field in a table? I am breaking the nVLDB table down into subsets of related fields in smaller tables and need to index each field. The PK field is just that, an integer and unique. The rest are just text fields and non-unique. 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 IMPORTANT - PLEASE READ ******************** This email and any files transmitted with it are confidential and may contain information protected by law from disclosure. If you have received this message in error, please notify the sender immediately and delete this email from your system. No warranty is given that this email or files, if attached to this email, are free from computer viruses or other defects. They are provided on the basis the user assumes all responsibility for loss, damage or consequence resulting directly or indirectly from their use, whether caused by the negligence of the sender or not. _______________________________________________ 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 Mon Dec 13 11:18:18 2004 From: dmcafee at pacbell.net (dmcafee at pacbell.net) Date: Mon, 13 Dec 2004 09:18:18 -0800 Subject: [dba-SQLServer] Compact and Repair in SQL Server? In-Reply-To: Message-ID: The term is called "Shrink" in SQL Server. Look up "Shrinking Databases" in books online David -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Julie Reardon-Taylor Sent: Monday, December 13, 2004 7:27 AM To: dba-SQLServer at databaseadvisors.com Subject: [dba-SQLServer] Compact and Repair in SQL Server? What is the equivalent to a compact and repair in SQL Server? My database seems to be bloating. Is there a way to schedule a compact of the database? Julie Reardon-Taylor PRO-SOFT OF NY, INC. 108 Franklin Street Watertown, NY 13601 (315) 785-0319 www.pro-soft.net From prosoft6 at hotmail.com Mon Dec 13 11:19:26 2004 From: prosoft6 at hotmail.com (Julie Reardon-Taylor) Date: Mon, 13 Dec 2004 12:19:26 -0500 Subject: [dba-SQLServer] Compact and Repair in SQL Server? In-Reply-To: Message-ID: Thank you!!! Julie Reardon-Taylor PRO-SOFT OF NY, INC. 108 Franklin Street Watertown, NY 13601 (315) 785-0319 www.pro-soft.net From CMackin at quiznos.com Mon Dec 13 11:27:49 2004 From: CMackin at quiznos.com (Mackin, Christopher) Date: Mon, 13 Dec 2004 10:27:49 -0700 Subject: [dba-SQLServer] Compact and Repair in SQL Server? Message-ID: While you're at it, you probably want to set up a Database Maintenace plan which can be intuitively created in Enterprise Manager under: {SQL Server Name}-> Management -> Database Maintenance Plans. It allows you to do a lot more than just Shrink it and the wizard is very easy to use. -Chris Mackin -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Julie Reardon-Taylor Sent: Monday, December 13, 2004 10:19 AM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] Compact and Repair in SQL Server? Thank you!!! Julie Reardon-Taylor PRO-SOFT OF NY, INC. 108 Franklin Street Watertown, NY 13601 (315) 785-0319 www.pro-soft.net _______________________________________________ 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 Dec 13 12:01:18 2004 From: fhtapia at gmail.com (Francisco Tapia) Date: Mon, 13 Dec 2004 10:01:18 -0800 Subject: [dba-SQLServer] Reports Message-ID: perhaps someone here can help me out so this reporting goes a lot smoother :) Here is a sample snapshot of my data 8/1/2003, 1, SampleText, Qty1 10/1/2003, 1, SampleText, Qty1 11/1/2003, 1, SampleText, Qty1 1/1/2004, 1, SampleText, Qty1 8/1/2004, 1, SampleText, Qty1 There is only data for these months... would you create a temp table to fill in the rest of the months within the criteria? ex: 8/1/2003 - 8/31/2004 -- -Francisco http://pcthis.blogspot.com | PC news with out the jargon! From artful at rogers.com Mon Dec 13 14:36:48 2004 From: artful at rogers.com (Arthur Fuller) Date: Mon, 13 Dec 2004 15:36:48 -0500 Subject: [dba-SQLServer] Reports In-Reply-To: References: Message-ID: <41BDFD60.6090208@rogers.com> Always happy to help, Francisco, especially given the number of times you have helped me. But on this one I think I need a little more explanation. Are you wanting an empty row to appear for the months that are missing, or what? Arthur Francisco Tapia wrote: >perhaps someone here can help me out so this reporting goes a lot smoother :) > >Here is a sample snapshot of my data > >8/1/2003, 1, SampleText, Qty1 >10/1/2003, 1, SampleText, Qty1 >11/1/2003, 1, SampleText, Qty1 >1/1/2004, 1, SampleText, Qty1 >8/1/2004, 1, SampleText, Qty1 > >There is only data for these months... would you create a temp table >to fill in the rest of the months within the criteria? > >ex: 8/1/2003 - 8/31/2004 > > > > > -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.296 / Virus Database: 265.5.1 - Release Date: 12/13/2004 From cfoust at infostatsystems.com Mon Dec 13 14:56:25 2004 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 13 Dec 2004 12:56:25 -0800 Subject: [dba-SQLServer] Reports Message-ID: If you have a date dimension table such as might be used in a datawarehouse, you can simply join the two tables and pull the missing dates out of the date dimension table. Charlotte Foust -----Original Message----- From: Francisco Tapia [mailto:fhtapia at gmail.com] Sent: Monday, December 13, 2004 10:01 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Reports perhaps someone here can help me out so this reporting goes a lot smoother :) Here is a sample snapshot of my data 8/1/2003, 1, SampleText, Qty1 10/1/2003, 1, SampleText, Qty1 11/1/2003, 1, SampleText, Qty1 1/1/2004, 1, SampleText, Qty1 8/1/2004, 1, SampleText, Qty1 There is only data for these months... would you create a temp table to fill in the rest of the months within the criteria? ex: 8/1/2003 - 8/31/2004 -- -Francisco http://pcthis.blogspot.com | PC news with out the jargon! _______________________________________________ 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 Mon Dec 13 15:27:17 2004 From: andrew.haslett at ilc.gov.au (Haslett, Andrew) Date: Tue, 14 Dec 2004 07:57:17 +1030 Subject: [dba-SQLServer] Adding indexes programmatically Message-ID: <0A870603A2A816459078203FC07F4CD204C7F8@adl01s055.ilcorp.gov.au> So your not actually indexing every field, as you first stated.. FYI, having an index will not necessarily avoid a table scan. Unfortunately its just not that simple. Anyway, suit yourself - good luck. -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Tuesday, 14 December 2004 3:22 AM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] Adding indexes programmatically In this case performance will ALWAYS improve. Remember that this is a bulk mail database, 640 fields of address info (indexes not needed except on zip) and demographics. All the client ever wants is COUNTS of records with specific demographics. In order to count records you use an index or a table scan. There are 64 MILLION records. A table scan is not an option. If a field is going to be used in a where clause to count records, it absolutely must must must have an index. I have run a test and it takes approximately 1 minute 30 seconds to get a count of records using a where on an indexed field. It takes OVER 24 hours to get the same count with no index. Imagine having to do a where on 7 fields with no index. "Yea, I can count that for you, I'll send it in a week ok?" 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 Haslett, Andrew Sent: Monday, December 13, 2004 6:01 AM To: 'dba-sqlserver at databaseadvisors.com' Subject: RE: [dba-SQLServer] Adding indexes programmatically Are you sure you need to index every field? There's quite a bit more to it compared to Access where you generally just put an index on every field you think you might search on. Overall performance isn't generally going to improve by adding an index on every field.. Numerous factors come into play such as performance, placement (physically) of indexes, types, disk space etc. especially considering the size of your database.. There's a reason there's a course on this stuff. Probably 3 days of the 5 day admin course covers indexes and its close to the most boring stuff I've ever sat through!! Easiest method is to usually let the wizard decide what indexes you need. -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Sunday, 12 December 2004 4:05 PM To: SQLServer Subject: [dba-SQLServer] Adding indexes programmatically Does anyone have code to add indexes to every field in a table? I am breaking the nVLDB table down into subsets of related fields in smaller tables and need to index each field. The PK field is just that, an integer and unique. The rest are just text fields and non-unique. 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 IMPORTANT - PLEASE READ ******************** This email and any files transmitted with it are confidential and may contain information protected by law from disclosure. If you have received this message in error, please notify the sender immediately and delete this email from your system. No warranty is given that this email or files, if attached to this email, are free from computer viruses or other defects. They are provided on the basis the user assumes all responsibility for loss, damage or consequence resulting directly or indirectly from their use, whether caused by the negligence of the sender or not. _______________________________________________ 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 IMPORTANT - PLEASE READ ******************** This email and any files transmitted with it are confidential and may contain information protected by law from disclosure. If you have received this message in error, please notify the sender immediately and delete this email from your system. No warranty is given that this email or files, if attached to this email, are free from computer viruses or other defects. They are provided on the basis the user assumes all responsibility for loss, damage or consequence resulting directly or indirectly from their use, whether caused by the negligence of the sender or not. From jwcolby at colbyconsulting.com Mon Dec 13 15:54:07 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Mon, 13 Dec 2004 16:54:07 -0500 Subject: [dba-SQLServer] Adding indexes programmatically In-Reply-To: <0A870603A2A816459078203FC07F4CD204C7F8@adl01s055.ilcorp.gov.au> Message-ID: <001d01c4e15e$456726e0$e8dafea9@ColbyM6805> >So your not actually indexing every field, as you first stated.. I am building a set of 30 or so tables, with related fields pulled from the big table. The big table has 640 fields and SQL Server can only create 240 indexes. I am indeed indexing every field in every one of the smaller "related field" tables with the sole exception of the address table. So no, I am not indexing every field, but I am indexing about 600 out of 640 fields. >FYI, having an index will not necessarily avoid a table scan. Unfortunately its just not that simple. I am aware of that. However it is a simple fact that without an index you WILL use a table scan. So while the presence of an index will not guarantee that a table scan will not be performed, the absence of an index does in fact guarantee that a table scan will be performed. 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 Haslett, Andrew Sent: Monday, December 13, 2004 4:27 PM To: 'dba-sqlserver at databaseadvisors.com' Subject: RE: [dba-SQLServer] Adding indexes programmatically So your not actually indexing every field, as you first stated.. FYI, having an index will not necessarily avoid a table scan. Unfortunately its just not that simple. Anyway, suit yourself - good luck. -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Tuesday, 14 December 2004 3:22 AM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] Adding indexes programmatically In this case performance will ALWAYS improve. Remember that this is a bulk mail database, 640 fields of address info (indexes not needed except on zip) and demographics. All the client ever wants is COUNTS of records with specific demographics. In order to count records you use an index or a table scan. There are 64 MILLION records. A table scan is not an option. If a field is going to be used in a where clause to count records, it absolutely must must must have an index. I have run a test and it takes approximately 1 minute 30 seconds to get a count of records using a where on an indexed field. It takes OVER 24 hours to get the same count with no index. Imagine having to do a where on 7 fields with no index. "Yea, I can count that for you, I'll send it in a week ok?" 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 Haslett, Andrew Sent: Monday, December 13, 2004 6:01 AM To: 'dba-sqlserver at databaseadvisors.com' Subject: RE: [dba-SQLServer] Adding indexes programmatically Are you sure you need to index every field? There's quite a bit more to it compared to Access where you generally just put an index on every field you think you might search on. Overall performance isn't generally going to improve by adding an index on every field.. Numerous factors come into play such as performance, placement (physically) of indexes, types, disk space etc. especially considering the size of your database.. There's a reason there's a course on this stuff. Probably 3 days of the 5 day admin course covers indexes and its close to the most boring stuff I've ever sat through!! Easiest method is to usually let the wizard decide what indexes you need. -----Original Message----- From: John W. Colby [mailto:jwcolby at colbyconsulting.com] Sent: Sunday, 12 December 2004 4:05 PM To: SQLServer Subject: [dba-SQLServer] Adding indexes programmatically Does anyone have code to add indexes to every field in a table? I am breaking the nVLDB table down into subsets of related fields in smaller tables and need to index each field. The PK field is just that, an integer and unique. The rest are just text fields and non-unique. 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 IMPORTANT - PLEASE READ ******************** This email and any files transmitted with it are confidential and may contain information protected by law from disclosure. If you have received this message in error, please notify the sender immediately and delete this email from your system. No warranty is given that this email or files, if attached to this email, are free from computer viruses or other defects. They are provided on the basis the user assumes all responsibility for loss, damage or consequence resulting directly or indirectly from their use, whether caused by the negligence of the sender or not. _______________________________________________ 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 IMPORTANT - PLEASE READ ******************** This email and any files transmitted with it are confidential and may contain information protected by law from disclosure. If you have received this message in error, please notify the sender immediately and delete this email from your system. No warranty is given that this email or files, if attached to this email, are free from computer viruses or other defects. They are provided on the basis the user assumes all responsibility for loss, damage or consequence resulting directly or indirectly from their use, whether caused by the negligence of the sender or not. _______________________________________________ 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 Dec 13 16:18:18 2004 From: fhtapia at gmail.com (Francisco Tapia) Date: Mon, 13 Dec 2004 14:18:18 -0800 Subject: [dba-SQLServer] Reports In-Reply-To: References: Message-ID: HA!, I guess i was pretty vauge ;) I'm going to be graphing some data out for the boss (kinda last minute changes) (wait when is there not :P) the original select spits out a set of data that looks very similar to the listing below 8/1/2003, 1, SampleText, Qty1 10/1/2003, 1, SampleText, Qty1 11/1/2003, 1, SampleText, Qty1 1/1/2004, 1, SampleText, Qty1 8/1/2004, 1, SampleText, Qty1 because the range for the graph is for 12 months, I created a variable table that simply holds the 12 months begining w/ the earliest month in this case that is August 2003. I take my table in a very simplistic SELECT FIELDS FROM PrimaryTable PT RIGHT OUTER JOIN @SecondaryTable ST ON PT.DateField = ST.DateField the output I expect back is: 8/1/2003 9/1/2003 10/1/2003 11/1/2003 12/1/2003 1/1/2004 2/1/2004 3/1/2004 4/1/2004 5/1/2004 6/1/2004 7/1/2004 8/1/2004 9/1/2004 10/1/2004 11/1/2004 12/1/2004 however I only get back the original subset w/ all the missing months :( ... does this make sense? On Mon, 13 Dec 2004 12:56:25 -0800, Charlotte Foust wrote: > If you have a date dimension table such as might be used in a > datawarehouse, you can simply join the two tables and pull the missing > dates out of the date dimension table. > > Charlotte Foust > > > > > -----Original Message----- > From: Francisco Tapia [mailto:fhtapia at gmail.com] > Sent: Monday, December 13, 2004 10:01 AM > To: dba-sqlserver at databaseadvisors.com > Subject: [dba-SQLServer] Reports > > perhaps someone here can help me out so this reporting goes a lot > smoother :) > > Here is a sample snapshot of my data > > 8/1/2003, 1, SampleText, Qty1 > 10/1/2003, 1, SampleText, Qty1 > 11/1/2003, 1, SampleText, Qty1 > 1/1/2004, 1, SampleText, Qty1 > 8/1/2004, 1, SampleText, Qty1 > > There is only data for these months... would you create a temp table to > fill in the rest of the months within the criteria? > > ex: 8/1/2003 - 8/31/2004 > > -- > -Francisco > http://pcthis.blogspot.com | PC news with out the jargon! -- -Francisco http://pcthis.blogspot.com | PC news with out the jargon! From cfoust at infostatsystems.com Mon Dec 13 16:56:14 2004 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 13 Dec 2004 14:56:14 -0800 Subject: [dba-SQLServer] Reports Message-ID: You have to use the variable table to drive the select, assuming it has all the dates in it. Get the dates from there and the matching records from the primary table. That should give you all the dates. Charlotte Foust -----Original Message----- From: Francisco Tapia [mailto:fhtapia at gmail.com] Sent: Monday, December 13, 2004 2:18 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Reports HA!, I guess i was pretty vauge ;) I'm going to be graphing some data out for the boss (kinda last minute changes) (wait when is there not :P) the original select spits out a set of data that looks very similar to the listing below 8/1/2003, 1, SampleText, Qty1 10/1/2003, 1, SampleText, Qty1 11/1/2003, 1, SampleText, Qty1 1/1/2004, 1, SampleText, Qty1 8/1/2004, 1, SampleText, Qty1 because the range for the graph is for 12 months, I created a variable table that simply holds the 12 months begining w/ the earliest month in this case that is August 2003. I take my table in a very simplistic SELECT FIELDS FROM PrimaryTable PT RIGHT OUTER JOIN @SecondaryTable ST ON PT.DateField = ST.DateField the output I expect back is: 8/1/2003 9/1/2003 10/1/2003 11/1/2003 12/1/2003 1/1/2004 2/1/2004 3/1/2004 4/1/2004 5/1/2004 6/1/2004 7/1/2004 8/1/2004 9/1/2004 10/1/2004 11/1/2004 12/1/2004 however I only get back the original subset w/ all the missing months :( ... does this make sense? On Mon, 13 Dec 2004 12:56:25 -0800, Charlotte Foust wrote: > If you have a date dimension table such as might be used in a > datawarehouse, you can simply join the two tables and pull the missing > dates out of the date dimension table. > > Charlotte Foust > > > > > -----Original Message----- > From: Francisco Tapia [mailto:fhtapia at gmail.com] > Sent: Monday, December 13, 2004 10:01 AM > To: dba-sqlserver at databaseadvisors.com > Subject: [dba-SQLServer] Reports > > perhaps someone here can help me out so this reporting goes a lot > smoother :) > > Here is a sample snapshot of my data > > 8/1/2003, 1, SampleText, Qty1 > 10/1/2003, 1, SampleText, Qty1 > 11/1/2003, 1, SampleText, Qty1 > 1/1/2004, 1, SampleText, Qty1 > 8/1/2004, 1, SampleText, Qty1 > > There is only data for these months... would you create a temp table > to fill in the rest of the months within the criteria? > > ex: 8/1/2003 - 8/31/2004 > > -- > -Francisco > http://pcthis.blogspot.com | PC news with out the jargon! -- -Francisco http://pcthis.blogspot.com | PC news with out the jargon! _______________________________________________ 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 Dec 13 17:37:33 2004 From: fhtapia at gmail.com (Francisco Tapia) Date: Mon, 13 Dec 2004 15:37:33 -0800 Subject: [dba-SQLServer] Reports In-Reply-To: References: Message-ID: so if I'm understanding you correctly it should be Select * From VariableTable LEFT OUTER JOIN PrimaryTable .... On Mon, 13 Dec 2004 14:56:14 -0800, Charlotte Foust wrote: > You have to use the variable table to drive the select, assuming it has > all the dates in it. Get the dates from there and the matching records > from the primary table. That should give you all the dates. > > > > Charlotte Foust > > -----Original Message----- > From: Francisco Tapia [mailto:fhtapia at gmail.com] > Sent: Monday, December 13, 2004 2:18 PM > To: dba-sqlserver at databaseadvisors.com > Subject: Re: [dba-SQLServer] Reports > > HA!, I guess i was pretty vauge ;) > > I'm going to be graphing some data out for the boss (kinda last minute > changes) (wait when is there not :P) > > the original select spits out a set of data that looks very similar to > the listing below > > 8/1/2003, 1, SampleText, Qty1 > 10/1/2003, 1, SampleText, Qty1 > 11/1/2003, 1, SampleText, Qty1 > 1/1/2004, 1, SampleText, Qty1 > 8/1/2004, 1, SampleText, Qty1 > > because the range for the graph is for 12 months, I created a variable > table that simply holds the 12 months begining w/ the earliest month in > this case that is August 2003. > > I take my table in a very simplistic > > SELECT FIELDS FROM PrimaryTable PT RIGHT OUTER JOIN @SecondaryTable ST > ON PT.DateField = ST.DateField > > the output I expect back is: > > 8/1/2003 > 9/1/2003 > 10/1/2003 > 11/1/2003 > 12/1/2003 > 1/1/2004 > 2/1/2004 > 3/1/2004 > 4/1/2004 > 5/1/2004 > 6/1/2004 > 7/1/2004 > 8/1/2004 > 9/1/2004 > 10/1/2004 > 11/1/2004 > 12/1/2004 > > however I only get back the original subset w/ all the missing months :( > ... does this make sense? > > On Mon, 13 Dec 2004 12:56:25 -0800, Charlotte Foust > wrote: > > If you have a date dimension table such as might be used in a > > datawarehouse, you can simply join the two tables and pull the missing > > > dates out of the date dimension table. > > > > Charlotte Foust > > > > > > > > > > -----Original Message----- > > From: Francisco Tapia [mailto:fhtapia at gmail.com] > > Sent: Monday, December 13, 2004 10:01 AM > > To: dba-sqlserver at databaseadvisors.com > > Subject: [dba-SQLServer] Reports > > > > perhaps someone here can help me out so this reporting goes a lot > > smoother :) > > > > Here is a sample snapshot of my data > > > > 8/1/2003, 1, SampleText, Qty1 > > 10/1/2003, 1, SampleText, Qty1 > > 11/1/2003, 1, SampleText, Qty1 > > 1/1/2004, 1, SampleText, Qty1 > > 8/1/2004, 1, SampleText, Qty1 > > > > There is only data for these months... would you create a temp table > > to fill in the rest of the months within the criteria? > > > > ex: 8/1/2003 - 8/31/2004 > > > > -- > > -Francisco > > http://pcthis.blogspot.com | PC news with out the jargon! > > -- > -Francisco > http://pcthis.blogspot.com | PC news with out the jargon! > _______________________________________________ > 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! From cfoust at infostatsystems.com Mon Dec 13 18:21:18 2004 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Mon, 13 Dec 2004 16:21:18 -0800 Subject: [dba-SQLServer] Reports Message-ID: Right, assuming you want all the dates in the variable table and only matching records from the primary table. Charlotte Foust -----Original Message----- From: Francisco Tapia [mailto:fhtapia at gmail.com] Sent: Monday, December 13, 2004 3:38 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Reports so if I'm understanding you correctly it should be Select * From VariableTable LEFT OUTER JOIN PrimaryTable .... On Mon, 13 Dec 2004 14:56:14 -0800, Charlotte Foust wrote: > You have to use the variable table to drive the select, assuming it > has all the dates in it. Get the dates from there and the matching > records from the primary table. That should give you all the dates. > > > > Charlotte Foust > > -----Original Message----- > From: Francisco Tapia [mailto:fhtapia at gmail.com] > Sent: Monday, December 13, 2004 2:18 PM > To: dba-sqlserver at databaseadvisors.com > Subject: Re: [dba-SQLServer] Reports > > HA!, I guess i was pretty vauge ;) > > I'm going to be graphing some data out for the boss (kinda last minute > changes) (wait when is there not :P) > > the original select spits out a set of data that looks very similar to > the listing below > > 8/1/2003, 1, SampleText, Qty1 > 10/1/2003, 1, SampleText, Qty1 > 11/1/2003, 1, SampleText, Qty1 > 1/1/2004, 1, SampleText, Qty1 > 8/1/2004, 1, SampleText, Qty1 > > because the range for the graph is for 12 months, I created a variable > table that simply holds the 12 months begining w/ the earliest month > in this case that is August 2003. > > I take my table in a very simplistic > > SELECT FIELDS FROM PrimaryTable PT RIGHT OUTER JOIN @SecondaryTable ST > ON PT.DateField = ST.DateField > > the output I expect back is: > > 8/1/2003 > 9/1/2003 > 10/1/2003 > 11/1/2003 > 12/1/2003 > 1/1/2004 > 2/1/2004 > 3/1/2004 > 4/1/2004 > 5/1/2004 > 6/1/2004 > 7/1/2004 > 8/1/2004 > 9/1/2004 > 10/1/2004 > 11/1/2004 > 12/1/2004 > > however I only get back the original subset w/ all the missing months > :( ... does this make sense? > > On Mon, 13 Dec 2004 12:56:25 -0800, Charlotte Foust > wrote: > > If you have a date dimension table such as might be used in a > > datawarehouse, you can simply join the two tables and pull the > > missing > > > dates out of the date dimension table. > > > > Charlotte Foust > > > > > > > > > > -----Original Message----- > > From: Francisco Tapia [mailto:fhtapia at gmail.com] > > Sent: Monday, December 13, 2004 10:01 AM > > To: dba-sqlserver at databaseadvisors.com > > Subject: [dba-SQLServer] Reports > > > > perhaps someone here can help me out so this reporting goes a lot > > smoother :) > > > > Here is a sample snapshot of my data > > > > 8/1/2003, 1, SampleText, Qty1 > > 10/1/2003, 1, SampleText, Qty1 > > 11/1/2003, 1, SampleText, Qty1 > > 1/1/2004, 1, SampleText, Qty1 > > 8/1/2004, 1, SampleText, Qty1 > > > > There is only data for these months... would you create a temp table > > to fill in the rest of the months within the criteria? > > > > ex: 8/1/2003 - 8/31/2004 > > > > -- > > -Francisco > > http://pcthis.blogspot.com | PC news with out the jargon! > > -- > -Francisco > http://pcthis.blogspot.com | PC news with out the jargon! > _______________________________________________ > 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! _______________________________________________ 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 Mon Dec 13 18:38:52 2004 From: dmcafee at pacbell.net (dmcafee at pacbell.net) Date: Mon, 13 Dec 2004 16:38:52 -0800 Subject: [dba-SQLServer] SQL CE Message-ID: Are any of you using SQL CE? The company I work from has a little over a hundred iPAQs out in the field and they want to transition from using ADO CE to SQL CE. If any of you are using SQL CE, are there any outstanding things to avoid or mistakes that you have made that you would advise against doing? Are any of you using any third party reporting software on the CE devices? Thanks much, David From fhtapia at gmail.com Tue Dec 14 00:55:29 2004 From: fhtapia at gmail.com (Francisco Tapia) Date: Mon, 13 Dec 2004 22:55:29 -0800 Subject: [dba-SQLServer] Reports In-Reply-To: References: Message-ID: well I will try that tomorrow.. i worked around the issue by dumping the data to excel and then filling in the missing dates (nulls) flipping the tables around I ought to get the same results if I did a SELECT * FROM Primary Table "RIGHT OUTER JOIN" Variable Table Should I not? On Mon, 13 Dec 2004 16:21:18 -0800, Charlotte Foust wrote: > Right, assuming you want all the dates in the variable table and only > > > matching records from the primary table. > > Charlotte Foust > > -----Original Message----- > From: Francisco Tapia [mailto:fhtapia at gmail.com] > Sent: Monday, December 13, 2004 3:38 PM > To: dba-sqlserver at databaseadvisors.com > Subject: Re: [dba-SQLServer] Reports > > so if I'm understanding you correctly it should be > > Select * From VariableTable LEFT OUTER JOIN PrimaryTable .... > > On Mon, 13 Dec 2004 14:56:14 -0800, Charlotte Foust > wrote: > > You have to use the variable table to drive the select, assuming it > > has all the dates in it. Get the dates from there and the matching > > records from the primary table. That should give you all the dates. > > > > > > > > Charlotte Foust > > > > -----Original Message----- > > From: Francisco Tapia [mailto:fhtapia at gmail.com] > > Sent: Monday, December 13, 2004 2:18 PM > > To: dba-sqlserver at databaseadvisors.com > > Subject: Re: [dba-SQLServer] Reports > > > > HA!, I guess i was pretty vauge ;) > > > > I'm going to be graphing some data out for the boss (kinda last minute > > changes) (wait when is there not :P) > > > > the original select spits out a set of data that looks very similar to > > > the listing below > > > > 8/1/2003, 1, SampleText, Qty1 > > 10/1/2003, 1, SampleText, Qty1 > > 11/1/2003, 1, SampleText, Qty1 > > 1/1/2004, 1, SampleText, Qty1 > > 8/1/2004, 1, SampleText, Qty1 > > > > because the range for the graph is for 12 months, I created a variable > > > table that simply holds the 12 months begining w/ the earliest month > > in this case that is August 2003. > > > > I take my table in a very simplistic > > > > SELECT FIELDS FROM PrimaryTable PT RIGHT OUTER JOIN @SecondaryTable ST > > > ON PT.DateField = ST.DateField > > > > the output I expect back is: > > > > 8/1/2003 > > 9/1/2003 > > 10/1/2003 > > 11/1/2003 > > 12/1/2003 > > 1/1/2004 > > 2/1/2004 > > 3/1/2004 > > 4/1/2004 > > 5/1/2004 > > 6/1/2004 > > 7/1/2004 > > 8/1/2004 > > 9/1/2004 > > 10/1/2004 > > 11/1/2004 > > 12/1/2004 > > > > however I only get back the original subset w/ all the missing months > > :( ... does this make sense? > > > > On Mon, 13 Dec 2004 12:56:25 -0800, Charlotte Foust > > wrote: > > > If you have a date dimension table such as might be used in a > > > datawarehouse, you can simply join the two tables and pull the > > > missing > > > > > dates out of the date dimension table. > > > > > > Charlotte Foust > > > > > > > > > > > > > > > -----Original Message----- > > > From: Francisco Tapia [mailto:fhtapia at gmail.com] > > > Sent: Monday, December 13, 2004 10:01 AM > > > To: dba-sqlserver at databaseadvisors.com > > > Subject: [dba-SQLServer] Reports > > > > > > perhaps someone here can help me out so this reporting goes a lot > > > smoother :) > > > > > > Here is a sample snapshot of my data > > > > > > 8/1/2003, 1, SampleText, Qty1 > > > 10/1/2003, 1, SampleText, Qty1 > > > 11/1/2003, 1, SampleText, Qty1 > > > 1/1/2004, 1, SampleText, Qty1 > > > 8/1/2004, 1, SampleText, Qty1 > > > > > > There is only data for these months... would you create a temp table > > > > to fill in the rest of the months within the criteria? > > > > > > ex: 8/1/2003 - 8/31/2004 > > > > > > -- > > > -Francisco > > > http://pcthis.blogspot.com | PC news with out the jargon! > > > > -- > > -Francisco > > http://pcthis.blogspot.com | PC news with out the jargon! > > _______________________________________________ > > 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! > _______________________________________________ > > > 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! From cfoust at infostatsystems.com Tue Dec 14 10:24:29 2004 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 14 Dec 2004 08:24:29 -0800 Subject: [dba-SQLServer] Reports Message-ID: You should, yes. I just find that syntax harder to read. Charlotte Foust -----Original Message----- From: Francisco Tapia [mailto:fhtapia at gmail.com] Sent: Monday, December 13, 2004 10:55 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Reports well I will try that tomorrow.. i worked around the issue by dumping the data to excel and then filling in the missing dates (nulls) flipping the tables around I ought to get the same results if I did a SELECT * FROM Primary Table "RIGHT OUTER JOIN" Variable Table Should I not? On Mon, 13 Dec 2004 16:21:18 -0800, Charlotte Foust wrote: > Right, assuming you want all the dates in the variable table and only > > > matching records from the primary table. > > Charlotte Foust > > -----Original Message----- > From: Francisco Tapia [mailto:fhtapia at gmail.com] > Sent: Monday, December 13, 2004 3:38 PM > To: dba-sqlserver at databaseadvisors.com > Subject: Re: [dba-SQLServer] Reports > > so if I'm understanding you correctly it should be > > Select * From VariableTable LEFT OUTER JOIN PrimaryTable .... > > On Mon, 13 Dec 2004 14:56:14 -0800, Charlotte Foust > wrote: > > You have to use the variable table to drive the select, assuming it > > has all the dates in it. Get the dates from there and the matching > > records from the primary table. That should give you all the dates. > > > > > > > > Charlotte Foust > > > > -----Original Message----- > > From: Francisco Tapia [mailto:fhtapia at gmail.com] > > Sent: Monday, December 13, 2004 2:18 PM > > To: dba-sqlserver at databaseadvisors.com > > Subject: Re: [dba-SQLServer] Reports > > > > HA!, I guess i was pretty vauge ;) > > > > I'm going to be graphing some data out for the boss (kinda last > > minute > > changes) (wait when is there not :P) > > > > the original select spits out a set of data that looks very similar > > to > > > the listing below > > > > 8/1/2003, 1, SampleText, Qty1 > > 10/1/2003, 1, SampleText, Qty1 > > 11/1/2003, 1, SampleText, Qty1 > > 1/1/2004, 1, SampleText, Qty1 > > 8/1/2004, 1, SampleText, Qty1 > > > > because the range for the graph is for 12 months, I created a > > variable > > > table that simply holds the 12 months begining w/ the earliest month > > in this case that is August 2003. > > > > I take my table in a very simplistic > > > > SELECT FIELDS FROM PrimaryTable PT RIGHT OUTER JOIN @SecondaryTable > > ST > > > ON PT.DateField = ST.DateField > > > > the output I expect back is: > > > > 8/1/2003 > > 9/1/2003 > > 10/1/2003 > > 11/1/2003 > > 12/1/2003 > > 1/1/2004 > > 2/1/2004 > > 3/1/2004 > > 4/1/2004 > > 5/1/2004 > > 6/1/2004 > > 7/1/2004 > > 8/1/2004 > > 9/1/2004 > > 10/1/2004 > > 11/1/2004 > > 12/1/2004 > > > > however I only get back the original subset w/ all the missing > > months :( ... does this make sense? > > > > On Mon, 13 Dec 2004 12:56:25 -0800, Charlotte Foust > > wrote: > > > If you have a date dimension table such as might be used in a > > > datawarehouse, you can simply join the two tables and pull the > > > missing > > > > > dates out of the date dimension table. > > > > > > Charlotte Foust > > > > > > > > > > > > > > > -----Original Message----- > > > From: Francisco Tapia [mailto:fhtapia at gmail.com] > > > Sent: Monday, December 13, 2004 10:01 AM > > > To: dba-sqlserver at databaseadvisors.com > > > Subject: [dba-SQLServer] Reports > > > > > > perhaps someone here can help me out so this reporting goes a lot > > > smoother :) > > > > > > Here is a sample snapshot of my data > > > > > > 8/1/2003, 1, SampleText, Qty1 > > > 10/1/2003, 1, SampleText, Qty1 > > > 11/1/2003, 1, SampleText, Qty1 > > > 1/1/2004, 1, SampleText, Qty1 > > > 8/1/2004, 1, SampleText, Qty1 > > > > > > There is only data for these months... would you create a temp > > > table > > > > to fill in the rest of the months within the criteria? > > > > > > ex: 8/1/2003 - 8/31/2004 > > > > > > -- > > > -Francisco > > > http://pcthis.blogspot.com | PC news with out the jargon! > > > > -- > > -Francisco > > http://pcthis.blogspot.com | PC news with out the jargon! > > _______________________________________________ > > 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! > _______________________________________________ > > > 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! _______________________________________________ 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 Tue Dec 14 12:23:35 2004 From: fhtapia at gmail.com (Francisco Tapia) Date: Tue, 14 Dec 2004 10:23:35 -0800 Subject: [dba-SQLServer] Reports In-Reply-To: References: Message-ID: :), well I originally didn't want to include the variable table (more typing ;)) but it looks like this is the method I must go with. I really just wanted an opinion on what people would choose, the variable table or if there was an easier or Better way. On Tue, 14 Dec 2004 08:24:29 -0800, Charlotte Foust wrote: > You should, yes. I just find that syntax harder to read. > > Charlotte Foust > > -----Original Message----- > From: Francisco Tapia [mailto:fhtapia at gmail.com] > Sent: Monday, December 13, 2004 10:55 PM > To: dba-sqlserver at databaseadvisors.com > Subject: Re: [dba-SQLServer] Reports > > well I will try that tomorrow.. i worked around the issue by dumping the > data to excel and then filling in the missing dates (nulls) > > flipping the tables around I ought to get the same results if I did a > SELECT * FROM > Primary Table "RIGHT OUTER JOIN" Variable Table > > Should I not? > > On Mon, 13 Dec 2004 16:21:18 -0800, Charlotte Foust > wrote: > > Right, assuming you want all the dates in the variable table and only > > > > > > matching records from the primary table. > > > > Charlotte Foust > > > > -----Original Message----- > > From: Francisco Tapia [mailto:fhtapia at gmail.com] > > Sent: Monday, December 13, 2004 3:38 PM > > To: dba-sqlserver at databaseadvisors.com > > Subject: Re: [dba-SQLServer] Reports > > > > so if I'm understanding you correctly it should be > > > > Select * From VariableTable LEFT OUTER JOIN PrimaryTable .... > > > > On Mon, 13 Dec 2004 14:56:14 -0800, Charlotte Foust > > wrote: > > > You have to use the variable table to drive the select, assuming it > > > has all the dates in it. Get the dates from there and the matching > > > records from the primary table. That should give you all the dates. > > > > > > > > > > > > Charlotte Foust > > > > > > -----Original Message----- > > > From: Francisco Tapia [mailto:fhtapia at gmail.com] > > > Sent: Monday, December 13, 2004 2:18 PM > > > To: dba-sqlserver at databaseadvisors.com > > > Subject: Re: [dba-SQLServer] Reports > > > > > > HA!, I guess i was pretty vauge ;) > > > > > > I'm going to be graphing some data out for the boss (kinda last > > > minute > > > changes) (wait when is there not :P) > > > > > > the original select spits out a set of data that looks very similar > > > to > > > > > the listing below > > > > > > 8/1/2003, 1, SampleText, Qty1 > > > 10/1/2003, 1, SampleText, Qty1 > > > 11/1/2003, 1, SampleText, Qty1 > > > 1/1/2004, 1, SampleText, Qty1 > > > 8/1/2004, 1, SampleText, Qty1 > > > > > > because the range for the graph is for 12 months, I created a > > > variable > > > > > table that simply holds the 12 months begining w/ the earliest month > > > > in this case that is August 2003. > > > > > > I take my table in a very simplistic > > > > > > SELECT FIELDS FROM PrimaryTable PT RIGHT OUTER JOIN @SecondaryTable > > > ST > > > > > ON PT.DateField = ST.DateField > > > > > > the output I expect back is: > > > > > > 8/1/2003 > > > 9/1/2003 > > > 10/1/2003 > > > 11/1/2003 > > > 12/1/2003 > > > 1/1/2004 > > > 2/1/2004 > > > 3/1/2004 > > > 4/1/2004 > > > 5/1/2004 > > > 6/1/2004 > > > 7/1/2004 > > > 8/1/2004 > > > 9/1/2004 > > > 10/1/2004 > > > 11/1/2004 > > > 12/1/2004 > > > > > > however I only get back the original subset w/ all the missing > > > months :( ... does this make sense? > > > > > > On Mon, 13 Dec 2004 12:56:25 -0800, Charlotte Foust > > > wrote: > > > > If you have a date dimension table such as might be used in a > > > > datawarehouse, you can simply join the two tables and pull the > > > > missing > > > > > > > dates out of the date dimension table. > > > > > > > > Charlotte Foust > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > From: Francisco Tapia [mailto:fhtapia at gmail.com] > > > > Sent: Monday, December 13, 2004 10:01 AM > > > > To: dba-sqlserver at databaseadvisors.com > > > > Subject: [dba-SQLServer] Reports > > > > > > > > perhaps someone here can help me out so this reporting goes a lot > > > > smoother :) > > > > > > > > Here is a sample snapshot of my data > > > > > > > > 8/1/2003, 1, SampleText, Qty1 > > > > 10/1/2003, 1, SampleText, Qty1 > > > > 11/1/2003, 1, SampleText, Qty1 > > > > 1/1/2004, 1, SampleText, Qty1 > > > > 8/1/2004, 1, SampleText, Qty1 > > > > > > > > There is only data for these months... would you create a temp > > > > table > > > > > > to fill in the rest of the months within the criteria? > > > > > > > > ex: 8/1/2003 - 8/31/2004 > > > > > > > > -- > > > > -Francisco > > > > http://pcthis.blogspot.com | PC news with out the jargon! > > > > > > -- > > > -Francisco > > > http://pcthis.blogspot.com | PC news with out the jargon! > > > _______________________________________________ > > > 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! > > _______________________________________________ > > > > > > 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! > _______________________________________________ > 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! From cfoust at infostatsystems.com Tue Dec 14 13:23:34 2004 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Tue, 14 Dec 2004 11:23:34 -0800 Subject: [dba-SQLServer] Reports Message-ID: Build yourself a Dates table and include it in your projects by default. You could even do it in XML and just read it when you need it. It simplifies a lot of reporting. Charlotte Foust -----Original Message----- From: Francisco Tapia [mailto:fhtapia at gmail.com] Sent: Tuesday, December 14, 2004 10:24 AM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Reports :), well I originally didn't want to include the variable table (more typing ;)) but it looks like this is the method I must go with. I really just wanted an opinion on what people would choose, the variable table or if there was an easier or Better way. On Tue, 14 Dec 2004 08:24:29 -0800, Charlotte Foust wrote: > You should, yes. I just find that syntax harder to read. > > Charlotte Foust > > -----Original Message----- > From: Francisco Tapia [mailto:fhtapia at gmail.com] > Sent: Monday, December 13, 2004 10:55 PM > To: dba-sqlserver at databaseadvisors.com > Subject: Re: [dba-SQLServer] Reports > > well I will try that tomorrow.. i worked around the issue by dumping > the data to excel and then filling in the missing dates (nulls) > > flipping the tables around I ought to get the same results if I did a > SELECT * FROM Primary Table "RIGHT OUTER JOIN" Variable Table > > Should I not? > > On Mon, 13 Dec 2004 16:21:18 -0800, Charlotte Foust > wrote: > > Right, assuming you want all the dates in the variable table and > > only > > > > > > matching records from the primary table. > > > > Charlotte Foust > > > > -----Original Message----- > > From: Francisco Tapia [mailto:fhtapia at gmail.com] > > Sent: Monday, December 13, 2004 3:38 PM > > To: dba-sqlserver at databaseadvisors.com > > Subject: Re: [dba-SQLServer] Reports > > > > so if I'm understanding you correctly it should be > > > > Select * From VariableTable LEFT OUTER JOIN PrimaryTable .... > > > > On Mon, 13 Dec 2004 14:56:14 -0800, Charlotte Foust > > wrote: > > > You have to use the variable table to drive the select, assuming > > > it has all the dates in it. Get the dates from there and the > > > matching records from the primary table. That should give you all > > > the dates. > > > > > > > > > > > > Charlotte Foust > > > > > > -----Original Message----- > > > From: Francisco Tapia [mailto:fhtapia at gmail.com] > > > Sent: Monday, December 13, 2004 2:18 PM > > > To: dba-sqlserver at databaseadvisors.com > > > Subject: Re: [dba-SQLServer] Reports > > > > > > HA!, I guess i was pretty vauge ;) > > > > > > I'm going to be graphing some data out for the boss (kinda last > > > minute > > > changes) (wait when is there not :P) > > > > > > the original select spits out a set of data that looks very > > > similar to > > > > > the listing below > > > > > > 8/1/2003, 1, SampleText, Qty1 > > > 10/1/2003, 1, SampleText, Qty1 > > > 11/1/2003, 1, SampleText, Qty1 > > > 1/1/2004, 1, SampleText, Qty1 > > > 8/1/2004, 1, SampleText, Qty1 > > > > > > because the range for the graph is for 12 months, I created a > > > variable > > > > > table that simply holds the 12 months begining w/ the earliest > > > month > > > > in this case that is August 2003. > > > > > > I take my table in a very simplistic > > > > > > SELECT FIELDS FROM PrimaryTable PT RIGHT OUTER JOIN > > > @SecondaryTable ST > > > > > ON PT.DateField = ST.DateField > > > > > > the output I expect back is: > > > > > > 8/1/2003 > > > 9/1/2003 > > > 10/1/2003 > > > 11/1/2003 > > > 12/1/2003 > > > 1/1/2004 > > > 2/1/2004 > > > 3/1/2004 > > > 4/1/2004 > > > 5/1/2004 > > > 6/1/2004 > > > 7/1/2004 > > > 8/1/2004 > > > 9/1/2004 > > > 10/1/2004 > > > 11/1/2004 > > > 12/1/2004 > > > > > > however I only get back the original subset w/ all the missing > > > months :( ... does this make sense? > > > > > > On Mon, 13 Dec 2004 12:56:25 -0800, Charlotte Foust > > > wrote: > > > > If you have a date dimension table such as might be used in a > > > > datawarehouse, you can simply join the two tables and pull the > > > > missing > > > > > > > dates out of the date dimension table. > > > > > > > > Charlotte Foust > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > From: Francisco Tapia [mailto:fhtapia at gmail.com] > > > > Sent: Monday, December 13, 2004 10:01 AM > > > > To: dba-sqlserver at databaseadvisors.com > > > > Subject: [dba-SQLServer] Reports > > > > > > > > perhaps someone here can help me out so this reporting goes a > > > > lot smoother :) > > > > > > > > Here is a sample snapshot of my data > > > > > > > > 8/1/2003, 1, SampleText, Qty1 > > > > 10/1/2003, 1, SampleText, Qty1 > > > > 11/1/2003, 1, SampleText, Qty1 > > > > 1/1/2004, 1, SampleText, Qty1 > > > > 8/1/2004, 1, SampleText, Qty1 > > > > > > > > There is only data for these months... would you create a temp > > > > table > > > > > > to fill in the rest of the months within the criteria? > > > > > > > > ex: 8/1/2003 - 8/31/2004 > > > > > > > > -- > > > > -Francisco > > > > http://pcthis.blogspot.com | PC news with out the jargon! > > > > > > -- > > > -Francisco > > > http://pcthis.blogspot.com | PC news with out the jargon! > > > _______________________________________________ > > > 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! > > _______________________________________________ > > > > > > 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! > _______________________________________________ > 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! _______________________________________________ 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 Tue Dec 14 15:48:24 2004 From: fhtapia at gmail.com (Francisco Tapia) Date: Tue, 14 Dec 2004 13:48:24 -0800 Subject: [dba-SQLServer] Reports In-Reply-To: References: Message-ID: the selection must be done at the server side because there will be "Reporting Services" So I wen this route.... --13 Month Selection DECLARE @rptMonths TABLE(rptMonth DateTime) INSERT INTO @rptMonths(rptMonth) VALUES(DATEADD(mm, 0, @StartDate)) INSERT INTO @rptMonths(rptMonth) VALUES(DATEADD(mm, 1, @StartDate)) INSERT INTO @rptMonths(rptMonth) VALUES(DATEADD(mm, 2, @StartDate)) INSERT INTO @rptMonths(rptMonth) VALUES(DATEADD(mm, 3, @StartDate)) INSERT INTO @rptMonths(rptMonth) VALUES(DATEADD(mm, 4, @StartDate)) INSERT INTO @rptMonths(rptMonth) VALUES(DATEADD(mm, 5, @StartDate)) INSERT INTO @rptMonths(rptMonth) VALUES(DATEADD(mm, 6, @StartDate)) INSERT INTO @rptMonths(rptMonth) VALUES(DATEADD(mm, 7, @StartDate)) INSERT INTO @rptMonths(rptMonth) VALUES(DATEADD(mm, 8, @StartDate)) INSERT INTO @rptMonths(rptMonth) VALUES(DATEADD(mm, 9, @StartDate)) INSERT INTO @rptMonths(rptMonth) VALUES(DATEADD(mm, 10, @StartDate)) INSERT INTO @rptMonths(rptMonth) VALUES(DATEADD(mm, 11, @StartDate)) INSERT INTO @rptMonths(rptMonth) VALUES(DATEADD(mm, 12, @StartDate)) On Tue, 14 Dec 2004 11:23:34 -0800, Charlotte Foust wrote: > Build yourself a Dates table and include it in your projects by default. > You could even do it in XML and just read it when you need it. It > simplifies a lot of reporting. > > Charlotte Foust > > -----Original Message----- > From: Francisco Tapia [mailto:fhtapia at gmail.com] > Sent: Tuesday, December 14, 2004 10:24 AM > To: dba-sqlserver at databaseadvisors.com > Subject: Re: [dba-SQLServer] Reports > > :), well I originally didn't want to include the variable table (more > typing ;)) but it looks like this is the method I must go with. I > really just wanted an opinion on what people would choose, the variable > table or if there was an easier or Better way. > > On Tue, 14 Dec 2004 08:24:29 -0800, Charlotte Foust > wrote: > > You should, yes. I just find that syntax harder to read. > > > > Charlotte Foust > > > > -----Original Message----- > > From: Francisco Tapia [mailto:fhtapia at gmail.com] > > Sent: Monday, December 13, 2004 10:55 PM > > To: dba-sqlserver at databaseadvisors.com > > Subject: Re: [dba-SQLServer] Reports > > > > well I will try that tomorrow.. i worked around the issue by dumping > > the data to excel and then filling in the missing dates (nulls) > > > > flipping the tables around I ought to get the same results if I did a > > SELECT * FROM Primary Table "RIGHT OUTER JOIN" Variable Table > > > > Should I not? > > > > On Mon, 13 Dec 2004 16:21:18 -0800, Charlotte Foust > > wrote: > > > Right, assuming you want all the dates in the variable table and > > > only > > > > > > > > > matching records from the primary table. > > > > > > Charlotte Foust > > > > > > -----Original Message----- > > > From: Francisco Tapia [mailto:fhtapia at gmail.com] > > > Sent: Monday, December 13, 2004 3:38 PM > > > To: dba-sqlserver at databaseadvisors.com > > > Subject: Re: [dba-SQLServer] Reports > > > > > > so if I'm understanding you correctly it should be > > > > > > Select * From VariableTable LEFT OUTER JOIN PrimaryTable .... > > > > > > On Mon, 13 Dec 2004 14:56:14 -0800, Charlotte Foust > > > wrote: > > > > You have to use the variable table to drive the select, assuming > > > > it has all the dates in it. Get the dates from there and the > > > > matching records from the primary table. That should give you all > > > > > the dates. > > > > > > > > > > > > > > > > Charlotte Foust > > > > > > > > -----Original Message----- > > > > From: Francisco Tapia [mailto:fhtapia at gmail.com] > > > > Sent: Monday, December 13, 2004 2:18 PM > > > > To: dba-sqlserver at databaseadvisors.com > > > > Subject: Re: [dba-SQLServer] Reports > > > > > > > > HA!, I guess i was pretty vauge ;) > > > > > > > > I'm going to be graphing some data out for the boss (kinda last > > > > minute > > > > changes) (wait when is there not :P) > > > > > > > > the original select spits out a set of data that looks very > > > > similar to > > > > > > > the listing below > > > > > > > > 8/1/2003, 1, SampleText, Qty1 > > > > 10/1/2003, 1, SampleText, Qty1 > > > > 11/1/2003, 1, SampleText, Qty1 > > > > 1/1/2004, 1, SampleText, Qty1 > > > > 8/1/2004, 1, SampleText, Qty1 > > > > > > > > because the range for the graph is for 12 months, I created a > > > > variable > > > > > > > table that simply holds the 12 months begining w/ the earliest > > > > month > > > > > > in this case that is August 2003. > > > > > > > > I take my table in a very simplistic > > > > > > > > SELECT FIELDS FROM PrimaryTable PT RIGHT OUTER JOIN > > > > @SecondaryTable ST > > > > > > > ON PT.DateField = ST.DateField > > > > > > > > the output I expect back is: > > > > > > > > 8/1/2003 > > > > 9/1/2003 > > > > 10/1/2003 > > > > 11/1/2003 > > > > 12/1/2003 > > > > 1/1/2004 > > > > 2/1/2004 > > > > 3/1/2004 > > > > 4/1/2004 > > > > 5/1/2004 > > > > 6/1/2004 > > > > 7/1/2004 > > > > 8/1/2004 > > > > 9/1/2004 > > > > 10/1/2004 > > > > 11/1/2004 > > > > 12/1/2004 > > > > > > > > however I only get back the original subset w/ all the missing > > > > months :( ... does this make sense? > > > > > > > > On Mon, 13 Dec 2004 12:56:25 -0800, Charlotte Foust > > > > wrote: > > > > > If you have a date dimension table such as might be used in a > > > > > datawarehouse, you can simply join the two tables and pull the > > > > > missing > > > > > > > > > dates out of the date dimension table. > > > > > > > > > > Charlotte Foust > > > > > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: Francisco Tapia [mailto:fhtapia at gmail.com] > > > > > Sent: Monday, December 13, 2004 10:01 AM > > > > > To: dba-sqlserver at databaseadvisors.com > > > > > Subject: [dba-SQLServer] Reports > > > > > > > > > > perhaps someone here can help me out so this reporting goes a > > > > > lot smoother :) > > > > > > > > > > Here is a sample snapshot of my data > > > > > > > > > > 8/1/2003, 1, SampleText, Qty1 > > > > > 10/1/2003, 1, SampleText, Qty1 > > > > > 11/1/2003, 1, SampleText, Qty1 > > > > > 1/1/2004, 1, SampleText, Qty1 > > > > > 8/1/2004, 1, SampleText, Qty1 > > > > > > > > > > There is only data for these months... would you create a temp > > > > > table > > > > > > > > to fill in the rest of the months within the criteria? > > > > > > > > > > ex: 8/1/2003 - 8/31/2004 > > > > > > > > > > -- > > > > > -Francisco > > > > > http://pcthis.blogspot.com | PC news with out the jargon! > > > > > > > > -- > > > > -Francisco > > > > http://pcthis.blogspot.com | PC news with out the jargon! > > > > _______________________________________________ > > > > 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! > > > _______________________________________________ > > > > > > > > > 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! > > _______________________________________________ > > 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! > _______________________________________________ > 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! From fhtapia at gmail.com Tue Dec 14 17:51:54 2004 From: fhtapia at gmail.com (Francisco Tapia) Date: Tue, 14 Dec 2004 15:51:54 -0800 Subject: [dba-SQLServer] DTS Jobs FireWalled? Message-ID: we have a server outside of our company... our SysAdmin just installed a new Cisco Router + Firewall and now none of the DTS jobs run from their schedule, they DO run if we click on the DTS and run it manually, they fail when run from the Sql Server JOBS.... the jobs are ment to run locally against the local server... why would the DTS package call outside the network? btw, The Sql Agent has admin rights on the box. thanks, -- -Francisco http://pcthis.blogspot.com | PC news with out the jargon! From martyconnelly at shaw.ca Thu Dec 16 14:46:32 2004 From: martyconnelly at shaw.ca (MartyConnelly) Date: Thu, 16 Dec 2004 12:46:32 -0800 Subject: [dba-SQLServer] Info SQL 2005 Enterprise Manger Released References: Message-ID: <41C1F428.6010407@shaw.ca> Here is an MSDN blog with the info and links to dowload beta SQL Server 2005 Express Manager http://blogs.msdn.com/sqlexpress/archive/2004/12/03/274429.aspx -- Marty Connelly Victoria, B.C. Canada From tuxedo_man at hotmail.com Fri Dec 17 15:06:52 2004 From: tuxedo_man at hotmail.com (Billy Pang) Date: Fri, 17 Dec 2004 21:06:52 +0000 Subject: [dba-SQLServer] query governor cost limit Message-ID: Hello: Has anyone ever had experience (good or bad) using the "query governor cost limit" option within sql server 2000? I've got a db dev server with two user databases where one user db has big resource-intensive queries running that is affecting the execution of the smaller queries in the other database. I am thinking of using the "query governor cost limit" to control this type of "bullying". (And there is no money to get another db dev server). Also, if there is a better solution to this "bullying" problem, I would like to know. Many thanks in advance, Billy From artful at rogers.com Sun Dec 19 23:05:20 2004 From: artful at rogers.com (Arthur Fuller) Date: Mon, 20 Dec 2004 00:05:20 -0500 Subject: [dba-SQLServer] TicketMaster-like Timer In-Reply-To: <41BDFD60.6090208@rogers.com> References: <41BDFD60.6090208@rogers.com> Message-ID: <41C65D90.20604@rogers.com> I have a requirement that I have virtually no experience in handling. I named the subject of this message due to the similarity of my requirement and the functionality of that site. The general idea is this. You want to grab some inventory and hold it for N minutes, making the available inventory equal P - Requested Qty. Then another sproc will perhaps fire that seals the grab and sets Actual Inventory to P - Requested Qty (i.e. the credit card was authenticated and the qty was sold). Failing that, upon expiry of N minutes the Request is cancelled and the Available Inventory is reset to P. I hope this is clear. Here is an example: Client wants 4 units. Inventory is 10 units. Set the timer to N minutes, and show available as 6 units. Client completes transaction, then set actual inventory to 6 units. Timer expires without completion, reset available inventory to 10 units. Note: It could happen that Q clients request units (i.e. 10 available, Client 1 requests 4, Client 2 requests 2, Client 3 requests 2), so I need in this case 3 timers and also the ability to display the available inventory as the actual inventory minus the sum of the requests. 10 - (4 + 2 + 2) = 2. My colleagues and I have kicked this problem around and we've decided this is a back-end challenge. How convenient for them! I really have no clue how to attack this. Suggestions most gratefully accepted. TIA, Arthur Arthur Fuller wrote: > Always happy to help, Francisco, especially given the number of times > you have helped me. But on this one I think I need a little more > explanation. Are you wanting an empty row to appear for the months > that are missing, or what? > > Arthur > > Francisco Tapia wrote: > >> perhaps someone here can help me out so this reporting goes a lot >> smoother :) >> >> Here is a sample snapshot of my data >> >> 8/1/2003, 1, SampleText, Qty1 >> 10/1/2003, 1, SampleText, Qty1 >> 11/1/2003, 1, SampleText, Qty1 >> 1/1/2004, 1, SampleText, Qty1 >> 8/1/2004, 1, SampleText, Qty1 >> >> There is only data for these months... would you create a temp table >> to fill in the rest of the months within the criteria? >> >> ex: 8/1/2003 - 8/31/2004 >> >> >> >> >> > > -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.296 / Virus Database: 265.6.0 - Release Date: 12/17/2004 From stuart at lexacorp.com.pg Sun Dec 19 23:46:42 2004 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Mon, 20 Dec 2004 15:46:42 +1000 Subject: [dba-SQLServer] TicketMaster-like Timer In-Reply-To: <41C65D90.20604@rogers.com> References: <41BDFD60.6090208@rogers.com> Message-ID: <41C6F3E2.19641.EDC756@lexacorp.com.pg> On 20 Dec 2004 at 0:05, Arthur Fuller wrote: > Note: > It could happen that Q clients request units (i.e. 10 available, Client > 1 requests 4, Client 2 requests 2, Client 3 requests 2), so I need in > this case 3 timers and also the ability to display the available > inventory as the actual inventory minus the sum of the requests. 10 - (4 > + 2 + 2) = 2. > > My colleagues and I have kicked this problem around and we've decided > this is a back-end challenge. How convenient for them! I really have no > clue how to attack this. Suggestions most gratefully accepted. > First thoughts: tblCurrentlyProcessing ClientID UnitID Qty Date/Time Requested When the request is first received decrease UnitsAvailable in main table and add new record to tblCurrentlyProcessing. When completed, delete record from tblCurrentlyProcessing. Once per minute or whatever run a procedure that deletes expired records from tblCurrentlyProcessing and adds back unused units to main table. -- Stuart From Developer at UltraDNT.com Mon Dec 20 00:11:13 2004 From: Developer at UltraDNT.com (Steve Conklin (Developer@UltraDNT)) Date: Mon, 20 Dec 2004 01:11:13 -0500 Subject: [dba-SQLServer] TicketMaster-like Timer In-Reply-To: <41C65D90.20604@rogers.com> Message-ID: <003901c4e65a$b8ac4800$640fa8c0@COA3> Some of the details of this should be altered depending on whether or not you want to fully track "shopping -cart abandonment." Either your InventoryTransaction table line-items can have 4 statuses (IN, OUT, Pending OUT, Pending (back) IN), or you have 2 tables, Inventory Txn and Inventory Txns Pending. Either setup can then be queried for current inventory (which should be a calculation, anyway), such as Product 1 inventory = Product 1's (INs + Pend INs) LESS (OUTs + Pend OUTs). Lets assume you also generate a unique order id, and keep that in the inventory transactions, and the order has a status of either complete or pending, and the date-time of order start. Run a job on the SQL server that executes every N minutes, and selects the Inv. Txns of Pend Out status for all orders that are pending with a date-time of less than Now minus N. Set all those orders to status ABANDONED and insert a matching Pend IN for each of the Pend OUTs. (Completed orders already have done the appropriate inventory OUTs.) Hth Steve -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Monday, December 20, 2004 12:05 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] TicketMaster-like Timer I have a requirement that I have virtually no experience in handling. I named the subject of this message due to the similarity of my requirement and the functionality of that site. The general idea is this. You want to grab some inventory and hold it for N minutes, making the available inventory equal P - Requested Qty. Then another sproc will perhaps fire that seals the grab and sets Actual Inventory to P - Requested Qty (i.e. the credit card was authenticated and the qty was sold). Failing that, upon expiry of N minutes the Request is cancelled and the Available Inventory is reset to P. I hope this is clear. Here is an example: Client wants 4 units. Inventory is 10 units. Set the timer to N minutes, and show available as 6 units. Client completes transaction, then set actual inventory to 6 units. Timer expires without completion, reset available inventory to 10 units. Note: It could happen that Q clients request units (i.e. 10 available, Client 1 requests 4, Client 2 requests 2, Client 3 requests 2), so I need in this case 3 timers and also the ability to display the available inventory as the actual inventory minus the sum of the requests. 10 - (4 + 2 + 2) = 2. My colleagues and I have kicked this problem around and we've decided this is a back-end challenge. How convenient for them! I really have no clue how to attack this. Suggestions most gratefully accepted. TIA, Arthur Arthur Fuller wrote: > Always happy to help, Francisco, especially given the number of times > you have helped me. But on this one I think I need a little more > explanation. Are you wanting an empty row to appear for the months > that are missing, or what? > > Arthur > > Francisco Tapia wrote: > >> perhaps someone here can help me out so this reporting goes a lot >> smoother :) >> >> Here is a sample snapshot of my data >> >> 8/1/2003, 1, SampleText, Qty1 >> 10/1/2003, 1, SampleText, Qty1 >> 11/1/2003, 1, SampleText, Qty1 >> 1/1/2004, 1, SampleText, Qty1 >> 8/1/2004, 1, SampleText, Qty1 >> >> There is only data for these months... would you create a temp table >> to fill in the rest of the months within the criteria? >> >> ex: 8/1/2003 - 8/31/2004 >> >> >> >> >> > > -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.296 / Virus Database: 265.6.0 - Release Date: 12/17/2004 _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From marklbreen at gmail.com Mon Dec 20 04:11:13 2004 From: marklbreen at gmail.com (Mark Breen) Date: Mon, 20 Dec 2004 10:11:13 +0000 Subject: [dba-SQLServer] TicketMaster-like Timer In-Reply-To: <003901c4e65a$b8ac4800$640fa8c0@COA3> References: <41C65D90.20604@rogers.com> <003901c4e65a$b8ac4800$640fa8c0@COA3> Message-ID: Hello Authur and Steve, I agree with Steve's approach, a self correctly architecture is desirable here, but Authur, I am pondering another aspect to your question. I do not know what % of orders are abandoned and for this discussion, the reason is irrelevant. Also, I do not know what stock levels your client currently holds. But, if you have a quite high % of orders that ultimately are only enquiries and reasonably low stock, you will effectively always have 10 - 20% of your stock unavailable. Can you consider some other form of allocations, sort of like when you book your airline tickets, you have the seat but it could be gone by the time you actually try to pay for it. This may inconvenience some customers but the alternative is that the stock would not have been there anyway. Also, with the method discussed, the time wasters actually prevent real customers acquiring product. And of course there is the cost to your client of carrying extra stock to compensate for the lost 10-20% of stock. My logic my not be applicable depending on the actual numbers, but this may be food for thought. Let us know how you tackle it. Mark On Mon, 20 Dec 2004 01:11:13 -0500, Steve Conklin (Developer at UltraDNT) wrote: > Some of the details of this should be altered depending on whether or > not you want to fully track "shopping -cart abandonment." Either your > InventoryTransaction table line-items can have 4 statuses (IN, OUT, > Pending OUT, Pending (back) IN), or you have 2 tables, Inventory Txn and > Inventory Txns Pending. Either setup can then be queried for current > inventory (which should be a calculation, anyway), such as Product 1 > inventory = Product 1's (INs + Pend INs) LESS (OUTs + Pend OUTs). > Lets assume you also generate a unique order id, and keep that in the > inventory transactions, and the order has a status of either complete > or pending, and the date-time of order start. > Run a job on the SQL server that executes every N minutes, and selects > the Inv. Txns of Pend Out status for all orders that are pending with a > date-time of less than Now minus N. Set all those orders to status > ABANDONED and insert a matching Pend IN for each of the Pend OUTs. > (Completed orders already have done the appropriate inventory OUTs.) > > Hth > Steve > > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur > Fuller > Sent: Monday, December 20, 2004 12:05 AM > To: dba-sqlserver at databaseadvisors.com > Subject: [dba-SQLServer] TicketMaster-like Timer > > I have a requirement that I have virtually no experience in handling. I > named the subject of this message due to the similarity of my > requirement and the functionality of that site. The general idea is > this. You want to grab some inventory and hold it for N minutes, making > the available inventory equal P - Requested Qty. Then another sproc will > > perhaps fire that seals the grab and sets Actual Inventory to P - > Requested Qty (i.e. the credit card was authenticated and the qty was > sold). Failing that, upon expiry of N minutes the Request is cancelled > and the Available Inventory is reset to P. I hope this is clear. Here is > > an example: > > Client wants 4 units. > Inventory is 10 units. > Set the timer to N minutes, and show available as 6 units. Client > completes transaction, then set actual inventory to 6 units. Timer > expires without completion, reset available inventory to 10 units. > > Note: > It could happen that Q clients request units (i.e. 10 available, Client > 1 requests 4, Client 2 requests 2, Client 3 requests 2), so I need in > this case 3 timers and also the ability to display the available > inventory as the actual inventory minus the sum of the requests. 10 - (4 > > + 2 + 2) = 2. > > My colleagues and I have kicked this problem around and we've decided > this is a back-end challenge. How convenient for them! I really have no > clue how to attack this. Suggestions most gratefully accepted. > > TIA, > Arthur > > Arthur Fuller wrote: > > > Always happy to help, Francisco, especially given the number of times > > you have helped me. But on this one I think I need a little more > > explanation. Are you wanting an empty row to appear for the months > > that are missing, or what? > > > > Arthur > > > > Francisco Tapia wrote: > > > >> perhaps someone here can help me out so this reporting goes a lot > >> smoother :) > >> > >> Here is a sample snapshot of my data > >> > >> 8/1/2003, 1, SampleText, Qty1 > >> 10/1/2003, 1, SampleText, Qty1 > >> 11/1/2003, 1, SampleText, Qty1 > >> 1/1/2004, 1, SampleText, Qty1 > >> 8/1/2004, 1, SampleText, Qty1 > >> > >> There is only data for these months... would you create a temp table > >> to fill in the rest of the months within the criteria? > >> > >> ex: 8/1/2003 - 8/31/2004 > >> > >> > >> > >> > >> > > > > > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.296 / Virus Database: 265.6.0 - Release Date: 12/17/2004 > > _______________________________________________ > 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 andy at minstersystems.co.uk Mon Dec 20 04:26:26 2004 From: andy at minstersystems.co.uk (Andy Lacey) Date: Mon, 20 Dec 2004 11:26:26 +0100 Subject: [dba-SQLServer] TicketMaster-like Timer Message-ID: <20041220112624.D82AE24D14F@smtp.nildram.co.uk> 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 --------- Original Message -------- From: dba-sqlserver at databaseadvisors.com To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] TicketMaster-like Timer Date: 20/12/04 10:11 > > Hello Authur and Steve, > > I agree with Steve's approach, a self correctly architecture is > desirable here, but Authur, I am pondering another aspect to your > question. > > I do not know what % of orders are abandoned and for this discussion, > the reason is irrelevant. Also, I do not know what stock levels your > client currently holds. > > But, if you have a quite high % of orders that ultimately are only > enquiries and reasonably low stock, you will effectively always have > 10 - 20% of your stock unavailable. > > Can you consider some other form of allocations, sort of like when you > book your airline tickets, you have the seat but it could be gone by > the time you actually try to pay for it. This may inconvenience some > customers but the alternative is that the stock would not have been > there anyway. Also, with the method discussed, the time wasters > actually prevent real customers acquiring product. And of course > there is the cost to your client of carrying extra stock to compensate > for the lost 10-20% of stock. > > My logic my not be applicable depending on the actual numbers, but > this may be food for thought. > > Let us know how you tackle it. > > Mark > > > > > > > > On Mon, 20 Dec 2004 01:11:13 -0500, Steve Conklin (Developer at UltraDNT) > <Developer at ultradnt.com> wrote: > > Some of the details of this should be altered depending on whether or > > not you want to fully track "shopping -cart abandonment." Either your > > InventoryTransaction table line-items can have 4 statuses (IN, OUT, > > Pending OUT, Pending (back) IN), or you have 2 tables, Inventory Txn and > > Inventory Txns Pending. Either setup can then be queried for current > > inventory (which should be a calculation, anyway), such as Product 1 > > inventory = Product 1's (INs + Pend INs) LESS (OUTs + Pend OUTs). > > Lets assume you also generate a unique order id, and keep that in the > > inventory transactions, and the order has a status of either complete > > or pending, and the date-time of order start. > > Run a job on the SQL server that executes every N minutes, and selects > > the Inv. Txns of Pend Out status for all orders that are pending with a > > date-time of less than Now minus N. Set all those orders to status > > ABANDONED and insert a matching Pend IN for each of the Pend OUTs. > > (Completed orders already have done the appropriate inventory OUTs.) > > > > Hth > > Steve > > > > > > -----Original Message----- > > From: dba-sqlserver-bounces at databaseadvisors.com > > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur > > Fuller > > Sent: Monday, December 20, 2004 12:05 AM > > To: dba-sqlserver at databaseadvisors.com > > Subject: [dba-SQLServer] TicketMaster-like Timer > > > > I have a requirement that I have virtually no experience in handling. I > > named the subject of this message due to the similarity of my > > requirement and the functionality of that site. The general idea is > > this. You want to grab some inventory and hold it for N minutes, making > > the available inventory equal P - Requested Qty. Then another sproc will > > > > perhaps fire that seals the grab and sets Actual Inventory to P - > > Requested Qty (i.e. the credit card was authenticated and the qty was > > sold). Failing that, upon expiry of N minutes the Request is cancelled > > and the Available Inventory is reset to P. I hope this is clear. Here is > > > > an example: > > > > Client wants 4 units. > > Inventory is 10 units. > > Set the timer to N minutes, and show available as 6 units. Client > > completes transaction, then set actual inventory to 6 units. Timer > > expires without completion, reset available inventory to 10 units. > > > > Note: > > It could happen that Q clients request units (i.e. 10 available, Client > > 1 requests 4, Client 2 requests 2, Client 3 requests 2), so I need in > > this case 3 timers and also the ability to display the available > > inventory as the actual inventory minus the sum of the requests. 10 - (4 > > > > + 2 + 2) = 2. > > > > My colleagues and I have kicked this problem around and we've decided > > this is a back-end challenge. How convenient for them! I really have no > > clue how to attack this. Suggestions most gratefully accepted. > > > > TIA, > > Arthur > > > > Arthur Fuller wrote: > > > > > Always happy to help, Francisco, especially given the number of times > > > you have helped me. But on this one I think I need a little more > > > explanation. Are you wanting an empty row to appear for the months > > > that are missing, or what? > > > > > > Arthur > > > > > > Francisco Tapia wrote: > > > > > >> perhaps someone here can help me out so this reporting goes a lot > > >> smoother :) > > >> > > >> Here is a sample snapshot of my data > > >> > > >> 8/1/2003, 1, SampleText, Qty1 > > >> 10/1/2003, 1, SampleText, Qty1 > > >> 11/1/2003, 1, SampleText, Qty1 > > >> 1/1/2004, 1, SampleText, Qty1 > > >> 8/1/2004, 1, SampleText, Qty1 > > >> > > >> There is only data for these months... would you create a temp table > > >> to fill in the rest of the months within the criteria? > > >> > > >> ex: 8/1/2003 - 8/31/2004 > > >> > > >> > > >> > > >> > > >> > > > > > > > > > > -- > > No virus found in this outgoing message. > > Checked by AVG Anti-Virus. > > Version: 7.0.296 / Virus Database: 265.6.0 - Release Date: 12/17/2004 > > > > _______________________________________________ > > 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 > > > > > > ________________________________________________ Message sent using UebiMiau 2.7.2 From marklbreen at gmail.com Mon Dec 20 07:28:42 2004 From: marklbreen at gmail.com (Mark Breen) Date: Mon, 20 Dec 2004 13:28:42 +0000 Subject: [dba-SQLServer] TicketMaster-like Timer In-Reply-To: <20041220112624.D82AE24D14F@smtp.nildram.co.uk> References: <20041220112624.D82AE24D14F@smtp.nildram.co.uk> Message-ID: 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 > > From andy at minstersystems.co.uk Mon Dec 20 09:21:45 2004 From: andy at minstersystems.co.uk (Andy Lacey) Date: Mon, 20 Dec 2004 16:21:45 +0100 Subject: [dba-SQLServer] TicketMaster-like Timer Message-ID: <20041220162142.64D392564B4@smtp.nildram.co.uk> It's the definition of 'long enough'. Many sites say something like "You have 5 minutes to complete this transaction" or words to that effect". I would suggest Arthur's routine would need to take this into account. So the records on the pending table need time-stamping when they're added and thesweep to take records off the 'pending' table can only remove records older than x minutes. Oh, and Arthur (I believe) is talking about tickets for gigs. -- Andy Lacey http://www.minstersystems.co.uk --------- Original Message -------- From: dba-sqlserver at databaseadvisors.com To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] TicketMaster-like Timer Date: 20/12/04 13:29 > > 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 > <andy at minstersystems.co.uk> 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 > > > > > > > ________________________________________________ Message sent using UebiMiau 2.7.2 From dmcafee at pacbell.net Mon Dec 20 11:30:27 2004 From: dmcafee at pacbell.net (dmcafee at pacbell.net) Date: Mon, 20 Dec 2004 09:30:27 -0800 Subject: [dba-SQLServer] TicketMaster-like Timer In-Reply-To: <20041220162142.64D392564B4@smtp.nildram.co.uk> Message-ID: Which often sell out 15000+ seat venues in mere minutes David -----Original Message----- Oh, and Arthur (I believe) is talking about tickets for gigs. -- Andy Lacey http://www.minstersystems.co.uk From andy at minstersystems.co.uk Mon Dec 20 13:59:28 2004 From: andy at minstersystems.co.uk (Andy Lacey) Date: Mon, 20 Dec 2004 19:59:28 -0000 Subject: [dba-SQLServer] TicketMaster-like Timer In-Reply-To: Message-ID: <000001c4e6ce$6a6a7670$b274d0d5@minster33c3r25> No argument about that. But I still contend that all of the sites I use, and that includes TicketMaster UK, give you x time to finalise your purchase once you've said you're buying, however busy they are. Anyway, this debate is pointless as it's a company policy that Arthur's place will or will not have, not a system matter. Sorry I started it really. -- 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 dmcafee at pacbell.net > Sent: 20 December 2004 17:30 > To: dba-sqlserver at databaseadvisors.com > Subject: RE: [dba-SQLServer] TicketMaster-like Timer > > > Which often sell out 15000+ seat venues in mere minutes > > David > > -----Original Message----- > > > Oh, and Arthur (I believe) is talking about tickets for gigs. > -- > 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 tuxedo_man at hotmail.com Wed Dec 22 12:27:25 2004 From: tuxedo_man at hotmail.com (Billy Pang) Date: Wed, 22 Dec 2004 18:27:25 +0000 Subject: [dba-SQLServer] is there a query governor cost on user database level? Message-ID: Hello: Is there a SET QUERY_GOVERNOR_COST_LIMIT equivalent on the database level? I can use SET QUERY_GOVERNOR_COST_LIMIT to control queries on the connection level or use sp_config to control it on the server level but is there anything I can do on the user database level? Thanks in advance, Billy From jwcolby at colbyconsulting.com Thu Dec 23 21:20:14 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Thu, 23 Dec 2004 22:20:14 -0500 Subject: [dba-SQLServer] Melissa Data In-Reply-To: Message-ID: <001b01c4e967$805872c0$677aa8c0@ColbyM6805> Has anyone used Melissa data to validate addresses with SQL Server or Access? Any comments? John W. Colby www.ColbyConsulting.com Contribute your unused CPU cycles to a good cause: http://folding.stanford.edu/ From artful at rogers.com Fri Dec 24 22:42:44 2004 From: artful at rogers.com (Arthur Fuller) Date: Fri, 24 Dec 2004 23:42:44 -0500 Subject: [dba-SQLServer] TicketMaster-like Timer In-Reply-To: <003901c4e65a$b8ac4800$640fa8c0@COA3> References: <003901c4e65a$b8ac4800$640fa8c0@COA3> Message-ID: <41CCEFC4.9060501@rogers.com> I think I follow your logic Steve, but I don't see how it leads to running the job for each user. I.e. you log in at 10:00 am and request 4 tickets, I log in at 10:02 am and request 4 tickets. How do I kill you at 10:10am and me at 10:12am? That's the part I am having a tough time dealing with. Arthur Steve Conklin (Developer at UltraDNT) wrote: >Some of the details of this should be altered depending on whether or >not you want to fully track "shopping -cart abandonment." Either your >InventoryTransaction table line-items can have 4 statuses (IN, OUT, >Pending OUT, Pending (back) IN), or you have 2 tables, Inventory Txn and >Inventory Txns Pending. Either setup can then be queried for current >inventory (which should be a calculation, anyway), such as Product 1 >inventory = Product 1's (INs + Pend INs) LESS (OUTs + Pend OUTs). >Lets assume you also generate a unique order id, and keep that in the >inventory transactions, and the order has a status of either complete >or pending, and the date-time of order start. >Run a job on the SQL server that executes every N minutes, and selects >the Inv. Txns of Pend Out status for all orders that are pending with a >date-time of less than Now minus N. Set all those orders to status >ABANDONED and insert a matching Pend IN for each of the Pend OUTs. >(Completed orders already have done the appropriate inventory OUTs.) > >Hth >Steve > > > > > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur >Fuller >Sent: Monday, December 20, 2004 12:05 AM >To: dba-sqlserver at databaseadvisors.com >Subject: [dba-SQLServer] TicketMaster-like Timer > > >I have a requirement that I have virtually no experience in handling. I >named the subject of this message due to the similarity of my >requirement and the functionality of that site. The general idea is >this. You want to grab some inventory and hold it for N minutes, making >the available inventory equal P - Requested Qty. Then another sproc will > >perhaps fire that seals the grab and sets Actual Inventory to P - >Requested Qty (i.e. the credit card was authenticated and the qty was >sold). Failing that, upon expiry of N minutes the Request is cancelled >and the Available Inventory is reset to P. I hope this is clear. Here is > >an example: > >Client wants 4 units. >Inventory is 10 units. >Set the timer to N minutes, and show available as 6 units. Client >completes transaction, then set actual inventory to 6 units. Timer >expires without completion, reset available inventory to 10 units. > >Note: >It could happen that Q clients request units (i.e. 10 available, Client >1 requests 4, Client 2 requests 2, Client 3 requests 2), so I need in >this case 3 timers and also the ability to display the available >inventory as the actual inventory minus the sum of the requests. 10 - (4 > >+ 2 + 2) = 2. > >My colleagues and I have kicked this problem around and we've decided >this is a back-end challenge. How convenient for them! I really have no >clue how to attack this. Suggestions most gratefully accepted. > >TIA, >Arthur > >Arthur Fuller wrote: > > > >>Always happy to help, Francisco, especially given the number of times >>you have helped me. But on this one I think I need a little more >>explanation. Are you wanting an empty row to appear for the months >>that are missing, or what? >> >>Arthur >> >>Francisco Tapia wrote: >> >> >> >>>perhaps someone here can help me out so this reporting goes a lot >>>smoother :) >>> >>>Here is a sample snapshot of my data >>> >>>8/1/2003, 1, SampleText, Qty1 >>>10/1/2003, 1, SampleText, Qty1 >>>11/1/2003, 1, SampleText, Qty1 >>>1/1/2004, 1, SampleText, Qty1 >>>8/1/2004, 1, SampleText, Qty1 >>> >>>There is only data for these months... would you create a temp table >>>to fill in the rest of the months within the criteria? >>> >>>ex: 8/1/2003 - 8/31/2004 >>> >>> >>> >>> >>> >>> >>> >> >> > > > > -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 12/22/2004 From artful at rogers.com Fri Dec 24 22:44:09 2004 From: artful at rogers.com (Arthur Fuller) Date: Fri, 24 Dec 2004 23:44:09 -0500 Subject: [dba-SQLServer] TicketMaster-like Timer In-Reply-To: References: <41C65D90.20604@rogers.com> <003901c4e65a$b8ac4800$640fa8c0@COA3> Message-ID: <41CCF019.2070107@rogers.com> Most definitely food for thought, and thank you. Mark Breen wrote: >Hello Authur and Steve, > >I agree with Steve's approach, a self correctly architecture is >desirable here, but Authur, I am pondering another aspect to your >question. > >I do not know what % of orders are abandoned and for this discussion, >the reason is irrelevant. Also, I do not know what stock levels your >client currently holds. > >But, if you have a quite high % of orders that ultimately are only >enquiries and reasonably low stock, you will effectively always have >10 - 20% of your stock unavailable. > >Can you consider some other form of allocations, sort of like when you >book your airline tickets, you have the seat but it could be gone by >the time you actually try to pay for it. This may inconvenience some >customers but the alternative is that the stock would not have been >there anyway. Also, with the method discussed, the time wasters >actually prevent real customers acquiring product. And of course >there is the cost to your client of carrying extra stock to compensate >for the lost 10-20% of stock. > >My logic my not be applicable depending on the actual numbers, but >this may be food for thought. > >Let us know how you tackle it. > >Mark > > > > > > > >On Mon, 20 Dec 2004 01:11:13 -0500, Steve Conklin (Developer at UltraDNT) > wrote: > > >>Some of the details of this should be altered depending on whether or >>not you want to fully track "shopping -cart abandonment." Either your >>InventoryTransaction table line-items can have 4 statuses (IN, OUT, >>Pending OUT, Pending (back) IN), or you have 2 tables, Inventory Txn and >>Inventory Txns Pending. Either setup can then be queried for current >>inventory (which should be a calculation, anyway), such as Product 1 >>inventory = Product 1's (INs + Pend INs) LESS (OUTs + Pend OUTs). >>Lets assume you also generate a unique order id, and keep that in the >>inventory transactions, and the order has a status of either complete >>or pending, and the date-time of order start. >>Run a job on the SQL server that executes every N minutes, and selects >>the Inv. Txns of Pend Out status for all orders that are pending with a >>date-time of less than Now minus N. Set all those orders to status >>ABANDONED and insert a matching Pend IN for each of the Pend OUTs. >>(Completed orders already have done the appropriate inventory OUTs.) >> >>Hth >>Steve >> >> >>-----Original Message----- >>From: dba-sqlserver-bounces at databaseadvisors.com >>[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur >>Fuller >>Sent: Monday, December 20, 2004 12:05 AM >>To: dba-sqlserver at databaseadvisors.com >>Subject: [dba-SQLServer] TicketMaster-like Timer >> >>I have a requirement that I have virtually no experience in handling. I >>named the subject of this message due to the similarity of my >>requirement and the functionality of that site. The general idea is >>this. You want to grab some inventory and hold it for N minutes, making >>the available inventory equal P - Requested Qty. Then another sproc will >> >>perhaps fire that seals the grab and sets Actual Inventory to P - >>Requested Qty (i.e. the credit card was authenticated and the qty was >>sold). Failing that, upon expiry of N minutes the Request is cancelled >>and the Available Inventory is reset to P. I hope this is clear. Here is >> >>an example: >> >>Client wants 4 units. >>Inventory is 10 units. >>Set the timer to N minutes, and show available as 6 units. Client >>completes transaction, then set actual inventory to 6 units. Timer >>expires without completion, reset available inventory to 10 units. >> >>Note: >>It could happen that Q clients request units (i.e. 10 available, Client >>1 requests 4, Client 2 requests 2, Client 3 requests 2), so I need in >>this case 3 timers and also the ability to display the available >>inventory as the actual inventory minus the sum of the requests. 10 - (4 >> >>+ 2 + 2) = 2. >> >>My colleagues and I have kicked this problem around and we've decided >>this is a back-end challenge. How convenient for them! I really have no >>clue how to attack this. Suggestions most gratefully accepted. >> >>TIA, >>Arthur >> >>Arthur Fuller wrote: >> >> >> >>>Always happy to help, Francisco, especially given the number of times >>>you have helped me. But on this one I think I need a little more >>>explanation. Are you wanting an empty row to appear for the months >>>that are missing, or what? >>> >>>Arthur >>> >>>Francisco Tapia wrote: >>> >>> >>> >>>>perhaps someone here can help me out so this reporting goes a lot >>>>smoother :) >>>> >>>>Here is a sample snapshot of my data >>>> >>>>8/1/2003, 1, SampleText, Qty1 >>>>10/1/2003, 1, SampleText, Qty1 >>>>11/1/2003, 1, SampleText, Qty1 >>>>1/1/2004, 1, SampleText, Qty1 >>>>8/1/2004, 1, SampleText, Qty1 >>>> >>>>There is only data for these months... would you create a temp table >>>>to fill in the rest of the months within the criteria? >>>> >>>>ex: 8/1/2003 - 8/31/2004 >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> >>> >>-- >>No virus found in this outgoing message. >>Checked by AVG Anti-Virus. >>Version: 7.0.296 / Virus Database: 265.6.0 - Release Date: 12/17/2004 >> >>_______________________________________________ >>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 > > > > > -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 12/22/2004 From artful at rogers.com Fri Dec 24 22:54:58 2004 From: artful at rogers.com (Arthur Fuller) Date: Fri, 24 Dec 2004 23:54:58 -0500 Subject: [dba-SQLServer] TicketMaster-like Timer In-Reply-To: <20041220112624.D82AE24D14F@smtp.nildram.co.uk> References: <20041220112624.D82AE24D14F@smtp.nildram.co.uk> Message-ID: <41CCF2A2.90005@rogers.com> Absolutely. We are very customer-sensitive, and especially so given the nature of the audiences for such bands as U2 and the Dead. We actually had a customer last year who flew from Japan to catch 12 U2 concerts in various cities in the USA and Canada -- and he travelled alone so he paid the extra single-room hotel price as well. IMO, U2 plays every concert note for note, so why in God's name would anyone want to attend 2 let alone 12 concerts in one tour? Mine is not to reason why, but only to write the sprocs. We want to give these junkies the fastest track possible into our money-extraction machine, while also allowing the first-time user to browse and decide whether she wants to see U2 in East Rutherford or NYC. So we have to be able to "claim" the tickets in the way that TicketMaster does. I guess the real question is, how to start N timers? I have no idea. But I need to do it. Funny how this business goes. U2 and Cher sell so quickly it makes your head spin. Elton (playing to the same basically gay market as Cher) sells SLOWLY. Who knows what's going to move quickly? Nobody. We have sold a LOT of tickets to the Stones, and most of the audience was born after their greatest records were released. Go figure. I would have thought they'd all be at a RadioHead concert instead. Maybe they attended cuz their parents bought the tickets. I don't know. I'm not even a big rock and roll fan, but we write the software the clients want. Gimme Cecil Taylor any day and drown all the Shanias, but a quick assessment of their relative sales will prove the irrelevance of my opinion. 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 > > > >--------- Original Message -------- >From: dba-sqlserver at databaseadvisors.com >To: dba-sqlserver at databaseadvisors.com >Subject: Re: [dba-SQLServer] TicketMaster-like Timer >Date: 20/12/04 10:11 > > > >>Hello Authur and Steve, >> >>I agree with Steve's approach, a self correctly architecture is >>desirable here, but Authur, I am pondering another aspect to your >>question. >> >>I do not know what % of orders are abandoned and for this discussion, >>the reason is irrelevant. Also, I do not know what stock levels your >>client currently holds. >> >>But, if you have a quite high % of orders that ultimately are only >>enquiries and reasonably low stock, you will effectively always have >>10 - 20% of your stock unavailable. >> >>Can you consider some other form of allocations, sort of like when you >>book your airline tickets, you have the seat but it could be gone by >>the time you actually try to pay for it. This may inconvenience some >>customers but the alternative is that the stock would not have been >>there anyway. Also, with the method discussed, the time wasters >>actually prevent real customers acquiring product. And of course >>there is the cost to your client of carrying extra stock to compensate >>for the lost 10-20% of stock. >> >>My logic my not be applicable depending on the actual numbers, but >>this may be food for thought. >> >>Let us know how you tackle it. >> >>Mark >> >> >> >> >> >> >> >>On Mon, 20 Dec 2004 01:11:13 -0500, Steve Conklin (Developer at UltraDNT) >><Developer at ultradnt.com> wrote: >>> Some of the details of this should be altered depending on whether or >>> not you want to fully track "shopping -cart abandonment." >> >> >Either your > > >>> InventoryTransaction table line-items can have 4 statuses (IN, OUT, >>> Pending OUT, Pending (back) IN), or you have 2 tables, Inventory Txn >> >> >and > > >>> Inventory Txns Pending. Either setup can then be queried for current >>> inventory (which should be a calculation, anyway), such as Product 1 >>> inventory = Product 1's (INs + Pend INs) LESS (OUTs + Pend OUTs). >>> Lets assume you also generate a unique order id, and keep that in the >>> inventory transactions, and the order has a status of either >> >> >complete > > >>> or pending, and the date-time of order start. >>> Run a job on the SQL server that executes every N minutes, and >> >> >selects > > >>> the Inv. Txns of Pend Out status for all orders that are pending with >> >> >a > > >>> date-time of less than Now minus N. Set all those orders to status >>> ABANDONED and insert a matching Pend IN for each of the Pend OUTs. >>> (Completed orders already have done the appropriate inventory OUTs.) >>> >>> Hth >>> Steve >>> >>> >>> -----Original Message----- >>> From: dba-sqlserver-bounces at databaseadvisors.com >>> [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of >> >> >Arthur > > >>> Fuller >>> Sent: Monday, December 20, 2004 12:05 AM >>> To: dba-sqlserver at databaseadvisors.com >>> Subject: [dba-SQLServer] TicketMaster-like Timer >>> >>> I have a requirement that I have virtually no experience in handling. >> >> >I > > >>> named the subject of this message due to the similarity of my >>> requirement and the functionality of that site. The general idea is >>> this. You want to grab some inventory and hold it for N minutes, >> >> >making > > >>> the available inventory equal P - Requested Qty. Then another sproc >> >> >will > > >>> >>> perhaps fire that seals the grab and sets Actual Inventory to P - >>> Requested Qty (i.e. the credit card was authenticated and the qty was >>> sold). Failing that, upon expiry of N minutes the Request is >> >> >cancelled > > >>> and the Available Inventory is reset to P. I hope this is clear. Here >> >> >is > > >>> >>> an example: >>> >>> Client wants 4 units. >>> Inventory is 10 units. >>> Set the timer to N minutes, and show available as 6 units. Client >>> completes transaction, then set actual inventory to 6 units. Timer >>> expires without completion, reset available inventory to 10 units. >>> >>> Note: >>> It could happen that Q clients request units (i.e. 10 available, >> >> >Client > > >>> 1 requests 4, Client 2 requests 2, Client 3 requests 2), so I need in >>> this case 3 timers and also the ability to display the available >>> inventory as the actual inventory minus the sum of the requests. 10 - >> >> >(4 > > >>> >>> + 2 + 2) = 2. >>> >>> My colleagues and I have kicked this problem around and we've decided >>> this is a back-end challenge. How convenient for them! I really have >> >> >no > > >>> clue how to attack this. Suggestions most gratefully accepted. >>> >>> TIA, >>> Arthur >>> >>> Arthur Fuller wrote: >>> >>> > Always happy to help, Francisco, especially given the number of >> >> >times > > >>> > you have helped me. But on this one I think I need a little more >>> > explanation. Are you wanting an empty row to appear for the >> >> >months > > >>> > that are missing, or what? >>> > >>> > Arthur >>> > >>> > Francisco Tapia wrote: >>> > >>> >> perhaps someone here can help me out so this reporting goes >> >> >a lot > > >>> >> smoother :) >>> >> >>> >> Here is a sample snapshot of my data >>> >> >>> >> 8/1/2003, 1, SampleText, Qty1 >>> >> 10/1/2003, 1, SampleText, Qty1 >>> >> 11/1/2003, 1, SampleText, Qty1 >>> >> 1/1/2004, 1, SampleText, Qty1 >>> >> 8/1/2004, 1, SampleText, Qty1 >>> >> >>> >> There is only data for these months... would you create a >> >> >temp table > > >>> >> to fill in the rest of the months within the criteria? >>> >> >>> >> ex: 8/1/2003 - 8/31/2004 >>> >> >>> >> >>> >> >>> >> >>> >> >>> > >>> > >>> >>> -- >>> No virus found in this outgoing message. >>> Checked by AVG Anti-Virus. >>> Version: 7.0.296 / Virus Database: 265.6.0 - Release Date: 12/17/2004 >>> >>> _______________________________________________ >>> 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 >> >> >> >> >> >> >> >> > >________________________________________________ >Message sent using UebiMiau 2.7.2 > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > > > > -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 12/22/2004 From artful at rogers.com Fri Dec 24 23:05:41 2004 From: artful at rogers.com (Arthur Fuller) Date: Sat, 25 Dec 2004 00:05:41 -0500 Subject: [dba-SQLServer] TicketMaster-like Timer In-Reply-To: References: <20041220112624.D82AE24D14F@smtp.nildram.co.uk> Message-ID: <41CCF525.7040901@rogers.com> 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 > > > > > -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 12/22/2004 From artful at rogers.com Fri Dec 24 23:12:02 2004 From: artful at rogers.com (Arthur Fuller) Date: Sat, 25 Dec 2004 00:12:02 -0500 Subject: [dba-SQLServer] TicketMaster-like Timer In-Reply-To: <20041220162142.64D392564B4@smtp.nildram.co.uk> References: <20041220162142.64D392564B4@smtp.nildram.co.uk> Message-ID: <41CCF6A2.5020709@rogers.com> Exactly right, Andy, and I'm puzzled about the best way to do this. Maybe I don't need timers at all but only rows in a "Reserved" table with a timestamp column and a sproc that executes every minute or so. Maybe that's the way to go. And if the "Reserved" table contains no rows terminate the sproc at once. Just a conjecture. Thanks to you all for helping me think this through. Andy Lacey wrote: >It's the definition of 'long enough'. Many sites say something like "You >have 5 minutes to complete this transaction" or words to that effect". I >would suggest Arthur's routine would need to take this into account. So the >records on the pending table need time-stamping when they're added and >thesweep to take records off the 'pending' table can only remove records >older than x minutes. > >Oh, and Arthur (I believe) is talking about tickets for gigs. >-- >Andy Lacey >http://www.minstersystems.co.uk > > > >--------- Original Message -------- >From: dba-sqlserver at databaseadvisors.com >To: dba-sqlserver at databaseadvisors.com >Subject: Re: [dba-SQLServer] TicketMaster-like Timer >Date: 20/12/04 13:29 > > > >>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 >><andy at minstersystems.co.uk> 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 >> >> >> >> >> >> >> >> >> > >________________________________________________ >Message sent using UebiMiau 2.7.2 > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > > > > -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 12/22/2004 From artful at rogers.com Fri Dec 24 23:15:12 2004 From: artful at rogers.com (Arthur Fuller) Date: Sat, 25 Dec 2004 00:15:12 -0500 Subject: [dba-SQLServer] TicketMaster-like Timer In-Reply-To: <000001c4e6ce$6a6a7670$b274d0d5@minster33c3r25> References: <000001c4e6ce$6a6a7670$b274d0d5@minster33c3r25> Message-ID: <41CCF760.4000601@rogers.com> Don't be sorry, Andy. You have it exactly right. First come, first grab -- unless you bust the timeout. It's quite true that many tickets could sell very quickly, but if you're the first guy in, I want you to declare the number of tickets asap and then reserve them for you for N minutes and if you're a slow typist or have second thoughts, you're toast and the tickets are un-reserved. Andy Lacey wrote: >No argument about that. But I still contend that all of the sites I use, and >that includes TicketMaster UK, give you x time to finalise your purchase >once you've said you're buying, however busy they are. Anyway, this debate >is pointless as it's a company policy that Arthur's place will or will not >have, not a system matter. Sorry I started it really. > >-- 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 dmcafee at pacbell.net >>Sent: 20 December 2004 17:30 >>To: dba-sqlserver at databaseadvisors.com >>Subject: RE: [dba-SQLServer] TicketMaster-like Timer >> >> >>Which often sell out 15000+ seat venues in mere minutes >> >>David >> >>-----Original Message----- >> >> >>Oh, and Arthur (I believe) is talking about tickets for gigs. >>-- >>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 >> >> >> >> >> > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > > > > -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 12/22/2004 From jwcolby at colbyconsulting.com Sat Dec 25 10:20:51 2004 From: jwcolby at colbyconsulting.com (John W. Colby) Date: Sat, 25 Dec 2004 11:20:51 -0500 Subject: [dba-SQLServer] TicketMaster-like Timer In-Reply-To: <41CCF525.7040901@rogers.com> Message-ID: <000201c4ea9d$c39e8f10$6c01a8c0@ColbyM6805> 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 > > > > > -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 12/22/2004 _______________________________________________ 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 Dec 25 12:05:56 2004 From: artful at rogers.com (Arthur Fuller) Date: Sat, 25 Dec 2004 13:05:56 -0500 Subject: [dba-SQLServer] TicketMaster-like Timer In-Reply-To: <000201c4ea9d$c39e8f10$6c01a8c0@ColbyM6805> References: <000201c4ea9d$c39e8f10$6c01a8c0@ColbyM6805> Message-ID: <41CDAC04.5020908@rogers.com> 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 >> >> >> >> >> >> >> > > > > -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 12/22/2004 From nancy.lytle at gmail.com Sat Dec 25 13:59:52 2004 From: nancy.lytle at gmail.com (worddiva) Date: Sat, 25 Dec 2004 14:59:52 -0500 Subject: [dba-SQLServer] TicketMaster-like Timer In-Reply-To: <41CDAC04.5020908@rogers.com> References: <000201c4ea9d$c39e8f10$6c01a8c0@ColbyM6805> <41CDAC04.5020908@rogers.com> Message-ID: I'll throw in my 2 cents worth here: Arthur, I think you are on the right track with the idea of a sproc. Have the sproc run by a job every 3 - 5 minutes and return all held items to inventory if the timestamp on that "pre-order" is more than 5 minutes ago. You might place the pre-orders in their own table, which would just be a holding table. The order would either be cancelled and returned to inventory or confirmed and moved along in the process. This way you are not really creating a bunch of timers, but just checking the time on each pre-order and then acting according to your rules. Nancy PS: You aren't the only one with no life:) On Sat, 25 Dec 2004 13:05:56 -0500, Arthur Fuller wrote: > 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: > From tuxedo_man at hotmail.com Sat Dec 25 14:41:19 2004 From: tuxedo_man at hotmail.com (Billy Pang) Date: Sat, 25 Dec 2004 20:41:19 +0000 Subject: [dba-SQLServer] TicketMaster-like Timer In-Reply-To: <41CCEFC4.9060501@rogers.com> Message-ID: Assuming that there is a column called expired_datetime, how about creating a view that displays all the tickets that are currently locked up and cannot be touched. when a user logs on at 10:02am, a record is created with expiry datetime five minutes into the future. The view will have a where clause that filters out expired out records. This way you can kill expired tickets without the fuss of a sql server agent. If a pair of tickets is not displayed in this view, it means that it is not locked up and therefore is available for acquisition. If a second user logs on at 10:04am, the tickets held up by the first user cannot be acquird by this user. However, if the second user logs on at 10:08am, assuming first user did not purchase tickets, the second user can acquire the same tickets since those tickets will no longer show up in the view (in which case, another record is created with expiry date five minutes into the future). When second user does buy the tickets, you don't have to do anything to that record you created from the second acquisition since the tickets do not get deposited back into the inventory pool and the acquisition record will automatically disappear after expiry datetime has passed. Hope that helps. Billy >From: Arthur Fuller >Reply-To: dba-sqlserver at databaseadvisors.com >To: dba-sqlserver at databaseadvisors.com >Subject: Re: [dba-SQLServer] TicketMaster-like Timer >Date: Fri, 24 Dec 2004 23:42:44 -0500 > >I think I follow your logic Steve, but I don't see how it leads to running >the job for each user. I.e. you log in at 10:00 am and request 4 tickets, I >log in at 10:02 am and request 4 tickets. How do I kill you at 10:10am and >me at 10:12am? That's the part I am having a tough time dealing with. > >Arthur > >Steve Conklin (Developer at UltraDNT) wrote: > >>Some of the details of this should be altered depending on whether or >>not you want to fully track "shopping -cart abandonment." Either your >>InventoryTransaction table line-items can have 4 statuses (IN, OUT, >>Pending OUT, Pending (back) IN), or you have 2 tables, Inventory Txn and >>Inventory Txns Pending. Either setup can then be queried for current >>inventory (which should be a calculation, anyway), such as Product 1 >>inventory = Product 1's (INs + Pend INs) LESS (OUTs + Pend OUTs). Lets >>assume you also generate a unique order id, and keep that in the >>inventory transactions, and the order has a status of either complete >>or pending, and the date-time of order start. >>Run a job on the SQL server that executes every N minutes, and selects >>the Inv. Txns of Pend Out status for all orders that are pending with a >>date-time of less than Now minus N. Set all those orders to status >>ABANDONED and insert a matching Pend IN for each of the Pend OUTs. >>(Completed orders already have done the appropriate inventory OUTs.) >> >>Hth >>Steve >> >> >> >> >> >>-----Original Message----- >>From: dba-sqlserver-bounces at databaseadvisors.com >>[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur >>Fuller >>Sent: Monday, December 20, 2004 12:05 AM >>To: dba-sqlserver at databaseadvisors.com >>Subject: [dba-SQLServer] TicketMaster-like Timer >> >> >>I have a requirement that I have virtually no experience in handling. I >>named the subject of this message due to the similarity of my requirement >>and the functionality of that site. The general idea is this. You want to >>grab some inventory and hold it for N minutes, making the available >>inventory equal P - Requested Qty. Then another sproc will >> >>perhaps fire that seals the grab and sets Actual Inventory to P - >>Requested Qty (i.e. the credit card was authenticated and the qty was >>sold). Failing that, upon expiry of N minutes the Request is cancelled and >>the Available Inventory is reset to P. I hope this is clear. Here is >> >>an example: >> >>Client wants 4 units. >>Inventory is 10 units. >>Set the timer to N minutes, and show available as 6 units. Client >>completes transaction, then set actual inventory to 6 units. Timer >>expires without completion, reset available inventory to 10 units. >> >>Note: >>It could happen that Q clients request units (i.e. 10 available, Client 1 >>requests 4, Client 2 requests 2, Client 3 requests 2), so I need in this >>case 3 timers and also the ability to display the available inventory as >>the actual inventory minus the sum of the requests. 10 - (4 >> >>+ 2 + 2) = 2. >> >>My colleagues and I have kicked this problem around and we've decided this >>is a back-end challenge. How convenient for them! I really have no clue >>how to attack this. Suggestions most gratefully accepted. >> >>TIA, >>Arthur >> >>Arthur Fuller wrote: >> >> >> >>>Always happy to help, Francisco, especially given the number of times >>>you have helped me. But on this one I think I need a little more >>>explanation. Are you wanting an empty row to appear for the months that >>>are missing, or what? >>> >>>Arthur >>> >>>Francisco Tapia wrote: >>> >>> >>> >>>>perhaps someone here can help me out so this reporting goes a lot >>>>smoother :) >>>> >>>>Here is a sample snapshot of my data >>>> >>>>8/1/2003, 1, SampleText, Qty1 >>>>10/1/2003, 1, SampleText, Qty1 >>>>11/1/2003, 1, SampleText, Qty1 >>>>1/1/2004, 1, SampleText, Qty1 >>>>8/1/2004, 1, SampleText, Qty1 >>>> >>>>There is only data for these months... would you create a temp table to >>>>fill in the rest of the months within the criteria? >>>> >>>>ex: 8/1/2003 - 8/31/2004 >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> >>> >> >> >> >> > > >-- >No virus found in this outgoing message. >Checked by AVG Anti-Virus. >Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 12/22/2004 > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > From tuxedo_man at hotmail.com Sat Dec 25 14:45:14 2004 From: tuxedo_man at hotmail.com (Billy Pang) Date: Sat, 25 Dec 2004 20:45:14 +0000 Subject: [dba-SQLServer] Merry Christmas Message-ID: Hello: I'd like to wish everyone here a very Merry Christmas and a very Happy New Year! Sincerely, Billy From stuart at lexacorp.com.pg Sat Dec 25 16:59:13 2004 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Sun, 26 Dec 2004 08:59:13 +1000 Subject: [dba-SQLServer] TicketMaster-like Timer In-Reply-To: <41CDAC04.5020908@rogers.com> References: <000201c4ea9d$c39e8f10$6c01a8c0@ColbyM6805> Message-ID: <41CE7D61.18470.1861D107@lexacorp.com.pg> On 25 Dec 2004 at 13:05, Arthur Fuller wrote: > 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. > My initial thought was a scheduled sproc, but a trigger may well be the way to go - Every time you get a new customer on line, do a clean up of your pending reservations table. It may slow things down during peak periods a little bit, but it also means that you don't have to run the sproc all the time during quiet periods. I guess you'd need to look at your user pattern to determine the best solution in your case. -- Stuart From accessd at shaw.ca Sun Dec 26 01:22:30 2004 From: accessd at shaw.ca (Jim Lawrence) Date: Sat, 25 Dec 2004 23:22:30 -0800 Subject: [dba-SQLServer] TicketMaster-like Timer In-Reply-To: <41CDAC04.5020908@rogers.com> Message-ID: <0I9B0000BJ4KTC@l-daemon> 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 >> >> >> >> >> >> >> > > > > -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 12/22/2004 _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com