* t-sql
Change recovery model to full (need immediate backup if you do this). Use same command to change back to simple or build-logged.
ALTER DATABASE AdventureWorks SET RECOVERY FULL
GO
This is the backup command. Issue it from SSMS or sqlcmd or powershell.
BACKUP DATABASE AdventureWorks TO DISK = 'C:\AdventureWorks.BAK' WITH DESCRIPTION = 'Full backup for AdventureWorks' -- this is optional, also works with log backup GO BACKUP LOG AdventureWorks TO DISK = 'C:\AdventureWorks.TRN' GO
next command uses mirror and stats (every 1%, without number it is every 10%)
BACKUP DATABASE AdventureWorks TO DISK = 'C:\AdventureWorks.BAK' WITH DESCRIPTION = 'Full backup for AdventureWorks' -- optional MIRROR TO DISK = 'D:\AdventureWorks_mirror.BAK' -- optional WITH FORMAT -- optional but probably recommended WITH STATS = 1 -- optional, setting is every 1 percent GO
* Sql server management studio – SSMS
DPM