We have a SQL Server 2016 running on a virtual machine of Windows 2016. Previously, the virtual machine's hostname was WIN
when we installed the SQL Server, so the database engine's server name was WIN
and the usernames were like WIN\Administrator
.
Later, we changed the virtual machine's hostname to MSSQLV
, and the database's server name automatically changed to MSSQLV
, e.g., when connection with Management Studio on the same host, the "Windows Authentication" shows MSSQLV\Administrator
.
However, when we check the database's properties, in the context of Select the database > right click > Properties > General > Database > Owner
, the Owner property still shows WIN\Administrator
.
We tried to correct the Owner by the SQL command ALTER AUTHORIZATION ON DATABASE::[database] to [MSSQLV\Administrator];
, and it got a successful running result. But the Owner property stays the same as before.
Moreover, we checked the context of Computer Management (Local) > System Tools > Local Users and Groups > Groups
, and found the following two names still quoting the old hostname WIN
:
SQLServer2005SQLBrowserUser$WIN
SQLServerMSASUser$WIN$MSSQLSERVER
The Concern:
We highly suspect this confusion caused a usability issue being not able to get the ER-Diagram of the database with the following error message:
Could not obtain information about Windows NT group/user
'WIN\Administrator', error code 0x534. (Microsoft SQL Server,
Error: 15404)
We have posted a separate question for the specific issue above.
Our Question:
Within the existing instance of SQL Server, how to change the domain\username from WIN\xxxxx
to MSSQLV\xxxxx
to make the domain match the new hostname?
Please also kindly remind us of if we missed other aspects of settings after hostname changing. And we highly appreciate any hints and suggestions.