• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 343
  • Last Modified:

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
0
searchsanjaysharma
Asked:
searchsanjaysharma
1 Solution
 
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
 
Ryan McCauleyCommented:
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
 
searchsanjaysharmaAuthor Commented:
Thanx
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now