snippetsqlMajor
How to change the login for a database's dbo user?
Viewed 0 times
theuserlogindatabasedboforhowchange
Problem
I just finished a successful install of SQL Server 2014 Express, onto a domain-joined VM instance of Win8.1.
During setup which I ran under
All well and good. Create the group, add it to SQL Server's Security node in SSMS, put it in the SysAdmin role, grant a 'Connect SQL' securable and we're off and running—right?
Not so fast.
The installer mapped
And of course, dbo can't be modified or removed.
I'd like to do this without uninstalling and reinstalling Reporting Services. Will it be possible to do so?
During setup which I ran under
DOMAIN\Admin I accepted the default configuration of adding the current user as a SQL admin. Upon reconsideration after completion, however, I'd like to use the DOMAIN\DbAdmins group instead of a single user on the domain.All well and good. Create the group, add it to SQL Server's Security node in SSMS, put it in the SysAdmin role, grant a 'Connect SQL' securable and we're off and running—right?
Not so fast.
The installer mapped
DOMAIN\Admin to the dbo user on these two databases:- ReportServer
- ReportServerTempDB
And of course, dbo can't be modified or removed.
I'd like to do this without uninstalling and reinstalling Reporting Services. Will it be possible to do so?
Solution
The group or login that is member of the
You can find more information on the specifics about the database owner (
sysadmin role is indepentent of who owns the database. The login that is mapped to the dbo of the database is basically the owner. You can change this via SSMS or with the query below:ALTER AUTHORIZATION ON DATABASE::[ReportServer] TO [sa];
ALTER AUTHORIZATION ON DATABASE::[ReportServerTempDB] TO [sa];You can find more information on the specifics about the database owner (
dbo) from this question: What is the purpose of the database 'owner'?Code Snippets
ALTER AUTHORIZATION ON DATABASE::[ReportServer] TO [sa];
ALTER AUTHORIZATION ON DATABASE::[ReportServerTempDB] TO [sa];Context
StackExchange Database Administrators Q#109303, answer score: 20
Revisions (0)
No revisions yet.