简体   繁体   中英

SQL Server 2005 - How to restore multiple backups (.bak)

I need to restore near 40 databases (.bak files) to a new SQL Server 2005 instance.
Manually, from SQL Server Management Studio, takes a long time.
¿How can I restore automaticaly all the .bak files to the new Server?
The new SQL Server instance is empty.
Thanks for the help!

SQL Server backups can be scripted like, literally, everything else. You can find out about it on Google. Search for "SQL Server restore statement".

Let me quote commenter Murph who had a very nice idea:

Its easier than that to get the script - when you do a restore with SQL Server Manager you get the option to create a script instead of run the restore, that will give you the basis from which you can build all the scripts you need.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM