|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Today @ 8:25 AM
Points: 573,
Visits: 1,010
|
|
We're recently purchased some new software, which requires its own SQL Server database. Working with the vendor they also needed to have a new SQL account created which would be a part of the db_owner database role membership. Creating new SQL accounts isn't something we do often (I cannot remember when I last created a new SQL account), so I made a mistake when I set the new user up. Here's what happened:
First, I created the new database. After setting it up, assigning the .mdf and .ldf files to their appropriate places, I then created the new SQL account, and in the property page for creating the new user, I checked db_owner under the "Schemas owned by this user", rather than "Database role membership".
Later I realized my mistake, but I'm not sure how to fix it. First of all, what account normally has ownership of the db_owner schema? I would assume it would be the sa account, especially for a new database like this one, but I want to ask anyway.
Second, how do I reassign the db_owner schema from this new SQL account to the account it should really be owned by?
Kindest Regards,
Rod
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Friday, May 17, 2013 12:08 PM
Points: 4,006,
Visits: 4,845
|
|
Usually, the fixed database roles are owned by dbo. Check the properties of some of the other roles in the database e.g. db_securityadmin, db_ddladmin, etc. You can change the owner of a role by opening the properties of the role in object browser and either typing in the new owner or clicking on the elipse and choosing the new owner from the list.
Greg
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 9:42 AM
Points: 446,
Visits: 980
|
|
The Owner of the db_owner Schema is db_owner. Use this to change it back. USE [DatabaseName] GO ALTER AUTHORIZATION ON SCHEMA::[db_owner] TO [db_owner] GO
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Today @ 8:25 AM
Points: 573,
Visits: 1,010
|
|
Thank you Greg and Kenneth, that did the trick for me.
Kindest Regards,
Rod
|
|
|
|