Sauvegarde automatique SQL Server Express 200X

1- Commande T-SQL de Sauvegarde à stocker dans un fichier sur C:backup.sql :

BACKUP DATABASE [DB_DATA] TO  DISK = N’E:Srvper-Fullcrumdbdata‘ WITH NOFORMAT, INIT,  NAME = N’LOGICAL_DATAS’, SKIP, NOREWIND, NOUNLOAD,  STATS = 10
GO

 

2- Commande en ligne via un save.bat :

C:Program FilesMicrosoft SQL Server90ToolsBinnSQLCMD.EXE -S SERVERINSTANCE SQL -E -i  C:backupscript.sql

3- Planifier ine tâche :

Utilisez le planificateur de tâchesde windows  pour  lancer save.bat tous les soirs …

N.B : L’ option -E évite de réclamer le mot de passe SQL et l’ option INIT écrase l’ unité de sauvegarde tous les Soirs

 

 

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=15748

extradrmtech

Since 20 years I work on Database Architecture and data migration protocols. I am also a consultant in Web content management solutions. I am an experienced web-developer with over 10 years developing PHP/MySQL, C#, VB.Net applications ranging from simple web sites to extensive web-based business applications. When not writing code, I like to dance salsa and swing and have fun with my little family.

You may also like...

Leave a Reply