February 18, 2010 at 12:32 pm
Dears,
SQL Server instance in my machine was MACHINENAME\SQL. For some reason i thought to rename the servername as MACHINENAME\MSSQL2005 using the following commands.
select @@servername
--this returned the old instance name of the SQL Server => MACHINENAME\SQL
sp_dropserver 'MACHINENAME\SQL'
sp_addserver 'MACHINENAME\MSSQL2005 ', 'local'
After executing above queries, i have stopped the SQL Server instance from the SQL Server Configuration and restarted.
When i am connecting to the database through Management Studio it connects to the old SQL Server instance "MACHINENAME\SQL" and not for the new one. When i tried connecting to the new instance it prompts for an error saying connecting to wrong servername\instance.
After connecting to the old instance when i executed the following query :
select * from sys.servers
it does returns the new sql server instance name => MACHINENAME\MSSQL2005 and other details (ex: server id, product, source, etc).
how can i connect to the new instance of the server through management studio? am i missing any steps? any suggestions?
thanks in advance,
Ammar.
February 18, 2010 at 1:15 pm
You can't rename sql server instance name, server name can be renamed.
For example, you can change a computer named MB1 that hosts an instance of SQL Server named Instance1 to another name, such as MB2. However, the instance part of the name, Instance1, will remain unchanged. In this example, the \\ComputerName\InstanceName would be changed from \\MB1\Instance1 to \\MB2\Instance1.
http://msdn.microsoft.com/en-us/library/ms143799.aspx
MJ
February 18, 2010 at 9:59 pm
thanks a lot. 🙂
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply