Aqui, una muestra de codigo para la restauración de backups mediante script sql
USE master;–Make sure the database is using the simple recovery model.ALTER DATABASE AdventureWorks SET RECOVERY SIMPLE;GO– Back up the full AdventureWorks database.BACKUP DATABASE AdventureWorks TO DISK = ‘Z:\SQLServerBackups\AdventureWorks.bak’WITH FORMAT;GO–Create a differential database backup.BACKUP DATABASE AdventureWorks TO DISK = ‘Z:\SQLServerBackups\AdventureWorks.bak’WITH DIFFERENTIAL;GO–Restore the full database backup (from backup set 1).RESTORE DATABASE AdventureWorks FROM DISK = ‘Z:\SQLServerBackups\AdventureWorks.bak’WITH FILE=1, NORECOVERY;–Restore the differential backup (from backup set 2).RESTORE DATABASE AdventureWorks FROM DISK = ‘Z:\SQLServerBackups\AdventureWorks.bak’WITH FILE=2, RECOVERY;GO
la fuente esta en :
http://msdn.microsoft.com/es-es/library/ms186216.aspx
No hay comentarios:
Publicar un comentario