﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Discuss Content Posted by Vince Iacoboni / Article Discussions / Article Discussions by Author  / Get And Set SQL Server 2005 Instance Registry Values / 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>Mon, 20 May 2013 15:26:42 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Get And Set SQL Server 2005 Instance Registry Values</title><link>http://www.sqlservercentral.com/Forums/Topic378710-257-1.aspx</link><description>Vince, SQLArg0 will have the first startup option, no matter which one it is.  You need check each possible one until the desired startup option is found or the key does not exist.  It's annoying.  There can several options (e.g., trace flags).  SQLArg0,..., SQLArg10,....Andy, if you have more than a few dozen SQL Servers, it helps to use these tools to standardize the installation and setup via scripts.  The GUI leaves too much room for mistakes by large teams.  It's also easier to just run the script.  There is a SMO Setting class of some sort, but I think it has a warning that it's going away in a future version.  I'm stickin' with the xp version until I'm forced to do otherwise.  It's nice when something does not have to be fixed with each version - getting too old for much more of that.</description><pubDate>Mon, 03 Nov 2008 19:06:51 GMT</pubDate><dc:creator>rstone</dc:creator></item><item><title>RE: Get And Set SQL Server 2005 Instance Registry Values</title><link>http://www.sqlservercentral.com/Forums/Topic378710-257-1.aspx</link><description>If Microsoft.VisualBasic.Right(hpServerName.ToUpper, 1) = "C" Then                    Dim rk As RegistryKey = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, _                    hpServerName).OpenSubKey("Software\Microsoft\Microsoft SQL Server\MSSQL." &amp; strX &amp; "\Cluster")                    Dim Instances As String                    Instances = rk.GetValue("ClusterName")To all those who want to do the Perl script in net code behind.</description><pubDate>Fri, 12 Oct 2007 09:27:13 GMT</pubDate><dc:creator>George Orellana</dc:creator></item><item><title>RE: Get And Set SQL Server 2005 Instance Registry Values</title><link>http://www.sqlservercentral.com/Forums/Topic378710-257-1.aspx</link><description>Thanks, Robert, I'll add them in.</description><pubDate>Tue, 31 Jul 2007 11:53:00 GMT</pubDate><dc:creator>viacoboni</dc:creator></item><item><title>RE: Get And Set SQL Server 2005 Instance Registry Values</title><link>http://www.sqlservercentral.com/Forums/Topic378710-257-1.aspx</link><description>&lt;P&gt;Your list doesn't include the DefaultData and DefaultLog entries in it.&lt;/P&gt;&lt;P&gt;These are the only values I read or set on a regular basis:&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;Exec&lt;/FONT&gt;&lt;FONT size=2&gt; xp_instance_regread N&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;'HKEY_LOCAL_MACHINE'&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;, &lt;/FONT&gt;&lt;FONT size=2&gt;N&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;'Software\Microsoft\MSSQLServer\MSSQLServer'&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;, &lt;/FONT&gt;&lt;FONT size=2&gt;N&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;'BackupDirectory'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#ff0000 size=2&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#1111ff&gt;Exec&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;FONT size=2&gt;xp_instance_regread N&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;'HKEY_LOCAL_MACHINE'&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;N&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;'Software\Microsoft\MSSQLServer\MSSQLServer'&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;N&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;'DefaultLog'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#ff0000 size=2&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#1111ff&gt;Exec&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; xp_instance_regread N&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;'HKEY_LOCAL_MACHINE'&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;N&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;'Software\Microsoft\MSSQLServer\MSSQLServer'&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;N&lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;'DefaultData'&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Tue, 31 Jul 2007 11:45:00 GMT</pubDate><dc:creator>Robert Davis</dc:creator></item><item><title>RE: Get And Set SQL Server 2005 Instance Registry Values</title><link>http://www.sqlservercentral.com/Forums/Topic378710-257-1.aspx</link><description>Andy, I'm not very familiar with SMO or DMO, but you can only work with what portions of the object model are exposed.  BackupDirectory is an exposed property, with warnings not to use it.  I didn't see any properties for ports.  Of course, SMO and DMO have the advantage that they are documented and supported better than registry keys.For me, I'm comfortable with Perl and the registry so this was my way to solve the issue.  I can see that others might prefer a SMO approach.</description><pubDate>Tue, 31 Jul 2007 07:40:00 GMT</pubDate><dc:creator>viacoboni</dc:creator></item><item><title>RE: Get And Set SQL Server 2005 Instance Registry Values</title><link>http://www.sqlservercentral.com/Forums/Topic378710-257-1.aspx</link><description>&lt;P&gt;Sorta, maybe wasnt the best question either. Are there things you're able to change this way that you can't using SMO or DMO? &lt;/P&gt;</description><pubDate>Tue, 31 Jul 2007 07:28:00 GMT</pubDate><dc:creator>Andy Warren</dc:creator></item><item><title>RE: Get And Set SQL Server 2005 Instance Registry Values</title><link>http://www.sqlservercentral.com/Forums/Topic378710-257-1.aspx</link><description>Andy,Are you asking why registry access in general is needed within SQL, or the SQL Server 2005 specific registry keys discussed in the article?  In some ways, the answer is the same.  The registry controls how certain programs interact with their environment.  Using SQL Server as an example, it specifies certain paths and options, such as the backup path and port options discussed in the article.  If you want these options tweaked, you must either use sanctioned front-ends (assuming they are exposed there) or some kind of utility to do so.  In my environment, getting those paths and options to be consistent across multiple instances was important enough that I wrote this utility.For example, the backup path specifies where files will go if they're not fully qualified.  This can make it much easier to backup using a DISK= statement.Does that answer your question?</description><pubDate>Tue, 31 Jul 2007 06:54:00 GMT</pubDate><dc:creator>viacoboni</dc:creator></item><item><title>RE: Get And Set SQL Server 2005 Instance Registry Values</title><link>http://www.sqlservercentral.com/Forums/Topic378710-257-1.aspx</link><description>&lt;P&gt;Interesting stuff. Couple questions though. Can you post some examples of why you've needed registry access from within SQL? I'm not a PERL user, so is there any advantage to using PERL over the already loaded .Net framework?&lt;/P&gt;</description><pubDate>Tue, 31 Jul 2007 05:24:00 GMT</pubDate><dc:creator>Andy Warren</dc:creator></item><item><title>RE: Get And Set SQL Server 2005 Instance Registry Values</title><link>http://www.sqlservercentral.com/Forums/Topic378710-257-1.aspx</link><description>&lt;P&gt;Was there anything in the PERL script that couldn't be accomplished with xp_instance_regread and xp_instance_regwrite?&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description><pubDate>Mon, 30 Jul 2007 21:56:00 GMT</pubDate><dc:creator>Robert Davis</dc:creator></item><item><title>Get And Set SQL Server 2005 Instance Registry Values</title><link>http://www.sqlservercentral.com/Forums/Topic378710-257-1.aspx</link><description>Comments posted here are about the content posted at &lt;A HREF="http://www.sqlservercentral.com/columnists/vIacoboni/3092.asp"&gt;http://www.sqlservercentral.com/columnists/vIacoboni/3092.asp&lt;/A&gt;</description><pubDate>Tue, 03 Jul 2007 09:52:00 GMT</pubDate><dc:creator>viacoboni</dc:creator></item></channel></rss>