How can I restore a master database from its bak file?SQL Recover from .bak file with NOINITAttempting to restore SQL Server 2005 database to a SQL Server 2008 R2 instance gives reason: 15105 errorRestore .Bak file to different ServerRestoring Database, creating new copy and use existing transaction logs for the original backup database to restore the NEW database to be current?Restoring corrupted bak fileCan I restore an SQL 2016 database mdf at an SQL 2014 Sp1 instance?Can't restore sql bak file to a new databaseSQL Server 2016: cannot restore database from .bak file because of huge transaction log?How to restore a file group from file group backup?How to make a distibutable .bak file?
If temperature is related to average kinetic energy in an ideal gas, then does speeding up the gas container affect its temperature?
What is the line crossing the Pacific Ocean that is shown on maps?
Why is Madam Hooch not a professor?
Impossible darts scores
How can I convince my reader that I will not use a certain trope?
Is there a short way to compare many values mutually at same time without using multiple 'AND'-s?
How can Charles Proxy change settings without admin rights after first time?
Short story with brother-sister conjoined twins as protagonists?
Does the Paladin's Aura of Protection affect only either her or ONE ally in range?
Does image quality of the lens affect "focus and recompose" technique?
Is there any set of 2-6 notes that doesn't have a chord name?
What can I do to find new work while my workplace is closed due to an accidental death?
How to get cool night-vision without lame drawbacks?
Find smallest index that is identical to the value in an array
Does Marvel have an equivalent of the Green Lantern?
Why aren't (poly-)cotton tents more popular?
Layout of complex table
Alphabet completion rate
Are there any vegetarian astronauts?
Story-based adventure with functions and relationships
C-152 carb heat on before landing in hot weather?
Why cruise at 7000' in an A319?
First-year PhD giving a talk among well-established researchers in the field
What do you call the action of someone tackling a stronger person?
How can I restore a master database from its bak file?
SQL Recover from .bak file with NOINITAttempting to restore SQL Server 2005 database to a SQL Server 2008 R2 instance gives reason: 15105 errorRestore .Bak file to different ServerRestoring Database, creating new copy and use existing transaction logs for the original backup database to restore the NEW database to be current?Restoring corrupted bak fileCan I restore an SQL 2016 database mdf at an SQL 2014 Sp1 instance?Can't restore sql bak file to a new databaseSQL Server 2016: cannot restore database from .bak file because of huge transaction log?How to restore a file group from file group backup?How to make a distibutable .bak file?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
During a penetration test I found multiple .bak-files for an MSSQL database. I want to restore them all. In a Windows VM I installed SQL Server 2017. For restoring the master database, I put the server in single-user mode and tried restoring the database as follows (also tried the same via SSMS):
RESTORE DATABASE master
FROM DISK = 'C:Foo<path>master.bak'
WITH MOVE 'master' TO 'C:Foomaster.mdf',
MOVE 'master_log' TO 'C:Foomaster_log.ldf',
REPLACE
GO
This gave me an error like:
.. can't be restored because it was created by a different version of the server (13.00.4435) than this server (14...).
I then downloaded MSSQL 2016 with service pack 1 by subscribing to "Visual Studio Dev Essentials" on my.visualstudio.com. Now I got the error:
.. can't be restored because it was created by a different version of
the server (13.00.4435) than this server (13.00.4001).
So now I needed to update. I downloaded MSSQL 2016 service pack 2, which gave me the error:
.. can't be restored because it was created by a different version of
the server (13.00.4435) than this server (13.00.5026).
So I really seem to require the exact patch. However, I can't find a list of patches with corresponding server versions. Does anyone have an idea on how to find the right patch?
If I could just extract the .bak file to its .mdf- and .ldf files that would be enough. I found a bunch of tools for restoring MSSQL .bak files, but want they all want to connect to a database (to do a simple restore). I'd be very happy if I could either get the right SQL Server version or extract the .bak file.
sql-server restore master-system-database
New contributor
Graa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
During a penetration test I found multiple .bak-files for an MSSQL database. I want to restore them all. In a Windows VM I installed SQL Server 2017. For restoring the master database, I put the server in single-user mode and tried restoring the database as follows (also tried the same via SSMS):
RESTORE DATABASE master
FROM DISK = 'C:Foo<path>master.bak'
WITH MOVE 'master' TO 'C:Foomaster.mdf',
MOVE 'master_log' TO 'C:Foomaster_log.ldf',
REPLACE
GO
This gave me an error like:
.. can't be restored because it was created by a different version of the server (13.00.4435) than this server (14...).
I then downloaded MSSQL 2016 with service pack 1 by subscribing to "Visual Studio Dev Essentials" on my.visualstudio.com. Now I got the error:
.. can't be restored because it was created by a different version of
the server (13.00.4435) than this server (13.00.4001).
So now I needed to update. I downloaded MSSQL 2016 service pack 2, which gave me the error:
.. can't be restored because it was created by a different version of
the server (13.00.4435) than this server (13.00.5026).
So I really seem to require the exact patch. However, I can't find a list of patches with corresponding server versions. Does anyone have an idea on how to find the right patch?
If I could just extract the .bak file to its .mdf- and .ldf files that would be enough. I found a bunch of tools for restoring MSSQL .bak files, but want they all want to connect to a database (to do a simple restore). I'd be very happy if I could either get the right SQL Server version or extract the .bak file.
sql-server restore master-system-database
New contributor
Graa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
During a penetration test I found multiple .bak-files for an MSSQL database. I want to restore them all. In a Windows VM I installed SQL Server 2017. For restoring the master database, I put the server in single-user mode and tried restoring the database as follows (also tried the same via SSMS):
RESTORE DATABASE master
FROM DISK = 'C:Foo<path>master.bak'
WITH MOVE 'master' TO 'C:Foomaster.mdf',
MOVE 'master_log' TO 'C:Foomaster_log.ldf',
REPLACE
GO
This gave me an error like:
.. can't be restored because it was created by a different version of the server (13.00.4435) than this server (14...).
I then downloaded MSSQL 2016 with service pack 1 by subscribing to "Visual Studio Dev Essentials" on my.visualstudio.com. Now I got the error:
.. can't be restored because it was created by a different version of
the server (13.00.4435) than this server (13.00.4001).
So now I needed to update. I downloaded MSSQL 2016 service pack 2, which gave me the error:
.. can't be restored because it was created by a different version of
the server (13.00.4435) than this server (13.00.5026).
So I really seem to require the exact patch. However, I can't find a list of patches with corresponding server versions. Does anyone have an idea on how to find the right patch?
If I could just extract the .bak file to its .mdf- and .ldf files that would be enough. I found a bunch of tools for restoring MSSQL .bak files, but want they all want to connect to a database (to do a simple restore). I'd be very happy if I could either get the right SQL Server version or extract the .bak file.
sql-server restore master-system-database
New contributor
Graa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
During a penetration test I found multiple .bak-files for an MSSQL database. I want to restore them all. In a Windows VM I installed SQL Server 2017. For restoring the master database, I put the server in single-user mode and tried restoring the database as follows (also tried the same via SSMS):
RESTORE DATABASE master
FROM DISK = 'C:Foo<path>master.bak'
WITH MOVE 'master' TO 'C:Foomaster.mdf',
MOVE 'master_log' TO 'C:Foomaster_log.ldf',
REPLACE
GO
This gave me an error like:
.. can't be restored because it was created by a different version of the server (13.00.4435) than this server (14...).
I then downloaded MSSQL 2016 with service pack 1 by subscribing to "Visual Studio Dev Essentials" on my.visualstudio.com. Now I got the error:
.. can't be restored because it was created by a different version of
the server (13.00.4435) than this server (13.00.4001).
So now I needed to update. I downloaded MSSQL 2016 service pack 2, which gave me the error:
.. can't be restored because it was created by a different version of
the server (13.00.4435) than this server (13.00.5026).
So I really seem to require the exact patch. However, I can't find a list of patches with corresponding server versions. Does anyone have an idea on how to find the right patch?
If I could just extract the .bak file to its .mdf- and .ldf files that would be enough. I found a bunch of tools for restoring MSSQL .bak files, but want they all want to connect to a database (to do a simple restore). I'd be very happy if I could either get the right SQL Server version or extract the .bak file.
sql-server restore master-system-database
sql-server restore master-system-database
New contributor
Graa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Graa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited Jun 17 at 7:42
Paul White♦
56.5k14 gold badges297 silver badges471 bronze badges
56.5k14 gold badges297 silver badges471 bronze badges
New contributor
Graa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked Jun 16 at 13:16
GraaGraa
1333 bronze badges
1333 bronze badges
New contributor
Graa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Graa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
The master database is special, different than other databases. It's a system database where SQL Server stores internal objects. The only time you'd normally restore it is if you're bringing back a server from the dead - you wouldn't usually want to restore master from one database to another.
In your scenario, when you're just curious about the contents of the database, restore master with a different database name, like this:
RESTORE DATABASE master_copy
FROM DISK = 'C:Foo<path>master.bak'
WITH MOVE 'master' TO 'C:Foomaster_copy.mdf',
MOVE 'master_log' TO 'C:Foomaster_copy_log.ldf',
GO
Then, after the restore finishes, you can query objects in the master_copy database.
2
I agree with Brent. If you still want to get master as master onto a different installation you can try to hack-attach it. Stop that SQL Server and just swap out master.mdf and master.ldf. Note that your SQL Server might not boot now, unless model and tempdb are/can be created on the same path as the "old" install.
– Tibor Karaszi
Jun 17 at 6:29
add a comment |
As I can't answer as comment, here it is as a normal one:
For your problem with the SQL-Server versions, have a look at
https://support.microsoft.com/en-us/help/3177312/sql-server-2016-build-versions
There you can see, that your backup file is from SQL Server 2016 SP1 CU3.
Microsoft maintains these lists for all versions of MSSQL down to SQL 7.0 i think.
New contributor
Marcel Klein is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "182"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Graa is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f240665%2fhow-can-i-restore-a-master-database-from-its-bak-file%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
The master database is special, different than other databases. It's a system database where SQL Server stores internal objects. The only time you'd normally restore it is if you're bringing back a server from the dead - you wouldn't usually want to restore master from one database to another.
In your scenario, when you're just curious about the contents of the database, restore master with a different database name, like this:
RESTORE DATABASE master_copy
FROM DISK = 'C:Foo<path>master.bak'
WITH MOVE 'master' TO 'C:Foomaster_copy.mdf',
MOVE 'master_log' TO 'C:Foomaster_copy_log.ldf',
GO
Then, after the restore finishes, you can query objects in the master_copy database.
2
I agree with Brent. If you still want to get master as master onto a different installation you can try to hack-attach it. Stop that SQL Server and just swap out master.mdf and master.ldf. Note that your SQL Server might not boot now, unless model and tempdb are/can be created on the same path as the "old" install.
– Tibor Karaszi
Jun 17 at 6:29
add a comment |
The master database is special, different than other databases. It's a system database where SQL Server stores internal objects. The only time you'd normally restore it is if you're bringing back a server from the dead - you wouldn't usually want to restore master from one database to another.
In your scenario, when you're just curious about the contents of the database, restore master with a different database name, like this:
RESTORE DATABASE master_copy
FROM DISK = 'C:Foo<path>master.bak'
WITH MOVE 'master' TO 'C:Foomaster_copy.mdf',
MOVE 'master_log' TO 'C:Foomaster_copy_log.ldf',
GO
Then, after the restore finishes, you can query objects in the master_copy database.
2
I agree with Brent. If you still want to get master as master onto a different installation you can try to hack-attach it. Stop that SQL Server and just swap out master.mdf and master.ldf. Note that your SQL Server might not boot now, unless model and tempdb are/can be created on the same path as the "old" install.
– Tibor Karaszi
Jun 17 at 6:29
add a comment |
The master database is special, different than other databases. It's a system database where SQL Server stores internal objects. The only time you'd normally restore it is if you're bringing back a server from the dead - you wouldn't usually want to restore master from one database to another.
In your scenario, when you're just curious about the contents of the database, restore master with a different database name, like this:
RESTORE DATABASE master_copy
FROM DISK = 'C:Foo<path>master.bak'
WITH MOVE 'master' TO 'C:Foomaster_copy.mdf',
MOVE 'master_log' TO 'C:Foomaster_copy_log.ldf',
GO
Then, after the restore finishes, you can query objects in the master_copy database.
The master database is special, different than other databases. It's a system database where SQL Server stores internal objects. The only time you'd normally restore it is if you're bringing back a server from the dead - you wouldn't usually want to restore master from one database to another.
In your scenario, when you're just curious about the contents of the database, restore master with a different database name, like this:
RESTORE DATABASE master_copy
FROM DISK = 'C:Foo<path>master.bak'
WITH MOVE 'master' TO 'C:Foomaster_copy.mdf',
MOVE 'master_log' TO 'C:Foomaster_copy_log.ldf',
GO
Then, after the restore finishes, you can query objects in the master_copy database.
answered Jun 16 at 13:57
Brent OzarBrent Ozar
36.6k19 gold badges116 silver badges252 bronze badges
36.6k19 gold badges116 silver badges252 bronze badges
2
I agree with Brent. If you still want to get master as master onto a different installation you can try to hack-attach it. Stop that SQL Server and just swap out master.mdf and master.ldf. Note that your SQL Server might not boot now, unless model and tempdb are/can be created on the same path as the "old" install.
– Tibor Karaszi
Jun 17 at 6:29
add a comment |
2
I agree with Brent. If you still want to get master as master onto a different installation you can try to hack-attach it. Stop that SQL Server and just swap out master.mdf and master.ldf. Note that your SQL Server might not boot now, unless model and tempdb are/can be created on the same path as the "old" install.
– Tibor Karaszi
Jun 17 at 6:29
2
2
I agree with Brent. If you still want to get master as master onto a different installation you can try to hack-attach it. Stop that SQL Server and just swap out master.mdf and master.ldf. Note that your SQL Server might not boot now, unless model and tempdb are/can be created on the same path as the "old" install.
– Tibor Karaszi
Jun 17 at 6:29
I agree with Brent. If you still want to get master as master onto a different installation you can try to hack-attach it. Stop that SQL Server and just swap out master.mdf and master.ldf. Note that your SQL Server might not boot now, unless model and tempdb are/can be created on the same path as the "old" install.
– Tibor Karaszi
Jun 17 at 6:29
add a comment |
As I can't answer as comment, here it is as a normal one:
For your problem with the SQL-Server versions, have a look at
https://support.microsoft.com/en-us/help/3177312/sql-server-2016-build-versions
There you can see, that your backup file is from SQL Server 2016 SP1 CU3.
Microsoft maintains these lists for all versions of MSSQL down to SQL 7.0 i think.
New contributor
Marcel Klein is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
As I can't answer as comment, here it is as a normal one:
For your problem with the SQL-Server versions, have a look at
https://support.microsoft.com/en-us/help/3177312/sql-server-2016-build-versions
There you can see, that your backup file is from SQL Server 2016 SP1 CU3.
Microsoft maintains these lists for all versions of MSSQL down to SQL 7.0 i think.
New contributor
Marcel Klein is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
As I can't answer as comment, here it is as a normal one:
For your problem with the SQL-Server versions, have a look at
https://support.microsoft.com/en-us/help/3177312/sql-server-2016-build-versions
There you can see, that your backup file is from SQL Server 2016 SP1 CU3.
Microsoft maintains these lists for all versions of MSSQL down to SQL 7.0 i think.
New contributor
Marcel Klein is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
As I can't answer as comment, here it is as a normal one:
For your problem with the SQL-Server versions, have a look at
https://support.microsoft.com/en-us/help/3177312/sql-server-2016-build-versions
There you can see, that your backup file is from SQL Server 2016 SP1 CU3.
Microsoft maintains these lists for all versions of MSSQL down to SQL 7.0 i think.
New contributor
Marcel Klein is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Marcel Klein is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered Jun 17 at 12:54
Marcel KleinMarcel Klein
111 bronze badge
111 bronze badge
New contributor
Marcel Klein is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Marcel Klein is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
Graa is a new contributor. Be nice, and check out our Code of Conduct.
Graa is a new contributor. Be nice, and check out our Code of Conduct.
Graa is a new contributor. Be nice, and check out our Code of Conduct.
Graa is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Database Administrators Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f240665%2fhow-can-i-restore-a-master-database-from-its-bak-file%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown