Database login is not a solution after changing the name of SQL Server database

Source: Internet
Author: User
SQL Server original Windows authentication cannot log on after the computer name is modified
Tags: database
2016-09-26 15:04 1491 People read review (1) Favorite Report
Category: DB Road--sqlserver (3)
After renaming the computer, the SQL database cannot be used to resolve the problem.
1. Log in with SA
Database creates a new query in master
Select from sys.sysservers
Make a query to discover that the previous computer name is still in the database
2. Delete the information that was logged in with the original computer name by entering the following
EXEC sp_dropserver "Original computer name"
Click Execute and then enter: Select
from Sys.sysservers
For verification, you can find that you have not found the information.
3. Input: EXEC sp_addserver "changed computer name", "LOCAL"
After you click Run, you can find that the computer has changed after you make a query.
Restart, the problem is solved.
Transfer from http://blog.csdn.net/love_zt_love/article/details/7175829

Database login is not a solution after changing the name of SQL Server database

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.