﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by Cowboy DBA  / Get Data, Log, Backup, and Binn Directory (SQL Server 2005) / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 21 May 2013 12:27:29 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Get Data, Log, Backup, and Binn Directory (SQL Server 2005)</title><link>http://www.sqlservercentral.com/Forums/Topic607313-1205-1.aspx</link><description>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 pathSET @path = NULLexec @returncode = master.dbo.xp_instance_regread N'hkey_local_machine',N'software\microsoft\mssqlserver\CPE',N'ErrorDumpDir', @path output, 'no_output'Thanks a bunch!</description><pubDate>Wed, 17 Jun 2009 09:54:49 GMT</pubDate><dc:creator>dhay1999</dc:creator></item><item><title>RE: Get Data, Log, Backup, and Binn Directory (SQL Server 2005)</title><link>http://www.sqlservercentral.com/Forums/Topic607313-1205-1.aspx</link><description>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_regreadThanks again.</description><pubDate>Tue, 30 Dec 2008 02:57:33 GMT</pubDate><dc:creator>Paul Munkenbeck</dc:creator></item><item><title>RE: Get Data, Log, Backup, and Binn Directory (SQL Server 2005)</title><link>http://www.sqlservercentral.com/Forums/Topic607313-1205-1.aspx</link><description>Yes. On 32Bit though</description><pubDate>Tue, 16 Dec 2008 01:09:08 GMT</pubDate><dc:creator>Cowboy DBA</dc:creator></item><item><title>RE: Get Data, Log, Backup, and Binn Directory (SQL Server 2005)</title><link>http://www.sqlservercentral.com/Forums/Topic607313-1205-1.aspx</link><description>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.</description><pubDate>Mon, 15 Dec 2008 10:54:14 GMT</pubDate><dc:creator>Rudy Panigas</dc:creator></item><item><title>RE: Get Data, Log, Backup, and Binn Directory (SQL Server 2005)</title><link>http://www.sqlservercentral.com/Forums/Topic607313-1205-1.aspx</link><description>This is odd as I've just ran it against a named instance and it works as expected. :(:unsure:</description><pubDate>Mon, 15 Dec 2008 10:23:46 GMT</pubDate><dc:creator>Cowboy DBA</dc:creator></item><item><title>RE: Get Data, Log, Backup, and Binn Directory (SQL Server 2005)</title><link>http://www.sqlservercentral.com/Forums/Topic607313-1205-1.aspx</link><description>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</description><pubDate>Mon, 15 Dec 2008 08:54:24 GMT</pubDate><dc:creator>Rudy Panigas</dc:creator></item><item><title>Get Data, Log, Backup, and Binn Directory (SQL Server 2005)</title><link>http://www.sqlservercentral.com/Forums/Topic607313-1205-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/scripts/Data+path/65026/"&gt;Get Data, Log, Backup, and Binn Directory (SQL Server 2005)&lt;/A&gt;[/B]</description><pubDate>Sun, 23 Nov 2008 23:44:41 GMT</pubDate><dc:creator>Cowboy DBA</dc:creator></item></channel></rss>