Monday, July 19, 2010

Change SQL Server Name

In case you need to change your server name, you could use this tips so SQL Server will still run smoothly after you change your server name.
For example you need to change your server name from 'ServerA' into 'ServerB', firstly drop the old server name with this command : sp_dropserver 'ServerA'.
After that, you should add your new server name with this command : sp_addserver 'ServerB','local'.
Parameter 'local' in this command means that this server is local server, not other linked server.
To check your current server name, you could use this command : SELECT * FROM sys.servers.
If you do all the things right, you should see your server listed there.

No comments: