Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restore backup without having the master DB backupped

Status
Not open for further replies.

RedLion

Programmer
Sep 13, 2000
342
NL
Hello,

I've got a little problem. I have a backup from a database on Ms Sql server 2000, now I would like to restore this database to another server, but I don't know how this can be done without having a master DB backedup.

What I did, made the same user on the new database as on the old one, made a database with the same name. Set the user as database owner for this database. Restored the backup for this database.

When I use the application with the user I created for this restored database I get the error that the table "mytable" does not exists. Even when I use the sa account to access this database I get the same error. But when I use the enterprise manager, I can just view all data in all tables with the sa account.

As I have searched on this forum I think I can conclude that the problem occurs because the user cridentials are not the same.

Thanks,

Charl
 
RedLion said:
What I did, made the same user on the new database as on the old one, made a database with the same name. Set the user as database owner for this database. Restored the backup for this database.
I'm not sure what masterdb has to do with that. Each database has it's own user definitions (table sysobjects). Restore also ignores all previously users on database - it simply restores everything (including users) from backup.

The fact that system admin account doesn't work may indicate something else is wrong... are you sure application works on right database/server? And are we talking about SQL or Windows integrated auth?

------
"There's a man... He's bald and wears a short-sleeved shirt, and somehow he's very important to me. I think his name is Homer."
(Jack O'Neill, Stargate)
[banghead]
 
Thanks for your response Vongrunt.

vongrunt said:
I'm not sure what masterdb has to do with that. Each database has its own user definitions (table sysobjects). Restore also ignores all previously users on database
All right, because the problems I met and other threads on this forum I thought that this could be the problem. - so that is not the problem

vongrunt said:
it simply restores everything (including users) from backup
Question: Some tables in the backup are owned by the user "myuser", so I made a login "myuser", does the restore of the backup matches the user in the backup to the login-user?

When I look in the Enterprise manager table view, I see that the tables I can't access have as owner "myuser" and as type "user" while the tables that have as owner "dbo" and type "user" can be accessed.

vongrunt said:
are you sure application works on right database/server
Yes, I can access tables marked as owner "dbo" without any problems

vongrunt said:
And are we talking about SQL or Windows integrated auth?
SQL

Thanks,

Charl
 
Isn't there anyone who has a clue what the problem can be?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top