datetime tune date into pad dynamic cursor money percent sp job isnumeric while over update
FREE TRIAL  SQL 2012 PROGRAMMING  SEARCH
SQL Server Scripts SQL 2005 SQL 2008 Articles
SQL JOBS NEWS FORMAT DEV JOBS
How to name backup file extensions?

As a standard you can implement the following file extension naming convention for Microsoft SQL Server database backup files:

/* File extensions for SQL Server backups

 

Full Database Backup      - *.bak

Transaction Log Backup    - *.trn

Differential Backup       - *.dif

Filegroup Backup          - *.fil

 

*/

NOTE: file extension or filename extension are frequently misspelled as extention.


-- SQL Server full database backup basic syntax
BACKUP DATABASE [AdventureWorks] TO  DISK = N'F:\data\backup\AW.bak'
GO
-- SQL Server full database backup with options
BACKUP DATABASE [AdventureWorks] TO  DISK = N'F:\data\backup\AW.bak'
WITH NOFORMAT, NOINIT,  NAME = N'AdventureWorks-Full Database Backup',
SKIP, NOREWIND, NOUNLOAD,  STATS = 10
GO
------------
-- SQL Server transaction log backup
BACKUP LOG [AdventureWorks] TO  DISK = N'F:\data\backup\AW_20120201_1430.trn'
GO
------------
-- SQL Server differential backup
BACKUP DATABASE [AdventureWorks] TO  DISK = N'F:\data\backup\AW.dif'
WITH  DIFFERENTIAL
GO
------------

Related article:

SQL Server 2000 Backup and Restore

 

Exam Prep 70-461
Exam 70-461