From paul.hartland at fsmail.net Thu Apr 1 02:14:46 2004 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Thu, 1 Apr 2004 10:14:46 +0200 (CEST) Subject: [dba-SQLServer] Stored Procedure Help (SQL Server & VB6) Message-ID: <32073193.1080807286669.JavaMail.www@wwinf3003> To all, I have a Visual Basic 6 front-end together with a SQL Server 7.0 back-end, and have tried writing a stored procedure to do the following: I pass a UserID into the SP, then I want the SP to UPDATE tblPersonnelJobCategories to TRUE where tblPersonnelJobCategories.UserID is equal to the UserID that I passed to the SP but I only want the UPDATE to take place where the PayrollNo & CategoryID in tblPersonnelJobCategories matches the PayrollNo & CategoryID in tblPersonnelCategoriesSelected I tried using the follwing SQL statement in my SP but it doesn?t like the Inner Join: UPDATE tblPersonnelJobCategories INNER JOIN tblPersonnelCategoriesSelected ON (tblPersonnelJobCategories.CategoryID = tblPersonnelCategoriesSelected.CategoryID) AND (tblPersonnelJobCategories.PayrollNo = tblPersonnelCategoriesSelected.PayrollNo) SET tblPersonnelJobCategories.Selected = True WHERE tblPersonnelJobCategories.UserID= @UserId Any help would be greatly appreciated, as I?m fairly new to SP?s and thought an INNER JOIN would be ok. Thanks in advance for any help Freeserve AnyTime - HALF PRICE for the first 3 months - Save ?7.50 a month www.freeserve.com/anytime From sqlserver667 at yahoo.com Thu Apr 1 06:37:12 2004 From: sqlserver667 at yahoo.com (S D) Date: Thu, 1 Apr 2004 04:37:12 -0800 (PST) Subject: [dba-SQLServer] Stored Procedure Help (SQL Server & VB6) In-Reply-To: <32073193.1080807286669.JavaMail.www@wwinf3003> Message-ID: <20040401123712.86216.qmail@web61208.mail.yahoo.com> Hi paul, nice to see you here also. Personally I do NOT use the INNER JOIN stuff. I just use plain SQL SELECT a.x, b.y FROM table1 a, table2 b WHERE a.a = b.a AND .... That would result in: UPDATE tblPersonnelJobCategories SET tblPersonnelJobCategories.Selected = True WHERE tblPersonnelJobCategories.UserID= @UserId AND tblPersonnelJobCategories.CategoryID = tblPersonnelCategoriesSelected.CategoryID AND tblPersonnelJobCategories.PayrollNo = tblPersonnelCategoriesSelected.PayrollNo A tip for you're query: does it run when you hardcode the UserID? Did you try to run: SELECT tblPersonnelJobCategories.UserID, tblPersonnelJobCategories.Selected FROM tblPersonnelJobCategories, tblPersonnelCategoriesSelected WHERE tblPersonnelJobCategories.UserID= @UserId AND tblPersonnelJobCategories.CategoryID = tblPersonnelCategoriesSelected.CategoryID AND tblPersonnelJobCategories.PayrollNo = tblPersonnelCategoriesSelected.PayrollNo Success. Sander paul.hartland at fsmail.net wrote: To all, I have a Visual Basic 6 front-end together with a SQL Server 7.0 back-end, and have tried writing a stored procedure to do the following: I pass a UserID into the SP, then I want the SP to UPDATE tblPersonnelJobCategories to TRUE where tblPersonnelJobCategories.UserID is equal to the UserID that I passed to the SP but I only want the UPDATE to take place where the PayrollNo & CategoryID in tblPersonnelJobCategories matches the PayrollNo & CategoryID in tblPersonnelCategoriesSelected I tried using the follwing SQL statement in my SP but it doesn?t like the Inner Join: UPDATE tblPersonnelJobCategories INNER JOIN tblPersonnelCategoriesSelected ON (tblPersonnelJobCategories.CategoryID = tblPersonnelCategoriesSelected.CategoryID) AND (tblPersonnelJobCategories.PayrollNo = tblPersonnelCategoriesSelected.PayrollNo) SET tblPersonnelJobCategories.Selected = True WHERE tblPersonnelJobCategories.UserID= @UserId Any help would be greatly appreciated, as I?m fairly new to SP?s and thought an INNER JOIN would be ok. Thanks in advance for any help Freeserve AnyTime - HALF PRICE for the first 3 months - Save ?7.50 a month www.freeserve.com/anytime _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam From paul.hartland at fsmail.net Thu Apr 1 07:27:22 2004 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Thu, 1 Apr 2004 15:27:22 +0200 (CEST) Subject: [dba-SQLServer] Stored Procedure Help (SQL Server & VB6) Message-ID: <14913988.1080826042901.JavaMail.www@wwinf3003> Thanks for the response, I ended up cheating. I created a view to select the records I needed to update then use an SP to update them..... Paul Message date : Apr 01 2004, 01:38 PM >From : "S D" To : dba-sqlserver at databaseadvisors.com Copy to : Subject : Re: [dba-SQLServer] Stored Procedure Help (SQL Server & VB6) Hi paul, nice to see you here also. Personally I do NOT use the INNER JOIN stuff. I just use plain SQL SELECT a.x, b.y FROM table1 a, table2 b WHERE a.a = b.a AND .... That would result in: UPDATE tblPersonnelJobCategories SET tblPersonnelJobCategories.Selected = True WHERE tblPersonnelJobCategories.UserID= @UserId AND tblPersonnelJobCategories.CategoryID = tblPersonnelCategoriesSelected.CategoryID AND tblPersonnelJobCategories.PayrollNo = tblPersonnelCategoriesSelected.PayrollNo A tip for you're query: does it run when you hardcode the UserID? Did you try to run: SELECT tblPersonnelJobCategories.UserID, tblPersonnelJobCategories.Selected FROM tblPersonnelJobCategories, tblPersonnelCategoriesSelected WHERE tblPersonnelJobCategories.UserID= @UserId AND tblPersonnelJobCategories.CategoryID = tblPersonnelCategoriesSelected.CategoryID AND tblPersonnelJobCategories.PayrollNo = tblPersonnelCategoriesSelected.PayrollNo Success. Sander paul.hartland at fsmail.net wrote: To all, I have a Visual Basic 6 front-end together with a SQL Server 7.0 back-end, and have tried writing a stored procedure to do the following: I pass a UserID into the SP, then I want the SP to UPDATE tblPersonnelJobCategories to TRUE where tblPersonnelJobCategories.UserID is equal to the UserID that I passed to the SP but I only want the UPDATE to take place where the PayrollNo & CategoryID in tblPersonnelJobCategories matches the PayrollNo & CategoryID in tblPersonnelCategoriesSelected I tried using the follwing SQL statement in my SP but it doesn?t like the Inner Join: UPDATE tblPersonnelJobCategories INNER JOIN tblPersonnelCategoriesSelected ON (tblPersonnelJobCategories.CategoryID = tblPersonnelCategoriesSelected.CategoryID) AND (tblPersonnelJobCategories.PayrollNo = tblPersonnelCategoriesSelected.PayrollNo) SET tblPersonnelJobCategories.Selected = True WHERE tblPersonnelJobCategories.UserID= @UserId Any help would be greatly appreciated, as I?m fairly new to SP?s and thought an INNER JOIN would be ok. Thanks in advance for any help Freeserve AnyTime - HALF PRICE for the first 3 months - Save ?7.50 a month www.freeserve.com/anytime _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com Freeserve AnyTime - HALF PRICE for the first 3 months - Save ?7.50 a month www.freeserve.com/anytime From my.lists at verizon.net Thu Apr 1 09:27:18 2004 From: my.lists at verizon.net (Francisco H Tapia) Date: Thu, 01 Apr 2004 07:27:18 -0800 Subject: [dba-SQLServer] ping ping ping....? In-Reply-To: <20040401055005.36140.qmail@web61203.mail.yahoo.com> References: <20040401055005.36140.qmail@web61203.mail.yahoo.com> Message-ID: <406C34D6.8000009@verizon.net> I received your both your posts... S D said the following on 3/31/2004 9:50 PM: >Hi group, > >is there any activity here? I'm not receiving anything.... > >Regards, > > > -- -Francisco From my.lists at verizon.net Thu Apr 1 09:33:31 2004 From: my.lists at verizon.net (Francisco H Tapia) Date: Thu, 01 Apr 2004 07:33:31 -0800 Subject: [dba-SQLServer] Stored Procedure Help (SQL Server & VB6) In-Reply-To: <20040401123712.86216.qmail@web61208.mail.yahoo.com> References: <20040401123712.86216.qmail@web61208.mail.yahoo.com> Message-ID: <406C364B.9020803@verizon.net> I personnally stay away from where joins. I've seen them all to often yield different results.. perhaps the developer didn't know how to use them, but I've always stuck to INNER/LEFT/RIGHT Joins... and specifically because you will tend to yield a better query plan. Have you run the statistics to see how many table scans you get from joining in the where clause? S D said the following on 4/1/2004 4:37 AM: >Hi paul, > >nice to see you here also. > >Personally I do NOT use the INNER JOIN stuff. I just use plain SQL >SELECT a.x, b.y >FROM table1 a, table2 b >WHERE a.a = b.a >AND .... >That would result in: >UPDATE tblPersonnelJobCategories > SET tblPersonnelJobCategories.Selected = True > WHERE tblPersonnelJobCategories.UserID= @UserId > AND tblPersonnelJobCategories.CategoryID = tblPersonnelCategoriesSelected.CategoryID > AND tblPersonnelJobCategories.PayrollNo = tblPersonnelCategoriesSelected.PayrollNo > > >A tip for you're query: does it run when you hardcode the UserID? > >Did you try to run: >SELECT tblPersonnelJobCategories.UserID, > tblPersonnelJobCategories.Selected > FROM tblPersonnelJobCategories, > tblPersonnelCategoriesSelected > WHERE tblPersonnelJobCategories.UserID= @UserId > AND tblPersonnelJobCategories.CategoryID = tblPersonnelCategoriesSelected.CategoryID > AND tblPersonnelJobCategories.PayrollNo = tblPersonnelCategoriesSelected.PayrollNo > >Success. > >Sander > > >paul.hartland at fsmail.net wrote: >To all, > >I have a Visual Basic 6 front-end together with a SQL Server 7.0 back-end, and have tried writing a stored procedure to do the following: > >I pass a UserID into the SP, then I want the SP to UPDATE tblPersonnelJobCategories to TRUE where tblPersonnelJobCategories.UserID is equal to the UserID that I passed to the SP but I only want the UPDATE to take place where the PayrollNo & CategoryID in tblPersonnelJobCategories matches the PayrollNo & CategoryID in tblPersonnelCategoriesSelected > >I tried using the follwing SQL statement in my SP but it doesn?t like the Inner Join: > >UPDATE tblPersonnelJobCategories INNER JOIN tblPersonnelCategoriesSelected ON (tblPersonnelJobCategories.CategoryID = tblPersonnelCategoriesSelected.CategoryID) AND (tblPersonnelJobCategories.PayrollNo = tblPersonnelCategoriesSelected.PayrollNo) SET tblPersonnelJobCategories.Selected = True WHERE tblPersonnelJobCategories.UserID= @UserId > >Any help would be greatly appreciated, as I?m fairly new to SP?s and thought an INNER JOIN would be ok. > > -- -Francisco From my.lists at verizon.net Thu Apr 1 09:34:48 2004 From: my.lists at verizon.net (Francisco H Tapia) Date: Thu, 01 Apr 2004 07:34:48 -0800 Subject: [dba-SQLServer] Stored Procedure Help (SQL Server & VB6) In-Reply-To: <32073193.1080807286669.JavaMail.www@wwinf3003> References: <32073193.1080807286669.JavaMail.www@wwinf3003> Message-ID: <406C3698.7090709@verizon.net> paul.hartland at fsmail.net said the following on 4/1/2004 12:14 AM: >To all, > >I have a Visual Basic 6 front-end together with a SQL Server 7.0 back-end, and have tried writing a stored procedure to do the following: > >I pass a UserID into the SP, then I want the SP to UPDATE tblPersonnelJobCategories to TRUE where tblPersonnelJobCategories.UserID is equal to the UserID that I passed to the SP but I only want the UPDATE to take place where the PayrollNo & CategoryID in tblPersonnelJobCategories matches the PayrollNo & CategoryID in tblPersonnelCategoriesSelected > >I tried using the follwing SQL statement in my SP but it doesn?t like the Inner Join: > >UPDATE tblPersonnelJobCategories INNER JOIN tblPersonnelCategoriesSelected ON (tblPersonnelJobCategories.CategoryID = tblPersonnelCategoriesSelected.CategoryID) AND (tblPersonnelJobCategories.PayrollNo = tblPersonnelCategoriesSelected.PayrollNo) SET tblPersonnelJobCategories.Selected = True WHERE tblPersonnelJobCategories.UserID= @UserId > > It's the syntax that you are using in your UPDATE statement that is causing you grief. (btw, I read your solution, which is fine too.. but I would do it this way) I use inner joins all the time... you statement could be better written like so: UPDATE Pjc SET Pjc.Selected = True FROM tblPersonnelJobCategories AS Pjc INNER JOIN tblPersonnelCategoriesSelected Pcs ON (Pjc.CategoryID = Pcs.CategoryID) AND (Pjc.PayrollNo = Pcs.PayrollNo) WHERE Pjc.UserID= @UserId -- -Francisco From paul.hartland at fsmail.net Thu Apr 1 09:42:01 2004 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Thu, 1 Apr 2004 17:42:01 +0200 (CEST) Subject: [dba-SQLServer] Web Assistant Message-ID: <22006934.1080834121916.JavaMail.www@wwinf3003> To all, A couple of weeks ago I decided to use the Web Assistant to create a simple web page when the data in tblPersonnel was updated (just to test it out) .. When you use this it create?s a stored procedure ..I have since deleted the stored procedure and my web assistant jobs and now I get the error message on my application as follows: Run time error ?-2147217900 (80040e14)?: SQl web assistant : web task not found. Verify the name of the task for possible errors. Anyone any idea how I can rectify this .PLEASE Paul Freeserve AnyTime - HALF PRICE for the first 3 months - Save ?7.50 a month www.freeserve.com/anytime From my.lists at verizon.net Thu Apr 1 10:00:19 2004 From: my.lists at verizon.net (Francisco H Tapia) Date: Thu, 01 Apr 2004 08:00:19 -0800 Subject: [dba-SQLServer] Web Assistant In-Reply-To: <22006934.1080834121916.JavaMail.www@wwinf3003> References: <22006934.1080834121916.JavaMail.www@wwinf3003> Message-ID: <406C3C93.6050807@verizon.net> Never having used web assistant I do no know all the things it does do... so My question for you is... when does this error occur?, what task were you doing, do all you users see this error? paul.hartland at fsmail.net said the following on 4/1/2004 7:42 AM: >To all, > >A couple of weeks ago I decided to use the Web Assistant to create a simple web page when the data in tblPersonnel was updated (just to test it out)?.. > >When you use this it create?s a stored procedure?..I have since deleted the stored procedure and my web assistant jobs and now I get the error message on my application as follows: > > Run time error ?-2147217900 (80040e14)?: > SQl web assistant : web task not found. Verify the name of the task for possible errors. > >Anyone any idea how I can rectify this??.PLEASE > > -- -Francisco From Robert.Djabarov at usaa.com Thu Apr 1 10:00:11 2004 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Thu, 1 Apr 2004 10:00:11 -0600 Subject: [dba-SQLServer] ping ping ping....pong... Message-ID: <3CCEA32DFF043C4CB99B835557E11B3003C6C84E@ex02.eagle.usaa.com> Just waiting ;) Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of S D Sent: Wednesday, March 31, 2004 11:50 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] ping ping ping....? Hi group, is there any activity here? I'm not receiving anything.... Regards, Sander Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From Robert.Djabarov at usaa.com Thu Apr 1 10:11:14 2004 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Thu, 1 Apr 2004 10:11:14 -0600 Subject: [dba-SQLServer] Stored Procedure Help (SQL Server & VB6) Message-ID: <3CCEA32DFF043C4CB99B835557E11B3053ECD3@ex02.eagle.usaa.com> UPDATE jc set Selected = 1 >From tblPersonnelJobCategories jc INNER JOIN tblPersonnelCategoriesSelected cs ON (jc.CategoryID = cs.CategoryID AND jc.PayrollNo = cs.PayrollNo) WHERE jc.UserID= @UserId And Sander, INNER/LEFT OUTER/RIGHT JOINs are the preferred method of joining tables. This way you make it clear what you join vs. what you filter out in your WHERE clause, which is what the WHERE clause is for. Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of paul.hartland at fsmail.net Sent: Thursday, April 01, 2004 7:27 AM To: dba-sqlserver at databaseadvisors.com Subject: Re: Re: [dba-SQLServer] Stored Procedure Help (SQL Server & VB6) Thanks for the response, I ended up cheating. I created a view to select the records I needed to update then use an SP to update them..... Paul Message date : Apr 01 2004, 01:38 PM >From : "S D" To : dba-sqlserver at databaseadvisors.com Copy to : Subject : Re: [dba-SQLServer] Stored Procedure Help (SQL Server & VB6) Hi paul, nice to see you here also. Personally I do NOT use the INNER JOIN stuff. I just use plain SQL SELECT a.x, b.y FROM table1 a, table2 b WHERE a.a = b.a AND .... That would result in: UPDATE tblPersonnelJobCategories SET tblPersonnelJobCategories.Selected = True WHERE tblPersonnelJobCategories.UserID= @UserId AND tblPersonnelJobCategories.CategoryID = tblPersonnelCategoriesSelected.CategoryID AND tblPersonnelJobCategories.PayrollNo = tblPersonnelCategoriesSelected.PayrollNo A tip for you're query: does it run when you hardcode the UserID? Did you try to run: SELECT tblPersonnelJobCategories.UserID, tblPersonnelJobCategories.Selected FROM tblPersonnelJobCategories, tblPersonnelCategoriesSelected WHERE tblPersonnelJobCategories.UserID= @UserId AND tblPersonnelJobCategories.CategoryID = tblPersonnelCategoriesSelected.CategoryID AND tblPersonnelJobCategories.PayrollNo = tblPersonnelCategoriesSelected.PayrollNo Success. Sander paul.hartland at fsmail.net wrote: To all, I have a Visual Basic 6 front-end together with a SQL Server 7.0 back-end, and have tried writing a stored procedure to do the following: I pass a UserID into the SP, then I want the SP to UPDATE tblPersonnelJobCategories to TRUE where tblPersonnelJobCategories.UserID is equal to the UserID that I passed to the SP but I only want the UPDATE to take place where the PayrollNo & CategoryID in tblPersonnelJobCategories matches the PayrollNo & CategoryID in tblPersonnelCategoriesSelected I tried using the follwing SQL statement in my SP but it doesn't like the Inner Join: UPDATE tblPersonnelJobCategories INNER JOIN tblPersonnelCategoriesSelected ON (tblPersonnelJobCategories.CategoryID = tblPersonnelCategoriesSelected.CategoryID) AND (tblPersonnelJobCategories.PayrollNo = tblPersonnelCategoriesSelected.PayrollNo) SET tblPersonnelJobCategories.Selected = True WHERE tblPersonnelJobCategories.UserID= @UserId Any help would be greatly appreciated, as I'm fairly new to SP's and thought an INNER JOIN would be ok. Thanks in advance for any help Freeserve AnyTime - HALF PRICE for the first 3 months - Save ?7.50 a month www.freeserve.com/anytime _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com Freeserve AnyTime - HALF PRICE for the first 3 months - Save ?7.50 a month www.freeserve.com/anytime _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From paul.hartland at fsmail.net Thu Apr 1 11:02:46 2004 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Thu, 1 Apr 2004 19:02:46 +0200 (CEST) Subject: [dba-SQLServer] Web Assistant Message-ID: <81563.1080838966255.JavaMail.www@wwinf3002> it errors from a vb6 front end when trying to update the record.... Message date : Apr 01 2004, 05:00 PM >From : "Francisco H Tapia" To : dba-sqlserver at databaseadvisors.com Copy to : Subject : Re: [dba-SQLServer] Web Assistant Never having used web assistant I do no know all the things it does do... so My question for you is... when does this error occur?, what task were you doing, do all you users see this error? paul.hartland at fsmail.net said the following on 4/1/2004 7:42 AM: >To all, > >A couple of weeks ago I decided to use the Web Assistant to create a simple web page when the data in tblPersonnel was updated (just to test it out)?.. > >When you use this it create?s a stored procedure?..I have since deleted the stored procedure and my web assistant jobs and now I get the error message on my application as follows: > > Run time error ?-2147217900 (80040e14)?: > SQl web assistant : web task not found. Verify the name of the task for possible errors. > >Anyone any idea how I can rectify this??.PLEASE > > -- -Francisco _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com Freeserve AnyTime - HALF PRICE for the first 3 months - Save ?7.50 a month www.freeserve.com/anytime From Robert.Djabarov at usaa.com Thu Apr 1 11:09:50 2004 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Thu, 1 Apr 2004 11:09:50 -0600 Subject: [dba-SQLServer] Web Assistant Message-ID: <3CCEA32DFF043C4CB99B835557E11B3003C6C851@ex02.eagle.usaa.com> You have an UPDATE trigger on that table. Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of paul.hartland at fsmail.net Sent: Thursday, April 01, 2004 11:03 AM To: dba-sqlserver at databaseadvisors.com Subject: Re: Re: [dba-SQLServer] Web Assistant it errors from a vb6 front end when trying to update the record.... Message date : Apr 01 2004, 05:00 PM >From : "Francisco H Tapia" To : dba-sqlserver at databaseadvisors.com Copy to : Subject : Re: [dba-SQLServer] Web Assistant Never having used web assistant I do no know all the things it does do... so My question for you is... when does this error occur?, what task were you doing, do all you users see this error? paul.hartland at fsmail.net said the following on 4/1/2004 7:42 AM: >To all, > >A couple of weeks ago I decided to use the Web Assistant to create a simple web page when the data in tblPersonnel was updated (just to test it out)?.. > >When you use this it create?s a stored procedure?..I have since deleted the stored procedure and my web assistant jobs and now I get the error message on my application as follows: > > Run time error ?-2147217900 (80040e14)?: > SQl web assistant : web task not found. Verify the name of the task for possible errors. > >Anyone any idea how I can rectify this??.PLEASE > > -- -Francisco _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com Freeserve AnyTime - HALF PRICE for the first 3 months - Save ?7.50 a month www.freeserve.com/anytime _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From paul.hartland at fsmail.net Thu Apr 1 11:28:39 2004 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Thu, 1 Apr 2004 19:28:39 +0200 (CEST) Subject: [dba-SQLServer] Web Assistant Message-ID: <3992407.1080840519159.JavaMail.www@wwinf3001> thats what I thought but I can't see a trigger for that table in my database, where would it be ? Message date : Apr 01 2004, 06:11 PM >From : "Djabarov, Robert" To : dba-sqlserver at databaseadvisors.com Copy to : Subject : RE: Re: [dba-SQLServer] Web Assistant You have an UPDATE trigger on that table. Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of paul.hartland at fsmail.net Sent: Thursday, April 01, 2004 11:03 AM To: dba-sqlserver at databaseadvisors.com Subject: Re: Re: [dba-SQLServer] Web Assistant it errors from a vb6 front end when trying to update the record.... Message date : Apr 01 2004, 05:00 PM >From : "Francisco H Tapia" To : dba-sqlserver at databaseadvisors.com Copy to : Subject : Re: [dba-SQLServer] Web Assistant Never having used web assistant I do no know all the things it does do... so My question for you is... when does this error occur?, what task were you doing, do all you users see this error? paul.hartland at fsmail.net said the following on 4/1/2004 7:42 AM: >To all, > >A couple of weeks ago I decided to use the Web Assistant to create a simple web page when the data in tblPersonnel was updated (just to test it out)?.. > >When you use this it create?s a stored procedure?..I have since deleted the stored procedure and my web assistant jobs and now I get the error message on my application as follows: > > Run time error ?-2147217900 (80040e14)?: > SQl web assistant : web task not found. Verify the name of the task for possible errors. > >Anyone any idea how I can rectify this??.PLEASE > > -- -Francisco _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com Freeserve AnyTime - HALF PRICE for the first 3 months - Save ?7.50 a month www.freeserve.com/anytime _______________________________________________ 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 Freeserve AnyTime - HALF PRICE for the first 3 months - Save ?7.50 a month www.freeserve.com/anytime From Robert.Djabarov at usaa.com Thu Apr 1 11:34:54 2004 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Thu, 1 Apr 2004 11:34:54 -0600 Subject: [dba-SQLServer] Web Assistant Message-ID: <3CCEA32DFF043C4CB99B835557E11B3003C6C855@ex02.eagle.usaa.com> Script the entire database and look for the table name. Show Dependencies may not show it for different reasons. Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of paul.hartland at fsmail.net Sent: Thursday, April 01, 2004 11:29 AM To: dba-sqlserver at databaseadvisors.com Subject: Re: RE: Re: [dba-SQLServer] Web Assistant thats what I thought but I can't see a trigger for that table in my database, where would it be ? Message date : Apr 01 2004, 06:11 PM >From : "Djabarov, Robert" To : dba-sqlserver at databaseadvisors.com Copy to : Subject : RE: Re: [dba-SQLServer] Web Assistant You have an UPDATE trigger on that table. Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of paul.hartland at fsmail.net Sent: Thursday, April 01, 2004 11:03 AM To: dba-sqlserver at databaseadvisors.com Subject: Re: Re: [dba-SQLServer] Web Assistant it errors from a vb6 front end when trying to update the record.... Message date : Apr 01 2004, 05:00 PM >From : "Francisco H Tapia" To : dba-sqlserver at databaseadvisors.com Copy to : Subject : Re: [dba-SQLServer] Web Assistant Never having used web assistant I do no know all the things it does do... so My question for you is... when does this error occur?, what task were you doing, do all you users see this error? paul.hartland at fsmail.net said the following on 4/1/2004 7:42 AM: >To all, > >A couple of weeks ago I decided to use the Web Assistant to create a simple web page when the data in tblPersonnel was updated (just to test it out)?.. > >When you use this it create?s a stored procedure?..I have since deleted the stored procedure and my web assistant jobs and now I get the error message on my application as follows: > > Run time error ?-2147217900 (80040e14)?: > SQl web assistant : web task not found. Verify the name of the task for possible errors. > >Anyone any idea how I can rectify this??.PLEASE > > -- -Francisco _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com Freeserve AnyTime - HALF PRICE for the first 3 months - Save ?7.50 a month www.freeserve.com/anytime _______________________________________________ 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 Freeserve AnyTime - HALF PRICE for the first 3 months - Save ?7.50 a month www.freeserve.com/anytime _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From mwp.reid at qub.ac.uk Thu Apr 1 12:00:00 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Thu, 1 Apr 2004 19:00:00 +0100 Subject: [dba-SQLServer] Web Assistant References: <22006934.1080834121916.JavaMail.www@wwinf3003> <406C3C93.6050807@verizon.net> Message-ID: <001301c41813$27eb6500$1b02a8c0@MARTINREID> Is there a rule of thumb re the number of DBAs required per umber of databases per installation? Martin From Robert.Djabarov at usaa.com Thu Apr 1 12:31:17 2004 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Thu, 1 Apr 2004 12:31:17 -0600 Subject: [dba-SQLServer] Web Assistant Message-ID: <3CCEA32DFF043C4CB99B835557E11B3003C6C856@ex02.eagle.usaa.com> Various Benchmarking companies are trying to come up with a standard, but I think it's all subjective, because of 100,000 factors that may or may not apply when comparing environments. At the end of the day I believe they ARE comparing apples to oranges. Here we have 134 servers with over 1500 databases and there are 5 of us (2 seniors and 3 juniors). Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin Reid Sent: Thursday, April 01, 2004 12:00 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Web Assistant Is there a rule of thumb re the number of DBAs required per umber of databases per installation? Martin _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From my.lists at verizon.net Thu Apr 1 12:40:50 2004 From: my.lists at verizon.net (Francisco H Tapia) Date: Thu, 01 Apr 2004 10:40:50 -0800 Subject: [dba-SQLServer] Creating joins across multiple databases Message-ID: <406C6232.30005@verizon.net> I'm including the latest article from Arthur Fuller on the Builder.com SQL Newsletter because I hope it can bring forward some positive discussion. Plus I'm sure many of us have dealt with this particular situation or will deal with it in the future. //* Creating joins across multiple databases* Enterprise databases often comprise several databases--one from production, another from marketing, and so on. All of the databases rely on a certain amount of common data, which is frequently copied to each database that needs it. However, this copying routine creates a new problem: skew. Where there is duplication, there is at least the opportunity for skew. The solution to this problem is often replication, or scheduled jobs that update each copy of the common data from one "master" database. This approach works, but sometimes a better method is to move all the common data into one database, and then access it as needed from the other databases. This eliminates both the skew and the replication jobs. This approach typically requires joining some local tables to the common tables. For example, suppose you have two databases: Common and Sales. The Customers table resides in the Common database, while the Orders table resides in the Sales database. You want to create a query that lists the Customer information along with the Order information. How do you join these two tables? The answer lies in prefixes. SQL Server uses a dot-delimited nomenclature that extends outward to the database and the server. To specify a column in a table in another database, name the other database: SELECT CustomerID FROM Common.Customers To join a table from the Common database to a table in the current (Sales) database, use this same nomenclature: SELECT * FROM Common.Customers INNER JOIN Orders ON Common.Customers.CustomerID = Orders.CustomerID Not every organization's application domain requires multiple databases. If your organization does require multiple databases, it's easy to create joins across databases. /Arthur Fuller has been developing database applications for more than 20 years. He frequently works with Access ADPs, Microsoft SQL 2000, MySQL, and .NET./ // Yes it is easy enough to join accross multiple databases and even accross several Sql Server linked servers :) (very cool)... however my concern and one that was not addressed in this article is the security aspect of it... say you just have a user who calls the report... does the user need to use an application who's using an application role and thus gets better than normal priviladges on the server? I have not been successful in adding new users to another database w/o also having to takes some hard steps; my solution was to ... Create VIEWS on the target database... add the user to that 2nd database, then give explicit selet crights on the views and then join accross from db2 to db1 via the sproc using the views instead of the tables... so while the data is not duplicated, the user is, and now has rights to base views that represent tables :( , so because I think I might be doing this wrong.. I'm hoping Arthur or someone else will chime in with a few clues :) Thanks, -- -Francisco From Robert.Djabarov at usaa.com Thu Apr 1 12:51:21 2004 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Thu, 1 Apr 2004 12:51:21 -0600 Subject: [dba-SQLServer] Creating joins across multiple databases Message-ID: <3CCEA32DFF043C4CB99B835557E11B3003C6C857@ex02.eagle.usaa.com> Based on what I've seen so far, it's not a good idea to do cross-db joins, and not only because of security issues as Francisco mentions, but also because of questions like "Who the heck is this guy and what is he doing in my swamp?" which immediately start popping up, which leads to finger-pointing when there is a slow-down or outage. It also violates database designation (DSS, OLTP) when it's OLTP for a native user while becoming a DSS for the new-comer. BTW, Francisco, did you copy the article or retyped it? If you copied it, I see a minor problem with Author's syntax... Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Francisco H Tapia Sent: Thursday, April 01, 2004 12:41 PM To: dba-SQLServer at databaseadvisors.com Subject: [dba-SQLServer] Creating joins across multiple databases I'm including the latest article from Arthur Fuller on the Builder.com SQL Newsletter because I hope it can bring forward some positive discussion. Plus I'm sure many of us have dealt with this particular situation or will deal with it in the future. //* Creating joins across multiple databases* Enterprise databases often comprise several databases--one from production, another from marketing, and so on. All of the databases rely on a certain amount of common data, which is frequently copied to each database that needs it. However, this copying routine creates a new problem: skew. Where there is duplication, there is at least the opportunity for skew. The solution to this problem is often replication, or scheduled jobs that update each copy of the common data from one "master" database. This approach works, but sometimes a better method is to move all the common data into one database, and then access it as needed from the other databases. This eliminates both the skew and the replication jobs. This approach typically requires joining some local tables to the common tables. For example, suppose you have two databases: Common and Sales. The Customers table resides in the Common database, while the Orders table resides in the Sales database. You want to create a query that lists the Customer information along with the Order information. How do you join these two tables? The answer lies in prefixes. SQL Server uses a dot-delimited nomenclature that extends outward to the database and the server. To specify a column in a table in another database, name the other database: SELECT CustomerID FROM Common.Customers To join a table from the Common database to a table in the current (Sales) database, use this same nomenclature: SELECT * FROM Common.Customers INNER JOIN Orders ON Common.Customers.CustomerID = Orders.CustomerID Not every organization's application domain requires multiple databases. If your organization does require multiple databases, it's easy to create joins across databases. /Arthur Fuller has been developing database applications for more than 20 years. He frequently works with Access ADPs, Microsoft SQL 2000, MySQL, and .NET./ // Yes it is easy enough to join accross multiple databases and even accross several Sql Server linked servers :) (very cool)... however my concern and one that was not addressed in this article is the security aspect of it... say you just have a user who calls the report... does the user need to use an application who's using an application role and thus gets better than normal priviladges on the server? I have not been successful in adding new users to another database w/o also having to takes some hard steps; my solution was to ... Create VIEWS on the target database... add the user to that 2nd database, then give explicit selet crights on the views and then join accross from db2 to db1 via the sproc using the views instead of the tables... so while the data is not duplicated, the user is, and now has rights to base views that represent tables :( , so because I think I might be doing this wrong.. I'm hoping Arthur or someone else will chime in with a few clues :) Thanks, -- -Francisco _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From kens.programming at verizon.net Thu Apr 1 13:31:01 2004 From: kens.programming at verizon.net (Ken Stoker) Date: Thu, 1 Apr 2004 11:31:01 -0800 Subject: [dba-SQLServer] Test Message-ID: <20040401193127.VMXU11989.out004.verizon.net@mdckstoker> Do not respond to this. Just started my new job today and testing to make sure I can post here. From mwp.reid at qub.ac.uk Thu Apr 1 13:27:44 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Thu, 1 Apr 2004 20:27:44 +0100 Subject: [dba-SQLServer] Creating joins across multiple databases References: <3CCEA32DFF043C4CB99B835557E11B3003C6C857@ex02.eagle.usaa.com> Message-ID: <000001c41820$3d1ac080$1b02a8c0@MARTINREID> How would you handle the issue in that case when joins where out?? Martin ----- Original Message ----- From: "Djabarov, Robert" To: Sent: Thursday, April 01, 2004 7:51 PM Subject: RE: [dba-SQLServer] Creating joins across multiple databases > Based on what I've seen so far, it's not a good idea to do cross-db > joins, and not only because of security issues as Francisco mentions, > but also because of questions like "Who the heck is this guy and what is > he doing in my swamp?" which immediately start popping up, which leads > to finger-pointing when there is a slow-down or outage. It also > violates database designation (DSS, OLTP) when it's OLTP for a native > user while becoming a DSS for the new-comer. > > BTW, Francisco, did you copy the article or retyped it? If you copied > it, I see a minor problem with Author's syntax... > > > Robert Djabarov > SQL Server & UDB > Sr. SQL Server Administrator > Phone: (210) 913-3148 > Pager: (210) 753-3148 > 9800 Fredericksburg Rd. San Antonio, TX 78288 > www.usaa.com > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of > Francisco H Tapia > Sent: Thursday, April 01, 2004 12:41 PM > To: dba-SQLServer at databaseadvisors.com > Subject: [dba-SQLServer] Creating joins across multiple databases > > I'm including the latest article from Arthur Fuller on the Builder.com > SQL Newsletter because I hope it can bring forward some positive > discussion. Plus I'm sure many of us have dealt with this particular > situation or will deal with it in the future. > > //* > Creating joins across multiple databases* > > Enterprise databases often comprise several databases--one from > production, another from marketing, and so on. All of the databases rely > > on a certain amount of common data, which is frequently copied to each > database that needs it. > > However, this copying routine creates a new problem: skew. Where there > is duplication, there is at least the opportunity for skew. The solution > > to this problem is often replication, or scheduled jobs that update each > > copy of the common data from one "master" database. This approach works, > > but sometimes a better method is to move all the common data into one > database, and then access it as needed from the other databases. This > eliminates both the skew and the replication jobs. > > This approach typically requires joining some local tables to the common > > tables. For example, suppose you have two databases: Common and Sales. > The Customers table resides in the Common database, while the Orders > table resides in the Sales database. You want to create a query that > lists the Customer information along with the Order information. How do > you join these two tables? The answer lies in prefixes. > > SQL Server uses a dot-delimited nomenclature that extends outward to the > > database and the server. To specify a column in a table in another > database, name the other database: > > SELECT CustomerID FROM Common.Customers > > To join a table from the Common database to a table in the current > (Sales) database, use this same nomenclature: > > SELECT * FROM Common.Customers > INNER JOIN Orders > ON Common.Customers.CustomerID = Orders.CustomerID > > Not every organization's application domain requires multiple databases. > > If your organization does require multiple databases, it's easy to > create joins across databases. > > /Arthur Fuller has been developing database applications for more than > 20 years. He frequently works with Access ADPs, Microsoft SQL 2000, > MySQL, and .NET./ > // > > Yes it is easy enough to join accross multiple databases and even > accross several Sql Server linked servers :) (very cool)... however my > > concern and one that was not addressed in this article is the security > aspect of it... say you just have a user who calls the report... does > the user need to use an application who's using an application role and > thus gets better than normal priviladges on the server? I have not been > > successful in adding new users to another database w/o also having to > takes some hard steps; my solution was to ... Create VIEWS on the target > > database... add the user to that 2nd database, then give explicit selet > crights on the views and then join accross from db2 to db1 via the sproc > > using the views instead of the tables... so while the data is not > duplicated, the user is, and now has rights to base views that represent > > tables :( , so because I think I might be doing this wrong.. I'm hoping > Arthur or someone else will chime in with a few clues :) > > Thanks, > > -- > -Francisco > > > _______________________________________________ > 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 Robert.Djabarov at usaa.com Thu Apr 1 14:09:13 2004 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Thu, 1 Apr 2004 14:09:13 -0600 Subject: [dba-SQLServer] Test Message-ID: <3CCEA32DFF043C4CB99B835557E11B3003C6C858@ex02.eagle.usaa.com> Congratulations! Where's the job at? Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Ken Stoker Sent: Thursday, April 01, 2004 1:31 PM To: dba-SQLServer at databaseadvisors.com Subject: [dba-SQLServer] Test Do not respond to this. Just started my new job today and testing to make sure I can post here. _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From Robert.Djabarov at usaa.com Thu Apr 1 14:31:47 2004 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Thu, 1 Apr 2004 14:31:47 -0600 Subject: [dba-SQLServer] Creating joins across multiple databases Message-ID: <3CCEA32DFF043C4CB99B835557E11B3003C6C85A@ex02.eagle.usaa.com> Not sure if I understand "when joins where out" part, but I'd stay out of cross-database joins. If there is a need for something like this, it's most likely that the app architecture needs to be rethought. Or, instead of creating a new database along with a new app, maybe the existing app and the underlying db need to be modified to accommodate newly requested features. Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin Reid Sent: Thursday, April 01, 2004 1:28 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Creating joins across multiple databases How would you handle the issue in that case when joins where out?? Martin ----- Original Message ----- From: "Djabarov, Robert" To: Sent: Thursday, April 01, 2004 7:51 PM Subject: RE: [dba-SQLServer] Creating joins across multiple databases > Based on what I've seen so far, it's not a good idea to do cross-db > joins, and not only because of security issues as Francisco mentions, > but also because of questions like "Who the heck is this guy and what > is he doing in my swamp?" which immediately start popping up, which > leads to finger-pointing when there is a slow-down or outage. It also > violates database designation (DSS, OLTP) when it's OLTP for a native > user while becoming a DSS for the new-comer. > > BTW, Francisco, did you copy the article or retyped it? If you copied > it, I see a minor problem with Author's syntax... > > > Robert Djabarov > SQL Server & UDB > Sr. SQL Server Administrator > Phone: (210) 913-3148 > Pager: (210) 753-3148 > 9800 Fredericksburg Rd. San Antonio, TX 78288 > www.usaa.com > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of > Francisco H Tapia > Sent: Thursday, April 01, 2004 12:41 PM > To: dba-SQLServer at databaseadvisors.com > Subject: [dba-SQLServer] Creating joins across multiple databases > > I'm including the latest article from Arthur Fuller on the Builder.com > SQL Newsletter because I hope it can bring forward some positive > discussion. Plus I'm sure many of us have dealt with this particular > situation or will deal with it in the future. > > //* > Creating joins across multiple databases* > > Enterprise databases often comprise several databases--one from > production, another from marketing, and so on. All of the databases rely > > on a certain amount of common data, which is frequently copied to each > database that needs it. > > However, this copying routine creates a new problem: skew. Where there > is duplication, there is at least the opportunity for skew. The solution > > to this problem is often replication, or scheduled jobs that update > each > > copy of the common data from one "master" database. This approach > works, > > but sometimes a better method is to move all the common data into one > database, and then access it as needed from the other databases. This > eliminates both the skew and the replication jobs. > > This approach typically requires joining some local tables to the > common > > tables. For example, suppose you have two databases: Common and Sales. > The Customers table resides in the Common database, while the Orders > table resides in the Sales database. You want to create a query that > lists the Customer information along with the Order information. How do > you join these two tables? The answer lies in prefixes. > > SQL Server uses a dot-delimited nomenclature that extends outward to > the > > database and the server. To specify a column in a table in another > database, name the other database: > > SELECT CustomerID FROM Common.Customers > > To join a table from the Common database to a table in the current > (Sales) database, use this same nomenclature: > > SELECT * FROM Common.Customers > INNER JOIN Orders > ON Common.Customers.CustomerID = Orders.CustomerID > > Not every organization's application domain requires multiple > databases. > > If your organization does require multiple databases, it's easy to > create joins across databases. > > /Arthur Fuller has been developing database applications for more than > 20 years. He frequently works with Access ADPs, Microsoft SQL 2000, > MySQL, and .NET./ > // > > Yes it is easy enough to join accross multiple databases and even > accross several Sql Server linked servers :) (very cool)... however my > > concern and one that was not addressed in this article is the security > aspect of it... say you just have a user who calls the report... does > the user need to use an application who's using an application role and > thus gets better than normal priviladges on the server? I have not been > > successful in adding new users to another database w/o also having to > takes some hard steps; my solution was to ... Create VIEWS on the target > > database... add the user to that 2nd database, then give explicit > selet > crights on the views and then join accross from db2 to db1 via the sproc > > using the views instead of the tables... so while the data is not > duplicated, the user is, and now has rights to base views that represent > > tables :( , so because I think I might be doing this wrong.. I'm > hoping > Arthur or someone else will chime in with a few clues :) > > Thanks, > > -- > -Francisco > > > _______________________________________________ > 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 my.lists at verizon.net Thu Apr 1 14:40:45 2004 From: my.lists at verizon.net (Francisco H Tapia) Date: Thu, 01 Apr 2004 12:40:45 -0800 Subject: [dba-SQLServer] Creating joins across multiple databases In-Reply-To: <3CCEA32DFF043C4CB99B835557E11B3003C6C857@ex02.eagle.usaa.com> References: <3CCEA32DFF043C4CB99B835557E11B3003C6C857@ex02.eagle.usaa.com> Message-ID: <406C7E4D.40608@verizon.net> copy paste... Djabarov, Robert said the following on 4/1/2004 10:51 AM: >Based on what I've seen so far, it's not a good idea to do cross-db >joins, and not only because of security issues as Francisco mentions, >but also because of questions like "Who the heck is this guy and what is >he doing in my swamp?" which immediately start popping up, which leads >to finger-pointing when there is a slow-down or outage. It also >violates database designation (DSS, OLTP) when it's OLTP for a native >user while becoming a DSS for the new-comer. > >BTW, Francisco, did you copy the article or retyped it? If you copied >it, I see a minor problem with Author's syntax... > > >Robert Djabarov >SQL Server & UDB >Sr. SQL Server Administrator >Phone: (210) 913-3148 >Pager: (210) 753-3148 >9800 Fredericksburg Rd. San Antonio, TX 78288 >www.usaa.com > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of >Francisco H Tapia >Sent: Thursday, April 01, 2004 12:41 PM >To: dba-SQLServer at databaseadvisors.com >Subject: [dba-SQLServer] Creating joins across multiple databases > >I'm including the latest article from Arthur Fuller on the Builder.com >SQL Newsletter because I hope it can bring forward some positive >discussion. Plus I'm sure many of us have dealt with this particular >situation or will deal with it in the future. > >//* >Creating joins across multiple databases* > >Enterprise databases often comprise several databases--one from >production, another from marketing, and so on. All of the databases rely > >on a certain amount of common data, which is frequently copied to each >database that needs it. > >However, this copying routine creates a new problem: skew. Where there >is duplication, there is at least the opportunity for skew. The solution > >to this problem is often replication, or scheduled jobs that update each > >copy of the common data from one "master" database. This approach works, > >but sometimes a better method is to move all the common data into one >database, and then access it as needed from the other databases. This >eliminates both the skew and the replication jobs. > >This approach typically requires joining some local tables to the common > >tables. For example, suppose you have two databases: Common and Sales. >The Customers table resides in the Common database, while the Orders >table resides in the Sales database. You want to create a query that >lists the Customer information along with the Order information. How do >you join these two tables? The answer lies in prefixes. > >SQL Server uses a dot-delimited nomenclature that extends outward to the > >database and the server. To specify a column in a table in another >database, name the other database: > >SELECT CustomerID FROM Common.Customers > >To join a table from the Common database to a table in the current >(Sales) database, use this same nomenclature: > >SELECT * FROM Common.Customers >INNER JOIN Orders >ON Common.Customers.CustomerID = Orders.CustomerID > >Not every organization's application domain requires multiple databases. > >If your organization does require multiple databases, it's easy to >create joins across databases. > >/Arthur Fuller has been developing database applications for more than >20 years. He frequently works with Access ADPs, Microsoft SQL 2000, >MySQL, and .NET./ >// > >Yes it is easy enough to join accross multiple databases and even >accross several Sql Server linked servers :) (very cool)... however my > >concern and one that was not addressed in this article is the security >aspect of it... say you just have a user who calls the report... does >the user need to use an application who's using an application role and >thus gets better than normal priviladges on the server? I have not been > >successful in adding new users to another database w/o also having to >takes some hard steps; my solution was to ... Create VIEWS on the target > >database... add the user to that 2nd database, then give explicit selet >crights on the views and then join accross from db2 to db1 via the sproc > >using the views instead of the tables... so while the data is not >duplicated, the user is, and now has rights to base views that represent > >tables :( , so because I think I might be doing this wrong.. I'm hoping >Arthur or someone else will chime in with a few clues :) > >Thanks, > > > -- -Francisco From Robert.Djabarov at usaa.com Thu Apr 1 14:43:05 2004 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Thu, 1 Apr 2004 14:43:05 -0600 Subject: [dba-SQLServer] Creating joins across multiple databases Message-ID: <3CCEA32DFF043C4CB99B835557E11B3003C6C85C@ex02.eagle.usaa.com> ...He's consistently missing schema owner...Just an observation ;) Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Francisco H Tapia Sent: Thursday, April 01, 2004 2:41 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Creating joins across multiple databases copy paste... Djabarov, Robert said the following on 4/1/2004 10:51 AM: >Based on what I've seen so far, it's not a good idea to do cross-db >joins, and not only because of security issues as Francisco mentions, >but also because of questions like "Who the heck is this guy and what >is he doing in my swamp?" which immediately start popping up, which >leads to finger-pointing when there is a slow-down or outage. It also >violates database designation (DSS, OLTP) when it's OLTP for a native >user while becoming a DSS for the new-comer. > >BTW, Francisco, did you copy the article or retyped it? If you copied >it, I see a minor problem with Author's syntax... > > >Robert Djabarov >SQL Server & UDB >Sr. SQL Server Administrator >Phone: (210) 913-3148 >Pager: (210) 753-3148 >9800 Fredericksburg Rd. San Antonio, TX 78288 >www.usaa.com > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of >Francisco H Tapia >Sent: Thursday, April 01, 2004 12:41 PM >To: dba-SQLServer at databaseadvisors.com >Subject: [dba-SQLServer] Creating joins across multiple databases > >I'm including the latest article from Arthur Fuller on the Builder.com >SQL Newsletter because I hope it can bring forward some positive >discussion. Plus I'm sure many of us have dealt with this particular >situation or will deal with it in the future. > >//* >Creating joins across multiple databases* > >Enterprise databases often comprise several databases--one from >production, another from marketing, and so on. All of the databases rely > >on a certain amount of common data, which is frequently copied to each >database that needs it. > >However, this copying routine creates a new problem: skew. Where there >is duplication, there is at least the opportunity for skew. The solution > >to this problem is often replication, or scheduled jobs that update >each > >copy of the common data from one "master" database. This approach >works, > >but sometimes a better method is to move all the common data into one >database, and then access it as needed from the other databases. This >eliminates both the skew and the replication jobs. > >This approach typically requires joining some local tables to the >common > >tables. For example, suppose you have two databases: Common and Sales. >The Customers table resides in the Common database, while the Orders >table resides in the Sales database. You want to create a query that >lists the Customer information along with the Order information. How do >you join these two tables? The answer lies in prefixes. > >SQL Server uses a dot-delimited nomenclature that extends outward to >the > >database and the server. To specify a column in a table in another >database, name the other database: > >SELECT CustomerID FROM Common.Customers > >To join a table from the Common database to a table in the current >(Sales) database, use this same nomenclature: > >SELECT * FROM Common.Customers >INNER JOIN Orders >ON Common.Customers.CustomerID = Orders.CustomerID > >Not every organization's application domain requires multiple >databases. > >If your organization does require multiple databases, it's easy to >create joins across databases. > >/Arthur Fuller has been developing database applications for more than >20 years. He frequently works with Access ADPs, Microsoft SQL 2000, >MySQL, and .NET./ >// > >Yes it is easy enough to join accross multiple databases and even >accross several Sql Server linked servers :) (very cool)... however my > >concern and one that was not addressed in this article is the security >aspect of it... say you just have a user who calls the report... does >the user need to use an application who's using an application role and >thus gets better than normal priviladges on the server? I have not been > >successful in adding new users to another database w/o also having to >takes some hard steps; my solution was to ... Create VIEWS on the target > >database... add the user to that 2nd database, then give explicit selet >crights on the views and then join accross from db2 to db1 via the sproc > >using the views instead of the tables... so while the data is not >duplicated, the user is, and now has rights to base views that represent > >tables :( , so because I think I might be doing this wrong.. I'm hoping >Arthur or someone else will chime in with a few clues :) > >Thanks, > > > -- -Francisco _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From carbonnb at sympatico.ca Thu Apr 1 14:54:17 2004 From: carbonnb at sympatico.ca (Bryan Carbonnell) Date: Thu, 01 Apr 2004 15:54:17 -0500 Subject: [dba-SQLServer] Searchable Archives Message-ID: <406C3B29.1522.5EAF1C@localhost> Well folks, it appears that the stars and planets have been in alignment this week, except for everyone in the house being sick. DBA-SQLServer now has a a searchable archive!!! You can get to it by pointing your ever so familiar web browser to: http://databaseadvisors.com/pipermail/dba-sqlserver/ Just fill in your favourite search term and click search and all will be found (we hope :) The only limitation is that the search index is updated once per day, so any posts made after 0207 CST will not be searchable until the following day. Actually all of the lists will become searchable like this over time, as posts are made to it. So if you want your favourite list to be searchable, just post to it. This includes dba-visio!!! :-) -- Bryan Carbonnell - carbonnb at sympatico.ca Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe producing bigger and better idiots. So far, the Universe is winning. - Mark Mischler. From my.lists at verizon.net Thu Apr 1 15:00:07 2004 From: my.lists at verizon.net (Francisco H Tapia) Date: Thu, 01 Apr 2004 13:00:07 -0800 Subject: [dba-SQLServer] Creating joins across multiple databases In-Reply-To: <3CCEA32DFF043C4CB99B835557E11B3003C6C85C@ex02.eagle.usaa.com> References: <3CCEA32DFF043C4CB99B835557E11B3003C6C85C@ex02.eagle.usaa.com> Message-ID: <406C82D7.3090301@verizon.net> Knowing Arthur, i'm sure that was a publisher's err, not an author err, from posting to HTML... Djabarov, Robert said the following on 4/1/2004 12:43 PM: >...He's consistently missing schema owner...Just an observation ;) > >Robert Djabarov >SQL Server & UDB >Sr. SQL Server Administrator >Phone: (210) 913-3148 >Pager: (210) 753-3148 >9800 Fredericksburg Rd. San Antonio, TX 78288 >www.usaa.com > > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of >Francisco H Tapia >Sent: Thursday, April 01, 2004 2:41 PM >To: dba-sqlserver at databaseadvisors.com >Subject: Re: [dba-SQLServer] Creating joins across multiple databases > > >copy paste... >Djabarov, Robert said the following on 4/1/2004 10:51 AM: > > > >>Based on what I've seen so far, it's not a good idea to do cross-db >>joins, and not only because of security issues as Francisco mentions, >>but also because of questions like "Who the heck is this guy and what >>is he doing in my swamp?" which immediately start popping up, which >>leads to finger-pointing when there is a slow-down or outage. It also >>violates database designation (DSS, OLTP) when it's OLTP for a native >>user while becoming a DSS for the new-comer. >> >>BTW, Francisco, did you copy the article or retyped it? If you copied >>it, I see a minor problem with Author's syntax... >> >> >>Robert Djabarov >>SQL Server & UDB >>Sr. SQL Server Administrator >>Phone: (210) 913-3148 >>Pager: (210) 753-3148 >>9800 Fredericksburg Rd. San Antonio, TX 78288 >>www.usaa.com >> >>-----Original Message----- >>From: dba-sqlserver-bounces at databaseadvisors.com >>[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of >>Francisco H Tapia >>Sent: Thursday, April 01, 2004 12:41 PM >>To: dba-SQLServer at databaseadvisors.com >>Subject: [dba-SQLServer] Creating joins across multiple databases >> >>I'm including the latest article from Arthur Fuller on the Builder.com >>SQL Newsletter because I hope it can bring forward some positive >>discussion. Plus I'm sure many of us have dealt with this particular >>situation or will deal with it in the future. >> >>//* >>Creating joins across multiple databases* >> >>Enterprise databases often comprise several databases--one from >>production, another from marketing, and so on. All of the databases >> >> >rely > > >>on a certain amount of common data, which is frequently copied to each >>database that needs it. >> >>However, this copying routine creates a new problem: skew. Where there >>is duplication, there is at least the opportunity for skew. The >> >> >solution > > >>to this problem is often replication, or scheduled jobs that update >>each >> >>copy of the common data from one "master" database. This approach >>works, >> >>but sometimes a better method is to move all the common data into one >>database, and then access it as needed from the other databases. This >>eliminates both the skew and the replication jobs. >> >>This approach typically requires joining some local tables to the >>common >> >>tables. For example, suppose you have two databases: Common and Sales. >>The Customers table resides in the Common database, while the Orders >>table resides in the Sales database. You want to create a query that >>lists the Customer information along with the Order information. How do >> >> > > > >>you join these two tables? The answer lies in prefixes. >> >>SQL Server uses a dot-delimited nomenclature that extends outward to >>the >> >>database and the server. To specify a column in a table in another >>database, name the other database: >> >>SELECT CustomerID FROM Common.Customers >> >>To join a table from the Common database to a table in the current >>(Sales) database, use this same nomenclature: >> >>SELECT * FROM Common.Customers >>INNER JOIN Orders >>ON Common.Customers.CustomerID = Orders.CustomerID >> >>Not every organization's application domain requires multiple >>databases. >> >>If your organization does require multiple databases, it's easy to >>create joins across databases. >> >>/Arthur Fuller has been developing database applications for more than >>20 years. He frequently works with Access ADPs, Microsoft SQL 2000, >>MySQL, and .NET./ >>// >> >>Yes it is easy enough to join accross multiple databases and even >>accross several Sql Server linked servers :) (very cool)... however >> >> >my > > >>concern and one that was not addressed in this article is the security >>aspect of it... say you just have a user who calls the report... does >>the user need to use an application who's using an application role and >> >> > > > >>thus gets better than normal priviladges on the server? I have not >> >> >been > > >>successful in adding new users to another database w/o also having to >>takes some hard steps; my solution was to ... Create VIEWS on the >> >> >target > > >>database... add the user to that 2nd database, then give explicit selet >>crights on the views and then join accross from db2 to db1 via the >> >> >sproc > > >>using the views instead of the tables... so while the data is not >>duplicated, the user is, and now has rights to base views that >> >> >represent > > >>tables :( , so because I think I might be doing this wrong.. I'm hoping >>Arthur or someone else will chime in with a few clues :) >> >>Thanks, >> >> >> >> >> > > > > -- -Francisco From kens.programming at verizon.net Thu Apr 1 16:06:39 2004 From: kens.programming at verizon.net (Ken Stoker) Date: Thu, 1 Apr 2004 14:06:39 -0800 Subject: [dba-SQLServer] Test In-Reply-To: <3CCEA32DFF043C4CB99B835557E11B3003C6C858@ex02.eagle.usaa.com> Message-ID: <20040401220705.FSOG2677.out005.verizon.net@mdckstoker> I am working from home, telecommuting. Got a 50% increase in salary, work from home, benefits were pretty much the same as my previous job and I have the chance to get back to Japan in the near future. I lived in Japan a couple years and have studied the language for five years and have an Asian studies minor. I am really looking forward to taking my wife and four kids there with the first trip back there. Thanks for the congrats. I really like this site. Everyone is so thoughtful. Ken Stoker -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Djabarov, Robert Sent: Thursday, April 01, 2004 12:09 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] Test Congratulations! Where's the job at? Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Ken Stoker Sent: Thursday, April 01, 2004 1:31 PM To: dba-SQLServer at databaseadvisors.com Subject: [dba-SQLServer] Test Do not respond to this. Just started my new job today and testing to make sure I can post here. _______________________________________________ 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 sqlserver667 at yahoo.com Fri Apr 2 00:10:33 2004 From: sqlserver667 at yahoo.com (S D) Date: Thu, 1 Apr 2004 22:10:33 -0800 (PST) Subject: JOINS Was:(Re: [dba-SQLServer] Stored Procedure Help (SQL Server & VB6)) In-Reply-To: <406C364B.9020803@verizon.net> Message-ID: <20040402061033.8487.qmail@web61202.mail.yahoo.com> Hi Francisco, you are correct. I have never used them. I never took time to figure it out. I always wondered if there was a diff. I'll take you're advise and start hacking the statistics. SQL Server is just a (very) small portion of my working field. Most of it is MS-Access...and there is no query-plan thingy in Access :-( Sander Francisco H Tapia wrote: I personnally stay away from where joins. I've seen them all to often yield different results.. perhaps the developer didn't know how to use them, but I've always stuck to INNER/LEFT/RIGHT Joins... and specifically because you will tend to yield a better query plan. Have you run the statistics to see how many table scans you get from joining in the where clause? S D said the following on 4/1/2004 4:37 AM: >Hi paul, > >nice to see you here also. > >Personally I do NOT use the INNER JOIN stuff. I just use plain SQL >SELECT a.x, b.y >FROM table1 a, table2 b >WHERE a.a = b.a >AND .... >That would result in: >UPDATE tblPersonnelJobCategories > SET tblPersonnelJobCategories.Selected = True > WHERE tblPersonnelJobCategories.UserID= @UserId > AND tblPersonnelJobCategories.CategoryID = tblPersonnelCategoriesSelected.CategoryID > AND tblPersonnelJobCategories.PayrollNo = tblPersonnelCategoriesSelected.PayrollNo > > >A tip for you're query: does it run when you hardcode the UserID? > >Did you try to run: >SELECT tblPersonnelJobCategories.UserID, > tblPersonnelJobCategories.Selected > FROM tblPersonnelJobCategories, > tblPersonnelCategoriesSelected > WHERE tblPersonnelJobCategories.UserID= @UserId > AND tblPersonnelJobCategories.CategoryID = tblPersonnelCategoriesSelected.CategoryID > AND tblPersonnelJobCategories.PayrollNo = tblPersonnelCategoriesSelected.PayrollNo > >Success. > >Sander > > >paul.hartland at fsmail.net wrote: >To all, > >I have a Visual Basic 6 front-end together with a SQL Server 7.0 back-end, and have tried writing a stored procedure to do the following: > >I pass a UserID into the SP, then I want the SP to UPDATE tblPersonnelJobCategories to TRUE where tblPersonnelJobCategories.UserID is equal to the UserID that I passed to the SP but I only want the UPDATE to take place where the PayrollNo & CategoryID in tblPersonnelJobCategories matches the PayrollNo & CategoryID in tblPersonnelCategoriesSelected > >I tried using the follwing SQL statement in my SP but it doesn?t like the Inner Join: > >UPDATE tblPersonnelJobCategories INNER JOIN tblPersonnelCategoriesSelected ON (tblPersonnelJobCategories.CategoryID = tblPersonnelCategoriesSelected.CategoryID) AND (tblPersonnelJobCategories.PayrollNo = tblPersonnelCategoriesSelected.PayrollNo) SET tblPersonnelJobCategories.Selected = True WHERE tblPersonnelJobCategories.UserID= @UserId > >Any help would be greatly appreciated, as I?m fairly new to SP?s and thought an INNER JOIN would be ok. > > -- -Francisco _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam From sqlserver667 at yahoo.com Fri Apr 2 00:15:19 2004 From: sqlserver667 at yahoo.com (S D) Date: Thu, 1 Apr 2004 22:15:19 -0800 (PST) Subject: [dba-SQLServer] MCSD: SQL-Server vs Bizztalk Message-ID: <20040402061519.47409.qmail@web61206.mail.yahoo.com> Hi group, I'm very buzy getting MCSD-ed (.Net) But I still have doubts whether to get SQL-Server 2000 certified or Bizztalk 2004!? Any comments/links/docs why I should choose one over the other? TIA Sander Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam From paul.hartland at fsmail.net Fri Apr 2 03:12:13 2004 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Fri, 2 Apr 2004 11:12:13 +0200 (CEST) Subject: [dba-SQLServer] Web Assistant Message-ID: <1128390.1080897133643.JavaMail.www@wwinf3002> Thanks for everyone's help on this, I found the triggers for the table at last and deleted them....hey presto, everything back to normal and lightning fast.... Thanks once again. Paul Freeserve AnyTime - HALF PRICE for the first 3 months - Save ?7.50 a month www.freeserve.com/anytime From paul.hartland at fsmail.net Fri Apr 2 05:11:25 2004 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Fri, 2 Apr 2004 13:11:25 +0200 (CEST) Subject: [dba-SQLServer] SQL Mail Message-ID: <20667449.1080904285911.JavaMail.www@wwinf3004> To all, I would like to start using SQL Mail, does anyone use this ?, if so how do you configure the SQL server to allow the sending of email through Outlook ? Does the SQL Server have to have it?s own email account etc ..I really do know nothing about this and need all the information I can get. Thanks in advance for all your help Paul Hartland Freeserve AnyTime - HALF PRICE for the first 3 months - Save ?7.50 a month www.freeserve.com/anytime From paul.hartland at fsmail.net Fri Apr 2 08:16:36 2004 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Fri, 2 Apr 2004 16:16:36 +0200 (CEST) Subject: [dba-SQLServer] Triggers To Update A Table When Another Table Has A Record Inserted Message-ID: <18375053.1080915396045.JavaMail.www@wwinf3006> To all, Just starting to play about with Triggers, what I want to do is create a Trigger for a table called tblPersonnel so that when someone adds a new record to the table, the Trigger Executes a stored procedure that updates a table called tblDataChanges with the PayrollNo, DateAdded, Firstname & Surname. Has anyone got any sample code to create this Trigger, I have the Stored Procedure to update the tblDataChanges with the Parameters @Payroll, @DateAdded, @Firstname & @Surname. Thanks in advance for any help on this. Paul Hartland Freeserve AnyTime - HALF PRICE for the first 3 months - Save ?7.50 a month www.freeserve.com/anytime From knicholson at gpsx.net Fri Apr 2 08:31:12 2004 From: knicholson at gpsx.net (Nicholson, Karen) Date: Fri, 2 Apr 2004 09:31:12 -0500 Subject: [dba-SQLServer] Triggers To Update A Table When Another Table Has A Record Inserted Message-ID: This trigger inserts to an audit trail table from my prospect table. If it is a new or different record then over it goes. insert prospect_archive (prospect_no, change_user, change_date, mktsrc_id, prospstat_id, lead_emp_no, sales_emp_no, assign_emp_no, promo_id) select p.prospect_no, p.change_user, @change_date, p.mktsrc_id, p.prospstat_id, p.lead_emp_no, p.sales_emp_no, p.assign_emp_no, p.promo_id from inserted, prospect p where p.prospect_no = inserted.prospect_no and not exists (select prospect_no from prospect_archive where prospect_no = inserted.prospect_no and isnull(mktsrc_id, '') = isnull(p.mktsrc_id, '') and isnull(prospstat_id, '') = isnull(p.prospstat_id, '') and isnull(lead_emp_no, 0) = isnull(p.lead_emp_no, 0) and isnull(sales_emp_no, 0) = isnull(p.sales_emp_no, 0) and isnull(assign_emp_no, 0) = isnull(p.assign_emp_no, 0) and isnull(promo_id, '') = isnull(p.promo_id, '') ) -----Original Message----- From: paul.hartland at fsmail.net [mailto:paul.hartland at fsmail.net] Sent: Friday, April 02, 2004 9:17 AM To: dba-sqlserver Subject: [dba-SQLServer] Triggers To Update A Table When Another Table Has A Record Inserted To all, Just starting to play about with Triggers, what I want to do is create a Trigger for a table called tblPersonnel so that when someone adds a new record to the table, the Trigger Executes a stored procedure that updates a table called tblDataChanges with the PayrollNo, DateAdded, Firstname & Surname. Has anyone got any sample code to create this Trigger, I have the Stored Procedure to update the tblDataChanges with the Parameters @Payroll, @DateAdded, @Firstname & @Surname. Thanks in advance for any help on this. Paul Hartland Freeserve AnyTime - HALF PRICE for the first 3 months - Save ?7.50 a month www.freeserve.com/anytime _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From martyconnelly at shaw.ca Fri Apr 2 12:20:31 2004 From: martyconnelly at shaw.ca (MartyConnelly) Date: Fri, 02 Apr 2004 10:20:31 -0800 Subject: JOINS Was:(Re: [dba-SQLServer] Stored Procedure Help (SQL Server & VB6)) References: <20040402061033.8487.qmail@web61202.mail.yahoo.com> Message-ID: <406DAEEF.5090407@shaw.ca> Jet includes an undocumented Registry setting you can use to turn on the logging of query optimization plan information to a text file. Jet only writes information to the ShowPlan.out file as it creates the query plan. See Access 2002 Desktop Developer's Handbook Paul Litwin, Ken Getz, and Mike Gunderloy Chapter 15 Online here http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacbk02/html/odc_4009c15.asp under Microsoft's Unsupported Jet Optimization Tools I got this out of the Microsoft Jet Database Engine Programmer's Guide you add this registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\3.5\Engines\Debug (everything but the Debug key is likely to be there already) and add this value: JETSHOWPLAN ON The easy way: copy the following into a text file called ShowPlan.reg, and doubleclick it in Explorer: REGEDIT4 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\3.5\Engines\Debug] "JETSHOWPLAN"="ON" When this switch is set ON, every query optimization will be logged to a Showplan.log file. The location can be kind of tricky -- it may be in your default Access directory, it may be in the location of the database you're running. I was never quite sure if it created itself in the default directory or in the current directory, so you may have to search for it. However, a caveat: having Showplan on can slow down Access a lot, as well as make it prone to crashing. Use it for analysis only. S D wrote: >Hi Francisco, > >you are correct. I have never used them. I never took time to figure it out. >I always wondered if there was a diff. I'll take you're advise and start hacking the statistics. > >SQL Server is just a (very) small portion of my working field. Most of it is MS-Access...and there is no query-plan thingy in Access :-( > >Sander > >Francisco H Tapia wrote: >I personnally stay away from where joins. I've seen them all to often >yield different results.. perhaps the developer didn't know how to use >them, but I've always stuck to INNER/LEFT/RIGHT Joins... and >specifically because you will tend to yield a better query plan. Have >you run the statistics to see how many table scans you get from joining >in the where clause? > > > >S D said the following on 4/1/2004 4:37 AM: > > > >>Hi paul, >> >>nice to see you here also. >> >>Personally I do NOT use the INNER JOIN stuff. I just use plain SQL >>SELECT a.x, b.y >> >> >>FROM table1 a, table2 b > > >>WHERE a.a = b.a >>AND .... >>That would result in: >>UPDATE tblPersonnelJobCategories >>SET tblPersonnelJobCategories.Selected = True >>WHERE tblPersonnelJobCategories.UserID= @UserId >>AND tblPersonnelJobCategories.CategoryID = tblPersonnelCategoriesSelected.CategoryID >>AND tblPersonnelJobCategories.PayrollNo = tblPersonnelCategoriesSelected.PayrollNo >> >> >>A tip for you're query: does it run when you hardcode the UserID? >> >>Did you try to run: >>SELECT tblPersonnelJobCategories.UserID, >>tblPersonnelJobCategories.Selected >>FROM tblPersonnelJobCategories, >>tblPersonnelCategoriesSelected >>WHERE tblPersonnelJobCategories.UserID= @UserId >>AND tblPersonnelJobCategories.CategoryID = tblPersonnelCategoriesSelected.CategoryID >>AND tblPersonnelJobCategories.PayrollNo = tblPersonnelCategoriesSelected.PayrollNo >> >>Success. >> >>Sander >> >> >>paul.hartland at fsmail.net wrote: >>To all, >> >>I have a Visual Basic 6 front-end together with a SQL Server 7.0 back-end, and have tried writing a stored procedure to do the following: >> >>I pass a UserID into the SP, then I want the SP to UPDATE tblPersonnelJobCategories to TRUE where tblPersonnelJobCategories.UserID is equal to the UserID that I passed to the SP but I only want the UPDATE to take place where the PayrollNo & CategoryID in tblPersonnelJobCategories matches the PayrollNo & CategoryID in tblPersonnelCategoriesSelected >> >>I tried using the follwing SQL statement in my SP but it doesn?t like the Inner Join: >> >>UPDATE tblPersonnelJobCategories INNER JOIN tblPersonnelCategoriesSelected ON (tblPersonnelJobCategories.CategoryID = tblPersonnelCategoriesSelected.CategoryID) AND (tblPersonnelJobCategories.PayrollNo = tblPersonnelCategoriesSelected.PayrollNo) SET tblPersonnelJobCategories.Selected = True WHERE tblPersonnelJobCategories.UserID= @UserId >> >>Any help would be greatly appreciated, as I?m fairly new to SP?s and thought an INNER JOIN would be ok. >> >> >> >> > > > > -- Marty Connelly Victoria, B.C. Canada From Robert.Djabarov at usaa.com Fri Apr 2 12:47:32 2004 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Fri, 2 Apr 2004 12:47:32 -0600 Subject: [dba-SQLServer] Triggers To Update A Table When Another Table Has ARecord Inserted Message-ID: <6B1FEFC06BC3474B8721FDAA8366810D08C99F59@ex04.eagle.usaa.com> I'd suggest not to implement a trigger (it's neat and all, but leads to issues you wouldn't want to deal with in the future). Create a set of stored procedures, - spI_Personnel, spD_Personnel, spU_Personnel, spS_Personnel. Letters after "sp" denote the action that will be taken on the table (I-nsert, U-pdate, D-elete, S-elect). Remove all direct access from the table. This way you know exactly how the data gets affected or displayed, no matter who accesses the table. Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of paul.hartland at fsmail.net Sent: Friday, April 02, 2004 8:17 AM To: dba-sqlserver Subject: [dba-SQLServer] Triggers To Update A Table When Another Table Has ARecord Inserted To all, Just starting to play about with Triggers, what I want to do is create a Trigger for a table called tblPersonnel so that when someone adds a new record to the table, the Trigger Executes a stored procedure that updates a table called tblDataChanges with the PayrollNo, DateAdded, Firstname & Surname. Has anyone got any sample code to create this Trigger, I have the Stored Procedure to update the tblDataChanges with the Parameters @Payroll, @DateAdded, @Firstname & @Surname. Thanks in advance for any help on this. Paul Hartland Freeserve AnyTime - HALF PRICE for the first 3 months - Save ?7.50 a month www.freeserve.com/anytime _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From mwp.reid at qub.ac.uk Fri Apr 2 12:48:40 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Fri, 2 Apr 2004 19:48:40 +0100 Subject: [dba-SQLServer] Creating joins across multiple databases References: <3CCEA32DFF043C4CB99B835557E11B3003C6C85A@ex02.eagle.usaa.com> Message-ID: <001301c418e3$1f815930$1b02a8c0@MARTINREID> Robert We have several large systems which will be migrated to SQL Server containing the core data of the University. Say we then have several smaller databases each performing a distinct function. They need access to the core information held within the large corporate systems. How would you handle this without cross db joins? Would you import data overnight using DTS or some other method?? Best Wishes Martin ----- Original Message ----- From: "Djabarov, Robert" To: Sent: Thursday, April 01, 2004 9:31 PM Subject: RE: [dba-SQLServer] Creating joins across multiple databases > Not sure if I understand "when joins where out" part, but I'd stay out > of cross-database joins. If there is a need for something like this, > it's most likely that the app architecture needs to be rethought. Or, > instead of creating a new database along with a new app, maybe the > existing app and the underlying db need to be modified to accommodate > newly requested features. > > Robert Djabarov > SQL Server & UDB > Sr. SQL Server Administrator > Phone: (210) 913-3148 > Pager: (210) 753-3148 > 9800 Fredericksburg Rd. San Antonio, TX 78288 > www.usaa.com > > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin > Reid > Sent: Thursday, April 01, 2004 1:28 PM > To: dba-sqlserver at databaseadvisors.com > Subject: Re: [dba-SQLServer] Creating joins across multiple databases > > > How would you handle the issue in that case when joins where out?? > > Martin > > > > ----- Original Message ----- > From: "Djabarov, Robert" > To: > Sent: Thursday, April 01, 2004 7:51 PM > Subject: RE: [dba-SQLServer] Creating joins across multiple databases > > > > Based on what I've seen so far, it's not a good idea to do cross-db > > joins, and not only because of security issues as Francisco mentions, > > but also because of questions like "Who the heck is this guy and what > > is he doing in my swamp?" which immediately start popping up, which > > leads to finger-pointing when there is a slow-down or outage. It also > > > violates database designation (DSS, OLTP) when it's OLTP for a native > > user while becoming a DSS for the new-comer. > > > > BTW, Francisco, did you copy the article or retyped it? If you copied > > > it, I see a minor problem with Author's syntax... > > > > > > Robert Djabarov > > SQL Server & UDB > > Sr. SQL Server Administrator > > Phone: (210) 913-3148 > > Pager: (210) 753-3148 > > 9800 Fredericksburg Rd. San Antonio, TX 78288 > > www.usaa.com > > > > -----Original Message----- > > From: dba-sqlserver-bounces at databaseadvisors.com > > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of > > Francisco H Tapia > > Sent: Thursday, April 01, 2004 12:41 PM > > To: dba-SQLServer at databaseadvisors.com > > Subject: [dba-SQLServer] Creating joins across multiple databases > > > > I'm including the latest article from Arthur Fuller on the Builder.com > > SQL Newsletter because I hope it can bring forward some positive > > discussion. Plus I'm sure many of us have dealt with this particular > > situation or will deal with it in the future. > > > > //* > > Creating joins across multiple databases* > > > > Enterprise databases often comprise several databases--one from > > production, another from marketing, and so on. All of the databases > rely > > > > on a certain amount of common data, which is frequently copied to each > > database that needs it. > > > > However, this copying routine creates a new problem: skew. Where there > > is duplication, there is at least the opportunity for skew. The > solution > > > > to this problem is often replication, or scheduled jobs that update > > each > > > > copy of the common data from one "master" database. This approach > > works, > > > > but sometimes a better method is to move all the common data into one > > database, and then access it as needed from the other databases. This > > eliminates both the skew and the replication jobs. > > > > This approach typically requires joining some local tables to the > > common > > > > tables. For example, suppose you have two databases: Common and Sales. > > The Customers table resides in the Common database, while the Orders > > table resides in the Sales database. You want to create a query that > > lists the Customer information along with the Order information. How > do > > you join these two tables? The answer lies in prefixes. > > > > SQL Server uses a dot-delimited nomenclature that extends outward to > > the > > > > database and the server. To specify a column in a table in another > > database, name the other database: > > > > SELECT CustomerID FROM Common.Customers > > > > To join a table from the Common database to a table in the current > > (Sales) database, use this same nomenclature: > > > > SELECT * FROM Common.Customers > > INNER JOIN Orders > > ON Common.Customers.CustomerID = Orders.CustomerID > > > > Not every organization's application domain requires multiple > > databases. > > > > If your organization does require multiple databases, it's easy to > > create joins across databases. > > > > /Arthur Fuller has been developing database applications for more than > > 20 years. He frequently works with Access ADPs, Microsoft SQL 2000, > > MySQL, and .NET./ > > // > > > > Yes it is easy enough to join accross multiple databases and even > > accross several Sql Server linked servers :) (very cool)... however > my > > > > concern and one that was not addressed in this article is the security > > aspect of it... say you just have a user who calls the report... does > > the user need to use an application who's using an application role > and > > thus gets better than normal priviladges on the server? I have not > been > > > > successful in adding new users to another database w/o also having to > > takes some hard steps; my solution was to ... Create VIEWS on the > target > > > > database... add the user to that 2nd database, then give explicit > > selet > > crights on the views and then join accross from db2 to db1 via the > sproc > > > > using the views instead of the tables... so while the data is not > > duplicated, the user is, and now has rights to base views that > represent > > > > tables :( , so because I think I might be doing this wrong.. I'm > > hoping > > Arthur or someone else will chime in with a few clues :) > > > > Thanks, > > > > -- > > -Francisco > > > > > > _______________________________________________ > > 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 Robert.Djabarov at usaa.com Fri Apr 2 12:49:50 2004 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Fri, 2 Apr 2004 12:49:50 -0600 Subject: [dba-SQLServer] SQL Mail Message-ID: <6B1FEFC06BC3474B8721FDAA8366810D08C9A6E1@ex04.eagle.usaa.com> Check this link: http://support.microsoft.com/default.aspx?scid=kb;en-us;263556&sd=tech Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of paul.hartland at fsmail.net Sent: Friday, April 02, 2004 5:11 AM To: dba-sqlserver Subject: [dba-SQLServer] SQL Mail To all, I would like to start using SQL Mail, does anyone use this ?, if so how do you configure the SQL server to allow the sending of email through Outlook ? Does the SQL Server have to have it's own email account etc.....I really do know nothing about this and need all the information I can get. Thanks in advance for all your help...... Paul Hartland Freeserve AnyTime - HALF PRICE for the first 3 months - Save ?7.50 a month www.freeserve.com/anytime _______________________________________________ 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 Fri Apr 2 13:15:45 2004 From: tuxedo_man at hotmail.com (Billy Pang) Date: Fri, 02 Apr 2004 19:15:45 +0000 Subject: [dba-SQLServer] SQL Mail Message-ID: another option would be to use CDOSYS to send the email from sql server without ms exchange profile. >From: "Djabarov, Robert" >Reply-To: dba-sqlserver at databaseadvisors.com >To: >Subject: RE: [dba-SQLServer] SQL Mail >Date: Fri, 2 Apr 2004 12:49:50 -0600 > >Check this link: > >http://support.microsoft.com/default.aspx?scid=kb;en-us;263556&sd=tech > >Robert Djabarov >SQL Server & UDB >Sr. SQL Server Administrator >Phone: (210) 913-3148 >Pager: (210) 753-3148 >9800 Fredericksburg Rd. San Antonio, TX 78288 >www.usaa.com > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of >paul.hartland at fsmail.net >Sent: Friday, April 02, 2004 5:11 AM >To: dba-sqlserver >Subject: [dba-SQLServer] SQL Mail > >To all, > >I would like to start using SQL Mail, does anyone use this ?, if so how do >you configure the SQL server to allow the sending of email through Outlook >? > >Does the SQL Server have to have it's own email account etc.....I really do >know nothing about this and need all the information I can get. > >Thanks in advance for all your help...... > >Paul Hartland >Freeserve AnyTime - HALF PRICE for the first 3 months - Save ?7.50 a month >www.freeserve.com/anytime >_______________________________________________ >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 > _________________________________________________________________ Add photos to your e-mail with MSN Premium. Get 2 months FREE* http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines From Robert.Djabarov at usaa.com Fri Apr 2 13:18:41 2004 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Fri, 2 Apr 2004 13:18:41 -0600 Subject: [dba-SQLServer] Creating joins across multiple databases Message-ID: <6B1FEFC06BC3474B8721FDAA8366810D08C9A6E3@ex04.eagle.usaa.com> Is there a way of getting rid of smaller databases while retaining "distinct functionality" by isolating those users via security settings (designated database role) and specific set of data access paths - functions, stored procedures, etc.? Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin Reid Sent: Friday, April 02, 2004 12:49 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Creating joins across multiple databases Robert We have several large systems which will be migrated to SQL Server containing the core data of the University. Say we then have several smaller databases each performing a distinct function. They need access to the core information held within the large corporate systems. How would you handle this without cross db joins? Would you import data overnight using DTS or some other method?? Best Wishes Martin ----- Original Message ----- From: "Djabarov, Robert" To: Sent: Thursday, April 01, 2004 9:31 PM Subject: RE: [dba-SQLServer] Creating joins across multiple databases > Not sure if I understand "when joins where out" part, but I'd stay out > of cross-database joins. If there is a need for something like this, > it's most likely that the app architecture needs to be rethought. Or, > instead of creating a new database along with a new app, maybe the > existing app and the underlying db need to be modified to accommodate > newly requested features. > > Robert Djabarov > SQL Server & UDB > Sr. SQL Server Administrator > Phone: (210) 913-3148 > Pager: (210) 753-3148 > 9800 Fredericksburg Rd. San Antonio, TX 78288 > www.usaa.com > > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin > Reid > Sent: Thursday, April 01, 2004 1:28 PM > To: dba-sqlserver at databaseadvisors.com > Subject: Re: [dba-SQLServer] Creating joins across multiple databases > > > How would you handle the issue in that case when joins where out?? > > Martin > > > > ----- Original Message ----- > From: "Djabarov, Robert" > To: > Sent: Thursday, April 01, 2004 7:51 PM > Subject: RE: [dba-SQLServer] Creating joins across multiple databases > > > > Based on what I've seen so far, it's not a good idea to do cross-db > > joins, and not only because of security issues as Francisco mentions, > > but also because of questions like "Who the heck is this guy and what > > is he doing in my swamp?" which immediately start popping up, which > > leads to finger-pointing when there is a slow-down or outage. It also > > > violates database designation (DSS, OLTP) when it's OLTP for a native > > user while becoming a DSS for the new-comer. > > > > BTW, Francisco, did you copy the article or retyped it? If you copied > > > it, I see a minor problem with Author's syntax... > > > > > > Robert Djabarov > > SQL Server & UDB > > Sr. SQL Server Administrator > > Phone: (210) 913-3148 > > Pager: (210) 753-3148 > > 9800 Fredericksburg Rd. San Antonio, TX 78288 > > www.usaa.com > > > > -----Original Message----- > > From: dba-sqlserver-bounces at databaseadvisors.com > > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of > > Francisco H Tapia > > Sent: Thursday, April 01, 2004 12:41 PM > > To: dba-SQLServer at databaseadvisors.com > > Subject: [dba-SQLServer] Creating joins across multiple databases > > > > I'm including the latest article from Arthur Fuller on the Builder.com > > SQL Newsletter because I hope it can bring forward some positive > > discussion. Plus I'm sure many of us have dealt with this particular > > situation or will deal with it in the future. > > > > //* > > Creating joins across multiple databases* > > > > Enterprise databases often comprise several databases--one from > > production, another from marketing, and so on. All of the databases > rely > > > > on a certain amount of common data, which is frequently copied to each > > database that needs it. > > > > However, this copying routine creates a new problem: skew. Where there > > is duplication, there is at least the opportunity for skew. The > solution > > > > to this problem is often replication, or scheduled jobs that update > > each > > > > copy of the common data from one "master" database. This approach > > works, > > > > but sometimes a better method is to move all the common data into one > > database, and then access it as needed from the other databases. This > > eliminates both the skew and the replication jobs. > > > > This approach typically requires joining some local tables to the > > common > > > > tables. For example, suppose you have two databases: Common and Sales. > > The Customers table resides in the Common database, while the Orders > > table resides in the Sales database. You want to create a query that > > lists the Customer information along with the Order information. How > do > > you join these two tables? The answer lies in prefixes. > > > > SQL Server uses a dot-delimited nomenclature that extends outward to > > the > > > > database and the server. To specify a column in a table in another > > database, name the other database: > > > > SELECT CustomerID FROM Common.Customers > > > > To join a table from the Common database to a table in the current > > (Sales) database, use this same nomenclature: > > > > SELECT * FROM Common.Customers > > INNER JOIN Orders > > ON Common.Customers.CustomerID = Orders.CustomerID > > > > Not every organization's application domain requires multiple > > databases. > > > > If your organization does require multiple databases, it's easy to > > create joins across databases. > > > > /Arthur Fuller has been developing database applications for more than > > 20 years. He frequently works with Access ADPs, Microsoft SQL 2000, > > MySQL, and .NET./ > > // > > > > Yes it is easy enough to join accross multiple databases and even > > accross several Sql Server linked servers :) (very cool)... however > my > > > > concern and one that was not addressed in this article is the security > > aspect of it... say you just have a user who calls the report... does > > the user need to use an application who's using an application role > and > > thus gets better than normal priviladges on the server? I have not > been > > > > successful in adding new users to another database w/o also having to > > takes some hard steps; my solution was to ... Create VIEWS on the > target > > > > database... add the user to that 2nd database, then give explicit > > selet > > crights on the views and then join accross from db2 to db1 via the > sproc > > > > using the views instead of the tables... so while the data is not > > duplicated, the user is, and now has rights to base views that > represent > > > > tables :( , so because I think I might be doing this wrong.. I'm > > hoping > > Arthur or someone else will chime in with a few clues :) > > > > Thanks, > > > > -- > > -Francisco > > > > > > _______________________________________________ > > 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 mwp.reid at qub.ac.uk Fri Apr 2 14:11:09 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Fri, 2 Apr 2004 21:11:09 +0100 Subject: [dba-SQLServer] Creating joins across multiple databases References: <6B1FEFC06BC3474B8721FDAA8366810D08C9A6E3@ex04.eagle.usaa.com> Message-ID: <000901c418ee$a7be0db0$1b02a8c0@MARTINREID> An example A couple of systems keep student data but also some things very specific to the faculty. Only they owuld use this data so it si not held on any of the core systems. Unless of course we put it on them. Martin ----- Original Message ----- From: "Djabarov, Robert" To: Sent: Friday, April 02, 2004 8:18 PM Subject: RE: [dba-SQLServer] Creating joins across multiple databases > Is there a way of getting rid of smaller databases while retaining > "distinct functionality" by isolating those users via security settings > (designated database role) and specific set of data access paths - > functions, stored procedures, etc.? > > Robert Djabarov > SQL Server & UDB > Sr. SQL Server Administrator > Phone: (210) 913-3148 > Pager: (210) 753-3148 > 9800 Fredericksburg Rd. San Antonio, TX 78288 > www.usaa.com > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin > Reid > Sent: Friday, April 02, 2004 12:49 PM > To: dba-sqlserver at databaseadvisors.com > Subject: Re: [dba-SQLServer] Creating joins across multiple databases > > Robert > > We have several large systems which will be migrated to SQL Server > containing the core data of the University. Say we then have several > smaller > databases each performing a distinct function. They need access to the > core > information held within the large corporate systems. How would you > handle > this without cross db joins? > > Would you import data overnight using DTS or some other method?? > > Best Wishes > > Martin > > > > ----- Original Message ----- > From: "Djabarov, Robert" > To: > Sent: Thursday, April 01, 2004 9:31 PM > Subject: RE: [dba-SQLServer] Creating joins across multiple databases > > > > Not sure if I understand "when joins where out" part, but I'd stay out > > of cross-database joins. If there is a need for something like this, > > it's most likely that the app architecture needs to be rethought. Or, > > instead of creating a new database along with a new app, maybe the > > existing app and the underlying db need to be modified to accommodate > > newly requested features. > > > > Robert Djabarov > > SQL Server & UDB > > Sr. SQL Server Administrator > > Phone: (210) 913-3148 > > Pager: (210) 753-3148 > > 9800 Fredericksburg Rd. San Antonio, TX 78288 > > www.usaa.com > > > > > > -----Original Message----- > > From: dba-sqlserver-bounces at databaseadvisors.com > > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of > Martin > > Reid > > Sent: Thursday, April 01, 2004 1:28 PM > > To: dba-sqlserver at databaseadvisors.com > > Subject: Re: [dba-SQLServer] Creating joins across multiple databases > > > > > > How would you handle the issue in that case when joins where out?? > > > > Martin > > > > > > > > ----- Original Message ----- > > From: "Djabarov, Robert" > > To: > > Sent: Thursday, April 01, 2004 7:51 PM > > Subject: RE: [dba-SQLServer] Creating joins across multiple databases > > > > > > > Based on what I've seen so far, it's not a good idea to do cross-db > > > joins, and not only because of security issues as Francisco > mentions, > > > but also because of questions like "Who the heck is this guy and > what > > > is he doing in my swamp?" which immediately start popping up, which > > > leads to finger-pointing when there is a slow-down or outage. It > also > > > > > violates database designation (DSS, OLTP) when it's OLTP for a > native > > > user while becoming a DSS for the new-comer. > > > > > > BTW, Francisco, did you copy the article or retyped it? If you > copied > > > > > it, I see a minor problem with Author's syntax... > > > > > > > > > Robert Djabarov > > > SQL Server & UDB > > > Sr. SQL Server Administrator > > > Phone: (210) 913-3148 > > > Pager: (210) 753-3148 > > > 9800 Fredericksburg Rd. San Antonio, TX 78288 > > > www.usaa.com > > > > > > -----Original Message----- > > > From: dba-sqlserver-bounces at databaseadvisors.com > > > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of > > > Francisco H Tapia > > > Sent: Thursday, April 01, 2004 12:41 PM > > > To: dba-SQLServer at databaseadvisors.com > > > Subject: [dba-SQLServer] Creating joins across multiple databases > > > > > > I'm including the latest article from Arthur Fuller on the > Builder.com > > > SQL Newsletter because I hope it can bring forward some positive > > > discussion. Plus I'm sure many of us have dealt with this > particular > > > situation or will deal with it in the future. > > > > > > //* > > > Creating joins across multiple databases* > > > > > > Enterprise databases often comprise several databases--one from > > > production, another from marketing, and so on. All of the databases > > rely > > > > > > on a certain amount of common data, which is frequently copied to > each > > > database that needs it. > > > > > > However, this copying routine creates a new problem: skew. Where > there > > > is duplication, there is at least the opportunity for skew. The > > solution > > > > > > to this problem is often replication, or scheduled jobs that update > > > each > > > > > > copy of the common data from one "master" database. This approach > > > works, > > > > > > but sometimes a better method is to move all the common data into > one > > > database, and then access it as needed from the other databases. > This > > > eliminates both the skew and the replication jobs. > > > > > > This approach typically requires joining some local tables to the > > > common > > > > > > tables. For example, suppose you have two databases: Common and > Sales. > > > The Customers table resides in the Common database, while the Orders > > > table resides in the Sales database. You want to create a query that > > > lists the Customer information along with the Order information. How > > do > > > you join these two tables? The answer lies in prefixes. > > > > > > SQL Server uses a dot-delimited nomenclature that extends outward to > > > the > > > > > > database and the server. To specify a column in a table in another > > > database, name the other database: > > > > > > SELECT CustomerID FROM Common.Customers > > > > > > To join a table from the Common database to a table in the current > > > (Sales) database, use this same nomenclature: > > > > > > SELECT * FROM Common.Customers > > > INNER JOIN Orders > > > ON Common.Customers.CustomerID = Orders.CustomerID > > > > > > Not every organization's application domain requires multiple > > > databases. > > > > > > If your organization does require multiple databases, it's easy to > > > create joins across databases. > > > > > > /Arthur Fuller has been developing database applications for more > than > > > 20 years. He frequently works with Access ADPs, Microsoft SQL 2000, > > > MySQL, and .NET./ > > > // > > > > > > Yes it is easy enough to join accross multiple databases and even > > > accross several Sql Server linked servers :) (very cool)... > however > > my > > > > > > concern and one that was not addressed in this article is the > security > > > aspect of it... say you just have a user who calls the report... > does > > > the user need to use an application who's using an application role > > and > > > thus gets better than normal priviladges on the server? I have not > > been > > > > > > successful in adding new users to another database w/o also having > to > > > takes some hard steps; my solution was to ... Create VIEWS on the > > target > > > > > > database... add the user to that 2nd database, then give explicit > > > selet > > > crights on the views and then join accross from db2 to db1 via the > > sproc > > > > > > using the views instead of the tables... so while the data is not > > > duplicated, the user is, and now has rights to base views that > > represent > > > > > > tables :( , so because I think I might be doing this wrong.. I'm > > > hoping > > > Arthur or someone else will chime in with a few clues :) > > > > > > Thanks, > > > > > > -- > > > -Francisco > > > > > > > > > _______________________________________________ > > > 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 > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From Robert.Djabarov at usaa.com Fri Apr 2 14:53:31 2004 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Fri, 2 Apr 2004 14:53:31 -0600 Subject: [dba-SQLServer] Creating joins across multiple databases Message-ID: <6B1FEFC06BC3474B8721FDAA8366810D08C9A6E5@ex04.eagle.usaa.com> I would, and create an optimized path to those tables so that when they are used the rest of the database is not affected. Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin Reid Sent: Friday, April 02, 2004 2:11 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Creating joins across multiple databases An example A couple of systems keep student data but also some things very specific to the faculty. Only they owuld use this data so it si not held on any of the core systems. Unless of course we put it on them. Martin ----- Original Message ----- From: "Djabarov, Robert" To: Sent: Friday, April 02, 2004 8:18 PM Subject: RE: [dba-SQLServer] Creating joins across multiple databases > Is there a way of getting rid of smaller databases while retaining > "distinct functionality" by isolating those users via security settings > (designated database role) and specific set of data access paths - > functions, stored procedures, etc.? > > Robert Djabarov > SQL Server & UDB > Sr. SQL Server Administrator > Phone: (210) 913-3148 > Pager: (210) 753-3148 > 9800 Fredericksburg Rd. San Antonio, TX 78288 > www.usaa.com > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin > Reid > Sent: Friday, April 02, 2004 12:49 PM > To: dba-sqlserver at databaseadvisors.com > Subject: Re: [dba-SQLServer] Creating joins across multiple databases > > Robert > > We have several large systems which will be migrated to SQL Server > containing the core data of the University. Say we then have several > smaller > databases each performing a distinct function. They need access to the > core > information held within the large corporate systems. How would you > handle > this without cross db joins? > > Would you import data overnight using DTS or some other method?? > > Best Wishes > > Martin > > > > ----- Original Message ----- > From: "Djabarov, Robert" > To: > Sent: Thursday, April 01, 2004 9:31 PM > Subject: RE: [dba-SQLServer] Creating joins across multiple databases > > > > Not sure if I understand "when joins where out" part, but I'd stay out > > of cross-database joins. If there is a need for something like this, > > it's most likely that the app architecture needs to be rethought. Or, > > instead of creating a new database along with a new app, maybe the > > existing app and the underlying db need to be modified to accommodate > > newly requested features. > > > > Robert Djabarov > > SQL Server & UDB > > Sr. SQL Server Administrator > > Phone: (210) 913-3148 > > Pager: (210) 753-3148 > > 9800 Fredericksburg Rd. San Antonio, TX 78288 > > www.usaa.com > > > > > > -----Original Message----- > > From: dba-sqlserver-bounces at databaseadvisors.com > > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of > Martin > > Reid > > Sent: Thursday, April 01, 2004 1:28 PM > > To: dba-sqlserver at databaseadvisors.com > > Subject: Re: [dba-SQLServer] Creating joins across multiple databases > > > > > > How would you handle the issue in that case when joins where out?? > > > > Martin > > > > > > > > ----- Original Message ----- > > From: "Djabarov, Robert" > > To: > > Sent: Thursday, April 01, 2004 7:51 PM > > Subject: RE: [dba-SQLServer] Creating joins across multiple databases > > > > > > > Based on what I've seen so far, it's not a good idea to do cross-db > > > joins, and not only because of security issues as Francisco > mentions, > > > but also because of questions like "Who the heck is this guy and > what > > > is he doing in my swamp?" which immediately start popping up, which > > > leads to finger-pointing when there is a slow-down or outage. It > also > > > > > violates database designation (DSS, OLTP) when it's OLTP for a > native > > > user while becoming a DSS for the new-comer. > > > > > > BTW, Francisco, did you copy the article or retyped it? If you > copied > > > > > it, I see a minor problem with Author's syntax... > > > > > > > > > Robert Djabarov > > > SQL Server & UDB > > > Sr. SQL Server Administrator > > > Phone: (210) 913-3148 > > > Pager: (210) 753-3148 > > > 9800 Fredericksburg Rd. San Antonio, TX 78288 > > > www.usaa.com > > > > > > -----Original Message----- > > > From: dba-sqlserver-bounces at databaseadvisors.com > > > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of > > > Francisco H Tapia > > > Sent: Thursday, April 01, 2004 12:41 PM > > > To: dba-SQLServer at databaseadvisors.com > > > Subject: [dba-SQLServer] Creating joins across multiple databases > > > > > > I'm including the latest article from Arthur Fuller on the > Builder.com > > > SQL Newsletter because I hope it can bring forward some positive > > > discussion. Plus I'm sure many of us have dealt with this > particular > > > situation or will deal with it in the future. > > > > > > //* > > > Creating joins across multiple databases* > > > > > > Enterprise databases often comprise several databases--one from > > > production, another from marketing, and so on. All of the databases > > rely > > > > > > on a certain amount of common data, which is frequently copied to > each > > > database that needs it. > > > > > > However, this copying routine creates a new problem: skew. Where > there > > > is duplication, there is at least the opportunity for skew. The > > solution > > > > > > to this problem is often replication, or scheduled jobs that update > > > each > > > > > > copy of the common data from one "master" database. This approach > > > works, > > > > > > but sometimes a better method is to move all the common data into > one > > > database, and then access it as needed from the other databases. > This > > > eliminates both the skew and the replication jobs. > > > > > > This approach typically requires joining some local tables to the > > > common > > > > > > tables. For example, suppose you have two databases: Common and > Sales. > > > The Customers table resides in the Common database, while the Orders > > > table resides in the Sales database. You want to create a query that > > > lists the Customer information along with the Order information. How > > do > > > you join these two tables? The answer lies in prefixes. > > > > > > SQL Server uses a dot-delimited nomenclature that extends outward to > > > the > > > > > > database and the server. To specify a column in a table in another > > > database, name the other database: > > > > > > SELECT CustomerID FROM Common.Customers > > > > > > To join a table from the Common database to a table in the current > > > (Sales) database, use this same nomenclature: > > > > > > SELECT * FROM Common.Customers > > > INNER JOIN Orders > > > ON Common.Customers.CustomerID = Orders.CustomerID > > > > > > Not every organization's application domain requires multiple > > > databases. > > > > > > If your organization does require multiple databases, it's easy to > > > create joins across databases. > > > > > > /Arthur Fuller has been developing database applications for more > than > > > 20 years. He frequently works with Access ADPs, Microsoft SQL 2000, > > > MySQL, and .NET./ > > > // > > > > > > Yes it is easy enough to join accross multiple databases and even > > > accross several Sql Server linked servers :) (very cool)... > however > > my > > > > > > concern and one that was not addressed in this article is the > security > > > aspect of it... say you just have a user who calls the report... > does > > > the user need to use an application who's using an application role > > and > > > thus gets better than normal priviladges on the server? I have not > > been > > > > > > successful in adding new users to another database w/o also having > to > > > takes some hard steps; my solution was to ... Create VIEWS on the > > target > > > > > > database... add the user to that 2nd database, then give explicit > > > selet > > > crights on the views and then join accross from db2 to db1 via the > > sproc > > > > > > using the views instead of the tables... so while the data is not > > > duplicated, the user is, and now has rights to base views that > > represent > > > > > > tables :( , so because I think I might be doing this wrong.. I'm > > > hoping > > > Arthur or someone else will chime in with a few clues :) > > > > > > Thanks, > > > > > > -- > > > -Francisco > > > > > > > > > _______________________________________________ > > > 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 > > _______________________________________________ > 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 my.lists at verizon.net Fri Apr 2 15:58:50 2004 From: my.lists at verizon.net (Francisco H Tapia) Date: Fri, 02 Apr 2004 13:58:50 -0800 Subject: [dba-SQLServer] Creating joins across multiple databases In-Reply-To: <6B1FEFC06BC3474B8721FDAA8366810D08C9A6E5@ex04.eagle.usaa.com> References: <6B1FEFC06BC3474B8721FDAA8366810D08C9A6E5@ex04.eagle.usaa.com> Message-ID: <406DE21A.4000209@verizon.net> I recognize the benefit of cross-db-Joining... as w/ anything that gets locked down, security issues are always of concern. Copying over the tables introduces a series of data duplication that will ultimately create a new level of maintenance...One idea to keep the data in synch is to introduce transactional replication, so that all base data would be identical throughout the enterprise... but if this is the case, then it defeats the purpose of linked servers etc. Djabarov, Robert said the following on 4/2/2004 12:53 PM: >I would, and create an optimized path to those tables so that when they >are used the rest of the database is not affected. > >Robert Djabarov >SQL Server & UDB >Sr. SQL Server Administrator >Phone: (210) 913-3148 >Pager: (210) 753-3148 >9800 Fredericksburg Rd. San Antonio, TX 78288 >www.usaa.com > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin >Reid >Sent: Friday, April 02, 2004 2:11 PM >To: dba-sqlserver at databaseadvisors.com >Subject: Re: [dba-SQLServer] Creating joins across multiple databases > >An example > > >A couple of systems keep student data but also some things very specific >to >the faculty. Only they owuld use this data so it si not held on any of >the >core systems. Unless of course we put it on them. > > >Martin > > >----- Original Message ----- >From: "Djabarov, Robert" >To: >Sent: Friday, April 02, 2004 8:18 PM >Subject: RE: [dba-SQLServer] Creating joins across multiple databases > > > > >>Is there a way of getting rid of smaller databases while retaining >>"distinct functionality" by isolating those users via security >> >> >settings > > >>(designated database role) and specific set of data access paths - >>functions, stored procedures, etc.? >> >>Robert Djabarov >>SQL Server & UDB >>Sr. SQL Server Administrator >>Phone: (210) 913-3148 >>Pager: (210) 753-3148 >>9800 Fredericksburg Rd. San Antonio, TX 78288 >>www.usaa.com >> >>-----Original Message----- >>From: dba-sqlserver-bounces at databaseadvisors.com >>[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of >> >> >Martin > > >>Reid >>Sent: Friday, April 02, 2004 12:49 PM >>To: dba-sqlserver at databaseadvisors.com >>Subject: Re: [dba-SQLServer] Creating joins across multiple databases >> >>Robert >> >>We have several large systems which will be migrated to SQL Server >>containing the core data of the University. Say we then have several >>smaller >>databases each performing a distinct function. They need access to the >>core >>information held within the large corporate systems. How would you >>handle >>this without cross db joins? >> >>Would you import data overnight using DTS or some other method?? >> >>Best Wishes >> >>Martin >> >> >> >>----- Original Message ----- >>From: "Djabarov, Robert" >>To: >>Sent: Thursday, April 01, 2004 9:31 PM >>Subject: RE: [dba-SQLServer] Creating joins across multiple databases >> >> >> >> >>>Not sure if I understand "when joins where out" part, but I'd stay >>> >>> >out > > >>>of cross-database joins. If there is a need for something like >>> >>> >this, > > >>>it's most likely that the app architecture needs to be rethought. >>> >>> >Or, > > >>>instead of creating a new database along with a new app, maybe the >>>existing app and the underlying db need to be modified to >>> >>> >accommodate > > >>>newly requested features. >>> >>>Robert Djabarov >>>SQL Server & UDB >>>Sr. SQL Server Administrator >>>Phone: (210) 913-3148 >>>Pager: (210) 753-3148 >>>9800 Fredericksburg Rd. San Antonio, TX 78288 >>>www.usaa.com >>> >>> >>>-----Original Message----- >>>From: dba-sqlserver-bounces at databaseadvisors.com >>>[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of >>> >>> >>Martin >> >> >>>Reid >>>Sent: Thursday, April 01, 2004 1:28 PM >>>To: dba-sqlserver at databaseadvisors.com >>>Subject: Re: [dba-SQLServer] Creating joins across multiple >>> >>> >databases > > >>>How would you handle the issue in that case when joins where out?? >>> >>>Martin >>> >>> >>> >>>----- Original Message ----- >>>From: "Djabarov, Robert" >>>To: >>>Sent: Thursday, April 01, 2004 7:51 PM >>>Subject: RE: [dba-SQLServer] Creating joins across multiple >>> >>> >databases > > >>> >>> >>>>Based on what I've seen so far, it's not a good idea to do >>>> >>>> >cross-db > > >>>>joins, and not only because of security issues as Francisco >>>> >>>> >>mentions, >> >> >>>>but also because of questions like "Who the heck is this guy and >>>> >>>> >>what >> >> >>>>is he doing in my swamp?" which immediately start popping up, >>>> >>>> >which > > >>>>leads to finger-pointing when there is a slow-down or outage. It >>>> >>>> >>also >> >> >>>>violates database designation (DSS, OLTP) when it's OLTP for a >>>> >>>> >>native >> >> >>>>user while becoming a DSS for the new-comer. >>>> >>>>BTW, Francisco, did you copy the article or retyped it? If you >>>> >>>> >>copied >> >> >>>>it, I see a minor problem with Author's syntax... >>>> >>>> >>>>Robert Djabarov >>>>SQL Server & UDB >>>>Sr. SQL Server Administrator >>>>Phone: (210) 913-3148 >>>>Pager: (210) 753-3148 >>>>9800 Fredericksburg Rd. San Antonio, TX 78288 >>>>www.usaa.com >>>> >>>>-----Original Message----- >>>>From: dba-sqlserver-bounces at databaseadvisors.com >>>>[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of >>>>Francisco H Tapia >>>>Sent: Thursday, April 01, 2004 12:41 PM >>>>To: dba-SQLServer at databaseadvisors.com >>>>Subject: [dba-SQLServer] Creating joins across multiple databases >>>> >>>>I'm including the latest article from Arthur Fuller on the >>>> >>>> >>Builder.com >> >> >>>>SQL Newsletter because I hope it can bring forward some positive >>>>discussion. Plus I'm sure many of us have dealt with this >>>> >>>> >>particular >> >> >>>>situation or will deal with it in the future. >>>> >>>>//* >>>>Creating joins across multiple databases* >>>> >>>>Enterprise databases often comprise several databases--one from >>>>production, another from marketing, and so on. All of the >>>> >>>> >databases > > >>>rely >>> >>> >>>>on a certain amount of common data, which is frequently copied to >>>> >>>> >>each >> >> >>>>database that needs it. >>>> >>>>However, this copying routine creates a new problem: skew. Where >>>> >>>> >>there >> >> >>>>is duplication, there is at least the opportunity for skew. The >>>> >>>> >>>solution >>> >>> >>>>to this problem is often replication, or scheduled jobs that >>>> >>>> >update > > >>>>each >>>> >>>>copy of the common data from one "master" database. This approach >>>>works, >>>> >>>>but sometimes a better method is to move all the common data into >>>> >>>> >>one >> >> >>>>database, and then access it as needed from the other databases. >>>> >>>> >>This >> >> >>>>eliminates both the skew and the replication jobs. >>>> >>>>This approach typically requires joining some local tables to the >>>>common >>>> >>>>tables. For example, suppose you have two databases: Common and >>>> >>>> >>Sales. >> >> >>>>The Customers table resides in the Common database, while the >>>> >>>> >Orders > > >>>>table resides in the Sales database. You want to create a query >>>> >>>> >that > > >>>>lists the Customer information along with the Order information. >>>> >>>> >How > > >>>do >>> >>> >>>>you join these two tables? The answer lies in prefixes. >>>> >>>>SQL Server uses a dot-delimited nomenclature that extends outward >>>> >>>> >to > > >>>>the >>>> >>>>database and the server. To specify a column in a table in another >>>>database, name the other database: >>>> >>>>SELECT CustomerID FROM Common.Customers >>>> >>>>To join a table from the Common database to a table in the current >>>>(Sales) database, use this same nomenclature: >>>> >>>>SELECT * FROM Common.Customers >>>>INNER JOIN Orders >>>>ON Common.Customers.CustomerID = Orders.CustomerID >>>> >>>>Not every organization's application domain requires multiple >>>>databases. >>>> >>>>If your organization does require multiple databases, it's easy to >>>>create joins across databases. >>>> >>>>/Arthur Fuller has been developing database applications for more >>>> >>>> >>than >> >> >>>>20 years. He frequently works with Access ADPs, Microsoft SQL >>>> >>>> >2000, > > >>>>MySQL, and .NET./ >>>>// >>>> >>>>Yes it is easy enough to join accross multiple databases and even >>>>accross several Sql Server linked servers :) (very cool)... >>>> >>>> >>however >> >> >>>my >>> >>> >>>>concern and one that was not addressed in this article is the >>>> >>>> >>security >> >> >>>>aspect of it... say you just have a user who calls the report... >>>> >>>> >>does >> >> >>>>the user need to use an application who's using an application >>>> >>>> >role > > >>>and >>> >>> >>>>thus gets better than normal priviladges on the server? I have >>>> >>>> >not > > >>>been >>> >>> >>>>successful in adding new users to another database w/o also having >>>> >>>> >>to >> >> >>>>takes some hard steps; my solution was to ... Create VIEWS on the >>>> >>>> >>>target >>> >>> >>>>database... add the user to that 2nd database, then give explicit >>>>selet >>>>crights on the views and then join accross from db2 to db1 via the >>>> >>>> >>>sproc >>> >>> >>>>using the views instead of the tables... so while the data is not >>>>duplicated, the user is, and now has rights to base views that >>>> >>>> >>>represent >>> >>> >>>>tables :( , so because I think I might be doing this wrong.. I'm >>>>hoping >>>>Arthur or someone else will chime in with a few clues :) >>>> >>>>Thanks, >>>> >>>>-- >>>>-Francisco >>>> >>>> >>>> >>>> > > > -- -Francisco From artful at rogers.com Tue Apr 6 01:37:48 2004 From: artful at rogers.com (Arthur Fuller) Date: Mon, 5 Apr 2004 23:37:48 -0700 Subject: [dba-SQLServer] Creating joins across multiple databases In-Reply-To: <3CCEA32DFF043C4CB99B835557E11B3003C6C857@ex02.eagle.usaa.com> Message-ID: <001d01c41ba1$ada96160$6501a8c0@rock> Yes, Robert, there was a problem in my syntax. A correction will appear in the next column. Bizarre thing was, in my saved query the syntax was right but when I pasted it into Word, somehow I screwed it up. Story of my life :) Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Djabarov, Robert Sent: Thursday, April 01, 2004 10:51 AM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] Creating joins across multiple databases Based on what I've seen so far, it's not a good idea to do cross-db joins, and not only because of security issues as Francisco mentions, but also because of questions like "Who the heck is this guy and what is he doing in my swamp?" which immediately start popping up, which leads to finger-pointing when there is a slow-down or outage. It also violates database designation (DSS, OLTP) when it's OLTP for a native user while becoming a DSS for the new-comer. BTW, Francisco, did you copy the article or retyped it? If you copied it, I see a minor problem with Author's syntax... Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Francisco H Tapia Sent: Thursday, April 01, 2004 12:41 PM To: dba-SQLServer at databaseadvisors.com Subject: [dba-SQLServer] Creating joins across multiple databases I'm including the latest article from Arthur Fuller on the Builder.com SQL Newsletter because I hope it can bring forward some positive discussion. Plus I'm sure many of us have dealt with this particular situation or will deal with it in the future. //* Creating joins across multiple databases* Enterprise databases often comprise several databases--one from production, another from marketing, and so on. All of the databases rely on a certain amount of common data, which is frequently copied to each database that needs it. However, this copying routine creates a new problem: skew. Where there is duplication, there is at least the opportunity for skew. The solution to this problem is often replication, or scheduled jobs that update each copy of the common data from one "master" database. This approach works, but sometimes a better method is to move all the common data into one database, and then access it as needed from the other databases. This eliminates both the skew and the replication jobs. This approach typically requires joining some local tables to the common tables. For example, suppose you have two databases: Common and Sales. The Customers table resides in the Common database, while the Orders table resides in the Sales database. You want to create a query that lists the Customer information along with the Order information. How do you join these two tables? The answer lies in prefixes. SQL Server uses a dot-delimited nomenclature that extends outward to the database and the server. To specify a column in a table in another database, name the other database: SELECT CustomerID FROM Common.Customers To join a table from the Common database to a table in the current (Sales) database, use this same nomenclature: SELECT * FROM Common.Customers INNER JOIN Orders ON Common.Customers.CustomerID = Orders.CustomerID Not every organization's application domain requires multiple databases. If your organization does require multiple databases, it's easy to create joins across databases. /Arthur Fuller has been developing database applications for more than 20 years. He frequently works with Access ADPs, Microsoft SQL 2000, MySQL, and .NET./ // Yes it is easy enough to join accross multiple databases and even accross several Sql Server linked servers :) (very cool)... however my concern and one that was not addressed in this article is the security aspect of it... say you just have a user who calls the report... does the user need to use an application who's using an application role and thus gets better than normal priviladges on the server? I have not been successful in adding new users to another database w/o also having to takes some hard steps; my solution was to ... Create VIEWS on the target database... add the user to that 2nd database, then give explicit selet crights on the views and then join accross from db2 to db1 via the sproc using the views instead of the tables... so while the data is not duplicated, the user is, and now has rights to base views that represent tables :( , so because I think I might be doing this wrong.. I'm hoping Arthur or someone else will chime in with a few clues :) Thanks, -- -Francisco _______________________________________________ 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 Tue Apr 6 01:43:17 2004 From: artful at rogers.com (Arthur Fuller) Date: Mon, 5 Apr 2004 23:43:17 -0700 Subject: [dba-SQLServer] Creating joins across multiple databases In-Reply-To: <406C82D7.3090301@verizon.net> Message-ID: <001e01c41ba2$72970bd0$6501a8c0@rock> Thanks for the vote of confidence, Francisco, but Robert is quite right. Somehow in my copy/paste operation I screwed it up. All the egg belongs on my face. Meanwhile I'm giving some thought to Robert's objections to the strategy of "related" dbs (which I freely admit I wouldn't do if the choice were always mine, but sometimes it isn't). Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Francisco H Tapia Sent: Thursday, April 01, 2004 1:00 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Creating joins across multiple databases Knowing Arthur, i'm sure that was a publisher's err, not an author err, from posting to HTML... Djabarov, Robert said the following on 4/1/2004 12:43 PM: >...He's consistently missing schema owner...Just an observation ;) > >Robert Djabarov >SQL Server & UDB >Sr. SQL Server Administrator >Phone: (210) 913-3148 >Pager: (210) 753-3148 >9800 Fredericksburg Rd. San Antonio, TX 78288 >www.usaa.com > > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of >Francisco H Tapia >Sent: Thursday, April 01, 2004 2:41 PM >To: dba-sqlserver at databaseadvisors.com >Subject: Re: [dba-SQLServer] Creating joins across multiple databases > > >copy paste... >Djabarov, Robert said the following on 4/1/2004 10:51 AM: > > > >>Based on what I've seen so far, it's not a good idea to do cross-db >>joins, and not only because of security issues as Francisco mentions, >>but also because of questions like "Who the heck is this guy and what >>is he doing in my swamp?" which immediately start popping up, which >>leads to finger-pointing when there is a slow-down or outage. It also >>violates database designation (DSS, OLTP) when it's OLTP for a native >>user while becoming a DSS for the new-comer. >> >>BTW, Francisco, did you copy the article or retyped it? If you copied >>it, I see a minor problem with Author's syntax... >> >> >>Robert Djabarov >>SQL Server & UDB >>Sr. SQL Server Administrator >>Phone: (210) 913-3148 >>Pager: (210) 753-3148 >>9800 Fredericksburg Rd. San Antonio, TX 78288 >>www.usaa.com >> >>-----Original Message----- >>From: dba-sqlserver-bounces at databaseadvisors.com >>[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of >>Francisco H Tapia >>Sent: Thursday, April 01, 2004 12:41 PM >>To: dba-SQLServer at databaseadvisors.com >>Subject: [dba-SQLServer] Creating joins across multiple databases >> >>I'm including the latest article from Arthur Fuller on the Builder.com >>SQL Newsletter because I hope it can bring forward some positive >>discussion. Plus I'm sure many of us have dealt with this particular >>situation or will deal with it in the future. >> >>//* >>Creating joins across multiple databases* >> >>Enterprise databases often comprise several databases--one from >>production, another from marketing, and so on. All of the databases >> >> >rely > > >>on a certain amount of common data, which is frequently copied to each >>database that needs it. >> >>However, this copying routine creates a new problem: skew. Where there >>is duplication, there is at least the opportunity for skew. The >> >> >solution > > >>to this problem is often replication, or scheduled jobs that update >>each >> >>copy of the common data from one "master" database. This approach >>works, >> >>but sometimes a better method is to move all the common data into one >>database, and then access it as needed from the other databases. This >>eliminates both the skew and the replication jobs. >> >>This approach typically requires joining some local tables to the >>common >> >>tables. For example, suppose you have two databases: Common and Sales. >>The Customers table resides in the Common database, while the Orders >>table resides in the Sales database. You want to create a query that >>lists the Customer information along with the Order information. How >>do >> >> > > > >>you join these two tables? The answer lies in prefixes. >> >>SQL Server uses a dot-delimited nomenclature that extends outward to >>the >> >>database and the server. To specify a column in a table in another >>database, name the other database: >> >>SELECT CustomerID FROM Common.Customers >> >>To join a table from the Common database to a table in the current >>(Sales) database, use this same nomenclature: >> >>SELECT * FROM Common.Customers >>INNER JOIN Orders >>ON Common.Customers.CustomerID = Orders.CustomerID >> >>Not every organization's application domain requires multiple >>databases. >> >>If your organization does require multiple databases, it's easy to >>create joins across databases. >> >>/Arthur Fuller has been developing database applications for more than >>20 years. He frequently works with Access ADPs, Microsoft SQL 2000, >>MySQL, and .NET./ // >> >>Yes it is easy enough to join accross multiple databases and even >>accross several Sql Server linked servers :) (very cool)... however >> >> >my > > >>concern and one that was not addressed in this article is the security >>aspect of it... say you just have a user who calls the report... does >>the user need to use an application who's using an application role >>and >> >> > > > >>thus gets better than normal priviladges on the server? I have not >> >> >been > > >>successful in adding new users to another database w/o also having to >>takes some hard steps; my solution was to ... Create VIEWS on the >> >> >target > > >>database... add the user to that 2nd database, then give explicit >>selet crights on the views and then join accross from db2 to db1 via >>the >> >> >sproc > > >>using the views instead of the tables... so while the data is not >>duplicated, the user is, and now has rights to base views that >> >> >represent > > >>tables :( , so because I think I might be doing this wrong.. I'm >>hoping Arthur or someone else will chime in with a few clues :) >> >>Thanks, >> >> >> >> >> > > > > -- -Francisco _______________________________________________ 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 Tue Apr 6 01:45:33 2004 From: artful at rogers.com (Arthur Fuller) Date: Mon, 5 Apr 2004 23:45:33 -0700 Subject: [dba-SQLServer] Creating joins across multiple databases In-Reply-To: <406C82D7.3090301@verizon.net> Message-ID: <001f01c41ba2$c328a810$6501a8c0@rock> Thanks for the vote of confidence, Francisco, but Robert is quite right. Somehow in my copy/paste operation I screwed it up. All the egg belongs on my face. Meanwhile I'm giving some thought to Robert's objections to the strategy of "related" dbs (which I freely admit I wouldn't do if the choice were always mine, but sometimes it isn't). Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Francisco H Tapia Sent: Thursday, April 01, 2004 1:00 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Creating joins across multiple databases Knowing Arthur, i'm sure that was a publisher's err, not an author err, from posting to HTML... Djabarov, Robert said the following on 4/1/2004 12:43 PM: >...He's consistently missing schema owner...Just an observation ;) > >Robert Djabarov >SQL Server & UDB >Sr. SQL Server Administrator >Phone: (210) 913-3148 >Pager: (210) 753-3148 >9800 Fredericksburg Rd. San Antonio, TX 78288 >www.usaa.com > > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of >Francisco H Tapia >Sent: Thursday, April 01, 2004 2:41 PM >To: dba-sqlserver at databaseadvisors.com >Subject: Re: [dba-SQLServer] Creating joins across multiple databases > > >copy paste... >Djabarov, Robert said the following on 4/1/2004 10:51 AM: > > > >>Based on what I've seen so far, it's not a good idea to do cross-db >>joins, and not only because of security issues as Francisco mentions, >>but also because of questions like "Who the heck is this guy and what >>is he doing in my swamp?" which immediately start popping up, which >>leads to finger-pointing when there is a slow-down or outage. It also >>violates database designation (DSS, OLTP) when it's OLTP for a native >>user while becoming a DSS for the new-comer. >> >>BTW, Francisco, did you copy the article or retyped it? If you copied >>it, I see a minor problem with Author's syntax... >> >> >>Robert Djabarov >>SQL Server & UDB >>Sr. SQL Server Administrator >>Phone: (210) 913-3148 >>Pager: (210) 753-3148 >>9800 Fredericksburg Rd. San Antonio, TX 78288 >>www.usaa.com >> >>-----Original Message----- >>From: dba-sqlserver-bounces at databaseadvisors.com >>[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of >>Francisco H Tapia >>Sent: Thursday, April 01, 2004 12:41 PM >>To: dba-SQLServer at databaseadvisors.com >>Subject: [dba-SQLServer] Creating joins across multiple databases >> >>I'm including the latest article from Arthur Fuller on the Builder.com >>SQL Newsletter because I hope it can bring forward some positive >>discussion. Plus I'm sure many of us have dealt with this particular >>situation or will deal with it in the future. >> >>//* >>Creating joins across multiple databases* >> >>Enterprise databases often comprise several databases--one from >>production, another from marketing, and so on. All of the databases >> >> >rely > > >>on a certain amount of common data, which is frequently copied to each >>database that needs it. >> >>However, this copying routine creates a new problem: skew. Where there >>is duplication, there is at least the opportunity for skew. The >> >> >solution > > >>to this problem is often replication, or scheduled jobs that update >>each >> >>copy of the common data from one "master" database. This approach >>works, >> >>but sometimes a better method is to move all the common data into one >>database, and then access it as needed from the other databases. This >>eliminates both the skew and the replication jobs. >> >>This approach typically requires joining some local tables to the >>common >> >>tables. For example, suppose you have two databases: Common and Sales. >>The Customers table resides in the Common database, while the Orders >>table resides in the Sales database. You want to create a query that >>lists the Customer information along with the Order information. How >>do >> >> > > > >>you join these two tables? The answer lies in prefixes. >> >>SQL Server uses a dot-delimited nomenclature that extends outward to >>the >> >>database and the server. To specify a column in a table in another >>database, name the other database: >> >>SELECT CustomerID FROM Common.Customers >> >>To join a table from the Common database to a table in the current >>(Sales) database, use this same nomenclature: >> >>SELECT * FROM Common.Customers >>INNER JOIN Orders >>ON Common.Customers.CustomerID = Orders.CustomerID >> >>Not every organization's application domain requires multiple >>databases. >> >>If your organization does require multiple databases, it's easy to >>create joins across databases. >> >>/Arthur Fuller has been developing database applications for more than >>20 years. He frequently works with Access ADPs, Microsoft SQL 2000, >>MySQL, and .NET./ // >> >>Yes it is easy enough to join accross multiple databases and even >>accross several Sql Server linked servers :) (very cool)... however >> >> >my > > >>concern and one that was not addressed in this article is the security >>aspect of it... say you just have a user who calls the report... does >>the user need to use an application who's using an application role >>and >> >> > > > >>thus gets better than normal priviladges on the server? I have not >> >> >been > > >>successful in adding new users to another database w/o also having to >>takes some hard steps; my solution was to ... Create VIEWS on the >> >> >target > > >>database... add the user to that 2nd database, then give explicit >>selet crights on the views and then join accross from db2 to db1 via >>the >> >> >sproc > > >>using the views instead of the tables... so while the data is not >>duplicated, the user is, and now has rights to base views that >> >> >represent > > >>tables :( , so because I think I might be doing this wrong.. I'm >>hoping Arthur or someone else will chime in with a few clues :) >> >>Thanks, >> >> >> >> >> > > > > -- -Francisco _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From mwp.reid at qub.ac.uk Thu Apr 8 14:24:03 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Thu, 8 Apr 2004 20:24:03 +0100 Subject: [dba-SQLServer] OLEDB References: <406C3B29.1522.5EAF1C@localhost> Message-ID: <001801c41d9f$84a025b0$1b02a8c0@MARTINREID> You have moved your databases up to SQL Server. What would you use for the front end connection, for example would you change to OLEDB?? Martin From my.lists at verizon.net Thu Apr 8 15:09:48 2004 From: my.lists at verizon.net (Francisco H Tapia) Date: Thu, 08 Apr 2004 13:09:48 -0700 Subject: [dba-SQLServer] OLEDB In-Reply-To: <001801c41d9f$84a025b0$1b02a8c0@MARTINREID> References: <406C3B29.1522.5EAF1C@localhost> <001801c41d9f$84a025b0$1b02a8c0@MARTINREID> Message-ID: <4075B18C.1070400@verizon.net> Martin Reid said the following on 4/8/2004 12:24 PM: >You have moved your databases up to SQL Server. What would you use for the >front end connection, for example would you change to OLEDB?? > > hmmm... I'm gonna refer you to a good book :)... it's called From Access to Sql Server from Ruselle Sinclair. ;o) As I understand it OLEDB is the connectivity of choice for Sql Server. It certainly is easier and more clearer in coding practice. I don't anticicpate any benefits by choosing ODBC connectivity. -- -Francisco From mikedorism at adelphia.net Thu Apr 8 15:10:34 2004 From: mikedorism at adelphia.net (Mike & Doris Manning) Date: Thu, 8 Apr 2004 16:10:34 -0400 Subject: [dba-SQLServer] OLEDB In-Reply-To: <001801c41d9f$84a025b0$1b02a8c0@MARTINREID> Message-ID: <000001c41da5$8d13c930$ed194244@hargrove.internal> Access ADP or VB.Net with SQL Server drivers Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin Reid Sent: Thursday, April 08, 2004 3:24 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] OLEDB You have moved your databases up to SQL Server. What would you use for the front end connection, for example would you change to OLEDB?? Martin _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From mwp.reid at qub.ac.uk Thu Apr 8 15:31:57 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Thu, 8 Apr 2004 21:31:57 +0100 Subject: [dba-SQLServer] OLEDB References: <000001c41da5$8d13c930$ed194244@hargrove.internal> Message-ID: <001901c41da8$8b11b040$1b02a8c0@MARTINREID> ADP But what if it was a straight forward linked table solution?? Just looking for opinion? MArtin ----- Original Message ----- From: "Mike & Doris Manning" To: Sent: Thursday, April 08, 2004 9:10 PM Subject: RE: [dba-SQLServer] OLEDB > Access ADP or VB.Net with SQL Server drivers > > Doris Manning > Database Administrator > Hargrove Inc. > www.hargroveinc.com > > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin Reid > Sent: Thursday, April 08, 2004 3:24 PM > To: dba-sqlserver at databaseadvisors.com > Subject: [dba-SQLServer] OLEDB > > > You have moved your databases up to SQL Server. What would you use for the > front end connection, for example would you change to OLEDB?? > > > Martin > > _______________________________________________ > 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 mwp.reid at qub.ac.uk Thu Apr 8 15:38:11 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Thu, 8 Apr 2004 21:38:11 +0100 Subject: [dba-SQLServer] OLEDB References: <406C3B29.1522.5EAF1C@localhost><001801c41d9f$84a025b0$1b02a8c0@MARTINREID> <4075B18C.1070400@verizon.net> Message-ID: <003301c41da9$696e95b0$1b02a8c0@MARTINREID> Have it. LOL he was the technical on one of ours as well. (<: I am doing some work for a company and am really interested in opinions from developers on various topics to do with moving from Access to SQL Server. This company are currently putting a lot of focus on that particular subject and I mean a lot of focus on how to do it, how to manage the process etc Seems to be a big topic there at the moment for whatever reason. >From my side I am looking at management and change issues involved in the process of moving up perhpas an entire companys Access database load over to SQL Server. ie. You have moved to SQL Server now what do you do? Martin ----- Original Message ----- From: "Francisco H Tapia" To: Sent: Thursday, April 08, 2004 9:09 PM Subject: Re: [dba-SQLServer] OLEDB > Martin Reid said the following on 4/8/2004 12:24 PM: > > >You have moved your databases up to SQL Server. What would you use for the > >front end connection, for example would you change to OLEDB?? > > > > > hmmm... I'm gonna refer you to a good book :)... it's called From Access > to Sql Server from Ruselle Sinclair. ;o) > > As I understand it OLEDB is the connectivity of choice for Sql Server. > It certainly is easier and more clearer in coding practice. > I don't anticicpate any benefits by choosing ODBC connectivity. > > -- > -Francisco > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From my.lists at verizon.net Thu Apr 8 16:01:29 2004 From: my.lists at verizon.net (Francisco H Tapia) Date: Thu, 08 Apr 2004 14:01:29 -0700 Subject: [dba-SQLServer] OLEDB In-Reply-To: <001901c41da8$8b11b040$1b02a8c0@MARTINREID> References: <000001c41da5$8d13c930$ed194244@hargrove.internal> <001901c41da8$8b11b040$1b02a8c0@MARTINREID> Message-ID: <4075BDA9.8010502@verizon.net> Until recently (and I havent used them) VB.net had the limitation that it has no reporting resource except for the Crystal8 that comes w/ it and it's my opinion that it's pretty crappy. However now there's reporting services for Sql Server 2000 and if you have the Sql Server license then the reporting services is free(AFAIK). Access for me at least continues to be the best bang for the buck in the sense that you have a gui/reporting tool all in one. But fwiw, Acess still has some minor quirks in the way it likes to handel connectivity. I'm looking to upgrade to Access 2003, have the disc and all but am worried to install it on this pc because of what it might mean in terms of breaking things... will Access 2000 still work? Charlolette posted a cool upgrade tool called evolution, that could upgrade your Access fe to VB.net... it's 80 bucks and if it really worked, I'd LOVE to buy it.but I digress. SqlServer developers may be fine w/ having a linked table solution or some manner in which the tables are exposed. This leads to sloppy front ends. You are really not leveraging the power of SqlServer because you won't be using sprocs. However any hired Sql DBA may not even want the job when he finds out the base tables are exposed. The rule of thumb, you keep the users out of the tables. You provide the developers w/ Views and sprocs. That's the only way at getting at the tables... and it does make it for more work as now you have to not only port the tables, but also the queries and in many ways the method in which you "think" about a query since now most if not all of the work is passed on to SqlServer. Martin Reid said the following on 4/8/2004 1:31 PM: >ADP > >But what if it was a straight forward linked table solution?? > >Just looking for opinion? > >MArtin > > >----- Original Message ----- >From: "Mike & Doris Manning" >To: >Sent: Thursday, April 08, 2004 9:10 PM >Subject: RE: [dba-SQLServer] OLEDB > > > > >>Access ADP or VB.Net with SQL Server drivers >> >>Doris Manning >>Database Administrator >>Hargrove Inc. >>www.hargroveinc.com >> >> >>-----Original Message----- >>From: dba-sqlserver-bounces at databaseadvisors.com >>[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin >> >> >Reid > > >>Sent: Thursday, April 08, 2004 3:24 PM >>To: dba-sqlserver at databaseadvisors.com >>Subject: [dba-SQLServer] OLEDB >> >> >>You have moved your databases up to SQL Server. What would you use for the >>front end connection, for example would you change to OLEDB?? >> >> >> -- -Francisco From Robert.Djabarov at usaa.com Thu Apr 8 16:39:04 2004 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Thu, 8 Apr 2004 16:39:04 -0500 Subject: [dba-SQLServer] OLEDB Message-ID: <6B1FEFC06BC3474B8721FDAA8366810D08C9A6F9@ex04.eagle.usaa.com> SQL+VB/VB.net+ActiveReports Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Francisco H Tapia Sent: Thursday, April 08, 2004 4:01 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] OLEDB Until recently (and I havent used them) VB.net had the limitation that it has no reporting resource except for the Crystal8 that comes w/ it and it's my opinion that it's pretty crappy. However now there's reporting services for Sql Server 2000 and if you have the Sql Server license then the reporting services is free(AFAIK). Access for me at least continues to be the best bang for the buck in the sense that you have a gui/reporting tool all in one. But fwiw, Acess still has some minor quirks in the way it likes to handel connectivity. I'm looking to upgrade to Access 2003, have the disc and all but am worried to install it on this pc because of what it might mean in terms of breaking things... will Access 2000 still work? Charlolette posted a cool upgrade tool called evolution, that could upgrade your Access fe to VB.net... it's 80 bucks and if it really worked, I'd LOVE to buy it.but I digress. SqlServer developers may be fine w/ having a linked table solution or some manner in which the tables are exposed. This leads to sloppy front ends. You are really not leveraging the power of SqlServer because you won't be using sprocs. However any hired Sql DBA may not even want the job when he finds out the base tables are exposed. The rule of thumb, you keep the users out of the tables. You provide the developers w/ Views and sprocs. That's the only way at getting at the tables... and it does make it for more work as now you have to not only port the tables, but also the queries and in many ways the method in which you "think" about a query since now most if not all of the work is passed on to SqlServer. Martin Reid said the following on 4/8/2004 1:31 PM: >ADP > >But what if it was a straight forward linked table solution?? > >Just looking for opinion? > >MArtin > > >----- Original Message ----- >From: "Mike & Doris Manning" >To: >Sent: Thursday, April 08, 2004 9:10 PM >Subject: RE: [dba-SQLServer] OLEDB > > > > >>Access ADP or VB.Net with SQL Server drivers >> >>Doris Manning >>Database Administrator >>Hargrove Inc. >>www.hargroveinc.com >> >> >>-----Original Message----- >>From: dba-sqlserver-bounces at databaseadvisors.com >>[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin >> >> >Reid > > >>Sent: Thursday, April 08, 2004 3:24 PM >>To: dba-sqlserver at databaseadvisors.com >>Subject: [dba-SQLServer] OLEDB >> >> >>You have moved your databases up to SQL Server. What would you use for the >>front end connection, for example would you change to OLEDB?? >> >> >> -- -Francisco _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From ebarro at afsweb.com Thu Apr 8 16:56:05 2004 From: ebarro at afsweb.com (Eric Barro) Date: Thu, 8 Apr 2004 14:56:05 -0700 Subject: [dba-SQLServer] passing IN search condition to stored procedure In-Reply-To: <6B1FEFC06BC3474B8721FDAA8366810D08C9A6F9@ex04.eagle.usaa.com> Message-ID: Greetings SQL gurus! I have a .NET page that declares parameters for passing to a stored procedure with the code fragment... myCommand.CommandType = CommandType.StoredProcedure myCommand.Parameters.Add(New SqlParameter("@CustCode", SqlDbType.varchar, 255)).Value = strCustCode On the stored procedure I have this... SELECT * FROM table WHERE [CustCode] IN (@CustCode) with @CustCode defined as a parameter. I can't get it to work...has anyone passed a bunch of values to a stored proc with an IN search condition and gotten it to work? strCustCode would be equal to ('CUST01', 'CUST02', 'CUST03') --- Eric Barro Senior Systems Analyst Advanced Field Services (208) 772-7060 http://www.afsweb.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.655 / Virus Database: 420 - Release Date: 4/8/2004 From Robert.Djabarov at usaa.com Thu Apr 8 17:25:27 2004 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Thu, 8 Apr 2004 17:25:27 -0500 Subject: [dba-SQLServer] passing IN search condition to stored procedure Message-ID: <6B1FEFC06BC3474B8721FDAA8366810D08C9A6FB@ex04.eagle.usaa.com> You can use this function: create function dbo.fn_ParseString2VarCharTable ( @string varchar(8000) ) returns @tbl table ( RecordID int identity(1,1) not null primary key clustered, [String] varchar(8000) not null ) as begin declare @spos int, @pos int set @string = replace(replace(@string, ', ', ','), ' ,', ',') set @spos = 1 set @pos = 100 while (@pos) > 0 begin set @pos = charindex(',', @string, @spos) insert @tbl ([String]) select ltrim ( rtrim ( substring ( @string, @spos, case when (@pos - @spos) <= 0 then datalength(@string) + 1 else @pos end - @spos ) ) ) set @spos = @pos + 1 end return end GO Then you'd do a join instead of IN: SELECT * FROM table t inner join dbo.fn_ParseString2VarCharTable(@CustCode) f on [CustCode] = f.[String] Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Eric Barro Sent: Thursday, April 08, 2004 4:56 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] passing IN search condition to stored procedure Greetings SQL gurus! I have a .NET page that declares parameters for passing to a stored procedure with the code fragment... myCommand.CommandType = CommandType.StoredProcedure myCommand.Parameters.Add(New SqlParameter("@CustCode", SqlDbType.varchar, 255)).Value = strCustCode On the stored procedure I have this... SELECT * FROM table WHERE [CustCode] IN (@CustCode) with @CustCode defined as a parameter. I can't get it to work...has anyone passed a bunch of values to a stored proc with an IN search condition and gotten it to work? strCustCode would be equal to ('CUST01', 'CUST02', 'CUST03') --- Eric Barro Senior Systems Analyst Advanced Field Services (208) 772-7060 http://www.afsweb.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.655 / Virus Database: 420 - Release Date: 4/8/2004 _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From martyconnelly at shaw.ca Fri Apr 9 00:01:43 2004 From: martyconnelly at shaw.ca (MartyConnelly) Date: Thu, 08 Apr 2004 22:01:43 -0700 Subject: [dba-SQLServer] OLEDB References: <406C3B29.1522.5EAF1C@localhost> <001801c41d9f$84a025b0$1b02a8c0@MARTINREID> <4075B18C.1070400@verizon.net> <003301c41da9$696e95b0$1b02a8c0@MARTINREID> Message-ID: <40762E37.7010707@shaw.ca> I would work out and test proper backup and restores for that many databases. You will probably need some data dictionaries. Check your security for logon and SQL Injection attacks especially if you are exposing anything to the Net. Microsoft is running some training seminars on this, for the next couple of months, mostly for ASP.Net and VB.Net. 1. SQL Injection http://www.spidynamics.com/papers/SQLInjectionWhitePaper.pdf 2. Cross Site Scripting FAQ http://www.cgisecurity.com/articles/xss-faq.shtml 3. The Snort IDS http://www.snort.org 4. Advanced SQL Injection http://www.nextgenss.com/papers/advanced_sql_injection.pdf 5. SQL INjection http://www.securityfocus.com/infocus/1768#ref1 6. Secure Programming HOWTO, David Wheeler www.dwheeler.com 7. Threats and Countermeasures, MSDN, Microsoft http://msdn.microsoft.com Martin Reid wrote: >Have it. LOL he was the technical on one of ours as well. (<: > >I am doing some work for a company and am really interested in opinions from >developers on various topics to do with moving from Access to SQL Server. >This company are currently putting a lot of focus on that particular subject >and I mean a lot of focus on how to do it, how to manage the process etc >Seems to be a big topic there at the moment for whatever reason. > >>From my side I am looking at management and change issues involved in the >process of moving up perhpas an entire companys Access database load over to >SQL Server. ie. You have moved to SQL > Server now what do you do? > >Martin > > > >----- Original Message ----- >From: "Francisco H Tapia" >To: >Sent: Thursday, April 08, 2004 9:09 PM >Subject: Re: [dba-SQLServer] OLEDB > > > > >>Martin Reid said the following on 4/8/2004 12:24 PM: >> >> >> >>>You have moved your databases up to SQL Server. What would you use for >>> >>> >the > > >>>front end connection, for example would you change to OLEDB?? >>> >>> >>> >>> >>hmmm... I'm gonna refer you to a good book :)... it's called From Access >>to Sql Server from Ruselle Sinclair. ;o) >> >>As I understand it OLEDB is the connectivity of choice for Sql Server. >>It certainly is easier and more clearer in coding practice. >>I don't anticicpate any benefits by choosing ODBC connectivity. >> >>-- >>-Francisco >> >> >>_______________________________________________ >>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 > > > > -- Marty Connelly Victoria, B.C. Canada From shamil-users at mns.ru Sat Apr 10 15:48:26 2004 From: shamil-users at mns.ru (Shamil Salakhetdinov) Date: Sun, 11 Apr 2004 00:48:26 +0400 Subject: [dba-SQLServer] OLEDB References: <406C3B29.1522.5EAF1C@localhost> <001801c41d9f$84a025b0$1b02a8c0@MARTINREID> Message-ID: <003201c41f3d$2edd07c0$0201a8c0@PARIS> C#/VB.NET + System.Windows.Forms + System.Data + System.Data.SqlClient - they all together are as RAD as MS Access or even more IMO (pun intended)... (Managed)C++ & OLE DB (ATL OLE DB) - this is the most flexible and speedy solution... (And in VS.NET 2003 WinForms are available for C++ programmers)... As for SQL Injection and other related topics - .NET Framework/CLR have multi-level/multi-purpose and very strong security model, which, when properly used and activated, disallow to run any malicious code/stop any attacks.... Shamil From: "Martin Reid" To: Sent: Thursday, April 08, 2004 11:24 PM Subject: [dba-SQLServer] OLEDB > You have moved your databases up to SQL Server. What would you use for the > front end connection, for example would you change to OLEDB?? > > > Martin > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > From mwp.reid at qub.ac.uk Thu Apr 15 04:28:36 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Thu, 15 Apr 2004 10:28:36 +0100 Subject: [dba-SQLServer] Transferring Objects References: <6B1FEFC06BC3474B8721FDAA8366810D08C9A6FB@ex04.eagle.usaa.com> Message-ID: <000b01c422cc$08c334a0$1b02a8c0@MARTINREID> What would be the best way to copy all the stored procedures from one SQL Server database to another?? Martin From paul.hartland at fsmail.net Thu Apr 15 04:36:29 2004 From: paul.hartland at fsmail.net (paul.hartland at fsmail.net) Date: Thu, 15 Apr 2004 11:36:29 +0200 (CEST) Subject: [dba-SQLServer] Transferring Objects Message-ID: <10117894.1082021789306.JavaMail.www@wwinf3004> Martin, Use the Import Wizard, there's an option as you run through the wizard for transferring objects, then that takes you onto another screen where you select the object types you want to import etc and then just select the ones you want. Paul Message date : Apr 15 2004, 10:29 AM >From : "Martin Reid" To : dba-sqlserver at databaseadvisors.com Copy to : Subject : [dba-SQLServer] Transferring Objects What would be the best way to copy all the stored procedures from one SQL Server database to another?? Martin _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com Join the UK's number one for the internet www.freeserve.com/time From mwp.reid at qub.ac.uk Thu Apr 15 04:38:19 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Thu, 15 Apr 2004 10:38:19 +0100 Subject: [dba-SQLServer] Transferring Objects References: <10117894.1082021789306.JavaMail.www@wwinf3004> Message-ID: <001a01c422cd$634eb880$1b02a8c0@MARTINREID> Thanks Paul. Martin ----- Original Message ----- From: To: Sent: Thursday, April 15, 2004 10:36 AM Subject: Re: [dba-SQLServer] Transferring Objects > Martin, > Use the Import Wizard, there's an option as you run through the wizard for transferring objects, then that takes you onto another screen where you select the object types you want to import etc and then just select the ones you want. > Paul > > > > > > Message date : Apr 15 2004, 10:29 AM > >From : "Martin Reid" > To : dba-sqlserver at databaseadvisors.com > Copy to : > Subject : [dba-SQLServer] Transferring Objects > What would be the best way to copy all the stored procedures from one SQL > Server database to another?? > > > Martin > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > Join the UK's number one for the internet > www.freeserve.com/time > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From mwp.reid at qub.ac.uk Thu Apr 15 07:20:34 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Thu, 15 Apr 2004 13:20:34 +0100 Subject: [dba-SQLServer] OT Ignore References: <000001c41da5$8d13c930$ed194244@hargrove.internal><001901c41da8$8b11b040$1b02a8c0@MARTINREID> <4075BDA9.8010502@verizon.net> Message-ID: <000d01c422e4$0ec054b0$1b02a8c0@MARTINREID> From michael.broesdorf at web.de Mon Apr 19 04:38:51 2004 From: michael.broesdorf at web.de (=?iso-8859-1?Q?Michael_Br=F6sdorf?=) Date: Mon, 19 Apr 2004 11:38:51 +0200 Subject: AW: [dba-SQLServer] OLEDB In-Reply-To: <001901c41da8$8b11b040$1b02a8c0@MARTINREID> Message-ID: A while ago I had to migrate an Access db to SQL-Server. The Frontend is still Access, with linked ODBC tables. So far it runs pretty good! We didn't migrate to an ADP since the app contained a lot of reports with a complex query structure. Using linked tables we didn't have to rewrite the whole thing, although a lot of recoding had to be done anyway... Michael -----Urspr?ngliche Nachricht----- Von: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]Im Auftrag von Martin Reid Gesendet: Donnerstag, 8. April 2004 22:32 An: dba-sqlserver at databaseadvisors.com Betreff: Re: [dba-SQLServer] OLEDB ADP But what if it was a straight forward linked table solution?? Just looking for opinion? MArtin ----- Original Message ----- From: "Mike & Doris Manning" To: Sent: Thursday, April 08, 2004 9:10 PM Subject: RE: [dba-SQLServer] OLEDB > Access ADP or VB.Net with SQL Server drivers > > Doris Manning > Database Administrator > Hargrove Inc. > www.hargroveinc.com > > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Martin Reid > Sent: Thursday, April 08, 2004 3:24 PM > To: dba-sqlserver at databaseadvisors.com > Subject: [dba-SQLServer] OLEDB > > > You have moved your databases up to SQL Server. What would you use for the > front end connection, for example would you change to OLEDB?? > > > Martin > > _______________________________________________ > 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 michael.broesdorf at web.de Mon Apr 19 04:47:16 2004 From: michael.broesdorf at web.de (=?iso-8859-1?Q?Michael_Br=F6sdorf?=) Date: Mon, 19 Apr 2004 11:47:16 +0200 Subject: AW: [dba-SQLServer] OLEDB In-Reply-To: <003201c41f3d$2edd07c0$0201a8c0@PARIS> Message-ID: Shamil, what would you recommend for reporting in such an environment? Michael -----Urspr?ngliche Nachricht----- Von: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]Im Auftrag von Shamil Salakhetdinov Gesendet: Samstag, 10. April 2004 22:48 An: dba-SQLServer Betreff: Re: [dba-SQLServer] OLEDB C#/VB.NET + System.Windows.Forms + System.Data + System.Data.SqlClient - they all together are as RAD as MS Access or even more IMO (pun intended)... (Managed)C++ & OLE DB (ATL OLE DB) - this is the most flexible and speedy solution... (And in VS.NET 2003 WinForms are available for C++ programmers)... As for SQL Injection and other related topics - .NET Framework/CLR have multi-level/multi-purpose and very strong security model, which, when properly used and activated, disallow to run any malicious code/stop any attacks.... Shamil From: "Martin Reid" To: Sent: Thursday, April 08, 2004 11:24 PM Subject: [dba-SQLServer] OLEDB > You have moved your databases up to SQL Server. What would you use for the > front end connection, for example would you change to OLEDB?? > > > Martin > > _______________________________________________ > 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 Jeff at OUTBAKTech.com Mon Apr 19 06:55:37 2004 From: Jeff at OUTBAKTech.com (Jeff Barrows) Date: Mon, 19 Apr 2004 06:55:37 -0500 Subject: [dba-SQLServer] What am I forgetting? - SQL Permissions Message-ID: <8DA8776D2F418E46A2A464AC6CE6305092E4@outbaksrv1.outbaktech.com> First of all, I am an SQL Novice, just kind of feeling my way thru things. I have just recently set up my SQL Server 2000, and tried to run an Access 2002 database against the SQL tables. Links are fine, I can view all the data, but I cannot remember where I adjust the settings to allow me to add or delete from the tables. I am suffering from a severe case of brain dead / spring fever (it was in the mid 80's here today) TIA Jeff Barrows Outbak Technologies, LLC Racine, WI www.outbaktech.com From mikedorism at adelphia.net Mon Apr 19 08:17:43 2004 From: mikedorism at adelphia.net (Mike & Doris Manning) Date: Mon, 19 Apr 2004 09:17:43 -0400 Subject: [dba-SQLServer] What am I forgetting? - SQL Permissions In-Reply-To: <8DA8776D2F418E46A2A464AC6CE6305092E4@outbaksrv1.outbaktech.com> Message-ID: <000001c42610$b2fdb480$190ba845@hargrove.internal> 1) Right click on the name of any table, sproc, or view. 2) Choose "All Tasks" 3) Choose "Manage Permissions" As a general rule, you should not allow users access to the tables themselves. Inserts, Updates, and Deletions should all be handled through sprocs and views. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Jeff Barrows Sent: Monday, April 19, 2004 7:56 AM To: Dba-SQL Subject: [dba-SQLServer] What am I forgetting? - SQL Permissions First of all, I am an SQL Novice, just kind of feeling my way thru things. I have just recently set up my SQL Server 2000, and tried to run an Access 2002 database against the SQL tables. Links are fine, I can view all the data, but I cannot remember where I adjust the settings to allow me to add or delete from the tables. I am suffering from a severe case of brain dead / spring fever (it was in the mid 80's here today) TIA Jeff Barrows Outbak Technologies, LLC Racine, WI www.outbaktech.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From Robert.Djabarov at usaa.com Mon Apr 19 09:50:55 2004 From: Robert.Djabarov at usaa.com (Djabarov, Robert) Date: Mon, 19 Apr 2004 09:50:55 -0500 Subject: [dba-SQLServer] OLEDB Message-ID: <6B1FEFC06BC3474B8721FDAA8366810D08C9A71E@ex04.eagle.usaa.com> ActiveReports from www.DataDynamics.com Robert Djabarov SQL Server & UDB Sr. SQL Server Administrator Phone: (210) 913-3148 Pager: (210) 753-3148 9800 Fredericksburg Rd. San Antonio, TX 78288 www.usaa.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Michael Br?sdorf Sent: Monday, April 19, 2004 4:47 AM To: dba-sqlserver at databaseadvisors.com Subject: AW: [dba-SQLServer] OLEDB Shamil, what would you recommend for reporting in such an environment? Michael -----Urspr?ngliche Nachricht----- Von: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]Im Auftrag von Shamil Salakhetdinov Gesendet: Samstag, 10. April 2004 22:48 An: dba-SQLServer Betreff: Re: [dba-SQLServer] OLEDB C#/VB.NET + System.Windows.Forms + System.Data + System.Data.SqlClient - they all together are as RAD as MS Access or even more IMO (pun intended)... (Managed)C++ & OLE DB (ATL OLE DB) - this is the most flexible and speedy solution... (And in VS.NET 2003 WinForms are available for C++ programmers)... As for SQL Injection and other related topics - .NET Framework/CLR have multi-level/multi-purpose and very strong security model, which, when properly used and activated, disallow to run any malicious code/stop any attacks.... Shamil From: "Martin Reid" To: Sent: Thursday, April 08, 2004 11:24 PM Subject: [dba-SQLServer] OLEDB > You have moved your databases up to SQL Server. What would you use for the > front end connection, for example would you change to OLEDB?? > > > Martin > > _______________________________________________ > 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 shamil-users at mns.ru Mon Apr 19 15:17:33 2004 From: shamil-users at mns.ru (Shamil Salakhetdinov) Date: Tue, 20 Apr 2004 00:17:33 +0400 Subject: [dba-SQLServer] OLEDB References: Message-ID: <002201c4264b$5cc518c0$0201a8c0@PARIS> Michael, The company I work for now and where I use OLE DB with MSVC++ - they use Crystal Reports to make a lot of very advanced reports: they exploit to the max drill-down, multi pass reporting, multi-section etc. features of Crystal reports - the results are amazingly powerful, very informative and user-friendly reports... BTW, they use MS Access as a storage for their reports data - with production data being processed and stored in legacy Raima Data Manager DBMS... And using this architecture and Crystal Reports as reporting tool they are able to have one very advanced payroll application to work in desktop mode or in remote Web-Site based mode etc.... (Crystal Reports Server is very smart in Web-site based reports browsing...) I think that usage of OLE DB doesn't define what tool one will select to use as a reporting tool - so the reporting tool can be also ActiveReports and others... But OLE DB used from C++ results in lightning fast data manipulation procedures - e.g. I've here tested it and I've ~2000+ MS SQL 2000 stored procedures used to insert, update and delete data from several tables - all finished within 2 seconds... I think such results can't be obtained when ADO is used with VB/MS Access. But such speedy results can be obtained when one will use ADO.NET with C#/VB.NET and .NET Framework's System.Data.SqlClient namespace's SqLConnection, SqlTransaction, SqlCommand etc. objects - they may even be more speedy because as I've heard .NET uses native MS SQL 2000 data access (drivers) called (?) TDS - Table Data Stream: <<< Native APIs are low-level APIs implemented with providers or drivers that communicate directly to SQL Server using the Tabular Data Stream (TDS) protocol. They are relatively complex APIs, but offer the best performance because they have the least overhead. >>> (If anyone has any refs on articles about using TDS from (MSV)C++ they are very welcome to send them to me! :)) As for reporting in general - it looks like MS SQL 2000 Reporting Services is a coming killer technology for most of the currently existing reporting tools: http://www.microsoft.com/sql/reporting/default.asp And BTW, when reports aren't that complicated then using C#/VB.NET System.Drawing.Printing and System.Drawing.* objects are not the worst choice for custom reports.... Shamil ----- Original Message ----- From: "Michael Br?sdorf" To: Sent: Monday, April 19, 2004 1:47 PM Subject: AW: [dba-SQLServer] OLEDB > Shamil, what would you recommend for reporting in such an environment? > > Michael > > -----Urspr?ngliche Nachricht----- > Von: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com]Im Auftrag von Shamil > Salakhetdinov > Gesendet: Samstag, 10. April 2004 22:48 > An: dba-SQLServer > Betreff: Re: [dba-SQLServer] OLEDB > > > C#/VB.NET + System.Windows.Forms + System.Data + System.Data.SqlClient - > they all together are as RAD as MS Access or even more IMO (pun > intended)... > > (Managed)C++ & OLE DB (ATL OLE DB) - this is the most flexible and > speedy > solution... (And in VS.NET 2003 WinForms are available for C++ > programmers)... > > As for SQL Injection and other related topics - .NET Framework/CLR have > multi-level/multi-purpose and very strong security model, which, when > properly used and activated, disallow to run any malicious code/stop any > attacks.... > > Shamil > > > From: "Martin Reid" > To: > Sent: Thursday, April 08, 2004 11:24 PM > Subject: [dba-SQLServer] OLEDB > > > > You have moved your databases up to SQL Server. What would you use for > the > > front end connection, for example would you change to OLEDB?? > > > > > > Martin > > > > _______________________________________________ > > 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 accessd at shaw.ca Mon Apr 19 19:39:53 2004 From: accessd at shaw.ca (Jim Lawrence (AccessD)) Date: Mon, 19 Apr 2004 17:39:53 -0700 Subject: [dba-SQLServer] OLEDB In-Reply-To: <002201c4264b$5cc518c0$0201a8c0@PARIS> Message-ID: Hi Shamil: > I think such results can't be obtained when ADO is used with VB/MS Access. Just could not let this one pass. Actually the performance using ADO OLE combination is very fast in VB/MS Access. Performance levels of 50,000 plus records in 2 seconds but that is with the MS SQL BE. See http://www.databaseadvisors.com/newletters/newsletter112003/0311UnboundRepor ts.htm (watch for wrap). I think the performance is all in the BE. Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Shamil Salakhetdinov Sent: Monday, April 19, 2004 1:18 PM To: dba-SQLServer Subject: Re: [dba-SQLServer] OLEDB Michael, The company I work for now and where I use OLE DB with MSVC++ - they use Crystal Reports to make a lot of very advanced reports: they exploit to the max drill-down, multi pass reporting, multi-section etc. features of Crystal reports - the results are amazingly powerful, very informative and user-friendly reports... BTW, they use MS Access as a storage for their reports data - with production data being processed and stored in legacy Raima Data Manager DBMS... And using this architecture and Crystal Reports as reporting tool they are able to have one very advanced payroll application to work in desktop mode or in remote Web-Site based mode etc.... (Crystal Reports Server is very smart in Web-site based reports browsing...) I think that usage of OLE DB doesn't define what tool one will select to use as a reporting tool - so the reporting tool can be also ActiveReports and others... But OLE DB used from C++ results in lightning fast data manipulation procedures - e.g. I've here tested it and I've ~2000+ MS SQL 2000 stored procedures used to insert, update and delete data from several tables - all finished within 2 seconds... I think such results can't be obtained when ADO is used with VB/MS Access. But such speedy results can be obtained when one will use ADO.NET with C#/VB.NET and .NET Framework's System.Data.SqlClient namespace's SqLConnection, SqlTransaction, SqlCommand etc. objects - they may even be more speedy because as I've heard .NET uses native MS SQL 2000 data access (drivers) called (?) TDS - Table Data Stream: <<< Native APIs are low-level APIs implemented with providers or drivers that communicate directly to SQL Server using the Tabular Data Stream (TDS) protocol. They are relatively complex APIs, but offer the best performance because they have the least overhead. >>> (If anyone has any refs on articles about using TDS from (MSV)C++ they are very welcome to send them to me! :)) As for reporting in general - it looks like MS SQL 2000 Reporting Services is a coming killer technology for most of the currently existing reporting tools: http://www.microsoft.com/sql/reporting/default.asp And BTW, when reports aren't that complicated then using C#/VB.NET System.Drawing.Printing and System.Drawing.* objects are not the worst choice for custom reports.... Shamil ----- Original Message ----- From: "Michael Br?sdorf" To: Sent: Monday, April 19, 2004 1:47 PM Subject: AW: [dba-SQLServer] OLEDB > Shamil, what would you recommend for reporting in such an environment? > > Michael > > -----Urspr?ngliche Nachricht----- > Von: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com]Im Auftrag von Shamil > Salakhetdinov > Gesendet: Samstag, 10. April 2004 22:48 > An: dba-SQLServer > Betreff: Re: [dba-SQLServer] OLEDB > > > C#/VB.NET + System.Windows.Forms + System.Data + System.Data.SqlClient - > they all together are as RAD as MS Access or even more IMO (pun > intended)... > > (Managed)C++ & OLE DB (ATL OLE DB) - this is the most flexible and > speedy > solution... (And in VS.NET 2003 WinForms are available for C++ > programmers)... > > As for SQL Injection and other related topics - .NET Framework/CLR have > multi-level/multi-purpose and very strong security model, which, when > properly used and activated, disallow to run any malicious code/stop any > attacks.... > > Shamil > > > From: "Martin Reid" > To: > Sent: Thursday, April 08, 2004 11:24 PM > Subject: [dba-SQLServer] OLEDB > > > > You have moved your databases up to SQL Server. What would you use for > the > > front end connection, for example would you change to OLEDB?? > > > > > > Martin > > > > _______________________________________________ > > 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 Apr 21 11:25:16 2004 From: artful at rogers.com (Arthur Fuller) Date: Wed, 21 Apr 2004 12:25:16 -0400 Subject: [dba-SQLServer] Transferring Objects In-Reply-To: <10117894.1082021789306.JavaMail.www@wwinf3004> Message-ID: <001601c427bd$3b3110b0$6501a8c0@rock> Before leaving this subject, any ideas on how to copy other objects which aren't database-specific, such as the logins? Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of paul.hartland at fsmail.net Sent: Thursday, April 15, 2004 5:36 AM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Transferring Objects Martin, Use the Import Wizard, there's an option as you run through the wizard for transferring objects, then that takes you onto another screen where you select the object types you want to import etc and then just select the ones you want. Paul From artful at rogers.com Wed Apr 21 11:26:59 2004 From: artful at rogers.com (Arthur Fuller) Date: Wed, 21 Apr 2004 12:26:59 -0400 Subject: [dba-SQLServer] What am I forgetting? - SQL Permissions In-Reply-To: <000001c42610$b2fdb480$190ba845@hargrove.internal> Message-ID: <001701c427bd$7857aad0$6501a8c0@rock> Just an addendum to this. If any table lacks a primary key, you won't be able to insert rows from Access (at least ADP filetype; I haven't checked the MDB file type). Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mike & Doris Manning Sent: Monday, April 19, 2004 9:18 AM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] What am I forgetting? - SQL Permissions 1) Right click on the name of any table, sproc, or view. 2) Choose "All Tasks" 3) Choose "Manage Permissions" As a general rule, you should not allow users access to the tables themselves. Inserts, Updates, and Deletions should all be handled through sprocs and views. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Jeff Barrows Sent: Monday, April 19, 2004 7:56 AM To: Dba-SQL Subject: [dba-SQLServer] What am I forgetting? - SQL Permissions First of all, I am an SQL Novice, just kind of feeling my way thru things. I have just recently set up my SQL Server 2000, and tried to run an Access 2002 database against the SQL tables. Links are fine, I can view all the data, but I cannot remember where I adjust the settings to allow me to add or delete from the tables. I am suffering from a severe case of brain dead / spring fever (it was in the mid 80's here today) TIA Jeff Barrows Outbak Technologies, LLC Racine, WI www.outbaktech.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 cfoust at infostatsystems.com Wed Apr 21 11:53:06 2004 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Wed, 21 Apr 2004 09:53:06 -0700 Subject: [dba-SQLServer] What am I forgetting? - SQL Permissions Message-ID: In an MDB, if you don't specify the primary index when you link the table, it won't be updateable at all, even if it has a primary key. Charlotte Foust -----Original Message----- From: Arthur Fuller [mailto:artful at rogers.com] Sent: Wednesday, April 21, 2004 8:27 AM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] What am I forgetting? - SQL Permissions Just an addendum to this. If any table lacks a primary key, you won't be able to insert rows from Access (at least ADP filetype; I haven't checked the MDB file type). Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Mike & Doris Manning Sent: Monday, April 19, 2004 9:18 AM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] What am I forgetting? - SQL Permissions 1) Right click on the name of any table, sproc, or view. 2) Choose "All Tasks" 3) Choose "Manage Permissions" As a general rule, you should not allow users access to the tables themselves. Inserts, Updates, and Deletions should all be handled through sprocs and views. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Jeff Barrows Sent: Monday, April 19, 2004 7:56 AM To: Dba-SQL Subject: [dba-SQLServer] What am I forgetting? - SQL Permissions First of all, I am an SQL Novice, just kind of feeling my way thru things. I have just recently set up my SQL Server 2000, and tried to run an Access 2002 database against the SQL tables. Links are fine, I can view all the data, but I cannot remember where I adjust the settings to allow me to add or delete from the tables. I am suffering from a severe case of brain dead / spring fever (it was in the mid 80's here today) TIA Jeff Barrows Outbak Technologies, LLC Racine, WI www.outbaktech.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 shamil-users at mns.ru Wed Apr 21 14:59:58 2004 From: shamil-users at mns.ru (Shamil Salakhetdinov) Date: Wed, 21 Apr 2004 23:59:58 +0400 Subject: [dba-SQLServer] OLEDB References: Message-ID: <002701c427db$3b012b70$0201a8c0@PARIS> Jim, I talked about 2000+ calls from client to the MS SQL backend's stored procs with passing/returning parameters(fields values) etc. - do you think that something like that is possible with MS Access and ADO? - I didn't check that but I expect that the communication between MS Access and MS SQL backend will be several times more slow. I can be wrong of course - no time to test that now... Shamil ----- Original Message ----- From: "Jim Lawrence (AccessD)" To: Sent: Tuesday, April 20, 2004 4:39 AM Subject: RE: [dba-SQLServer] OLEDB > Hi Shamil: > > > I think such results can't be obtained when ADO is used with VB/MS Access. > > Just could not let this one pass. Actually the performance using ADO OLE > combination is very fast in VB/MS Access. Performance levels of 50,000 plus > records in 2 seconds but that is with the MS SQL BE. See > http://www.databaseadvisors.com/newletters/newsletter112003/0311UnboundRepor > ts.htm (watch for wrap). I think the performance is all in the BE. > > Jim > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Shamil > Salakhetdinov > Sent: Monday, April 19, 2004 1:18 PM > To: dba-SQLServer > Subject: Re: [dba-SQLServer] OLEDB > > > Michael, > > The company I work for now and where I use OLE DB with MSVC++ - they use > Crystal Reports to make a lot of very advanced reports: they exploit to > the max drill-down, multi pass reporting, multi-section etc. features of > Crystal reports - the results are amazingly powerful, very informative > and user-friendly reports... BTW, they use MS Access as a storage for > their reports data - with production data being processed and stored in > legacy Raima Data Manager DBMS... And using this architecture and > Crystal Reports as reporting tool they are able to have one very > advanced payroll application to work in desktop mode or in remote > Web-Site based mode etc.... (Crystal Reports Server is very smart in > Web-site based reports browsing...) > > I think that usage of OLE DB doesn't define what tool one will select to > use as a reporting tool - so the reporting tool can be also > ActiveReports and others... > > But OLE DB used from C++ results in lightning fast data manipulation > procedures - e.g. I've here tested it and I've ~2000+ MS SQL 2000 stored > procedures used to insert, update and delete data from several tables - > all finished within 2 seconds... > > I think such results can't be obtained when ADO is used with VB/MS > Access. > > But such speedy results can be obtained when one will use ADO.NET with > C#/VB.NET and .NET Framework's System.Data.SqlClient namespace's > SqLConnection, SqlTransaction, SqlCommand etc. objects - they may even > be more speedy because as I've heard .NET uses native MS SQL 2000 data > access (drivers) called (?) TDS - Table Data Stream: > > <<< > Native APIs are low-level APIs implemented with providers or drivers > that communicate directly to SQL Server using the Tabular Data Stream > (TDS) protocol. They are relatively complex APIs, but offer the best > performance because they have the least overhead. > >>> > (If anyone has any refs on articles about using TDS from (MSV)C++ they > are very welcome to send them to me! :)) > > As for reporting in general - it looks like MS SQL 2000 Reporting > Services is a coming killer technology for most of the currently > existing reporting tools: > > http://www.microsoft.com/sql/reporting/default.asp > > And BTW, when reports aren't that complicated then using C#/VB.NET > System.Drawing.Printing and System.Drawing.* objects are not the worst > choice for custom reports.... > > Shamil > > ----- Original Message ----- > From: "Michael Br?sdorf" > To: > Sent: Monday, April 19, 2004 1:47 PM > Subject: AW: [dba-SQLServer] OLEDB > > > > Shamil, what would you recommend for reporting in such an environment? > > > > Michael > > > > -----Urspr?ngliche Nachricht----- > > Von: dba-sqlserver-bounces at databaseadvisors.com > > [mailto:dba-sqlserver-bounces at databaseadvisors.com]Im Auftrag von > Shamil > > Salakhetdinov > > Gesendet: Samstag, 10. April 2004 22:48 > > An: dba-SQLServer > > Betreff: Re: [dba-SQLServer] OLEDB > > > > > > C#/VB.NET + System.Windows.Forms + System.Data + > System.Data.SqlClient - > > they all together are as RAD as MS Access or even more IMO (pun > > intended)... > > > > (Managed)C++ & OLE DB (ATL OLE DB) - this is the most flexible and > > speedy > > solution... (And in VS.NET 2003 WinForms are available for C++ > > programmers)... > > > > As for SQL Injection and other related topics - .NET Framework/CLR > have > > multi-level/multi-purpose and very strong security model, which, when > > properly used and activated, disallow to run any malicious code/stop > any > > attacks.... > > > > Shamil > > > > > > From: "Martin Reid" > > To: > > Sent: Thursday, April 08, 2004 11:24 PM > > Subject: [dba-SQLServer] OLEDB > > > > > > > You have moved your databases up to SQL Server. What would you use > for > > the > > > front end connection, for example would you change to OLEDB?? > > > > > > > > > Martin > > > > > > _______________________________________________ > > > 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 cfoust at infostatsystems.com Wed Apr 21 16:19:46 2004 From: cfoust at infostatsystems.com (Charlotte Foust) Date: Wed, 21 Apr 2004 14:19:46 -0700 Subject: [dba-SQLServer] OLEDB Message-ID: Shamil, I think Jim is talking about creating a code connection with ADO using the MSSQL OLEDB driver to trigger the SQL Server activity. Since the Jet query engine isn't engaged (if you do it right, at least :-} ), the speed should be acceptable from Access or VB, not just from MSVC++. Executing the *code* that creates the connection and passes parameters may be faster in VC++, but the ADO speed should be about the same. I don't use VC++, so I can't test it, but I know that doing it the way I described is faster by orders of magnitude than using Jet queries against linked SQL tables. Charlotte Foust -----Original Message----- From: Shamil Salakhetdinov [mailto:shamil-users at mns.ru] Sent: Wednesday, April 21, 2004 12:00 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] OLEDB Jim, I talked about 2000+ calls from client to the MS SQL backend's stored procs with passing/returning parameters(fields values) etc. - do you think that something like that is possible with MS Access and ADO? - I didn't check that but I expect that the communication between MS Access and MS SQL backend will be several times more slow. I can be wrong of course - no time to test that now... Shamil ----- Original Message ----- From: "Jim Lawrence (AccessD)" To: Sent: Tuesday, April 20, 2004 4:39 AM Subject: RE: [dba-SQLServer] OLEDB > Hi Shamil: > > > I think such results can't be obtained when ADO is used with VB/MS Access. > > Just could not let this one pass. Actually the performance using ADO OLE > combination is very fast in VB/MS Access. Performance levels of 50,000 plus > records in 2 seconds but that is with the MS SQL BE. See > http://www.databaseadvisors.com/newletters/newsletter112003/0311UnboundRepor > ts.htm (watch for wrap). I think the performance is all in the BE. > > Jim > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Shamil > Salakhetdinov > Sent: Monday, April 19, 2004 1:18 PM > To: dba-SQLServer > Subject: Re: [dba-SQLServer] OLEDB > > > Michael, > > The company I work for now and where I use OLE DB with MSVC++ - they use > Crystal Reports to make a lot of very advanced reports: they exploit to > the max drill-down, multi pass reporting, multi-section etc. features of > Crystal reports - the results are amazingly powerful, very informative > and user-friendly reports... BTW, they use MS Access as a storage for > their reports data - with production data being processed and stored in > legacy Raima Data Manager DBMS... And using this architecture and > Crystal Reports as reporting tool they are able to have one very > advanced payroll application to work in desktop mode or in remote > Web-Site based mode etc.... (Crystal Reports Server is very smart in > Web-site based reports browsing...) > > I think that usage of OLE DB doesn't define what tool one will select to > use as a reporting tool - so the reporting tool can be also > ActiveReports and others... > > But OLE DB used from C++ results in lightning fast data manipulation > procedures - e.g. I've here tested it and I've ~2000+ MS SQL 2000 stored > procedures used to insert, update and delete data from several tables - > all finished within 2 seconds... > > I think such results can't be obtained when ADO is used with VB/MS > Access. > > But such speedy results can be obtained when one will use ADO.NET with > C#/VB.NET and .NET Framework's System.Data.SqlClient namespace's > SqLConnection, SqlTransaction, SqlCommand etc. objects - they may even > be more speedy because as I've heard .NET uses native MS SQL 2000 data > access (drivers) called (?) TDS - Table Data Stream: > > <<< > Native APIs are low-level APIs implemented with providers or drivers > that communicate directly to SQL Server using the Tabular Data Stream > (TDS) protocol. They are relatively complex APIs, but offer the best > performance because they have the least overhead. > >>> > (If anyone has any refs on articles about using TDS from (MSV)C++ they > are very welcome to send them to me! :)) > > As for reporting in general - it looks like MS SQL 2000 Reporting > Services is a coming killer technology for most of the currently > existing reporting tools: > > http://www.microsoft.com/sql/reporting/default.asp > > And BTW, when reports aren't that complicated then using C#/VB.NET > System.Drawing.Printing and System.Drawing.* objects are not the worst > choice for custom reports.... > > Shamil > > ----- Original Message ----- > From: "Michael Br?sdorf" > To: > Sent: Monday, April 19, 2004 1:47 PM > Subject: AW: [dba-SQLServer] OLEDB > > > > Shamil, what would you recommend for reporting in such an environment? > > > > Michael > > > > -----Urspr?ngliche Nachricht----- > > Von: dba-sqlserver-bounces at databaseadvisors.com > > [mailto:dba-sqlserver-bounces at databaseadvisors.com]Im Auftrag von > Shamil > > Salakhetdinov > > Gesendet: Samstag, 10. April 2004 22:48 > > An: dba-SQLServer > > Betreff: Re: [dba-SQLServer] OLEDB > > > > > > C#/VB.NET + System.Windows.Forms + System.Data + > System.Data.SqlClient - > > they all together are as RAD as MS Access or even more IMO (pun > > intended)... > > > > (Managed)C++ & OLE DB (ATL OLE DB) - this is the most flexible and > > speedy solution... (And in VS.NET 2003 WinForms are available for > > C++ programmers)... > > > > As for SQL Injection and other related topics - .NET Framework/CLR > have > > multi-level/multi-purpose and very strong security model, which, when > > properly used and activated, disallow to run any malicious code/stop > any > > attacks.... > > > > Shamil > > > > > > From: "Martin Reid" > > To: > > Sent: Thursday, April 08, 2004 11:24 PM > > Subject: [dba-SQLServer] OLEDB > > > > > > > You have moved your databases up to SQL Server. What would you use > for > > the > > > front end connection, for example would you change to OLEDB?? > > > > > > > > > Martin > > > > > > _______________________________________________ > > > 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 > _______________________________________________ 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 Apr 21 19:28:57 2004 From: accessd at shaw.ca (Jim Lawrence (AccessD)) Date: Wed, 21 Apr 2004 17:28:57 -0700 Subject: [dba-SQLServer] OLEDB In-Reply-To: <002701c427db$3b012b70$0201a8c0@PARIS> Message-ID: Hi Shamil: Connecting from any version to any SQL BE has had a bad rap because if the designer is using ODBC connections, traditionally it is very slow.... On the other hand, if the designer uses straight ADO OLE, the FE is of a minor issue. All the functionality of ADO is now accessible and the performance is fast. This is equally true for A97 to A2003. Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Shamil Salakhetdinov Sent: Wednesday, April 21, 2004 1:00 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] OLEDB Jim, I talked about 2000+ calls from client to the MS SQL backend's stored procs with passing/returning parameters(fields values) etc. - do you think that something like that is possible with MS Access and ADO? - I didn't check that but I expect that the communication between MS Access and MS SQL backend will be several times more slow. I can be wrong of course - no time to test that now... Shamil ----- Original Message ----- From: "Jim Lawrence (AccessD)" To: Sent: Tuesday, April 20, 2004 4:39 AM Subject: RE: [dba-SQLServer] OLEDB > Hi Shamil: > > > I think such results can't be obtained when ADO is used with VB/MS Access. > > Just could not let this one pass. Actually the performance using ADO OLE > combination is very fast in VB/MS Access. Performance levels of 50,000 plus > records in 2 seconds but that is with the MS SQL BE. See > http://www.databaseadvisors.com/newletters/newsletter112003/0311UnboundRepor > ts.htm (watch for wrap). I think the performance is all in the BE. > > Jim > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com]On Behalf Of Shamil > Salakhetdinov > Sent: Monday, April 19, 2004 1:18 PM > To: dba-SQLServer > Subject: Re: [dba-SQLServer] OLEDB > > > Michael, > > The company I work for now and where I use OLE DB with MSVC++ - they use > Crystal Reports to make a lot of very advanced reports: they exploit to > the max drill-down, multi pass reporting, multi-section etc. features of > Crystal reports - the results are amazingly powerful, very informative > and user-friendly reports... BTW, they use MS Access as a storage for > their reports data - with production data being processed and stored in > legacy Raima Data Manager DBMS... And using this architecture and > Crystal Reports as reporting tool they are able to have one very > advanced payroll application to work in desktop mode or in remote > Web-Site based mode etc.... (Crystal Reports Server is very smart in > Web-site based reports browsing...) > > I think that usage of OLE DB doesn't define what tool one will select to > use as a reporting tool - so the reporting tool can be also > ActiveReports and others... > > But OLE DB used from C++ results in lightning fast data manipulation > procedures - e.g. I've here tested it and I've ~2000+ MS SQL 2000 stored > procedures used to insert, update and delete data from several tables - > all finished within 2 seconds... > > I think such results can't be obtained when ADO is used with VB/MS > Access. > > But such speedy results can be obtained when one will use ADO.NET with > C#/VB.NET and .NET Framework's System.Data.SqlClient namespace's > SqLConnection, SqlTransaction, SqlCommand etc. objects - they may even > be more speedy because as I've heard .NET uses native MS SQL 2000 data > access (drivers) called (?) TDS - Table Data Stream: > > <<< > Native APIs are low-level APIs implemented with providers or drivers > that communicate directly to SQL Server using the Tabular Data Stream > (TDS) protocol. They are relatively complex APIs, but offer the best > performance because they have the least overhead. > >>> > (If anyone has any refs on articles about using TDS from (MSV)C++ they > are very welcome to send them to me! :)) > > As for reporting in general - it looks like MS SQL 2000 Reporting > Services is a coming killer technology for most of the currently > existing reporting tools: > > http://www.microsoft.com/sql/reporting/default.asp > > And BTW, when reports aren't that complicated then using C#/VB.NET > System.Drawing.Printing and System.Drawing.* objects are not the worst > choice for custom reports.... > > Shamil > > ----- Original Message ----- > From: "Michael Br?sdorf" > To: > Sent: Monday, April 19, 2004 1:47 PM > Subject: AW: [dba-SQLServer] OLEDB > > > > Shamil, what would you recommend for reporting in such an environment? > > > > Michael > > > > -----Urspr?ngliche Nachricht----- > > Von: dba-sqlserver-bounces at databaseadvisors.com > > [mailto:dba-sqlserver-bounces at databaseadvisors.com]Im Auftrag von > Shamil > > Salakhetdinov > > Gesendet: Samstag, 10. April 2004 22:48 > > An: dba-SQLServer > > Betreff: Re: [dba-SQLServer] OLEDB > > > > > > C#/VB.NET + System.Windows.Forms + System.Data + > System.Data.SqlClient - > > they all together are as RAD as MS Access or even more IMO (pun > > intended)... > > > > (Managed)C++ & OLE DB (ATL OLE DB) - this is the most flexible and > > speedy > > solution... (And in VS.NET 2003 WinForms are available for C++ > > programmers)... > > > > As for SQL Injection and other related topics - .NET Framework/CLR > have > > multi-level/multi-purpose and very strong security model, which, when > > properly used and activated, disallow to run any malicious code/stop > any > > attacks.... > > > > Shamil > > > > > > From: "Martin Reid" > > To: > > Sent: Thursday, April 08, 2004 11:24 PM > > Subject: [dba-SQLServer] OLEDB > > > > > > > You have moved your databases up to SQL Server. What would you use > for > > the > > > front end connection, for example would you change to OLEDB?? > > > > > > > > > Martin > > > > > > _______________________________________________ > > > 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 > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From mwp.reid at qub.ac.uk Thu Apr 22 02:58:05 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Thu, 22 Apr 2004 08:58:05 +0100 Subject: [dba-SQLServer] SQL Question References: <002201c4264b$5cc518c0$0201a8c0@PARIS> Message-ID: <002001c4283f$8b44d050$9111758f@aine> Given a one to many relationship is it possible to produce this output using an SP without the use of cursors etc?? INPUT TABLE 1 1000 IT 1000 Databases 1000 VMS 1001 Spreadsheets 1001 GenStat 1002 Aquatic systems 1002 Research INPUT TABLE 2 1000 Smith 1001 Brown 1002 Foster OUTPUT REQUIRED 1000 Smith IT, Databases,VMS 1001 Brown Spreadsheets,GenStat 1002 Foster Aquatic Systems,Research Martin From andrew.haslett at ilc.gov.au Fri Apr 23 01:10:35 2004 From: andrew.haslett at ilc.gov.au (Haslett, Andrew) Date: Fri, 23 Apr 2004 15:40:35 +0930 Subject: [dba-SQLServer] SQL Question Message-ID: http://www.sqlteam.com/item.asp?ItemID=256 http://www.sqlteam.com/item.asp?ItemID=11021 Reversed: http://www.4guysfromrolla.com/webtech/031004-1.shtml Cheers, Andrew -----Original Message----- From: Martin Reid [mailto:mwp.reid at qub.ac.uk] Sent: Thursday, 22 April 2004 5:28 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] SQL Question Given a one to many relationship is it possible to produce this output using an SP without the use of cursors etc?? INPUT TABLE 1 1000 IT 1000 Databases 1000 VMS 1001 Spreadsheets 1001 GenStat 1002 Aquatic systems 1002 Research INPUT TABLE 2 1000 Smith 1001 Brown 1002 Foster OUTPUT REQUIRED 1000 Smith IT, Databases,VMS 1001 Brown Spreadsheets,GenStat 1002 Foster Aquatic Systems,Research Martin _______________________________________________ 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 my.lists at verizon.net Tue Apr 27 12:26:12 2004 From: my.lists at verizon.net (Francisco H Tapia) Date: Tue, 27 Apr 2004 10:26:12 -0700 Subject: [dba-SQLServer] Reporting services Message-ID: <408E97B4.1080207@verizon.net> Anybody using the reporting services offered by MS? I downloaded the trial and am anxiously waiting for our Admin guy to get back to me w/ a rollout date for our server. Very nice interface tho I must say it already shows me some minor quirks. Such as: When the report is created, how can I modify the end report in a gui way... I had a test one where it required me to click on the + icon in order to expand the list wich was VERY annoying :S. So I'm curious how many have jumped on that bandwagon... and for that matter has anyone looked into Notification Services? Thanks, -- -Francisco From mikedorism at adelphia.net Tue Apr 27 12:38:30 2004 From: mikedorism at adelphia.net (Mike & Doris Manning) Date: Tue, 27 Apr 2004 13:38:30 -0400 Subject: [dba-SQLServer] Reporting services In-Reply-To: <408E97B4.1080207@verizon.net> Message-ID: <000001c42c7e$750d3dc0$190ba845@hargrove.internal> I've downloaded it but we had server problems at the time so Admin downloaded it to new server which just got swapped recently. Hoping to get into it soon as we have a lot of Access after-hour/routine report functionality we're looking to move up to it. Notification Services is really cool!!!! Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Francisco H Tapia Sent: Tuesday, April 27, 2004 1:26 PM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Reporting services Anybody using the reporting services offered by MS? I downloaded the trial and am anxiously waiting for our Admin guy to get back to me w/ a rollout date for our server. Very nice interface tho I must say it already shows me some minor quirks. Such as: When the report is created, how can I modify the end report in a gui way... I had a test one where it required me to click on the + icon in order to expand the list wich was VERY annoying :S. So I'm curious how many have jumped on that bandwagon... and for that matter has anyone looked into Notification Services? Thanks, -- -Francisco _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From mwp.reid at qub.ac.uk Tue Apr 27 12:57:20 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Tue, 27 Apr 2004 18:57:20 +0100 Subject: [dba-SQLServer] Reporting services References: <408E97B4.1080207@verizon.net> Message-ID: <003901c42c81$18478480$1b02a8c0@MARTINREID> Other than the beta test no but our Cognos people in work are very impressed with it and we expect to base a lot of development around it. Biggest plus is that its free and works well. We have two guys both using it in a big way. I can put you in direct contact if you like. Let me know. Martin ----- Original Message ----- From: "Francisco H Tapia" To: Sent: Tuesday, April 27, 2004 6:26 PM Subject: [dba-SQLServer] Reporting services > Anybody using the reporting services offered by MS? I downloaded the > trial and am anxiously waiting for our Admin guy to get back to me w/ a > rollout date for our server. Very nice interface tho I must say it > already shows me some minor quirks. Such as: When the report is > created, how can I modify the end report in a gui way... I had a test > one where it required me to click on the + icon in order to expand the > list wich was VERY annoying :S. > > So I'm curious how many have jumped on that bandwagon... and for that > matter has anyone looked into Notification Services? > > Thanks, > > -- > -Francisco > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From my.lists at verizon.net Tue Apr 27 13:50:28 2004 From: my.lists at verizon.net (Francisco H Tapia) Date: Tue, 27 Apr 2004 11:50:28 -0700 Subject: [dba-SQLServer] Reporting services In-Reply-To: <003901c42c81$18478480$1b02a8c0@MARTINREID> References: <408E97B4.1080207@verizon.net> <003901c42c81$18478480$1b02a8c0@MARTINREID> Message-ID: <408EAB74.3070806@verizon.net> Heck yeah :). As I said I'm still using the trial version, one thing I'm trying to do that should be exceptionally simple is: UserName (Group by) Company (Group by) Location, City, State (Group By) Data, Time (Detail) I just gotta get used to this dotNET2003 interface too so :|... Martin Reid said the following on 4/27/2004 10:57 AM: >Other than the beta test no but our Cognos people in work are very impressed >with it and we expect to base a lot of development around it. Biggest plus >is that its free and works well. We have two guys both using it in a big >way. I can put you in direct contact if you like. Let me know. > >Martin > > >----- Original Message ----- >From: "Francisco H Tapia" >To: >Sent: Tuesday, April 27, 2004 6:26 PM >Subject: [dba-SQLServer] Reporting services > > > > >>Anybody using the reporting services offered by MS? I downloaded the >>trial and am anxiously waiting for our Admin guy to get back to me w/ a >>rollout date for our server. Very nice interface tho I must say it >>already shows me some minor quirks. Such as: When the report is >>created, how can I modify the end report in a gui way... I had a test >>one where it required me to click on the + icon in order to expand the >>list wich was VERY annoying :S. >> >>So I'm curious how many have jumped on that bandwagon... and for that >>matter has anyone looked into Notification Services? >> >>Thanks, >> >>-- >>-Francisco >> >> >> -- -Francisco From mwp.reid at qub.ac.uk Tue Apr 27 14:12:05 2004 From: mwp.reid at qub.ac.uk (Martin Reid) Date: Tue, 27 Apr 2004 20:12:05 +0100 Subject: [dba-SQLServer] Reporting services References: <408E97B4.1080207@verizon.net><003901c42c81$18478480$1b02a8c0@MARTINREID> <408EAB74.3070806@verizon.net> Message-ID: <001e01c42c8b$bca89e60$1b02a8c0@MARTINREID> Will do in the morning and cc you on the email. You can take it from there. Martin ----- Original Message ----- From: "Francisco H Tapia" To: Sent: Tuesday, April 27, 2004 7:50 PM Subject: Re: [dba-SQLServer] Reporting services > Heck yeah :). > As I said I'm still using the trial version, one thing I'm trying to > do that should be exceptionally simple is: > > UserName (Group by) > Company (Group by) > Location, City, State (Group By) > Data, Time (Detail) > > > I just gotta get used to this dotNET2003 interface too so :|... > > > Martin Reid said the following on 4/27/2004 10:57 AM: > > >Other than the beta test no but our Cognos people in work are very impressed > >with it and we expect to base a lot of development around it. Biggest plus > >is that its free and works well. We have two guys both using it in a big > >way. I can put you in direct contact if you like. Let me know. > > > >Martin > > > > > >----- Original Message ----- > >From: "Francisco H Tapia" > >To: > >Sent: Tuesday, April 27, 2004 6:26 PM > >Subject: [dba-SQLServer] Reporting services > > > > > > > > > >>Anybody using the reporting services offered by MS? I downloaded the > >>trial and am anxiously waiting for our Admin guy to get back to me w/ a > >>rollout date for our server. Very nice interface tho I must say it > >>already shows me some minor quirks. Such as: When the report is > >>created, how can I modify the end report in a gui way... I had a test > >>one where it required me to click on the + icon in order to expand the > >>list wich was VERY annoying :S. > >> > >>So I'm curious how many have jumped on that bandwagon... and for that > >>matter has anyone looked into Notification Services? > >> > >>Thanks, > >> > >>-- > >>-Francisco > >> > >> > >> > > -- > -Francisco > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From my.lists at verizon.net Tue Apr 27 16:02:22 2004 From: my.lists at verizon.net (Francisco H Tapia) Date: Tue, 27 Apr 2004 14:02:22 -0700 Subject: [dba-SQLServer] Reporting services In-Reply-To: <001e01c42c8b$bca89e60$1b02a8c0@MARTINREID> References: <408E97B4.1080207@verizon.net><003901c42c81$18478480$1b02a8c0@MARTINREID> <408EAB74.3070806@verizon.net> <001e01c42c8b$bca89e60$1b02a8c0@MARTINREID> Message-ID: <408ECA5E.4080308@verizon.net> Cool thanks :) Martin Reid said the following on 4/27/2004 12:12 PM: >Will do in the morning and cc you on the email. You can take it from there. > >Martin > > >----- Original Message ----- >From: "Francisco H Tapia" >To: >Sent: Tuesday, April 27, 2004 7:50 PM >Subject: Re: [dba-SQLServer] Reporting services > > > > >>Heck yeah :). >> As I said I'm still using the trial version, one thing I'm trying to >>do that should be exceptionally simple is: >> >>UserName (Group by) >> Company (Group by) >> Location, City, State (Group By) >> Data, Time (Detail) >> >> >>I just gotta get used to this dotNET2003 interface too so :|... >> >> >>Martin Reid said the following on 4/27/2004 10:57 AM: >> >> >> >>>Other than the beta test no but our Cognos people in work are very >>> >>> >impressed > > >>>with it and we expect to base a lot of development around it. Biggest >>> >>> >plus > > >>>is that its free and works well. We have two guys both using it in a big >>>way. I can put you in direct contact if you like. Let me know. >>> >>>Martin >>> >>> >>>----- Original Message ----- >>>From: "Francisco H Tapia" >>>To: >>>Sent: Tuesday, April 27, 2004 6:26 PM >>>Subject: [dba-SQLServer] Reporting services >>> >>> >>> >>> >>> >>> >>>>Anybody using the reporting services offered by MS? I downloaded the >>>>trial and am anxiously waiting for our Admin guy to get back to me w/ a >>>>rollout date for our server. Very nice interface tho I must say it >>>>already shows me some minor quirks. Such as: When the report is >>>>created, how can I modify the end report in a gui way... I had a test >>>>one where it required me to click on the + icon in order to expand the >>>>list wich was VERY annoying :S. >>>> >>>>So I'm curious how many have jumped on that bandwagon... and for that >>>>matter has anyone looked into Notification Services? >>>> >>>>Thanks, >>>> >>>>-- >>>>-Francisco >>>> >>>> >>>> >>>> >>>> >>-- >>-Francisco >> >> >> > > -- -Francisco From my.lists at verizon.net Tue Apr 27 16:04:22 2004 From: my.lists at verizon.net (Francisco H Tapia) Date: Tue, 27 Apr 2004 14:04:22 -0700 Subject: [dba-SQLServer] Notification services In-Reply-To: <000001c42c7e$750d3dc0$190ba845@hargrove.internal> References: <000001c42c7e$750d3dc0$190ba845@hargrove.internal> Message-ID: <408ECAD6.6030502@verizon.net> Mike & Doris Manning said the following on 4/27/2004 10:38 AM: >Notification Services is really cool!!!! > > Awesome, can you post a little summary for those of us that havent' used it yet :) -- -Francisco