Tuesday 14 August 2012

Data Base Related Syntax's

Data Base backup through query and different methods:
     Compressed backup is a great new feature in SQL Server 2008. By compressing backups, you can save time and disk space. Initial thoughts may lead you to believe that compressed backups would take longer, as during the backup process the disk is usually the bottleneck; however, since less data is being written to the disk, backup time is usually reduced.It’s a relatively simple process to use compressed backups. During the backup you would select compress backup Bear in mind that if you are working with a SQL 2005 database this feature will not be available.

-----compression backup query-----
BACKUP DATABASE TEST(DATABASE NAME) TO DISK = N'D:test(file name).bak' WITH
NOFORMAT, NOINIT, NAME = N'TEST(DATABASE NAME)-Full Database Backup', SKIP,
NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10
-----with out compression backup-----
BACKUP DATABASE TEST(DATABASE NAME) TO DISK = N'D:test(file name).bak' WITH
NOFORMAT, NOINIT, NAME = N'TEST(DATABASE NAME)-Full Database Backup', SKIP,
NOREWIND, NOUNLOAD,  STATS = 10
While we are on the subject of backups, it’s also important to understand how Copy Only Backup works, and why and when you’d want to use it. The Copy Only Backup is especially useful for taking “one off ” backups for development or testing –
the advantage is it doesn’t affect transaction log backups or differential backups. Keep in mind it also cannot serve as a base for differential or transaction log backups when restoring either. To select Copy Only Backup, simply check the Copy Only Backup option in the GUI(See figure)

No comments:

Post a Comment