June 3, 2019 at 2:47 pm
An administrator restored some SharePoint databases for me and did not use the service account I asked him to use and consequently his name is in the Owners field (Right Click DB in SSMS --> Properties--> General Tab --> Owner). When I tried to change this to the Service Account that is the actual DBO I get
Msg 15110, Level 16, State 1, Line 1
The proposed new database owner is already a user or aliased in the database.
How can I alter my DB so that the Owner is the Service account and no the the admin doing the restore of the DB?
This is in our test environment.
Thank you!
Even as a mother protects with her life
Her child, her only child,
So with a boundless heart
Should one cherish all living beings;
June 3, 2019 at 4:38 pm
Change it to 'sa'
EXEC sp_changedbowner 'sa'
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
June 3, 2019 at 5:54 pm
Or, remove the service account from the users in the database and then add the service account as the new owner:
USE YourDatabase;
GO
DROP USER YourServiceAccount;
GO
EXEC sp_changedbowner 'YourServiceAccount';
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
June 3, 2019 at 6:49 pm
Thanks, but it can't be the SA account. It needs to be a specific service account.
Even as a mother protects with her life
Her child, her only child,
So with a boundless heart
Should one cherish all living beings;
June 4, 2019 at 7:29 pm
i prefer the alter authorization command:
ALTER AUTHORIZATION ON DATABASE::[WSS_Content] to [MyDomain\SharePointServiceAccount];
Lowell
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply