3

I am trying to restore a backup from a split .bak file[.bak_1/.bak_2/.bak_3]. The backup is password protected. So far this is what I have and I cannot seem to format in a way that does not throw me an error.

USE master
GO
RESTORE DATABASE client_a_database1
  FROM DISK = 'G:\database1\***.bak_1',
       DISK = 'G:\database1\***.bak_2',
       DISK = 'G:\database1\***.bak_3'
  WITH MOVE 'database1_data' TO 'G:\database1\***.mdf'
       MOVE 'database1_log' TO 'G:\database1\***.ldf', REPLACE,
  Password 'password'
  GO 

With this format I am getting an error on the Password that I have added.

9
  • I'm not sure, but isn't it MEDIAPASSWORD in stead of PASSWORD? Commented Dec 16, 2013 at 19:28
  • What's the actual error? Commented Dec 16, 2013 at 19:29
  • Error reads - INCORRECT SYNTAX NEAR 'GO'. Expecting 'TO'
    – YELDOB
    Commented Dec 16, 2013 at 19:38
  • I have tried different formats and layouts - however always seem to get an error.
    – YELDOB
    Commented Dec 16, 2013 at 19:39
  • 1
    @EdwardDortland its the other way Password is correct.
    – Kin Shah
    Commented Dec 16, 2013 at 19:42

1 Answer 1

2

Below will work, as you had syntax error :

USE master
GO
RESTORE DATABASE client_a_database1
  FROM DISK = 'G:\database1\***.bak_1',
       DISK = 'G:\database1\***.bak_2',
       DISK = 'G:\database1\***.bak_3'
  WITH MOVE 'database1_data' TO 'G:\database1\***.mdf'
       MOVE 'database1_log' TO 'G:\database1\***.ldf', REPLACE,
  Password = 'password'
  GO 

Also, a RESTORE HEADERONLY output will help understand why you are getting -

restore was taken from a different MS SQL version.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.