Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Trying to set user mapping of the 'sa' account to a database but it errors out

Posted on 2013-01-23
3
Medium Priority
?
3,021 Views
Last Modified: 2013-01-28
Hello,
 We've been moving a couple of databases from an old 2000 server to a new VM with SQL Server 2008 Standard. In 2008 if I right click on the 'sa' user and go to properties and then on the left go to User Mapping, I can't put a check mark beside my database that I've restored and set it to db_owner. I get the error:
Cannot use the special principal 'sa' (Microsoft SQL Server, Error: 15405)
But yet in the old 2000 server you could set the database role of db_owner to our databases.
Is this not possible in 2008 standard or is it just 'understood' that the db_owner is 'sa'?
What we need is to be able to see that 'sa' is in the db_owner role with our database.

Thank you,
KB5
0
Comment
Question by:Kennyboy5
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 40

Assisted Solution

by:lcohan
lcohan earned 800 total points
ID: 38810863
The error above is clear because SA sql account IS "dbo" and please try change that under "User" and also under "Schema" when making the change.
"Cannot use the special principal 'sa' (Microsoft SQL Server, Error: 15405)"
0
 
LVL 4

Accepted Solution

by:
Kennyboy5 earned 0 total points
ID: 38810948
It is the owner but it just wasn't showing it. I had to run a query on the database to fix it.
use TheNameOfYourDatabase
exec sp_changedbowner 'sa', 'true' 

Open in new window


Now shows sa as the dbo.
0
 
LVL 4

Author Closing Comment

by:Kennyboy5
ID: 38826168
My query was the fix to the problem.
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question