Go Premium for a chance to win a PS4. Enter to Win

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

Restore database from another computer

How to setup automatic restore of the backup which was made on another computer, and path of the folder Data iks not the same?
0
TanjaMar
Asked:
TanjaMar
1 Solution
 
arbertCommented:
What do you mean "automatic restore"?

You can use enterprise manager to setup a scheduled job with TSQL:

RESTORE database yourdatabasenamehere from disk='yourdrive\pathhere'

Brett
0
 
Scott PletcherSenior DBACommented:
If the data files are in a different location, you need to specify the MOVE option also:

RESTORE DATABASE yourDatabaseNameHere
FROM DISK = 'x:\full\path\to\backup\backup.bak'
WITH MOVE 'logical_data_file_name' TO 'operating_system_data_file_name',
                   'logical_log_file_name' TO 'operating_system_log_file_name',
          RECOVERY
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now