The error and solution after the sqlserver host name is changed. The sqlserver Host Name

Source: Internet
Author: User

The error and solution after the sqlserver host name is changed. The sqlserver Host Name

After changing the Host Name of the sqlserver server, you need to perform some operations. Otherwise, there will be problems with the maintenance plan and subscription release. The specific steps are as follows:


After changing the computer name, run select @ servername to return the original computer name, indicating that the "instance" is not modified with the change. In this case, you need to manually execute:

Sp_dropserver 'original hostname'

Then execute
Sp_addserver 'new hostname', 'local'
Then, restart the database service, and then execute select @ servername to return the modified computer name, indicating that the "instance" has been modified.



Verified:
Select convert (varchar (100), serverproperty ('servername '))
Select convert (varchar (100), @ servername)


The details are as follows:

1. Disable Publishing
2. exec sp_dropserver 'original hostname', 'droplogins'
3. sp_addserver 'new hostname', 'local'

Note the consistency of Case sensitivity and select convert (varchar (100) and serverproperty ('servername ').


You can also execute the following script:

-- Execute the following statement and restart the SQL service.
If serverproperty ('servername') <> @ servername
Begin
Declare @ server sysname
Set @ server =servername
Exec sp_dropserver @ server = @ server
Set @ server = cast (serverproperty ('servername') as sysname)
Exec sp_addserver @ server = @ server, @ local = 'local'
End


The following errors can be avoided after the above steps are performed:



How to change the maintenance plan after changing the computer name

[298] SQLServer error: 15404. Unable to obtain information about Windows NT group/user 'hrb-LG \ Administrator '. Error code: 0x534. [SQL state 42000] (ConnIsLoginSysAdmin)

I have never encountered this problem before, but read this error message: unable to obtain information about the Windows NT group/user 'win-I556UB3ODG2 \ admin. This is because of the Owner Relationship. When a job is created, the default owner is the current user, but the user of the computer is not necessarily the same as the owner of the SQL statement.

Open the general interface of the job and change this WIN-I556UB3ODG2 \ Administrator to sa ".

SQLServer error: 15404, unable to obtain information about Windows NT group/user MYPC \ Administrator, error code 0x534. [SQL state 42000] (ConnIsLoginSysAdmin)

When the user name of our system is changed, we will find that all the previous running well maintenance plans in the original SQL suddenly failed to run, and the above error message is displayed. The solution is to change the original system user name in SQL Security> login name to the current user name, and then delete the existing maintenance plan and re-create the maintenance plan.


Why does my computer have a version change error when installing SQL server2005?

Database Installation always has a series of problems. After installing the system, my computer directly installs SQL 2005. As long as this does not seem to cause some problems, it seems that vs cannot be installed before it, and vista does not seem to be able to install database 2005!

Microsoft SQL server prompts a connection failure when changing the Host Name

Register the server again

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.