How to change the servername in sql server.

Posted on 2012-09-07
Last Modified: 2012-09-23
I have a remote server, whose ip is
I have Sql Server installed in it, the servername is shown as ADMISSIONCELL
Can  i change its name to
Question by:searchsanjaysharma
    LVL 28

    Expert Comment

    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:
    LVL 35

    Expert Comment

    by:David Todd

    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.

    LVL 28

    Accepted Solution

    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:

    sp_dropserver 'ADMISSIONCELL'
    sp_addserver '', local

    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.

    Author Closing Comment


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    MS SQL - Output to columns equally. 5 42
    SQL Server Degrading on Write 13 51
    Not selecting duplicate data 6 23
    report c# 9 59
    Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
    So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now