<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Stored Procedures - Techyaz.com</title>
	<atom:link href="https://techyaz.com/tag/stored-procedures/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>Tips, Tutorials and How-to Topics</description>
	<lastBuildDate>Mon, 23 Apr 2018 12:00:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8</generator>

<image>
	<url>https://techyaz.com/wp-content/uploads/2017/11/cropped-Site-icon-150x150.png</url>
	<title>Stored Procedures - Techyaz.com</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Change SQL Server Instance Name?</title>
		<link>https://techyaz.com/sql-server/change-sql-server-instance-name/</link>
					<comments>https://techyaz.com/sql-server/change-sql-server-instance-name/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Mon, 23 Apr 2018 10:18:35 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[SQL Server Connectivity Issue]]></category>
		<category><![CDATA[Stored Procedures]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=2112</guid>

					<description><![CDATA[<p>Changing SQL Server Instance name is not a routine task. Although, sometimes we get requirements to change SQL Instance name. There are multiple scenarios in which we need to rename SQL Server Instance like: If you have changed database server&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/change-sql-server-instance-name/">How to Change SQL Server Instance Name?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Changing SQL Server Instance name is not a routine task. Although, sometimes we get requirements to change SQL Instance name. There are multiple scenarios in which we need to rename SQL Server Instance like:</p>
<ul>
<li>If you have changed database server name then we should change SQL Server Instance name as well.</li>
<li>If you have cloned a database server from DBSERVER1 to DBSERVER2. Here, SQL Server installed on DBSERVER1 will be copied with same name to DBSERVER2. You need to change the SQL Server instance name on DBSERVER2.</li>
<li>Naming convention is not met.</li>
</ul>
<p>Please keep in mind that we cannot change complete name of SQL Server named instance. Suppose you have installed a named instance <em>SERVERNAME</em>\<em>DBInstance1 </em>on your server. If you want to rename this named instance then we can only change first part of this name i.e. <em>SERVERNAME</em>. You cannot change <em>DBInstance1</em> so your named instance will look like <em>DBSERVERNAME</em>\<em>DBInstance1</em> post name change.</p>
<h3><span style="color: #333399;">Impact of Changing SQL Server Instance Name</span></h3>
<p><img fetchpriority="high" decoding="async" class="size-full wp-image-2113 alignright" src="http://techyaz.com/wp-content/uploads/2018/04/Rename-SQL-Server-Instance.png" alt="Rename SQL Server Instance name" width="300" height="300" srcset="https://techyaz.com/wp-content/uploads/2018/04/Rename-SQL-Server-Instance.png 300w, https://techyaz.com/wp-content/uploads/2018/04/Rename-SQL-Server-Instance-150x150.png 150w, https://techyaz.com/wp-content/uploads/2018/04/Rename-SQL-Server-Instance-160x160.png 160w, https://techyaz.com/wp-content/uploads/2018/04/Rename-SQL-Server-Instance-320x320.png 320w" sizes="(max-width: 300px) 100vw, 300px" /></p>
<p>We need to plan carefully before renaming any SQL Server Instance. Below is the list of possible impacts that you should go through while renaming SQL Server Instance name.</p>
<ul>
<li>Those domain users who are accessing or connecting to the SQL Server Instance as part of Windows group will not be able to connect to renamed instance of SQL Server. Make sure to update the Windows group to specify the new computer name to establish connectivity to the SQL Server instance.</li>
<li>You would not be able to access reporting services after renaming the instance name. You should follow steps mentioned in attached article to <strong><a href="http://techyaz.com/sql-server/troubleshooting/configure-reporting-services-after-renaming-sql-server-instance/" target="_blank" rel="noopener">rename SQL Server instance that is running with reporting services</a></strong>.</li>
<li>If you have database mirroring on the SQL Server instance then you need to drop the mirroring and then reconfigure it post renaming the SQL Server Instance.</li>
<li>Renaming SQL Server instance name does not support if your instance has replication, except when you use log shipping with replication.</li>
<li>You can change the name of SQL Server instance on secondary server in log shipping if the primary server is permanently lost.</li>
<li>If you have linked server configurations then it will be affected by the computer renaming operation. Use <strong>sp_addlinkedserver</strong>or <strong>sp_setnetname</strong> to update computer name references.</li>
</ul>
<h3><span style="color: #333399;">Rename SQL Server Instance</span></h3>
<p>SQL Server instance name along with other system metadata stores in <em>sys.servers</em> system object. We need to update details in system metadata to reflect new name. Also i would suggest to not change SQL Server Instance name directly on your production server.</p>
<p>Suppose you have installed default instance of SQL Server in your database server. If you have changed the name of your database server then you need to update the name of default SQL Server instance as well in sys.servers system table. First, we need to drop the existing SQL Server instance name then we will add new name as per our choice. Follow below steps to change SQL Server instance name.</p>
<pre><span style="color: #0000ff;"><strong><span style="color: #008000;">--Drop existing name</span>
sp_dropserver [old_Instance_name]; </strong></span>
<span style="color: #0000ff;"><strong>GO </strong></span>

<span style="color: #0000ff;"><strong><span style="color: #008000;">--Update New name</span>
sp_addserver [new_Instance_name], local; </strong></span>
<span style="color: #0000ff;"><strong>GO</strong></span></pre>
<p>If you have installed a named instance on your database server then you can run below command to change SQL Server Instance name.</p>
<pre><strong><span style="color: #0000ff;">sp_dropserver [old_name\instancename]; </span></strong>
<strong><span style="color: #0000ff;">GO </span></strong>

<strong><span style="color: #0000ff;">sp_addserver [new_name\instancename], local; </span></strong>
<strong><span style="color: #0000ff;">GO</span></strong></pre>
<p><strong>Note:</strong> Make sure to restart SQL Server services post running above commands to reflect these changes.</p>
<p>You can verify the changes by running below commands or by querying sys.servers system table. If you have not restarted SQL Server services then you might be getting older SQL Server instance name. So restart SQL Server service to apply new changes.</p>
<pre><span style="color: #0000ff;"><strong>SELECT @@SERVERNAME</strong></span></pre>
<p>If you have remote logins on your database server then you might get error 15190 while running sp_dropserver command. Read below article to fix this issue and then proceed with the instance name change.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/fix-error-15190-there-are-still-remote-logins-for-the-server-dbserver/" target="_blank" rel="noopener">Fix Error 15190: There are still remote logins for the server</a></strong></li>
</ul>
<p>I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/" target="_blank" rel="noopener">Facebook</a> and on <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p><span style="color: #800000;"><em><strong>Read More:</strong></em></span></p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/configure-reporting-services-after-renaming-sql-server-instance/" target="_blank" rel="noopener">Configure Reporting Services After Renaming SQL Server Instance Name</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/find-when-sql-server-was-installed/" target="_blank" rel="noopener">How to Find When SQL Server was Installed on your database server?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/what-should-be-the-best-value-for-fill-factor-in-sql-server/" target="_blank" rel="noopener">What should be best value for fill factor in SQL Server?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/to-find-out-no-of-traces-running-on-your-db-instance/" target="_blank" rel="noopener">Find all trace profilers running on SQL Server Instance</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/how-to-move-a-table-to-a-different-filegroup/" target="_blank" rel="noopener">How to Move a Table to Another Filegroup?</a></strong></li>
</ul>
<p>The post <a href="https://techyaz.com/sql-server/change-sql-server-instance-name/">How to Change SQL Server Instance Name?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/change-sql-server-instance-name/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
