Link to home
Start Free TrialLog in
Avatar of BillPowell
BillPowell

asked on

Restore Database from Backup

I have a database I wish to restore from a backup.  It was created on another server, therefore it has a different sa.  I have tried with no success to use the All Tasks->Restore Database.  Its also worth mentioning that the database name has a dash in it.

Any ideas?
Avatar of JesterToo
JesterToo
Flag of United States of America image

The hyphen in the db name shouldn't be a problem.  Neither should the fact that "sa" on the other server might be different... the "logins" are contained in MASTER, not in the user db's.

The easiest way to restore a db to a different path than from where it was backed up from is to use the "restore with move" feature...

   RESTORE DATABASE [database] FROM DISK = 'D:\Backup\XXXXXX.bak'
                 WITH MOVE '[dataname]' TO 'XXXXX_Data.mdf', MOVE '[logname]' TO 'XXXXX_Log.ldf'

See BOL for more info.

HTH,
Lynn

 
Avatar of arbert
arbert

" Neither should the fact that "sa" on the other server might be different"


The sa shouldn't be a problem.  Just remember, the users in the database you restore will NO LONGER have a login on the new server--you will have to relink them with sp_change_users_login.

Brett
Avatar of Mehul Shah
What problems you faced while restoring the db using All Tasks->Restore Database.
Avatar of BillPowell

ASKER

<<What problems you faced while restoring the db using All Tasks->Restore Database.>>

Heres a link to the errors Im receiving:

http://clubweb.interbaun.com/powell/exchange/errors.html

The first one happens when restoring.  The second one happens after I have OK'd the errors and am now trying to open one of the tables in EM.  The database does appear to exist in EM, but when I switch to QA it does not appear in the databases pick list.
ASKER CERTIFIED SOLUTION
Avatar of Mehul Shah
Mehul Shah
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That did it.  The paths were different.
Thanks!
"That did it.  The paths were different."

That's exactly what JesterToo said above.