Solved

DBO User ISSUE

Posted on 2011-02-17
2
1,191 Views
Last Modified: 2012-05-11
I've attached a database from one server to another and the dbo user is still located at the database level but i'm unable to give the sa user access to the database because it was already located at the db level.

I am also doing transactional replication and I'm getting this error:

Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be impersonated, or you do not have permission. (Source: MSSQLServer, Error number: 15517)

Anybody know a fix to this issue?
0
Comment
Question by:faclogistics
2 Comments
 
LVL 12

Expert Comment

by:mcv22
ID: 34922630
The sa user might have been orphaned. Run the following command in the database.

Another option is to drop the sa user from the restored database and map it again (this will lose any explicit permissions assigned in that database).
exec sp_change_users_login 'auto_fix', 'sa'

Open in new window

0
 
LVL 15

Accepted Solution

by:
Aaron Shilo earned 500 total points
ID: 34923774
To work around this problem, change the database owner to a valid login or domain user. To do this, run the following statements:
USE <DatabaseName>
GO
sp_changedbowner '<NewLogin>'

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now