Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 332
  • Last Modified:

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?
0
BillPowell
Asked:
BillPowell
  • 2
  • 2
  • 2
  • +1
1 Solution
 
JesterTooCommented:
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

 
0
 
arbertCommented:
" 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
0
 
Mehul ShahIT consultantCommented:
What problems you faced while restoring the db using All Tasks->Restore Database.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
BillPowellAuthor Commented:
<<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.
0
 
Mehul ShahIT consultantCommented:
When you are trying to restore the database on the second tab you need to give the physical path of the database files. As by default it will be the path from where the backup was taken.

So say you took the backup from System A where the data files were stored on c:\mssql folder. In the backup set the same path will be stored. When you try to restore the same backup on System B, the default folder will be c:\mssql and if that folder is not found the restore will fail.

The solution is to provide the correct path on second tab of the restore screen.

Hope this helps



0
 
BillPowellAuthor Commented:
That did it.  The paths were different.
Thanks!
0
 
arbertCommented:
"That did it.  The paths were different."

That's exactly what JesterToo said above.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now