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.