debugMinor
Error with restoring from a split .bak file with password
Viewed 0 times
errorfilewithrestoringpasswordsplitbakfrom
Problem
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.
With this format I am getting an error on the Password that I have added.
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'
GOWith this format I am getting an error on the Password that I have added.
Solution
Below will work, as you had syntax error :
Also, a RESTORE HEADERONLY output will help understand why you are getting -
restore was taken from a different MS SQL version.
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'
GOAlso, a RESTORE HEADERONLY output will help understand why you are getting -
restore was taken from a different MS SQL version.
Code Snippets
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'
GOContext
StackExchange Database Administrators Q#55130, answer score: 2
Revisions (0)
No revisions yet.