June 14, 2013 at 10:08 am
I have about 100 db's with mdf, ldf, and ndf files that I need to restore to the SQL 2008R2 on different instance. I have all the backups in their respective folders. Is there a script out there that will restore all of them in one swoop??
Thank you in advance, as always! God Bless
June 14, 2013 at 10:16 am
hydbadrose (6/14/2013)
I have about 100 db's with mdf, ldf, and ndf files that I need to restore to the SQL 2008R2 on different instance. I have all the backups in their respective folders. Is there a script out there that will restore all of them in one swoop??Thank you in advance, as always! God Bless
nope, no built in functionality;
you'll want to write a script that creates the commands from the metadata; peek at the scripts section hear on SSC for something that might be 90% of what you are after:
http://www.sqlservercentral.com/search/?q=restore+all+databases&t=s
Lowell
June 14, 2013 at 1:25 pm
If you have the system tables on the original server and kept the same filenames and directory structure on the new server, you might be able to use a SELECT statement on the original server to generate the SQL RESTORE command on the new server if you're using backup files to do the transfer.
If you're not using backup/restore but want to use the MDF/LDF files, you might be able to query the attach commands, but I'm not as familiar with this. I prefer to use BACKUP and then RESTORE on the new server.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply