{"id":1832,"date":"2012-04-13T15:35:40","date_gmt":"2012-04-13T15:35:40","guid":{"rendered":"http:\/\/craftydba.com\/?p=1832"},"modified":"2017-10-12T00:55:17","modified_gmt":"2017-10-12T00:55:17","slug":"renaming-a-server","status":"publish","type":"post","link":"https:\/\/craftydba.com\/?p=1832","title":{"rendered":"Renaming A Server"},"content":{"rendered":"<p>I was recently approached by the WINTEL to help rename a Windows 2003 Server that has Symantec <a href=\"http:\/\/en.wikipedia.org\/wiki\/Backup_Exec\">Backup Exec <\/a>12.5.  This backup software uses the Express Version of SQL Server 2005 to manage information about backups, restores, and schedules.  Since I have not done this task in a while, I wanted to write down the steps for future requests.<\/p>\n<p>The first task is to connect to the Express Version of SQL Server 2005 via my locally installed SQL Server Management Studio tool.  <\/p>\n<p>This can be accomplished by using the following steps from <a href=\"http:\/\/support.microsoft.com\/kb\/914277\">MSDN<\/a>.<\/p>\n<p>\n1 &#8211; Enable remote connections.  Please see image below.\n<\/p>\n<p><a href=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/Remote-Connections.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/Remote-Connections.jpg\" alt=\"\" title=\"Remote-Connections\" width=\"668\" height=\"504\" class=\"alignleft size-full wp-image-1844\" srcset=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/Remote-Connections.jpg 668w, https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/Remote-Connections-300x226.jpg 300w\" sizes=\"auto, (max-width: 668px) 100vw, 668px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\n2 &#8211; Allow TCP\/IP protocol for connections (network\/client).  Please see images below.\n<\/p>\n<p><a href=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/Client-Protocols.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/Client-Protocols.jpg\" alt=\"\" title=\"Client-Protocols\" width=\"642\" height=\"284\" class=\"alignleft size-full wp-image-1840\" srcset=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/Client-Protocols.jpg 642w, https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/Client-Protocols-300x132.jpg 300w\" sizes=\"auto, (max-width: 642px) 100vw, 642px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/Network-Protocols.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/Network-Protocols.jpg\" alt=\"\" title=\"Network-Protocols\" width=\"670\" height=\"272\" class=\"alignleft size-full wp-image-1857\" srcset=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/Network-Protocols.jpg 670w, https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/Network-Protocols-300x121.jpg 300w\" sizes=\"auto, (max-width: 670px) 100vw, 670px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\n3 &#8211; Start the browser service.  Please see image below.\n<\/p>\n<p><a href=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/Enable-Services.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/Enable-Services.jpg\" alt=\"\" title=\"Enable-Services\" width=\"670\" height=\"249\" class=\"alignleft size-full wp-image-1859\" srcset=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/Enable-Services.jpg 670w, https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/Enable-Services-300x111.jpg 300w\" sizes=\"auto, (max-width: 670px) 100vw, 670px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\n4 &#8211; Configure the firewall to allow traffic\n<\/p>\n<p>The second task is to identify the number of instances running on this server.  This can be easily obtained by running the following script that reads the settings from the registry.<\/p>\n<pre class=\"lang:TSQL theme:familiar mark:1,2-3\" title=\"tsql - find all server instances\">\r\n--\r\n-- Step 1 - Find all instances on SQL Express\r\n--\r\n\r\n-- Create table variable\r\nDECLARE @GetInstances \r\n    TABLE (Value1 nvarchar(100),  InstanceName nvarchar(100),  Data2 nvarchar(100))  \r\n\r\n-- Add the instance data to the table variable\r\nINSERT INTO @GetInstances \r\nEXEC xp_regread   \r\n  @rootkey = 'HKEY_LOCAL_MACHINE',   \r\n  @key = 'SOFTWARE\\Microsoft\\Microsoft SQL Server',   \r\n  @value_name = 'InstalledInstances'  \r\n\r\n-- Show the rows from the table variable\r\nSelect InstanceName from @GetInstances \r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>The third task is to drop the old server name and add the new server name so that traffic can be recieved by the SQL Server database.  The <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms189804.aspx\">sp_helpserver<\/a>, <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms174310.aspx\">sp_dropserver<\/a>, and <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms174411.aspx\">sp_addserver <\/a>system stored procedures are used to accomplish this task.<\/p>\n<pre class=\"lang:TSQL theme:familiar mark:1,2-3\" title=\"tsql - drop old server, add new server\">\r\n--\r\n-- Step 2 - Drop and add new server name\r\n--\r\n\r\n-- Get current server info\r\nsp_helpserver\r\n\r\n-- Drop the old name\r\nsp_dropserver 'SATPBK01\\BKUPEXEC'\r\nGO\r\n\r\n-- Add the new name\r\nsp_addserver 'SATPDFS01\\BKUPEXEC', local\r\nGO\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/Server-Instances.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/Server-Instances.jpg\" alt=\"\" title=\"Server-Instances\" width=\"778\" height=\"130\" class=\"alignleft size-full wp-image-1845\" srcset=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/Server-Instances.jpg 778w, https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/Server-Instances-300x50.jpg 300w\" sizes=\"auto, (max-width: 778px) 100vw, 778px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Last but not least, SQL Server is not the only program depending upon the computer name.  Use the registry editor to search for all occurences of the name.  For instance, Backup Exec has a couple of registry keys that contain the name of the old server.  Please see <a href=\"http:\/\/www.symantec.com\/business\/support\/index?page=content&#038;id=TECH137614\">article <\/a>on Symantec site.<\/p>\n<p><span style=\"color: #FF0000;\">Change only registry keys that you have researched and know will not break your server.<\/span><\/p>\n<p>A backup of the registry and a rescue disk is always a good plan when making these type of changes.  Making one change at a time allows you to pin point any errors more easily.  In short, good luck renaming your server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was recently approached by the WINTEL to help rename a Windows 2003 Server that has Symantec Backup Exec 12.5. This backup software uses the Express Version of SQL Server 2005 to manage information about backups, restores, and schedules. Since I have not done this task in a while, I wanted to write down the steps for future requests. The first task is to connect to the Express Version of SQL Server 2005 via my locally installed SQL Server Management Studio tool. This can be accomplished by using the following&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[406,408,12,15,405,407,404,403,402,28,29],"class_list":["post-1832","post","type-post","status-publish","format-standard","hentry","category-db-admin","tag-browser-service","tag-firewall-exceptions","tag-free-code","tag-john-f-miner-iii","tag-network-protocols","tag-remote-logins","tag-sp_addserver","tag-sp_dropserver","tag-sp_helpserver","tag-sql-server","tag-tsql"],"_links":{"self":[{"href":"https:\/\/craftydba.com\/index.php?rest_route=\/wp\/v2\/posts\/1832","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/craftydba.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/craftydba.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/craftydba.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/craftydba.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1832"}],"version-history":[{"count":0,"href":"https:\/\/craftydba.com\/index.php?rest_route=\/wp\/v2\/posts\/1832\/revisions"}],"wp:attachment":[{"href":"https:\/\/craftydba.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1832"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/craftydba.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1832"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/craftydba.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1832"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}