Cari Blog Ini

23 Juli 2012

Example of Backup Database With Compression

1. Backup Database With Compression
-----------------------------------------------------------------------
-----code:start-----
-----------------------------------------------------------------------
USE master
go

BACKUP DATABASE DB_Simulasi
     TO DISK = 'D:\Backup\DB_Simulasi.bak'
     WITH COMPRESSION
-----------------------------------------------------------------------
-----code:end-----
-----------------------------------------------------------------------

Result Messages:
Processed 66832 pages for database 'DB_Simulasi', file 'SeaSQL_dat' on file 1.
Processed 2 pages for database 'DB_Simulasi', file 'SeaSQL_log' on file 1.
BACKUP DATABASE successfully processed 66834 pages in 12.519 seconds (41.707 MB/sec).


2. Backup Database Without Compression
-----------------------------------------------------------------------
-----code:start-----
-----------------------------------------------------------------------
USE master
go

BACKUP DATABASE DB_Simulasi
         TO DISK = 'D:\Backup_2\DB_Simulasi.bak'
-----------------------------------------------------------------------
-----code:end-----
-----------------------------------------------------------------------

Result Messages:
Processed 66832 pages for database 'DB_Simulasi', file 'SeaSQL_dat' on file 1.
Processed 1 pages for database 'DB_Simulasi', file 'SeaSQL_log' on file 1.
BACKUP DATABASE successfully processed 66833 pages in 13.029 seconds (40.074 MB/sec).
Source:
http://syntaxhelp.com/SQLServer/Backup/FULL