Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Restore from .BAK file
Message
De
03/01/2014 20:57:16
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Copies de sauvegarde
Versions des environnements
SQL Server:
SQL Server 2012
Application:
Web
Divers
Thread ID:
01591308
Message ID:
01591331
Vues:
44
>>I need to "move" a bunch of databases from one computer to another. I have created backup of all databases to an external drive. That is, the external drive now has several .BAK files. Do I need to create the databases on the target computer before I can restore from the .BAK files? Or can I restore and create database from .BAK in one step?
>>
>>TIA
>
>In order to write a script that would restore all databases from a certain folder - without hard-coding each database name - I would need to scan all files with extension *.BAK. How can I create a cursor and scan all files from a folder into the cursor (using T-SQL)?
>Or is there a better way to approach the task?
I frequently have to move DB's, so I wrote some VFP and .NET programs that do that.
Are you committed to TSQL for some special reason?
This is an easy task using VFP with SPT or .NET.
You can write one program to do the backups and the restores.
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform