patternsqlMinor
Restore database of 90GB to computer of only 100GB
Viewed 0 times
100gbdatabasecomputeronlyrestore90gb
Problem
How do I restore a huge Microsoft SQL Server database that is 6GB as a zip file and 90GB as a bak file to a computer that only has 100GB free space?
When I uncompress the zip file I get a bak file that is 90GB so only 10GB left on hard drive hence not enough space to restore using SQL Server Management Studio.
The advantage is that I have two computers, the other had 200GB free so I was able to fully restore but its not the intended computer. I've been able to access the restored database over the network using ethernet but my other software of interest requires that the SQL Server running the database is on the same computer as the software of interest so I have to move / restore the database to the computer with less space somehow.
Kindly requesting for guidance, I've been exploring the option of manually copying and pasting the .mdf and log files from the computer where I fully restored to the new computer and then wiring it up somehow but I don't know if it will work.
When I uncompress the zip file I get a bak file that is 90GB so only 10GB left on hard drive hence not enough space to restore using SQL Server Management Studio.
The advantage is that I have two computers, the other had 200GB free so I was able to fully restore but its not the intended computer. I've been able to access the restored database over the network using ethernet but my other software of interest requires that the SQL Server running the database is on the same computer as the software of interest so I have to move / restore the database to the computer with less space somehow.
Kindly requesting for guidance, I've been exploring the option of manually copying and pasting the .mdf and log files from the computer where I fully restored to the new computer and then wiring it up somehow but I don't know if it will work.
Solution
Once you have restored the database on another system, you can detach the database, move/copy all DB files (data and log) to your target system and attach the database there. The method is relatively simple in most circumstances, you can follow this Microsoft doc for commands and this concept doc for more detail.
Databases will usually grow over time, you will want to make sure you have a plan of how to cope with this - if you are already low on space then you don't have a lot of breathing room. This is especially important for your log files, assuming you are using the full recovery model, you will need to keep your transaction log backed up (to a location other than the DB server) so that you don't exhaust your storage from a growing log file.
Note that running a SQL Server Instance on the same server as the application is often not recommended. Make sure you are giving sane memory limits to your instance so that it does not try to use memory on the server that is likely to be needed by the application.
Databases will usually grow over time, you will want to make sure you have a plan of how to cope with this - if you are already low on space then you don't have a lot of breathing room. This is especially important for your log files, assuming you are using the full recovery model, you will need to keep your transaction log backed up (to a location other than the DB server) so that you don't exhaust your storage from a growing log file.
Note that running a SQL Server Instance on the same server as the application is often not recommended. Make sure you are giving sane memory limits to your instance so that it does not try to use memory on the server that is likely to be needed by the application.
Context
StackExchange Database Administrators Q#295228, answer score: 7
Revisions (0)
No revisions yet.