From Rich_Lavsa at pghcorning.com Mon Oct 3 10:16:47 2005 From: Rich_Lavsa at pghcorning.com (Lavsa, Rich) Date: Mon, 3 Oct 2005 11:16:47 -0400 Subject: [dba-SQLServer] unable to begin a distributed transaction Message-ID: <2A261FF9D5EBCA46940C11688CE872EE02DC3A2C@goexchange2.pghcorning.com> Hello all, We have had oracle 8i, (8.1.7.4) for 3 years or so. I was in the process of building a small application that would periodically pull data from our ERP system (oracle database) into SQL server 2K. I set up a Linked server, created a procedure, and (not to revisit all the little issues..) I was done. Now we've upgraded Oracle to 9i. We were using Net8 as the oracle client up until last week, of which all machines and servers were upgraded to Net9. Now I get the 'MSDAORA' was unable to begin a distributed transaction. [SQLSTATE 42000] (Error 7391), any time I try to change a view that is using OPENQUERY to return data from Oracle. I had a scheduled procedure running without any incident until we updated the Oracle 9 client. I tested the linked server, it does show all the tables and views and If I create a new view or write an OPENQUERY sql statement it all works however it will not allow me to save the view nor will the procedure work any longer. I did some research and found a few articles about "Oracle Manager for MTS". Even with some research that I did, I am not quite sure what this is and if I even need it. Anyone out there have any idea as to what my problem might be. Thanks in Advance, Rich From artful at rogers.com Mon Oct 3 17:33:09 2005 From: artful at rogers.com (Arthur Fuller) Date: Mon, 3 Oct 2005 18:33:09 -0400 Subject: [dba-SQLServer] unable to begin a distributed transaction In-Reply-To: <2A261FF9D5EBCA46940C11688CE872EE02DC3A2C@goexchange2.pghcorning.com> Message-ID: <200510032233.j93MX7T26274@databaseadvisors.com> I may have an inkling as to your problem. When updating, the registry seems (more often than not) to lose explicit paths to various objects. To verify the correctness of my theory, visit the MS-SQL job(s) in question and then edit them, specifying the precise path to the MSDORA stuff. I could be wrong, and since I don't have Oracle installed on my development box, I cannot readily check this thesis out, but I have seen this kind of problem before and I think that it concerns MS-SQL's patch updates. It could also be the case that the same problem applies to Oracle updates, but I can't readily verify this. Anyway, try visiting your job and editing it to point precisely to the ORA instance. Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Lavsa, Rich Sent: October 3, 2005 11:17 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] unable to begin a distributed transaction Hello all, We have had oracle 8i, (8.1.7.4) for 3 years or so. I was in the process of building a small application that would periodically pull data from our ERP system (oracle database) into SQL server 2K. I set up a Linked server, created a procedure, and (not to revisit all the little issues..) I was done. Now we've upgraded Oracle to 9i. We were using Net8 as the oracle client up until last week, of which all machines and servers were upgraded to Net9. Now I get the 'MSDAORA' was unable to begin a distributed transaction. [SQLSTATE 42000] (Error 7391), any time I try to change a view that is using OPENQUERY to return data from Oracle. I had a scheduled procedure running without any incident until we updated the Oracle 9 client. I tested the linked server, it does show all the tables and views and If I create a new view or write an OPENQUERY sql statement it all works however it will not allow me to save the view nor will the procedure work any longer. I did some research and found a few articles about "Oracle Manager for MTS". Even with some research that I did, I am not quite sure what this is and if I even need it. Anyone out there have any idea as to what my problem might be. Thanks in Advance, Rich _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From Rich_Lavsa at pghcorning.com Tue Oct 4 12:10:24 2005 From: Rich_Lavsa at pghcorning.com (Lavsa, Rich) Date: Tue, 4 Oct 2005 13:10:24 -0400 Subject: [dba-SQLServer] unable to begin a distributed transaction Message-ID: <2A261FF9D5EBCA46940C11688CE872EE02DC3B61@goexchange2.pghcorning.com> I found the answer late yesterday. It was in fact invalid registry entries, they were still pointing to the Oracle 8i files, instead of the new 9 files. All is back in order. Just to post back a solution to keep in the archives, found the solution in KB280106. Thanks for the response Arthur Rich -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Monday, October 03, 2005 6:33 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] unable to begin a distributed transaction I may have an inkling as to your problem. When updating, the registry seems (more often than not) to lose explicit paths to various objects. To verify the correctness of my theory, visit the MS-SQL job(s) in question and then edit them, specifying the precise path to the MSDORA stuff. I could be wrong, and since I don't have Oracle installed on my development box, I cannot readily check this thesis out, but I have seen this kind of problem before and I think that it concerns MS-SQL's patch updates. It could also be the case that the same problem applies to Oracle updates, but I can't readily verify this. Anyway, try visiting your job and editing it to point precisely to the ORA instance. Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Lavsa, Rich Sent: October 3, 2005 11:17 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] unable to begin a distributed transaction Hello all, We have had oracle 8i, (8.1.7.4) for 3 years or so. I was in the process of building a small application that would periodically pull data from our ERP system (oracle database) into SQL server 2K. I set up a Linked server, created a procedure, and (not to revisit all the little issues..) I was done. Now we've upgraded Oracle to 9i. We were using Net8 as the oracle client up until last week, of which all machines and servers were upgraded to Net9. Now I get the 'MSDAORA' was unable to begin a distributed transaction. [SQLSTATE 42000] (Error 7391), any time I try to change a view that is using OPENQUERY to return data from Oracle. I had a scheduled procedure running without any incident until we updated the Oracle 9 client. I tested the linked server, it does show all the tables and views and If I create a new view or write an OPENQUERY sql statement it all works however it will not allow me to save the view nor will the procedure work any longer. I did some research and found a few articles about "Oracle Manager for MTS". Even with some research that I did, I am not quite sure what this is and if I even need it. Anyone out there have any idea as to what my problem might be. Thanks in Advance, Rich _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From Mark.Whittinghill at protective.com Tue Oct 4 15:00:12 2005 From: Mark.Whittinghill at protective.com (Mark.Whittinghill at protective.com) Date: Tue, 4 Oct 2005 15:00:12 -0500 Subject: [dba-SQLServer] REVOKE Message-ID: I have a DTS that has a REVOKE ALL step on a table. If that table is open by a user when that step runs, should I expect an error, or expect it to just hang? I am asking because this package hung on this step recently, and I am trying to isolate if that is the cause. Mark Whittinghill Sr. Programmer Analyst Protective - Asset Protection Division 636.536.5720 Mark.Whittinghill at protective.com ----------------------------------------- Confidentiality Notice: This e-mail communication and any attachments may contain confidential and privileged information for the use of the designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its contents is prohibited. If you have received this communication in error, please notify me immediately by replying to this message and deleting it from your computer. Thank you. From tuxedo_man at hotmail.com Tue Oct 4 20:38:03 2005 From: tuxedo_man at hotmail.com (Billy Pang) Date: Wed, 05 Oct 2005 01:38:03 +0000 Subject: [dba-SQLServer] REVOKE In-Reply-To: Message-ID: I would think an "access denied" issue would usually generate an error rather than hang the connection but I have never had to use a REVOKE ALL in a DTS before. which database revoking taking place? Is it revoking all permissions in the MASTER db? maybe it is hanging the application that is executing DTS. >From: Mark.Whittinghill at protective.com >Reply-To: dba-sqlserver at databaseadvisors.com >To: dba-sqlserver at databaseadvisors.com >Subject: [dba-SQLServer] REVOKE >Date: Tue, 4 Oct 2005 15:00:12 -0500 > >I have a DTS that has a REVOKE ALL step on a table. If that table is open >by a user when that step runs, should I expect an error, or expect it to >just hang? I am asking because this package hung on this step recently, >and I am trying to isolate if that is the cause. > >Mark Whittinghill >Sr. Programmer Analyst >Protective - Asset Protection Division >636.536.5720 >Mark.Whittinghill at protective.com > > >----------------------------------------- >Confidentiality Notice: This e-mail communication and any attachments >may contain confidential and privileged information for the use of the >designated recipients named above. If you are not the intended >recipient, you are hereby notified that you have received this >communication in error and that any review, disclosure, dissemination, >distribution or copying of it or its contents is prohibited. If you >have received this communication in error, please notify me immediately >by replying to this message and deleting it from your computer. Thank >you. >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > From newsgrps at dalyn.co.nz Tue Oct 4 22:21:59 2005 From: newsgrps at dalyn.co.nz (David Emerson) Date: Wed, 05 Oct 2005 16:21:59 +1300 Subject: [dba-SQLServer] Rows limited in combo box Message-ID: <6.2.3.4.0.20051005160506.0317ad70@mail.dalyn.co.nz> Cross posted to AccessD, AccessDSQL Access XP, SQL2K I have a combo box that uses the value in the control source to link to another table and show the description (a typical 2 column combo box with the first column width set to 0) The sproc that is the row source for the combo box returns 16484 rows. Lately the box has been showing blank even though there is a valid link to a row in the row source. When I limit the number of rows the missing text appears. It seems that Access is limiting the number of rows that are being returned (similar to the Maximum Records property for a form). Is there a similar field for a combo box/stored procedure that will limit the records returned? Regards David Emerson Dalyn Software Ltd 999 Moonshine Rd, RD 1 Judgeford, Porirua New Zealand 6006 Phone 0064 4 235-6782 Fax 0064 4 235-6783 From newsgrps at dalyn.co.nz Tue Oct 4 23:59:18 2005 From: newsgrps at dalyn.co.nz (David Emerson) Date: Wed, 05 Oct 2005 17:59:18 +1300 Subject: [dba-SQLServer] [AccessD] Rows limited in combo box In-Reply-To: <6.2.3.4.0.20051005160506.0317ad70@mail.dalyn.co.nz> References: <6.2.3.4.0.20051005160506.0317ad70@mail.dalyn.co.nz> Message-ID: <6.2.3.4.0.20051005175848.068fc9b0@mail.dalyn.co.nz> Found it - Tools ... Options ... Advanced ... Client server settings ... Default Max Records. I set this to 0. At 5/10/2005, you wrote: >Cross posted to AccessD, AccessDSQL > >Access XP, SQL2K > >I have a combo box that uses the value in the control source to link >to another table and show the description (a typical 2 column combo >box with the first column width set to 0) > >The sproc that is the row source for the combo box returns 16484 >rows. Lately the box has been showing blank even though there is a >valid link to a row in the row source. When I limit the number of >rows the missing text appears. It seems that Access is limiting the >number of rows that are being returned (similar to the Maximum >Records property for a form). > >Is there a similar field for a combo box/stored procedure that will >limit the records returned? > >Regards > >David Emerson >Dalyn Software Ltd >999 Moonshine Rd, RD 1 >Judgeford, Porirua >New Zealand 6006 >Phone 0064 4 235-6782 >Fax 0064 4 235-6783 > >-- >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/accessd >Website: http://www.databaseadvisors.com From pli at umn.edu Wed Oct 5 09:19:02 2005 From: pli at umn.edu (Ping Li) Date: Wed, 05 Oct 2005 09:19:02 -0500 Subject: [dba-SQLServer] Help: What to do when transaction log file is full Message-ID: <4343E0D6.8020407@umn.edu> Hi, I am absolutely new to DBA tasks and I really need help from you all. Last week, after I used DTS wizzard to copy a huge table as a backup copy, I used query analyzer to truncate the old table and insert new records into it. It ran for a long time and came back with an error message saying "the log file is full, free up some space...". I checked the database. It was set to use simple recovery model and with a static size. The database is set to backup complete with no log option. The reason for what is that the database is more of a data mart than transactional database. The settings are as follows: Data file: space allocated: 100000MB. Log file: space allocated: 3000MB; automatically growth--checked; file growth: 1000 in MB; Maximum size: restricted file growth(MB) 3100 I talked with somebody. Some suggested me change the database to grow automatically or auto-increment by 10% while the other strongly urge not to set it to grow automatically. One of people I talked shrink the log regularly. I would appreciate any imput on what's the best practice in managing log files. Thank you, Ping Li From Mark.Whittinghill at protective.com Wed Oct 5 10:07:59 2005 From: Mark.Whittinghill at protective.com (Mark.Whittinghill at protective.com) Date: Wed, 5 Oct 2005 10:07:59 -0500 Subject: [dba-SQLServer] REVOKE In-Reply-To: Message-ID: In this case, we are revoking all permissions on a table for a particular login. This used to work, but it turns out that a couple months ago, explicit permissions were granted to this login, so it overrules the revoke (I'm not the dba and don't do these tasks) My boss has decided to just drop this login and rebuild it. In this case, the revoke step was blocked due to the table being in use. Now that I know how to use sp_who I can troubleshoot better. Thanks, Mark Whittinghill Sr. Programmer Analyst Protective - Asset Protection Division 636.536.5720 Mark.Whittinghill at protective.com "Billy Pang" Sent by: dba-sqlserver-bounces at databaseadvisors.com 10/04/2005 08:38 PM Please respond to dba-sqlserver at databaseadvisors.com To dba-sqlserver at databaseadvisors.com cc Subject Re: [dba-SQLServer] REVOKE I would think an "access denied" issue would usually generate an error rather than hang the connection but I have never had to use a REVOKE ALL in a DTS before. which database revoking taking place? Is it revoking all permissions in the MASTER db? maybe it is hanging the application that is executing DTS. >From: Mark.Whittinghill at protective.com >Reply-To: dba-sqlserver at databaseadvisors.com >To: dba-sqlserver at databaseadvisors.com >Subject: [dba-SQLServer] REVOKE >Date: Tue, 4 Oct 2005 15:00:12 -0500 > >I have a DTS that has a REVOKE ALL step on a table. If that table is open >by a user when that step runs, should I expect an error, or expect it to >just hang? I am asking because this package hung on this step recently, >and I am trying to isolate if that is the cause. > >Mark Whittinghill >Sr. Programmer Analyst >Protective - Asset Protection Division >636.536.5720 >Mark.Whittinghill at protective.com > > >----------------------------------------- >Confidentiality Notice: This e-mail communication and any attachments >may contain confidential and privileged information for the use of the >designated recipients named above. If you are not the intended >recipient, you are hereby notified that you have received this >communication in error and that any review, disclosure, dissemination, >distribution or copying of it or its contents is prohibited. If you >have received this communication in error, please notify me immediately >by replying to this message and deleting it from your computer. Thank >you. >_______________________________________________ >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 Oct 5 13:20:50 2005 From: accessd at shaw.ca (Jim Lawrence) Date: Wed, 05 Oct 2005 11:20:50 -0700 Subject: [dba-SQLServer] Help: What to do when transaction log file is full In-Reply-To: <4343E0D6.8020407@umn.edu> Message-ID: <009601c5c9d9$8403e0a0$017ba8c0@xpserver> Hi Ping: My recommendation would be to let the database grow automatically and monitor how much space is being used. If you backup regularly and shrink only when necessary there should be no problem. If you set a fixed limit and the database is live there can be some serious ramifications if it suddenly runs out of space. My two cents worth. Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Ping Li Sent: Wednesday, October 05, 2005 7:19 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] Help: What to do when transaction log file is full Hi, I am absolutely new to DBA tasks and I really need help from you all. Last week, after I used DTS wizzard to copy a huge table as a backup copy, I used query analyzer to truncate the old table and insert new records into it. It ran for a long time and came back with an error message saying "the log file is full, free up some space...". I checked the database. It was set to use simple recovery model and with a static size. The database is set to backup complete with no log option. The reason for what is that the database is more of a data mart than transactional database. The settings are as follows: Data file: space allocated: 100000MB. Log file: space allocated: 3000MB; automatically growth--checked; file growth: 1000 in MB; Maximum size: restricted file growth(MB) 3100 I talked with somebody. Some suggested me change the database to grow automatically or auto-increment by 10% while the other strongly urge not to set it to grow automatically. One of people I talked shrink the log regularly. I would appreciate any imput on what's the best practice in managing log files. Thank you, Ping Li _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From fhtapia at gmail.com Wed Oct 5 15:15:44 2005 From: fhtapia at gmail.com (Francisco Tapia) Date: Wed, 5 Oct 2005 13:15:44 -0700 Subject: [dba-SQLServer] Help: What to do when transaction log file is full In-Reply-To: <009601c5c9d9$8403e0a0$017ba8c0@xpserver> References: <4343E0D6.8020407@umn.edu> <009601c5c9d9$8403e0a0$017ba8c0@xpserver> Message-ID: Ping, You acutally do not need a log file that is that huge in size, at least not typically. Some DBAs will argue with unresctricted growth on the data file, but imnsho, it's not a huge issue to allow the data file to grow by at least 10%. The log file does not have this need. If you shrink the log file to something like 50mb, you can monitor it's usage, and have it to auto-backup when the transaction lone reaches 60% of capacity by setting up an alert and having the alert performe the backup job when the log file is at 60%. If you monitor the growth of the transaction log you'll find that it may not be growing that fast, and thus you can possibly shrink the log file even further possibly 25mb or 15... depends really on how heavy your server is being used. In books online lookup Sql Agent Alerts to find out more on what else you can do w/ them. hope this helps. On 10/5/05, Jim Lawrence wrote: > > Hi Ping: > > My recommendation would be to let the database grow automatically and > monitor how much space is being used. If you backup regularly and shrink > only when necessary there should be no problem. If you set a fixed limit > and > the database is live there can be some serious ramifications if it > suddenly > runs out of space. > > My two cents worth. > Jim > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Ping Li > Sent: Wednesday, October 05, 2005 7:19 AM > To: dba-sqlserver at databaseadvisors.com > Subject: [dba-SQLServer] Help: What to do when transaction log file is > full > > Hi, > > I am absolutely new to DBA tasks and I really need help from you all. > > Last week, after I used DTS wizzard to copy a huge table as a backup > copy, I used query analyzer to truncate the old table and insert new > records into it. It ran for a long time and came back with an error > message saying "the log file is full, free up some space...". I checked > the database. It was set to use simple recovery model and with a static > size. The database is set to backup complete with no log option. The > reason for what is that the database is more of a data mart than > transactional database. > > The settings are as follows: > Data file: space allocated: 100000MB. > Log file: space allocated: 3000MB; automatically growth--checked; file > growth: 1000 in MB; Maximum size: restricted file growth(MB) 3100 > > I talked with somebody. Some suggested me change the database to grow > automatically or auto-increment by 10% while the other strongly urge not > to set it to grow automatically. One of people I talked shrink the log > regularly. > > I would appreciate any imput on what's the best practice in managing log > files. Thank you, > > Ping Li > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > -- -Francisco http://pcthis.blogspot.com |PC news with out the jargon! http://sqlthis.blogspot.com | Tsql and More... From pli at umn.edu Thu Oct 6 14:18:05 2005 From: pli at umn.edu (Ping Li) Date: Thu, 06 Oct 2005 14:18:05 -0500 Subject: [dba-SQLServer] Help: What to do when transaction log file is full In-Reply-To: References: Message-ID: <4345786D.6010308@umn.edu> Hi, Jim and Francisco, Thank you both for your suggestions. I think maybe it's better to set up the data file for auto-growth by a small increment of MB. But I don't quite understand the log file. I mean, it has 3GB space allocated and the usage is only 4% when I checked with command: DBCC sqlperf(logspace). Why did it give me log file full error when I tried to insert records? Is 3.5million records really huge? We don't need the transaction log so we set the recovery model to SIMPLE and backup the database with no log option. That means we truncate the log file every day when we back up the database. Should I shrink the log file first before I set the database to autogrow? What would the file size be after it gets shrunk? will it have performance hit later on when the file grows back large? As I understand, truncate a log file doesn't free up the space for other use. Only shrink can actually reduce the file size. Thanks again. Ping dba-sqlserver-request at databaseadvisors.com wrote: >Send dba-SQLServer mailing list submissions to > dba-sqlserver at databaseadvisors.com > >To subscribe or unsubscribe via the World Wide Web, visit > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >or, via email, send a message with subject or body 'help' to > dba-sqlserver-request at databaseadvisors.com > >You can reach the person managing the list at > dba-sqlserver-owner at databaseadvisors.com > >When replying, please edit your Subject line so it is more specific >than "Re: Contents of dba-SQLServer digest..." > > >Today's Topics: > > 1. Re: Help: What to do when transaction log file is full > (Jim Lawrence) > 2. Re: Help: What to do when transaction log file is full > (Francisco Tapia) > > >---------------------------------------------------------------------- > >Message: 1 >Date: Wed, 05 Oct 2005 11:20:50 -0700 >From: Jim Lawrence >Subject: Re: [dba-SQLServer] Help: What to do when transaction log > file is full >To: dba-sqlserver at databaseadvisors.com >Message-ID: <009601c5c9d9$8403e0a0$017ba8c0 at xpserver> >Content-Type: text/plain; charset=us-ascii > >Hi Ping: > >My recommendation would be to let the database grow automatically and >monitor how much space is being used. If you backup regularly and shrink >only when necessary there should be no problem. If you set a fixed limit and >the database is live there can be some serious ramifications if it suddenly >runs out of space. > >My two cents worth. >Jim > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Ping Li >Sent: Wednesday, October 05, 2005 7:19 AM >To: dba-sqlserver at databaseadvisors.com >Subject: [dba-SQLServer] Help: What to do when transaction log file is full > >Hi, > >I am absolutely new to DBA tasks and I really need help from you all. > >Last week, after I used DTS wizzard to copy a huge table as a backup >copy, I used query analyzer to truncate the old table and insert new >records into it. It ran for a long time and came back with an error >message saying "the log file is full, free up some space...". I checked >the database. It was set to use simple recovery model and with a static >size. The database is set to backup complete with no log option. The >reason for what is that the database is more of a data mart than >transactional database. > >The settings are as follows: >Data file: space allocated: 100000MB. >Log file: space allocated: 3000MB; automatically growth--checked; file >growth: 1000 in MB; Maximum size: restricted file growth(MB) 3100 > >I talked with somebody. Some suggested me change the database to grow >automatically or auto-increment by 10% while the other strongly urge not >to set it to grow automatically. One of people I talked shrink the log >regularly. > >I would appreciate any imput on what's the best practice in managing log >files. Thank you, > >Ping Li >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > > >------------------------------ > >Message: 2 >Date: Wed, 5 Oct 2005 13:15:44 -0700 >From: Francisco Tapia >Subject: Re: [dba-SQLServer] Help: What to do when transaction log > file is full >To: dba-sqlserver at databaseadvisors.com >Message-ID: > >Content-Type: text/plain; charset=ISO-8859-1 > >Ping, >You acutally do not need a log file that is that huge in size, at least not >typically. Some DBAs will argue with unresctricted growth on the data file, >but imnsho, it's not a huge issue to allow the data file to grow by at least >10%. The log file does not have this need. If you shrink the log file to >something like 50mb, you can monitor it's usage, and have it to auto-backup >when the transaction lone reaches 60% of capacity by setting up an alert and >having the alert performe the backup job when the log file is at 60%. If you >monitor the growth of the transaction log you'll find that it may not be >growing that fast, and thus you can possibly shrink the log file even >further possibly 25mb or 15... depends really on how heavy your server is >being used. > >In books online lookup Sql Agent Alerts to find out more on what else you >can do w/ them. > >hope this helps. > >On 10/5/05, Jim Lawrence wrote: > > >>Hi Ping: >> >>My recommendation would be to let the database grow automatically and >>monitor how much space is being used. If you backup regularly and shrink >>only when necessary there should be no problem. If you set a fixed limit >>and >>the database is live there can be some serious ramifications if it >>suddenly >>runs out of space. >> >>My two cents worth. >>Jim >> >>-----Original Message----- >>From: dba-sqlserver-bounces at databaseadvisors.com >>[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Ping Li >>Sent: Wednesday, October 05, 2005 7:19 AM >>To: dba-sqlserver at databaseadvisors.com >>Subject: [dba-SQLServer] Help: What to do when transaction log file is >>full >> >>Hi, >> >>I am absolutely new to DBA tasks and I really need help from you all. >> >>Last week, after I used DTS wizzard to copy a huge table as a backup >>copy, I used query analyzer to truncate the old table and insert new >>records into it. It ran for a long time and came back with an error >>message saying "the log file is full, free up some space...". I checked >>the database. It was set to use simple recovery model and with a static >>size. The database is set to backup complete with no log option. The >>reason for what is that the database is more of a data mart than >>transactional database. >> >>The settings are as follows: >>Data file: space allocated: 100000MB. >>Log file: space allocated: 3000MB; automatically growth--checked; file >>growth: 1000 in MB; Maximum size: restricted file growth(MB) 3100 >> >>I talked with somebody. Some suggested me change the database to grow >>automatically or auto-increment by 10% while the other strongly urge not >>to set it to grow automatically. One of people I talked shrink the log >>regularly. >> >>I would appreciate any imput on what's the best practice in managing log >>files. Thank you, >> >>Ping Li >>_______________________________________________ >>dba-SQLServer mailing list >>dba-SQLServer at databaseadvisors.com >>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >>http://www.databaseadvisors.com >> >>_______________________________________________ >>dba-SQLServer mailing list >>dba-SQLServer at databaseadvisors.com >>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >>http://www.databaseadvisors.com >> >> >> >> > > >-- >-Francisco >http://pcthis.blogspot.com |PC news with out the jargon! >http://sqlthis.blogspot.com | Tsql and More... > > >------------------------------ > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > > >End of dba-SQLServer Digest, Vol 32, Issue 4 >******************************************** > > -- Ping Li Developer/Analyst CLA Fiscal Administration 208 Johnston Hall 101 Pleasant St SE University of Minnesota Minneapolis, MN 55455 (612)-626-0304 pli at umn.edu From accessd at shaw.ca Thu Oct 6 19:22:55 2005 From: accessd at shaw.ca (Jim Lawrence) Date: Thu, 06 Oct 2005 17:22:55 -0700 Subject: [dba-SQLServer] Help: What to do when transaction log file is full In-Reply-To: <4345786D.6010308@umn.edu> Message-ID: <012601c5cad5$4c5aa1a0$017ba8c0@xpserver> Hi Ping: That does seem very fast. You would not have mistaken the Event log file, which also has size limits, for the transaction log file? Truncating - shrinking the log file after a backup should be sufficient security. The only time there would be an issue is if the server database ever becomes corrupted as it would take longer to recover. 3.5 million records is fairly average for a medium sized business. Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Ping Li Sent: Thursday, October 06, 2005 12:18 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Help: What to do when transaction log file is full Hi, Jim and Francisco, Thank you both for your suggestions. I think maybe it's better to set up the data file for auto-growth by a small increment of MB. But I don't quite understand the log file. I mean, it has 3GB space allocated and the usage is only 4% when I checked with command: DBCC sqlperf(logspace). Why did it give me log file full error when I tried to insert records? Is 3.5million records really huge? We don't need the transaction log so we set the recovery model to SIMPLE and backup the database with no log option. That means we truncate the log file every day when we back up the database. Should I shrink the log file first before I set the database to autogrow? What would the file size be after it gets shrunk? will it have performance hit later on when the file grows back large? As I understand, truncate a log file doesn't free up the space for other use. Only shrink can actually reduce the file size. Thanks again. Ping dba-sqlserver-request at databaseadvisors.com wrote: >Send dba-SQLServer mailing list submissions to > dba-sqlserver at databaseadvisors.com > >To subscribe or unsubscribe via the World Wide Web, visit > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >or, via email, send a message with subject or body 'help' to > dba-sqlserver-request at databaseadvisors.com > >You can reach the person managing the list at > dba-sqlserver-owner at databaseadvisors.com > >When replying, please edit your Subject line so it is more specific >than "Re: Contents of dba-SQLServer digest..." > > >Today's Topics: > > 1. Re: Help: What to do when transaction log file is full > (Jim Lawrence) > 2. Re: Help: What to do when transaction log file is full > (Francisco Tapia) > > >---------------------------------------------------------------------- > >Message: 1 >Date: Wed, 05 Oct 2005 11:20:50 -0700 >From: Jim Lawrence >Subject: Re: [dba-SQLServer] Help: What to do when transaction log > file is full >To: dba-sqlserver at databaseadvisors.com >Message-ID: <009601c5c9d9$8403e0a0$017ba8c0 at xpserver> >Content-Type: text/plain; charset=us-ascii > >Hi Ping: > >My recommendation would be to let the database grow automatically and >monitor how much space is being used. If you backup regularly and shrink >only when necessary there should be no problem. If you set a fixed limit and >the database is live there can be some serious ramifications if it suddenly >runs out of space. > >My two cents worth. >Jim > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Ping Li >Sent: Wednesday, October 05, 2005 7:19 AM >To: dba-sqlserver at databaseadvisors.com >Subject: [dba-SQLServer] Help: What to do when transaction log file is full > >Hi, > >I am absolutely new to DBA tasks and I really need help from you all. > >Last week, after I used DTS wizzard to copy a huge table as a backup >copy, I used query analyzer to truncate the old table and insert new >records into it. It ran for a long time and came back with an error >message saying "the log file is full, free up some space...". I checked >the database. It was set to use simple recovery model and with a static >size. The database is set to backup complete with no log option. The >reason for what is that the database is more of a data mart than >transactional database. > >The settings are as follows: >Data file: space allocated: 100000MB. >Log file: space allocated: 3000MB; automatically growth--checked; file >growth: 1000 in MB; Maximum size: restricted file growth(MB) 3100 > >I talked with somebody. Some suggested me change the database to grow >automatically or auto-increment by 10% while the other strongly urge not >to set it to grow automatically. One of people I talked shrink the log >regularly. > >I would appreciate any imput on what's the best practice in managing log >files. Thank you, > >Ping Li >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > > >------------------------------ > >Message: 2 >Date: Wed, 5 Oct 2005 13:15:44 -0700 >From: Francisco Tapia >Subject: Re: [dba-SQLServer] Help: What to do when transaction log > file is full >To: dba-sqlserver at databaseadvisors.com >Message-ID: > >Content-Type: text/plain; charset=ISO-8859-1 > >Ping, >You acutally do not need a log file that is that huge in size, at least not >typically. Some DBAs will argue with unresctricted growth on the data file, >but imnsho, it's not a huge issue to allow the data file to grow by at least >10%. The log file does not have this need. If you shrink the log file to >something like 50mb, you can monitor it's usage, and have it to auto-backup >when the transaction lone reaches 60% of capacity by setting up an alert and >having the alert performe the backup job when the log file is at 60%. If you >monitor the growth of the transaction log you'll find that it may not be >growing that fast, and thus you can possibly shrink the log file even >further possibly 25mb or 15... depends really on how heavy your server is >being used. > >In books online lookup Sql Agent Alerts to find out more on what else you >can do w/ them. > >hope this helps. > >On 10/5/05, Jim Lawrence wrote: > > >>Hi Ping: >> >>My recommendation would be to let the database grow automatically and >>monitor how much space is being used. If you backup regularly and shrink >>only when necessary there should be no problem. If you set a fixed limit >>and >>the database is live there can be some serious ramifications if it >>suddenly >>runs out of space. >> >>My two cents worth. >>Jim >> >>-----Original Message----- >>From: dba-sqlserver-bounces at databaseadvisors.com >>[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Ping Li >>Sent: Wednesday, October 05, 2005 7:19 AM >>To: dba-sqlserver at databaseadvisors.com >>Subject: [dba-SQLServer] Help: What to do when transaction log file is >>full >> >>Hi, >> >>I am absolutely new to DBA tasks and I really need help from you all. >> >>Last week, after I used DTS wizzard to copy a huge table as a backup >>copy, I used query analyzer to truncate the old table and insert new >>records into it. It ran for a long time and came back with an error >>message saying "the log file is full, free up some space...". I checked >>the database. It was set to use simple recovery model and with a static >>size. The database is set to backup complete with no log option. The >>reason for what is that the database is more of a data mart than >>transactional database. >> >>The settings are as follows: >>Data file: space allocated: 100000MB. >>Log file: space allocated: 3000MB; automatically growth--checked; file >>growth: 1000 in MB; Maximum size: restricted file growth(MB) 3100 >> >>I talked with somebody. Some suggested me change the database to grow >>automatically or auto-increment by 10% while the other strongly urge not >>to set it to grow automatically. One of people I talked shrink the log >>regularly. >> >>I would appreciate any imput on what's the best practice in managing log >>files. Thank you, >> >>Ping Li >>_______________________________________________ >>dba-SQLServer mailing list >>dba-SQLServer at databaseadvisors.com >>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >>http://www.databaseadvisors.com >> >>_______________________________________________ >>dba-SQLServer mailing list >>dba-SQLServer at databaseadvisors.com >>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >>http://www.databaseadvisors.com >> >> >> >> > > >-- >-Francisco >http://pcthis.blogspot.com |PC news with out the jargon! >http://sqlthis.blogspot.com | Tsql and More... > > >------------------------------ > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > > >End of dba-SQLServer Digest, Vol 32, Issue 4 >******************************************** > > -- Ping Li Developer/Analyst CLA Fiscal Administration 208 Johnston Hall 101 Pleasant St SE University of Minnesota Minneapolis, MN 55455 (612)-626-0304 pli at umn.edu _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From fhtapia at gmail.com Fri Oct 7 11:34:14 2005 From: fhtapia at gmail.com (Francisco Tapia) Date: Fri, 7 Oct 2005 09:34:14 -0700 Subject: [dba-SQLServer] Reporting Services - Global Access Message-ID: I am using Reporting Services, but have a need to also make these reports available via the internet, When I go to IIS and assign anonymous access to the reportserver virtual directory, then my internal admins cannot visit the reports virtual directory and gain access to the reports, even tho they have explicit security rights on the objects... all they get is an empty home page. when I disable the anonymous access to reportserver then when they visit the default reports site they can login as themselves. I'm only now tapping into this system and do not understand why it toggles in this manner... especially since the "reports" side is not the one that is being changed to anonymous access only the "reportserver" side. anyone had any experiance with RS security? -- -Francisco http://pcthis.blogspot.com |PC news with out the jargon! http://sqlthis.blogspot.com | Tsql and More... From Paul.Hartland at orridge.co.uk Thu Oct 13 07:30:51 2005 From: Paul.Hartland at orridge.co.uk (Paul Hartland) Date: Thu, 13 Oct 2005 13:30:51 +0100 Subject: [dba-SQLServer] SQL Server 2000 - User Defined Functions - Calling From Visual Basic 6.0 Message-ID: <14A7AB003EFD444BBB193A23128DA20E7E91C0@AL-PRI.Aldridge.local> To all, I have just created my very first UDF in SQL Server 2000 basically I want to use it to return a print address to a string variable in Visual Basic 6.0, my function is as below: CREATE FUNCTION [gng_create_PrintAddress] ( @strLine1 [nvarchar](255), @strLine2 [nvarchar](255), @strLine3 [nvarchar](255), @strLine4 [nvarchar](255), @strLine5 [nvarchar](255), @strLine6 [nvarchar](255), @strPC [nvarchar](255) ) RETURNS [nvarchar](2000) AS BEGIN RETURN ISNULL(@strLine1+CHAR(13),'') + ISNULL(@strLine2+CHAR(13),'') + ISNULL(@strLine3+CHAR(13),'') + ISNULL(@strLine4+CHAR(13),'') + ISNULL(@strLine5+CHAR(13),'') + ISNULL(@strLine6+CHAR(13),'') + ISNULL(@strPC+CHAR(13),'') END In VB6 I have a data environment with a SQLConn connection, and if I want to execute a stored procedure to return a recordset I do something like the following: Dim rsData As ADODB.Recordset Set rsData = DEGNG.SQLConn.Execute("[SP Name]") and give it the parameters if required..... So I thought I could have something like below: Dim strAdd As String strAdd = DEGNG.SQLConn.Execute("gng_create_PrintAddress '" & Line1 & "', '" & Line2 & "','" & Line3 & "', '" & Line4 & "', '" & Line5 & "', '" & Line6 & "', '" & PCode & "'") And then strAdd would contain the print address, but it give me an error saying: Type Mismatch. can anyone point me in the right direction here ? Thanks in advance for any help on this, as I would really like to start learning more about UDF's and using them instead of modules in VB6 PAUL HARTLAND Database Designer/Programmer paul.hartland at orridge.co.uk DDI - 01922 472031 Mobile - 07730 523179 _______________________________________________ * This message is confidential. * This email, its content and any files transmitted with it are intended solely for the addressee and may be legally privileged and/or confidential. * Access by any other party is unauthorised without the express written permission of the sender. * If you have received this email in error you may not copy or use the contents, attachments or information in any way and any review, use, dissemination, forwarding, disclosure, alteration, printing of this information is strictly prohibited. Please destroy it and notify the sender via return e-mail. * This email has been prepared using information believed by Paul Hartland to be reliable and accurate, but the company makes no warranty as to accuracy or completeness. In particular the author does not accept responsibility for changes made to this email after it was sent. * Any opinions expressed in this document are those of the author and do not necessarily reflect the opinions of the company or its affiliates. The Orridge web site can be found at: http://www.orridge.co.uk From artful at rogers.com Thu Oct 13 08:19:52 2005 From: artful at rogers.com (Arthur Fuller) Date: Thu, 13 Oct 2005 09:19:52 -0400 Subject: [dba-SQLServer] SQL Server 2000 - User Defined Functions - CallingFrom Visual Basic 6.0 In-Reply-To: <14A7AB003EFD444BBB193A23128DA20E7E91C0@AL-PRI.Aldridge.local> Message-ID: <200510131319.j9DDJrT18726@databaseadvisors.com> If I understand this correctly, then you are trying to execute your UDF as if it were a sproc. That won`t work. Try some variant instead... SELECT * FROM myUDF WHERE parm1 = etc. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Paul Hartland Sent: October 13, 2005 8:31 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] SQL Server 2000 - User Defined Functions - CallingFrom Visual Basic 6.0 To all, I have just created my very first UDF in SQL Server 2000 basically I want to use it to return a print address to a string variable in Visual Basic 6.0, my function is as below: CREATE FUNCTION [gng_create_PrintAddress] ( @strLine1 [nvarchar](255), @strLine2 [nvarchar](255), @strLine3 [nvarchar](255), @strLine4 [nvarchar](255), @strLine5 [nvarchar](255), @strLine6 [nvarchar](255), @strPC [nvarchar](255) ) RETURNS [nvarchar](2000) AS BEGIN RETURN ISNULL(@strLine1+CHAR(13),'') + ISNULL(@strLine2+CHAR(13),'') + ISNULL(@strLine3+CHAR(13),'') + ISNULL(@strLine4+CHAR(13),'') + ISNULL(@strLine5+CHAR(13),'') + ISNULL(@strLine6+CHAR(13),'') + ISNULL(@strPC+CHAR(13),'') END In VB6 I have a data environment with a SQLConn connection, and if I want to execute a stored procedure to return a recordset I do something like the following: Dim rsData As ADODB.Recordset Set rsData = DEGNG.SQLConn.Execute("[SP Name]") and give it the parameters if required..... So I thought I could have something like below: Dim strAdd As String strAdd = DEGNG.SQLConn.Execute("gng_create_PrintAddress '" & Line1 & "', '" & Line2 & "','" & Line3 & "', '" & Line4 & "', '" & Line5 & "', '" & Line6 & "', '" & PCode & "'") And then strAdd would contain the print address, but it give me an error saying: Type Mismatch. can anyone point me in the right direction here ? Thanks in advance for any help on this, as I would really like to start learning more about UDF's and using them instead of modules in VB6 PAUL HARTLAND Database Designer/Programmer paul.hartland at orridge.co.uk DDI - 01922 472031 Mobile - 07730 523179 _______________________________________________ * This message is confidential. * This email, its content and any files transmitted with it are intended solely for the addressee and may be legally privileged and/or confidential. * Access by any other party is unauthorised without the express written permission of the sender. * If you have received this email in error you may not copy or use the contents, attachments or information in any way and any review, use, dissemination, forwarding, disclosure, alteration, printing of this information is strictly prohibited. Please destroy it and notify the sender via return e-mail. * This email has been prepared using information believed by Paul Hartland to be reliable and accurate, but the company makes no warranty as to accuracy or completeness. In particular the author does not accept responsibility for changes made to this email after it was sent. * Any opinions expressed in this document are those of the author and do not necessarily reflect the opinions of the company or its affiliates. The Orridge web site can be found at: http://www.orridge.co.uk _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From Paul.Hartland at orridge.co.uk Thu Oct 13 09:08:14 2005 From: Paul.Hartland at orridge.co.uk (Paul Hartland) Date: Thu, 13 Oct 2005 15:08:14 +0100 Subject: [dba-SQLServer] SQL Server 2000 - User Defined Functions -CallingFrom Visual Basic 6.0 Message-ID: <14A7AB003EFD444BBB193A23128DA20E7E91D6@AL-PRI.Aldridge.local> Thanks, will try that approach...... PAUL HARTLAND Database Designer/Programmer paul.hartland at orridge.co.uk DDI - 01922 472031 Mobile - 07730 523179 -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: 13 October 2005 14:20 To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] SQL Server 2000 - User Defined Functions -CallingFrom Visual Basic 6.0 If I understand this correctly, then you are trying to execute your UDF as if it were a sproc. That won`t work. Try some variant instead... SELECT * FROM myUDF WHERE parm1 = etc. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Paul Hartland Sent: October 13, 2005 8:31 AM To: dba-sqlserver at databaseadvisors.com Subject: [dba-SQLServer] SQL Server 2000 - User Defined Functions - CallingFrom Visual Basic 6.0 To all, I have just created my very first UDF in SQL Server 2000 basically I want to use it to return a print address to a string variable in Visual Basic 6.0, my function is as below: CREATE FUNCTION [gng_create_PrintAddress] ( @strLine1 [nvarchar](255), @strLine2 [nvarchar](255), @strLine3 [nvarchar](255), @strLine4 [nvarchar](255), @strLine5 [nvarchar](255), @strLine6 [nvarchar](255), @strPC [nvarchar](255) ) RETURNS [nvarchar](2000) AS BEGIN RETURN ISNULL(@strLine1+CHAR(13),'') + ISNULL(@strLine2+CHAR(13),'') + ISNULL(@strLine3+CHAR(13),'') + ISNULL(@strLine4+CHAR(13),'') + ISNULL(@strLine5+CHAR(13),'') + ISNULL(@strLine6+CHAR(13),'') + ISNULL(@strPC+CHAR(13),'') END In VB6 I have a data environment with a SQLConn connection, and if I want to execute a stored procedure to return a recordset I do something like the following: Dim rsData As ADODB.Recordset Set rsData = DEGNG.SQLConn.Execute("[SP Name]") and give it the parameters if required..... So I thought I could have something like below: Dim strAdd As String strAdd = DEGNG.SQLConn.Execute("gng_create_PrintAddress '" & Line1 & "', '" & Line2 & "','" & Line3 & "', '" & Line4 & "', '" & Line5 & "', '" & Line6 & "', '" & PCode & "'") And then strAdd would contain the print address, but it give me an error saying: Type Mismatch. can anyone point me in the right direction here ? Thanks in advance for any help on this, as I would really like to start learning more about UDF's and using them instead of modules in VB6 PAUL HARTLAND Database Designer/Programmer paul.hartland at orridge.co.uk DDI - 01922 472031 Mobile - 07730 523179 _______________________________________________ * This message is confidential. * This email, its content and any files transmitted with it are intended solely for the addressee and may be legally privileged and/or confidential. * Access by any other party is unauthorised without the express written permission of the sender. * If you have received this email in error you may not copy or use the contents, attachments or information in any way and any review, use, dissemination, forwarding, disclosure, alteration, printing of this information is strictly prohibited. Please destroy it and notify the sender via return e-mail. * This email has been prepared using information believed by Paul Hartland to be reliable and accurate, but the company makes no warranty as to accuracy or completeness. In particular the author does not accept responsibility for changes made to this email after it was sent. * Any opinions expressed in this document are those of the author and do not necessarily reflect the opinions of the company or its affiliates. The Orridge web site can be found at: http://www.orridge.co.uk _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From artful at rogers.com Thu Oct 13 10:34:27 2005 From: artful at rogers.com (Arthur Fuller) Date: Thu, 13 Oct 2005 11:34:27 -0400 Subject: [dba-SQLServer] Cross-posted to AccessD In-Reply-To: <14A7AB003EFD444BBB193A23128DA20E7E91D6@AL-PRI.Aldridge.local> Message-ID: <200510131534.j9DFYUJ07220@databaseadvisors.com> Here is a link to my most recent article, based in part on conversations and threads that took place on this list. http://www.simple-talk.com/. Every hit counts, as it were, and makes me look more valuable as a columnist. So feel free to contribute some of your work-avoidance moments to the cause. LOL. Arthur From rl_stewart at highstream.net Thu Oct 13 12:50:39 2005 From: rl_stewart at highstream.net (Robert L. Stewart) Date: Thu, 13 Oct 2005 12:50:39 -0500 Subject: [dba-SQLServer] SQL Server 2000 - User Defined Functions In-Reply-To: References: Message-ID: <6.2.3.4.2.20051013124403.028c2a88@pop3.highstream.net> In the UDFs that I use, I call them like I would in Access. SELECT udfConcatAddress(5) FROM tblNameAddress WHERE NameID = 5 My UDF would have a SELECT in it also where it would SELECT the data from the table based on the NameID that I pass in as the parameter. Then it would assemble the string and pass it back as the result of the function call. I use a similar thing to de-normalize data, like hobbies, to display it on web forms in query results. Robert At 12:00 PM 10/13/2005, you wrote: >Date: Thu, 13 Oct 2005 09:19:52 -0400 >From: "Arthur Fuller" >Subject: Re: [dba-SQLServer] SQL Server 2000 - User Defined Functions > - CallingFrom Visual Basic 6.0 >To: >Message-ID: <200510131319.j9DDJrT18726 at databaseadvisors.com> >Content-Type: text/plain; charset="us-ascii" > >If I understand this correctly, then you are trying to execute your UDF as >if it were a sproc. That won`t work. >Try some variant instead... >SELECT * FROM myUDF WHERE parm1 = etc. > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Paul >Hartland >Sent: October 13, 2005 8:31 AM >To: dba-sqlserver at databaseadvisors.com >Subject: [dba-SQLServer] SQL Server 2000 - User Defined Functions - >CallingFrom Visual Basic 6.0 > >To all, > >I have just created my very first UDF in SQL Server 2000 basically I >want to use it to return a print address to a string variable in Visual >Basic 6.0, my function is as below: > >CREATE FUNCTION [gng_create_PrintAddress] > ( > @strLine1 [nvarchar](255), > @strLine2 [nvarchar](255), > @strLine3 [nvarchar](255), > @strLine4 [nvarchar](255), > @strLine5 [nvarchar](255), > @strLine6 [nvarchar](255), > @strPC [nvarchar](255) > >) >RETURNS > [nvarchar](2000) >AS >BEGIN > RETURN ISNULL(@strLine1+CHAR(13),'') + > ISNULL(@strLine2+CHAR(13),'') + > ISNULL(@strLine3+CHAR(13),'') + > ISNULL(@strLine4+CHAR(13),'') + > ISNULL(@strLine5+CHAR(13),'') + > ISNULL(@strLine6+CHAR(13),'') + > ISNULL(@strPC+CHAR(13),'') >END > >In VB6 I have a data environment with a SQLConn connection, and if I >want to execute a stored procedure to return a recordset I do something >like the following: > >Dim rsData As ADODB.Recordset >Set rsData = DEGNG.SQLConn.Execute("[SP Name]") and give it the >parameters if required..... > >So I thought I could have something like below: > >Dim strAdd As String >strAdd = DEGNG.SQLConn.Execute("gng_create_PrintAddress '" & Line1 & "', >'" & Line2 & "','" & Line3 & "', '" & Line4 & "', '" & Line5 & "', '" & >Line6 & "', '" & PCode & "'") > >And then strAdd would contain the print address, but it give me an error >saying: Type Mismatch. >can anyone point me in the right direction here ? > >Thanks in advance for any help on this, as I would really like to start >learning more about UDF's and using them instead of modules in VB6 > > > > > > > >PAUL HARTLAND >Database Designer/Programmer >paul.hartland at orridge.co.uk >DDI - 01922 472031 >Mobile - 07730 523179 From accessd at shaw.ca Thu Oct 13 12:52:27 2005 From: accessd at shaw.ca (Jim Lawrence) Date: Thu, 13 Oct 2005 10:52:27 -0700 Subject: [dba-SQLServer] Cross-posted to AccessD In-Reply-To: <200510131534.j9DFYUJ07220@databaseadvisors.com> Message-ID: <001f01c5d01e$dff8d4b0$017ba8c0@xpserver> Hi Arthur: A good article Arthur... It seems to paraphrase much of the concerns that we have heard and voiced on the list. Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Thursday, October 13, 2005 8:34 AM To: dba-sqlserver at databaseadvisors.com Cc: 'Access Developers discussion and problem solving' Subject: [dba-SQLServer] Cross-posted to AccessD Here is a link to my most recent article, based in part on conversations and threads that took place on this list. http://www.simple-talk.com/. Every hit counts, as it were, and makes me look more valuable as a columnist. So feel free to contribute some of your work-avoidance moments to the cause. LOL. Arthur _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From artful at rogers.com Fri Oct 14 14:30:25 2005 From: artful at rogers.com (Arthur Fuller) Date: Fri, 14 Oct 2005 15:30:25 -0400 Subject: [dba-SQLServer] Cross-posted to AccessD In-Reply-To: <001f01c5d01e$dff8d4b0$017ba8c0@xpserver> Message-ID: <200510141930.j9EJUMJ13441@databaseadvisors.com> Thanks, Jim. That was the intent, not to voice my own opinions but to reflect those of the community. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence Sent: October 13, 2005 1:52 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Cross-posted to AccessD Hi Arthur: A good article Arthur... It seems to paraphrase much of the concerns that we have heard and voiced on the list. Jim From jwcolby at ColbyConsulting.com Sun Oct 16 22:42:24 2005 From: jwcolby at ColbyConsulting.com (John Colby) Date: Sun, 16 Oct 2005 23:42:24 -0400 Subject: [dba-SQLServer] SQL Server - User not associated with a trusted connection Message-ID: <006101c5d2cc$ccd723e0$667aa8c0@ColbyM6805> What does this mean? I am struggling to get a DotNetNuke web site running on some system at my home office. I have IIS set up and running, SQL Server set up and running, SV 2003 Installed and running. I followed the directions in the DotNetNuke book which has me set up a SQL Server database, a DotNetNukeUser user, using SQL Server logon (which MAY be the issue). I created the database, the user, the password and told the DotNetNuke web.Config all this info but when the ASP install script runs and tries to access SQL Server I get this "not associated with a trusted connection" error from SQL Server for this user. I believe that when I set up SQL Server I told it to use Windows Login. Is it possible to use either one independent of the other. IOW, can I use a specified SQL Server user / password even though I told the install to use Windows login authentication? If not, what do I do? Set up a DotNetNukeUser user in Windows and then pass in that Windows user and it's password in the connection string? I am sooooo close I can taste it. John W. Colby www.ColbyConsulting.com Contribute your unused CPU cycles to a good cause: http://folding.stanford.edu/ From jwcolby at ColbyConsulting.com Sun Oct 16 22:55:06 2005 From: jwcolby at ColbyConsulting.com (John Colby) Date: Sun, 16 Oct 2005 23:55:06 -0400 Subject: [dba-SQLServer] [AccessD] SQL Server - User not associated with a trusted connection In-Reply-To: <006101c5d2cc$ccd723e0$667aa8c0@ColbyM6805> Message-ID: <006e01c5d2ce$926e8660$667aa8c0@ColbyM6805> Never mind, I got it. Wooohooo, I have DNN running on one of my machines now, with VS 2003 as well. Not my Laptop Dev machine but at least I can go to work now. John W. Colby www.ColbyConsulting.com Contribute your unused CPU cycles to a good cause: http://folding.stanford.edu/ -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Colby Sent: Sunday, October 16, 2005 11:42 PM To: dba-sqlserver at databaseadvisors.com Cc: dba-vb at databaseadvisors.com; 'Access Developers discussion and problemsolving' Subject: [AccessD] SQL Server - User not associated with a trusted connection What does this mean? I am struggling to get a DotNetNuke web site running on some system at my home office. I have IIS set up and running, SQL Server set up and running, SV 2003 Installed and running. I followed the directions in the DotNetNuke book which has me set up a SQL Server database, a DotNetNukeUser user, using SQL Server logon (which MAY be the issue). I created the database, the user, the password and told the DotNetNuke web.Config all this info but when the ASP install script runs and tries to access SQL Server I get this "not associated with a trusted connection" error from SQL Server for this user. I believe that when I set up SQL Server I told it to use Windows Login. Is it possible to use either one independent of the other. IOW, can I use a specified SQL Server user / password even though I told the install to use Windows login authentication? If not, what do I do? Set up a DotNetNukeUser user in Windows and then pass in that Windows user and it's password in the connection string? I am sooooo close I can taste it. John W. Colby www.ColbyConsulting.com Contribute your unused CPU cycles to a good cause: http://folding.stanford.edu/ -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com From mikedorism at verizon.net Mon Oct 17 06:51:58 2005 From: mikedorism at verizon.net (Mike & Doris Manning) Date: Mon, 17 Oct 2005 07:51:58 -0400 Subject: [dba-SQLServer] SQL Server - User not associated with a trusted connection In-Reply-To: <006101c5d2cc$ccd723e0$667aa8c0@ColbyM6805> Message-ID: <000401c5d311$2eb07c30$2e01a8c0@dorismanning> If you want to use both types of logins, you need to set the server to Mixed Mode. You can change this without doing a reinstall. Just right click on the server and go through the property pages. Doris Manning mikedorism at verizon.net From john at winhaven.net Mon Oct 17 11:46:52 2005 From: john at winhaven.net (John Bartow) Date: Mon, 17 Oct 2005 11:46:52 -0500 Subject: [dba-SQLServer] Monitoring concurrent users In-Reply-To: Message-ID: <000b01c5d33a$60381820$6e01a8c0@ScuzzPaq> Hi all, I'm looking for suggestions on monitoring concurrent users for a MSDE 2000 based application. Over the next few months I want to see what the average and maximum number of users concurrently logged into the database are. John B. From Paul.Hartland at orridge.co.uk Wed Oct 19 03:13:02 2005 From: Paul.Hartland at orridge.co.uk (Paul Hartland) Date: Wed, 19 Oct 2005 09:13:02 +0100 Subject: [dba-SQLServer] SQL Server 2000 - xp_sendmail - Error Message Message-ID: <14A7AB003EFD444BBB193A23128DA20E7E93EB@AL-PRI.Aldridge.local> To all, Want to start using the xp_sendmail function in SQL Server 2000, was playing about with it yesterday but couldn't get it to work.....The error message I get is: [Microsoft][ODBC SQL Server Driver][SQL Server]xp_sendmail: Your SQL Server Service is running under the local system account. You need to change your SQL Server Service account to run under a domain account in order to complete this operation. Can anyone guide me to exactly what I have to do to get it to work ? Thanks in advance for any help on this.... PAUL HARTLAND Database Designer/Programmer paul.hartland at orridge.co.uk DDI - 01922 472031 Mobile - 07730 523179 _______________________________________________ * This message is confidential. * This email, its content and any files transmitted with it are intended solely for the addressee and may be legally privileged and/or confidential. * Access by any other party is unauthorised without the express written permission of the sender. * If you have received this email in error you may not copy or use the contents, attachments or information in any way and any review, use, dissemination, forwarding, disclosure, alteration, printing of this information is strictly prohibited. Please destroy it and notify the sender via return e-mail. * This email has been prepared using information believed by Paul Hartland to be reliable and accurate, but the company makes no warranty as to accuracy or completeness. In particular the author does not accept responsibility for changes made to this email after it was sent. * Any opinions expressed in this document are those of the author and do not necessarily reflect the opinions of the company or its affiliates. The Orridge web site can be found at: http://www.orridge.co.uk From martyconnelly at shaw.ca Wed Oct 19 14:21:57 2005 From: martyconnelly at shaw.ca (MartyConnelly) Date: Wed, 19 Oct 2005 12:21:57 -0700 Subject: [dba-SQLServer] Monitoring concurrent users References: <000b01c5d33a$60381820$6e01a8c0@ScuzzPaq> Message-ID: <43569CD5.8080209@shaw.ca> Maybe not what you want, here are some notes I made on checking MSDE for throttling violations above 5, maybe a start. You can track the amount of throttling going on through DBCC and logs I once tracked this and kept a log in an access table. There is more here or SQL BOL search on ( DBCC CONCURRENCYVIOLATION ) Watch out below for yellow on white tips (kind of hard to read in IE click on area to see. http://www.betav.com/Files/Content/Whitepapers/msde_files/msde.htm To track the throttling you can use something like SP below with DBCC or turn it on in the SQL log, it gives you the number of times you have exceed the 5 connection limit. This dumps the records to database table. Concurrency violations since 2003-01-21 12:20:43.747 1 2 3 4 5 6 7 8 9 10-100 >100 0 0 0 0 0 0 0 0 0 0 0 Concurrency violations will be written to the SQL Server error log. ALTER PROCEDURE StoredProcedureDBCCworks /* ( @parameter1 datatype = default value, @parameter2 datatype OUTPUT ) */ AS SET NOCOUNT ON -- Create the table to accept the results or use #tracestatus #indicates temptable If NOT EXISTS (SELECT * FROM SYSOBJECTS WHERE ID = OBJECT_ID('DBCCtracestatus ') AND sysstat & 0xf=3) DROP TABLE DBCCtracestatus BEGIN CREATE TABLE DBCCtracestatus ( maint varchar(4096), TraceFlag INT, Status INT ) END I lifted parts of it I think from Betav.com( no longer there), but is pretty basic calls. The only thing unusual is the select statement. I just put it together for a client group that was interested; can't find my final code I would rewrite but need a network to test on ; or run a dozen or so access mssql clients from my machine to check. You can do this by hand starting the dbcctrace to sql error logging from OSQL then sifting through the error log. Sorry about the late reply tried tracking down the code John Bartow wrote: >Hi all, >I'm looking for suggestions on monitoring concurrent users for a MSDE 2000 >based application. Over the next few months I want to see what the average >and maximum number of users concurrently logged into the database are. > >John B. > >_______________________________________________ >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 accessd at shaw.ca Wed Oct 19 17:29:14 2005 From: accessd at shaw.ca (Jim Lawrence) Date: Wed, 19 Oct 2005 15:29:14 -0700 Subject: [dba-SQLServer] Monitoring concurrent users In-Reply-To: <43569CD5.8080209@shaw.ca> Message-ID: <013901c5d4fc$89281640$017ba8c0@xpserver> Marty; that is simply brilliant. Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of MartyConnelly Sent: Wednesday, October 19, 2005 12:22 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Monitoring concurrent users Maybe not what you want, here are some notes I made on checking MSDE for throttling violations above 5, maybe a start. You can track the amount of throttling going on through DBCC and logs I once tracked this and kept a log in an access table. There is more here or SQL BOL search on ( DBCC CONCURRENCYVIOLATION ) Watch out below for yellow on white tips (kind of hard to read in IE click on area to see. http://www.betav.com/Files/Content/Whitepapers/msde_files/msde.htm To track the throttling you can use something like SP below with DBCC or turn it on in the SQL log, it gives you the number of times you have exceed the 5 connection limit. This dumps the records to database table. Concurrency violations since 2003-01-21 12:20:43.747 1 2 3 4 5 6 7 8 9 10-100 >100 0 0 0 0 0 0 0 0 0 0 0 Concurrency violations will be written to the SQL Server error log. ALTER PROCEDURE StoredProcedureDBCCworks /* ( @parameter1 datatype = default value, @parameter2 datatype OUTPUT ) */ AS SET NOCOUNT ON -- Create the table to accept the results or use #tracestatus #indicates temptable If NOT EXISTS (SELECT * FROM SYSOBJECTS WHERE ID = OBJECT_ID('DBCCtracestatus ') AND sysstat & 0xf=3) DROP TABLE DBCCtracestatus BEGIN CREATE TABLE DBCCtracestatus ( maint varchar(4096), TraceFlag INT, Status INT ) END I lifted parts of it I think from Betav.com( no longer there), but is pretty basic calls. The only thing unusual is the select statement. I just put it together for a client group that was interested; can't find my final code I would rewrite but need a network to test on ; or run a dozen or so access mssql clients from my machine to check. You can do this by hand starting the dbcctrace to sql error logging from OSQL then sifting through the error log. Sorry about the late reply tried tracking down the code John Bartow wrote: >Hi all, >I'm looking for suggestions on monitoring concurrent users for a MSDE 2000 >based application. Over the next few months I want to see what the average >and maximum number of users concurrently logged into the database are. > >John B. > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > > > > -- Marty Connelly Victoria, B.C. Canada _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From martyconnelly at shaw.ca Wed Oct 19 19:51:55 2005 From: martyconnelly at shaw.ca (MartyConnelly) Date: Wed, 19 Oct 2005 17:51:55 -0700 Subject: [dba-SQLServer] Monitoring concurrent users References: <013901c5d4fc$89281640$017ba8c0@xpserver> Message-ID: <4356EA2B.9060809@shaw.ca> I can barely remember what I did. It took me a couple of days to figure out about 2 years ago. But what he might want to do is the simplest way is to count the number of concurrent usersSELECT COUNT (*) FROM SYSPROCESSES WHERE STATUS <> sleeping will do the trick. If this returns a value less than 14 (8 + 6), then the delay is likely caused by other factorsnot the governor limit of 5 users. as stated in the article. And just run as timer started process and log to a file Ahh there was a bit missing I found the ADP, that I may have used to test with. It is easier to write SP's in an ADP essentially just an Access query ALTER PROCEDURE StoredProcedureDBCCworks /* ( @parameter1 datatype = default value, @parameter2 datatype OUTPUT ) */ AS SET NOCOUNT ON -- Create the table to accept the results or use #tracestatus #indicates temptable If NOT EXISTS (SELECT * FROM SYSOBJECTS WHERE ID = OBJECT_ID('DBCCtracestatus ') AND sysstat & 0xf=3) DROP TABLE DBCCtracestatus BEGIN CREATE TABLE DBCCtracestatus ( maint varchar(4096), TraceFlag INT, Status INT ) END -- Execute the command, putting the results in the table INSERT INTO DBCCtracestatus(maint) EXEC master..xp_cmdshell 'OSQL -E -Q " DBCC CONCURRENCYVIOLATION WITH NO_INFOMSGS"' /* You can use xp_cmdshell to start a osql session to which you supply the DBCC page command. xp_cmdshell always returns rows. EXEC ('DBCC TRACESTATUS (-1) WITH NO_INFOMSGS') INSERT INTO #maint(Results) EXEC(master..xp_cmdshell OSQL -E -Q dbcc checkdb(master)) */ -- Display the results SELECT * FROM DBCCtracestatus GO /* SET NOCOUNT ON */ RETURN Jim Lawrence wrote: >Marty; that is simply brilliant. > >Jim > >-----Original Message----- >From: dba-sqlserver-bounces at databaseadvisors.com >[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of >MartyConnelly >Sent: Wednesday, October 19, 2005 12:22 PM >To: dba-sqlserver at databaseadvisors.com >Subject: Re: [dba-SQLServer] Monitoring concurrent users > >Maybe not what you want, here are some notes I made on checking MSDE for >throttling violations >above 5, maybe a start. > >You can track the amount of throttling going on through DBCC and logs >I once tracked this and kept a log in an access table. > >There is more here or SQL BOL search on ( DBCC CONCURRENCYVIOLATION ) > >Watch out below for yellow on white tips (kind of hard to read in IE >click on area to see. > >http://www.betav.com/Files/Content/Whitepapers/msde_files/msde.htm > > >To track the throttling you can use something like SP below with DBCC or >turn it on in the SQL log, it gives you the number of times you have >exceed the 5 connection limit. This dumps the records to database table. > >Concurrency violations since 2003-01-21 12:20:43.747 >1 2 3 4 5 6 7 8 9 10-100 >100 >0 0 0 0 0 0 0 0 0 0 0 >Concurrency violations will be written to the SQL Server error log. > >ALTER PROCEDURE StoredProcedureDBCCworks >/* >( > @parameter1 datatype = default value, > @parameter2 datatype OUTPUT >) >*/ >AS >SET NOCOUNT ON >-- Create the table to accept the results or use #tracestatus #indicates >temptable >If NOT EXISTS >(SELECT * FROM SYSOBJECTS WHERE ID = OBJECT_ID('DBCCtracestatus ') AND >sysstat & 0xf=3) >DROP TABLE DBCCtracestatus >BEGIN >CREATE TABLE DBCCtracestatus ( > maint varchar(4096), > TraceFlag INT, > Status INT > ) >END >I lifted parts of it I think from Betav.com( no longer there), but is >pretty basic calls. >The only thing unusual is the select statement. >I just put it together for a client group that was interested; can't >find my final code >I would rewrite but need a network to test on ; or run a dozen or so >access mssql clients >from my machine to check. You can do this by hand starting the dbcctrace >to sql error logging >from OSQL then sifting through the error log. Sorry about the late reply >tried tracking down the code > >John Bartow wrote: > > > >>Hi all, >>I'm looking for suggestions on monitoring concurrent users for a MSDE 2000 >>based application. Over the next few months I want to see what the average >>and maximum number of users concurrently logged into the database are. >> >>John B. >> >>_______________________________________________ >>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 john at winhaven.net Fri Oct 21 11:05:34 2005 From: john at winhaven.net (John Bartow) Date: Fri, 21 Oct 2005 11:05:34 -0500 Subject: [dba-SQLServer] Monitoring concurrent users In-Reply-To: <43569CD5.8080209@shaw.ca> Message-ID: <006401c5d659$45cca4c0$7701a8c0@ScuzzPaq> Thanks Marty! I'll give it try. John B. -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of MartyConnelly Sent: Wednesday, October 19, 2005 2:22 PM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Monitoring concurrent users Maybe not what you want, here are some notes I made on checking MSDE for throttling violations above 5, maybe a start. You can track the amount of throttling going on through DBCC and logs I once tracked this and kept a log in an access table. There is more here or SQL BOL search on ( DBCC CONCURRENCYVIOLATION ) Watch out below for yellow on white tips (kind of hard to read in IE click on area to see. http://www.betav.com/Files/Content/Whitepapers/msde_files/msde.htm To track the throttling you can use something like SP below with DBCC or turn it on in the SQL log, it gives you the number of times you have exceed the 5 connection limit. This dumps the records to database table. Concurrency violations since 2003-01-21 12:20:43.747 1 2 3 4 5 6 7 8 9 10-100 >100 0 0 0 0 0 0 0 0 0 0 0 Concurrency violations will be written to the SQL Server error log. ALTER PROCEDURE StoredProcedureDBCCworks /* ( @parameter1 datatype = default value, @parameter2 datatype OUTPUT ) */ AS SET NOCOUNT ON -- Create the table to accept the results or use #tracestatus #indicates temptable If NOT EXISTS (SELECT * FROM SYSOBJECTS WHERE ID = OBJECT_ID('DBCCtracestatus ') AND sysstat & 0xf=3) DROP TABLE DBCCtracestatus BEGIN CREATE TABLE DBCCtracestatus ( maint varchar(4096), TraceFlag INT, Status INT ) END I lifted parts of it I think from Betav.com( no longer there), but is pretty basic calls. The only thing unusual is the select statement. I just put it together for a client group that was interested; can't find my final code I would rewrite but need a network to test on ; or run a dozen or so access mssql clients from my machine to check. You can do this by hand starting the dbcctrace to sql error logging from OSQL then sifting through the error log. Sorry about the late reply tried tracking down the code John Bartow wrote: >Hi all, >I'm looking for suggestions on monitoring concurrent users for a MSDE >2000 based application. Over the next few months I want to see what the >average and maximum number of users concurrently logged into the database are. > >John B. > >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > > > > > -- Marty Connelly Victoria, B.C. Canada _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From darrend at crhorizons.com.au Mon Oct 24 01:03:48 2005 From: darrend at crhorizons.com.au (Darren DICK) Date: Mon, 24 Oct 2005 16:03:48 +1000 Subject: [dba-SQLServer] Calling function from a query Message-ID: <200510240600.j9O60JJ28520@databaseadvisors.com> Hello all What I have is a function that will (in this case) determine those records from the Account table that are now 'cancelled' In this example the cancelled status is true if there is a cancelled date in the Account Table and the Account status code is M Those 2 things combined need to occur to determine a cancelled record So rather than copy and paste the contents of the function below into each and every occurrence of testing for 'cancelled' I want a function to determine those 2 criteria then select all records from the Account table that meet the criteria as determined in the function IE how do I call the function from the query and do it 'on the fly' Make sense? Lemme know Many thanks in advance Darren ___________________________________________________ SQL = select * from Account where Account_IsCancelled(a) FUNCTION = fn Account_IsCancelled(a as Account) begin return (a.AccountStatusCode <> 'M' and a.DateCancelled is not null) end Darren From DavidL at sierranevada.com Mon Oct 24 12:22:50 2005 From: DavidL at sierranevada.com (David Lewis) Date: Mon, 24 Oct 2005 10:22:50 -0700 Subject: [dba-SQLServer] dba-SQLServer Digest, Vol 32, Issue 13 Message-ID: <9923336B7F4D1A459B983065D95397B90112A087@pale.sierranevada.corp> Darren: Hmmmm... I'm not sure I follow what you want, but here are a few thoughts: 1) functions are evaluated for each row in the query. 2) The methods for calling a function are covered in BOL 3) Would the following be an acceptable way of achieving your goal: SELECT a.* from Account a WHERE a.AccountStatusCode<>'M' AND a.Cancelled IS NOT NULL ? Not sure why using a function is preferable to this very basic approach? Or, to put it in a subquery, perhaps something like SELECT a.* from Account a WHERE a.[Primary Key] NOT IN (SELECT b.[Primary Key] FROM Account b WHERE b.AccountStatusCode<>'M' AND b.Cancelled IS NOT NULL) Or, to use a view... CREATE VIEW vw_CancelledAccounts AS SELECT a.[Primary Key] from Account a WHERE a.AccountStatusCode<>'M' AND a.Cancelled IS NOT NULL Then use it in the query as: SELECT a.* from Account a INNER JOIN vw_CancelledAccounts b ON a.[Primary Key]=b.[Primary Key] There are many other ways to get there, too. I don't see how using a function is the best choice... HTH. D. Lewis Message: 1 Date: Mon, 24 Oct 2005 16:03:48 +1000 From: "Darren DICK" Subject: [dba-SQLServer] Calling function from a query To: Message-ID: <200510240600.j9O60JJ28520 at databaseadvisors.com> Content-Type: text/plain; charset="us-ascii" Hello all What I have is a function that will (in this case) determine those records from the Account table that are now 'cancelled' In this example the cancelled status is true if there is a cancelled date in the Account Table and the Account status code is M Those 2 things combined need to occur to determine a cancelled record So rather than copy and paste the contents of the function below into each and every occurrence of testing for 'cancelled' I want a function to determine those 2 criteria then select all records from the Account table that meet the criteria as determined in the function IE how do I call the function from the query and do it 'on the fly' Make sense? Lemme know Many thanks in advance Darren ___________________________________________________ SQL = select * from Account where Account_IsCancelled(a) FUNCTION = fn Account_IsCancelled(a as Account) begin return (a.AccountStatusCode <> 'M' and a.DateCancelled is not null) end Darren From prosoft6 at hotmail.com Mon Oct 24 12:40:49 2005 From: prosoft6 at hotmail.com (Julie Reardon-Taylor) Date: Mon, 24 Oct 2005 13:40:49 -0400 Subject: [dba-SQLServer] Experience Connecting to Clearpath IX6800 Message-ID: Anyone have experience using an ODBC connection to retrieve data from this system and convert it to XML? Julie Reardon-Taylor PRO-SOFT OF NY, INC. 44 Public Square Suite #5 Watertown, NY 13601 Phone/Fax: (315) 785-0319 www.pro-soft.net From darrend at crhorizons.com.au Mon Oct 24 22:26:51 2005 From: darrend at crhorizons.com.au (Darren DICK) Date: Tue, 25 Oct 2005 13:26:51 +1000 Subject: [dba-SQLServer] dba-SQLServer Digest, Vol 32, Issue 13 In-Reply-To: <9923336B7F4D1A459B983065D95397B90112A087@pale.sierranevada.corp> Message-ID: <200510250323.j9P3NNJ09018@databaseadvisors.com> Hi David Brilliant I am sure this is what we will need I will first try using the view Thanks heaps Darren ------------------------- -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of David Lewis Sent: Tuesday, 25 October 2005 3:23 AM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] dba-SQLServer Digest, Vol 32, Issue 13 Darren: Hmmmm... I'm not sure I follow what you want, but here are a few thoughts: 1) functions are evaluated for each row in the query. 2) The methods for calling a function are covered in BOL 3) Would the following be an acceptable way of achieving your goal: SELECT a.* from Account a WHERE a.AccountStatusCode<>'M' AND a.Cancelled IS NOT NULL ? Not sure why using a function is preferable to this very basic approach? Or, to put it in a subquery, perhaps something like SELECT a.* from Account a WHERE a.[Primary Key] NOT IN (SELECT b.[Primary Key] FROM Account b WHERE b.AccountStatusCode<>'M' AND b.Cancelled IS NOT NULL) Or, to use a view... CREATE VIEW vw_CancelledAccounts AS SELECT a.[Primary Key] from Account a WHERE a.AccountStatusCode<>'M' AND a.Cancelled IS NOT NULL Then use it in the query as: SELECT a.* from Account a INNER JOIN vw_CancelledAccounts b ON a.[Primary Key]=b.[Primary Key] There are many other ways to get there, too. I don't see how using a function is the best choice... HTH. D. Lewis Message: 1 Date: Mon, 24 Oct 2005 16:03:48 +1000 From: "Darren DICK" Subject: [dba-SQLServer] Calling function from a query To: Message-ID: <200510240600.j9O60JJ28520 at databaseadvisors.com> Content-Type: text/plain; charset="us-ascii" Hello all What I have is a function that will (in this case) determine those records from the Account table that are now 'cancelled' In this example the cancelled status is true if there is a cancelled date in the Account Table and the Account status code is M Those 2 things combined need to occur to determine a cancelled record So rather than copy and paste the contents of the function below into each and every occurrence of testing for 'cancelled' I want a function to determine those 2 criteria then select all records from the Account table that meet the criteria as determined in the function IE how do I call the function from the query and do it 'on the fly' Make sense? Lemme know Many thanks in advance Darren ___________________________________________________ SQL = select * from Account where Account_IsCancelled(a) FUNCTION = fn Account_IsCancelled(a as Account) begin return (a.AccountStatusCode <> 'M' and a.DateCancelled is not null) end Darren _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From fhtapia at gmail.com Mon Oct 24 23:39:29 2005 From: fhtapia at gmail.com (Francisco Tapia) Date: Mon, 24 Oct 2005 21:39:29 -0700 Subject: [dba-SQLServer] Experience Connecting to Clearpath IX6800 In-Reply-To: References: Message-ID: converting to XML is just a matter of using the for xml feature, I've yet to find a good method of extracting the for xml feature straight out of sql server. Generally I build a webservice (if this data will be used often) otherwise just a view and export right out of Access 2003 as XML. (what do others do?) On 10/24/05, Julie Reardon-Taylor wrote: > > > Anyone have experience using an ODBC connection to retrieve data from this > system and convert it to XML? > > > Julie Reardon-Taylor > PRO-SOFT OF NY, INC. > 44 Public Square Suite #5 > Watertown, NY 13601 > Phone/Fax: (315) 785-0319 > www.pro-soft.net > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > -- -Francisco http://pcthis.blogspot.com |PC news with out the jargon! http://sqlthis.blogspot.com | Tsql and More... From fhtapia at gmail.com Mon Oct 24 23:51:51 2005 From: fhtapia at gmail.com (Francisco Tapia) Date: Mon, 24 Oct 2005 21:51:51 -0700 Subject: [dba-SQLServer] Calling function from a query In-Reply-To: <200510240600.j9O60JJ28520@databaseadvisors.com> References: <200510240600.j9O60JJ28520@databaseadvisors.com> Message-ID: You'd still need this function to return something so your where clause would have to be WHERE Account_IsCancelled(a) = 1 Your function would probably read more like this: Function fn Account_IsCancelled(a as Account) RETURNS INT AS BEGIN IF EXISTS( SELECT * FROM Accounts a Where (a.AccountStatusCode <> 'M' and a.DateCancelled is not null)) BEGIN RETURN 1 END ELSE BEGIN RETURN 0 END END On 10/23/05, Darren DICK wrote: > > Hello all > > What I have is a function that will (in this case) determine those records > from the Account table that are now 'cancelled' > > In this example the cancelled status is true if there is a cancelled date > in > the Account Table and the Account status code is M > Those 2 things combined need to occur to determine a cancelled record > > So rather than copy and paste the contents of the function below into each > and every occurrence of testing for 'cancelled' > I want a function to determine those 2 criteria then select all records > from > the Account table that meet the criteria as determined in the function > > IE how do I call the function from the query and do it 'on the fly' > > Make sense? > > Lemme know > > Many thanks in advance > > Darren > > ___________________________________________________ > SQL = select * from Account where Account_IsCancelled(a) > > FUNCTION = fn Account_IsCancelled(a as Account) > begin > return (a.AccountStatusCode <> 'M' and > a.DateCancelled is not null) end > > Darren > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > -- -Francisco http://pcthis.blogspot.com |PC news with out the jargon! http://sqlthis.blogspot.com | Tsql and More... From fhtapia at gmail.com Thu Oct 27 12:16:52 2005 From: fhtapia at gmail.com (Francisco Tapia) Date: Thu, 27 Oct 2005 10:16:52 -0700 Subject: [dba-SQLServer] Sql Audit Logouts Message-ID: I'm running the profiler on a Server who has had some issues w/ connectivity... initially I'm reading through the tracelogs and there are not really big problems such as huge duration times on anything "except" Audit Logouts... i've never seen them take this long... the program is from a vendor so I do not know how it's configured from their app... but i'm looking at logout times up to 9.64 hrs... with the shortest ones being only a few hundred milliseconds (ie... 200ms). The majority of the application names point to their appname, but some point to the .Net sqlClient Data provider here is a sample snapshot APP CPU READS WRITES DURATION ClientID SPID StartTime COLLOGIN 129776 14759675 3305 34718656 788 53 10/26/05 8:11 LTILOGIN 2033 96237 252 29670173 1960 54 10/26/05 8:12 LTILOGIN 779 50651 641 34692673 2364 55 10/26/05 8:12 4784 249436 191 29748840 2376 56 10/26/05 8:12 0 73 0 29744313 2376 57 10/26/05 8:12 COLLOGIN 55892 4235589 782 26828546 856 58 10/26/05 8:13 COLLOGIN 313 23476 14 27890093 1524 60 10/26/05 8:13 -- -Francisco http://pcthis.blogspot.com |PC news with out the jargon! http://sqlthis.blogspot.com | Tsql and More... From tuxedo_man at hotmail.com Fri Oct 28 19:53:19 2005 From: tuxedo_man at hotmail.com (Billy Pang) Date: Sat, 29 Oct 2005 00:53:19 +0000 Subject: [dba-SQLServer] Sql Audit Logouts In-Reply-To: Message-ID: maybe some sort of connection pooling on the application side to optimize performance? >From: Francisco Tapia >Reply-To: dba-sqlserver at databaseadvisors.com >To: SQL Server 2k List , >dba-sqlserver at databaseadvisors.com >Subject: [dba-SQLServer] Sql Audit Logouts >Date: Thu, 27 Oct 2005 10:16:52 -0700 > >I'm running the profiler on a Server who has had some issues w/ >connectivity... initially I'm reading through the tracelogs and there >are not really big problems such as huge duration times on anything >"except" Audit Logouts... i've never seen them take this long... the >program is from a vendor so I do not know how it's configured from >their app... but i'm looking at logout times up to 9.64 hrs... with >the shortest ones being only a few hundred milliseconds (ie... 200ms). > >The majority of the application names point to their appname, but some >point to the .Net sqlClient Data provider > >here is a sample snapshot >APP CPU READS WRITES DURATION ClientID SPID > StartTime >COLLOGIN 129776 14759675 3305 34718656 788 >53 10/26/05 8:11 >LTILOGIN 2033 96237 252 29670173 1960 > 54 10/26/05 8:12 >LTILOGIN 779 50651 641 34692673 2364 > 55 10/26/05 8:12 > 4784 249436 191 29748840 >2376 56 10/26/05 8:12 > 0 73 0 >29744313 2376 57 10/26/05 8:12 >COLLOGIN 55892 4235589 782 26828546 856 >58 10/26/05 8:13 >COLLOGIN 313 23476 14 27890093 1524 > 60 10/26/05 8:13 > > >-- >-Francisco >http://pcthis.blogspot.com |PC news with out the jargon! >http://sqlthis.blogspot.com | Tsql and More... >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > From john at winhaven.net Sat Oct 29 18:23:42 2005 From: john at winhaven.net (President) Date: Sat, 29 Oct 2005 18:23:42 -0500 Subject: [dba-SQLServer] Administrivia - Message Size Limits Message-ID: <01bf01c5dcdf$cd99beb0$6b01a8c0@ScuzzPaq> Greeting to all list members, The Database Advisors, Inc. Board of Directors has recently approved lowering the size limits of messages on the list to 20k. This is an attempt to encourage the snipping of emails during replies and to reduce the size of the archives in the future. Our archives are getting quite large, hence the cost of storing them is going up. It is unlikely that we will see many messages exceed 20k in size if they are properly snipped. HOWEVER our list moderators will let messages of any size through as long as the following criteria is met: 1. it has been properly snipped 2. it does not contain attachments 3. it was sent using plain text formatting 4. it contains valuable technical information If any of these criteria is not met, the post will be rejected. Please bear in mind that, although it would not be typical of our elite corp. of moderators, it may take moderators up to 24 hours to get to your post to allow it through. We initially experimented with the 20k limit on the Off Topic OT list where posts tend to be long, for the most part because of poor snipping. One other major cause of messages being held due to exceeding the size limit was messages being sent in html or rich text formats. (The size is determined before the html formatting is stripped and presently there is nothing we can do about this.) In the weeks since we reduced the size limit on the OT (where messages are often long winded (to say the least :o)) the number of messages rejected due to exceeding the size limits has dropped to near zero. Because of this we do not foresee a problem with the technical lists but please let us know if you are experiencing any problems because of this limit. We sincerely hope this does not cause any complications in your utilization of this valuable asset. Regards, John Bartow, President Database Advisors, Inc. Email: mailto:president at databaseadvisors.com Website: http://www.databaseadvisors.com