SQL Server backup restore problem
I have SQL Server 2008 which is part of a domain... Now I am backing up this server 's database and restoring it to SQL Server which is not part of the domain. I have a C # application that uses this database. On a machine with no domains, I now get exceptions:
"Cannot execute prinzipal as database because principal 'dbo' does not exist, this principal type cannot be issued without a name, or you do not have permission"
I think the problem is that the owner of the database is a domain user and that user does not exist on the target machine (backup machine) !? How can I solve this?
a source to share
MS SQL Server follows a 2-layer user system. You have to make sure that your login is the actual login on SQL Server (this is NOT the case for SQL Server itself ).
You find SQL Server users in Studio Management under: Server Server -> Security - Logins
Once you have verified that your login is available, you must map it to a user / schema. It's okay todo, so you must:
- Select the SQL Server user you want to map.
- Right click user
- Select properties
- Click on the User Mapping tab
- Select the database you want to create for
- Select the Database user you want to bind to the currently selected SQL Server user with
- Done
a source to share