How to change a default Instance name in SQL Server

Hi All,
Can I change the name of the SQL Server Instance( either Default or Named) through some procedure?
saratcmAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

chapmandewCommented:
No, you cannot.  The default instance is the name of the machine...so, you'd need to change the machine name and then do some things to change the instance name.
0
DarksquireCommented:
You have to uninstall/reinstall to change an instance name. There is no other way that I know of.

http://social.msdn.microsoft.com/Forums/en-US/sqlsetupandupgrade/thread/4fec5f6e-71c1-4f5b-a8be-fd94d15c89f1
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
saratcmAuthor Commented:
THANKS!
0
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
Yes, you can change the Instance name of SQL Server both Default and Named instances..
Ideally this needs to be done in case of any Hostname or Servername changes and have a look at all the pointers mentioned in the link below:

http://msdn.microsoft.com/en-us/library/ms143799.aspx

If you feel this helped you out, kindly click on Request Attention button and assign points accordingly..
0
chapmandewCommented:
Pretty much exactly what I said in my first post.  :)
0
Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
Yes chapmandew, but since Re-installation approach was marked as answer I thought ( Hope I am wrong) that you agreed with that..
Since you haven't raised any objections, thought of objecting to that answer..

Kindly let me know if I am wrong.
0
chapmandewCommented:
You're wrong.  :)

Depending on the mood Im in, sometimes I just let the question go rather than object.
0
DarksquireCommented:
Yes you can, in SQL Server 2008. This question pertained to SQL Server 2005.
There is a "hack" method with stipulations below for SQL Server 2005
The sp_dropserver / sp_addserver method works only for the DEFAULT instance though. On the default instance only, by using sp_dropserver / sp_addserver you can change the server name reported by @@SERVERNAME. You would also have to change your machnine name if you wanted remote clients to be able to connect to that instance using that name.

For a NAMED (non-default) instance it isn't so easy. The supported method is to uninstall / re-install. There are registry hacks to rename a default instance, but you may prefer the safer option of re-installing:

1. drop current instname (sp_dropserver)
2. add new instance name (sp_addserver 'new name','local')
3. stop sqlserver
4. modify hklm\software\microsoft\microsoft sql server\
5. modify hklm\system\currentcontrolset\services\mssql$inst
6. use "sc create" to add new mssql$<inst>
7. start up with new inst_name - voila!

Note: you can do all this very safely. Instead of modifying the existing keys, you can create a new set. Modify this new set with appropriate changes (I'll see about putting an article together documenting it all). Register a new service for the new instance and then start it. Your original configuration/data is _never_ touched, so, if need to, you can always start up the old instance.

Info found at: http://groups.google.com/group/microsoft.public.sqlserver.server/browse_thread/thread/544c4eaf43ddfaf3/e9065e05718e984e

0
Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
>> Depending on the mood Im in, sometimes I just let the question go rather than object.

Ok, Got it..

>> There are registry hacks to rename a default instance, but you may prefer the safer option of re-installing:

No registry hacks required for that as I have used only sp_dropserver and sp_addserver to change default instance name in SQL Server 2005 without any issues.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.