SQL
LiteSpeed & Traditional backup - COMMANDS
Command |
Native
SQL Command |
SQL
LiteSpeed |
Backup
Database |
BACKUP
DATABASE … |
EXEC
master.dbo.xp_backup_database … |
Backup
Log |
BACKUP
LOG … |
EXEC
master.dbo.xp_backup_log … |
Backup
FileGroup |
BACKUP
DATABASE … FILEGROUP = 'PRIMARY' … |
EXEC
master.dbo.xp_backup_database … , @filegroup = 'PRIMARY' |
Differential
Backup |
BACKUP
DATABASE … WITH DIFFERENTIAL |
EXEC
master.dbo.xp_backup_database … , @with = 'DIFFERENTIAL' |
Restore
database |
RESTORE
DATABASE |
EXEC
master.dbo.xp_restore_database |
Restore
without recovery |
RESTORE
DATABASE MyDB … WITH NORECOVERY |
EXEC
master.dbo.xp_restore_database… , @with='NORECOVERY' |
Restore
Log to a point in time |
RESTORE
LOG … WITH RECOVERY , STOPBEFOREMARK = 'LogMark' |
EXEC
master.dbo.xp_restore_log … ,@with ='RECOVERY' , @with = 'STOPBEFOREMARK=
"LogMark"’ |
Restore
with move |
RESTORE
DATABASE … WITH MOVE … TO … , MOVE … TO … |
EXEC
master.dbo.xp_restore_database… , @filename = … , @with = 'MOVE
"…” TO "…"' , @with = 'MOVE "…” TO "…"' |
Restore
with verify only |
RESTORE
VERIFYONLY FROM DISK = … |
EXEC
master.dbo.xp_restore_verifyonly @filename = … |
No comments:
Post a Comment