Changes to the SQL Server name

Source: Internet
Author: User

Changes to the SQL Server name

1. Use the SELECT @ @ServerName to see the server name of the current database 2. From the Sys.sysservers table, you can see all of the current server name 3. Use sp_dropserver ' servername ' to remove this server name. 4. Use sp_addserver ' new servername ', ' local ' to re-add the on-premises server to the Server table 5. Query the Sys.sysservers table to check if it has been changed 6. Restart the database service, and the modifications are completed as follows: Select @@ Servernameselect * from Sys.sysserverssp_dropserver ' pc-201002101233\sqlexpress '///red section for current server name sp_addserver ' LOCALHOST ', ' LOCAL '//Red part of the server name to be changed to the other parts of the same direct copy of the past is OK.

Changes to the SQL Server name

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.