Authorization dbo maps to a user with an old machine name I am trying to run a command that looks like this:

Create ASSEMBLY [AssemblyName]
AUTHORIZATION [dbo]
From ...


When this runs, it returns an error message: Could not obtain information about Windows NT group/user 'oldMachineName\username', error code 0x534.

In this case oldMachineName is the old machine name for my computer. I changed the computer's machine name to newMachineName before every installing Sql Server, but there are obviously some vestiges of it hanging around.

When I log into Sql Server using SSMS, it correctly lists the logged-in user as newMachineName\username. Yet when running this command with Authorization dbo it is trying to use oldMachineName.

So, how can I convince Sql Server that oldMachineName doesn't exist anymore and teach it the correct group/user of the current dbo (ie: my logged in user)?
It seems the database was created/restored/attached by a Windows account user that no longer exists. Change the database owner to a valid existing login using ALTER AUTHORIZATION

ALTER AUTHORIZATION ON DATABASE::YourDatabase TO SomeValidLogin;


Consider creating a login, perhaps one per database, without CONNECT permissions for database ownership purposes. That will avoid this sort of problem going forward.