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.

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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