Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Article Discussions
»
Article Discussions by Author
»
Discuss content posted by Cowboy DBA
»
Get Data, Log, Backup, and Binn Directory...
Get Data, Log, Backup, and Binn Directory (SQL Server 2005)
Rate Topic
Display Mode
Topic Options
Author
Message
Cowboy DBA
Cowboy DBA
Posted Sunday, November 23, 2008 11:44 PM
SSC Journeyman
Group: General Forum Members
Last Login: 2 days ago @ 5:32 AM
Points: 88,
Visits: 1,960
Comments posted to this topic are about the item
Get Data, Log, Backup, and Binn Directory (SQL Server 2005)
Post #607313
Rudy Panigas
Rudy Panigas
Posted Monday, December 15, 2008 8:54 AM
Old Hand
Group: General Forum Members
Last Login: 2 days ago @ 7:38 AM
Points: 306,
Visits: 1,012
Hello,
Nice script. I've tested it a SQL server with 6 instances and your code does not product the instance name. It seem to work on default instance only.
I like it.
Rudy
Post #619655
Cowboy DBA
Cowboy DBA
Posted Monday, December 15, 2008 10:23 AM
SSC Journeyman
Group: General Forum Members
Last Login: 2 days ago @ 5:32 AM
Points: 88,
Visits: 1,960
This is odd as I've just ran it against a named instance and it works as expected.
Post #619793
Rudy Panigas
Rudy Panigas
Posted Monday, December 15, 2008 10:54 AM
Old Hand
Group: General Forum Members
Last Login: 2 days ago @ 7:38 AM
Points: 306,
Visits: 1,012
Are you executing this on a SQL server with more than one instance? I've tried on SQL server 64bit as I don't have any 32 bit servers.
Post #619816
Cowboy DBA
Cowboy DBA
Posted Tuesday, December 16, 2008 1:09 AM
SSC Journeyman
Group: General Forum Members
Last Login: 2 days ago @ 5:32 AM
Points: 88,
Visits: 1,960
Yes. On 32Bit though
Post #620215
Paul Munkenbeck
Paul Munkenbeck
Posted Tuesday, December 30, 2008 2:57 AM
SSC Rookie
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 9:03 AM
Points: 44,
Visits: 96
Hi, this script is a great idea and does exactly what I needed to document some server settings before I apply a change to default data and log values.
I have found a small bug in the script. If the DefaultData value is set but the DefaultLog is not set then the DefaultLog is displayed as the DefaultData value rather than the SQLDataRoot value. This is because the @path variable is no longer null going into the xp_instance_regread for the DefaultLog value. The xp does not find the value for DefaultLog as it is not set, and therefore does not alter the value in @path, but @path is not null as it contains the value from DefaultData set previously.
To fix this I just added a SET @path = NULL before each call to xp_instance_regread
Thanks again.
Post #627169
dhay1999
dhay1999
Posted Wednesday, June 17, 2009 9:54 AM
Grasshopper
Group: General Forum Members
Last Login: Thursday, March 29, 2012 9:12 AM
Points: 21,
Visits: 343
Exactly what I was looking for. I needed a path for automated tracing that the sql agent account had permissions to, and not dump everything in the root of C:\ like my predecessor in SQL 2000. It works on my multiple instance machine SQL2008.
I added the following to get the default errorlog path
SET @path = NULL
exec @returncode = master.dbo.xp_instance_regread N'hkey_local_machine',N'software\microsoft\mssqlserver\CPE',N'ErrorDumpDir', @path output, 'no_output'
Thanks a bunch!
david hay
Post #736742
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.