Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.

share|improve this question
    
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 Dec 16 '13 at 19:42

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
Thanks again @Kin –  YELDOB Dec 16 '13 at 20:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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