How to change the servername in sql server.

I have a remote server, whose ip is 172.16.3.17.
I have Sql Server installed in it, the servername is shown as ADMISSIONCELL
Can  i change its name to 172.16.3.17
searchsanjaysharmaAsked:
Who is Participating?
 
Ryan McCauleyConnect With a Mentor Data and Analytics ManagerCommented:
I don't understand why you'd need to set the results of @@SERVERNAME to your IP Address - the servername should work fine - but you do it like this:

SELECT @@SERVERNAME
sp_dropserver 'ADMISSIONCELL'
sp_addserver '172.16.3.17', local
SELECT @@SERVERNAME

Open in new window


That said, I don't believe this local server name actually serves any purpose - it's just there so that applications and processes know the computer's name (including database instance, if applicable). The SQL Server, as far as I'm aware, doesn't really care what's in that value - I have cases where I've set the value to something else intentionally without issue (in one case, it was to move a license from an old server to a new server when the application required the server name to be something particular, so this did the trick).

Really, I'm not sure why you'd need to set this value to the IP address - it has nothing to do with connectivity at all, so it may not be necessary. If we haven't answered your question yet, it might be helpful to add some more detail about what you're trying to accomplish by setting this value to an IP Address.
0
 
sammySeltzerCommented:
You will need to run sp_dropserver, and sp_addserver with IP Address.

I have not tried with IP Address but I don't see why it would not work.

See MS kb:

http://support.microsoft.com/kb/303774
0
 
David ToddSenior DBACommented:
Hi,

The SQL Server name reflects the name of the server in the OS.

In fact, changing the OS server-name creates issues for SQL.

In SSMS I believe that you can specify different connect to name and display name in the registered servers. This is possibly a low-impact way of achieving your goal.

HTH
  David
0
 
searchsanjaysharmaAuthor Commented:
Thanx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.