PhilZone
Welcome to the phil zone

Navigation

Home
Green House
River Cottage
About
PhotoLogs
Certification
SongLyrics
SystemAdmin
Network
Security

I Read

Anil
HouleDude
Woof
Scripting
Joel
RobGalbraith
Carlos
Sam
Mary
Steve
xkcd
UserFriendly
Indexed
QuestionableContent
RealLife
Dilbert
Tugster
NYT
Weather
Radar
News

Stuff

WebMail
QuesoKnow

SQL Backup

Grab the orphan log before any restore

 

USE master

BACKUP LOG database TO device
WITH NOINIT, NO_TRUNCATE,
NAME = 'nwcopy-Log2',
DESCRIPTION = 'Transaction log backup after database failure'

+++++++++++++++++++++++

Basic backup

USE master

EXEC sp_addumpdevice 'disk', 'nwc2','c:mssql7backupnwc2.bak'

BACKUP DATABASE nwcopy TO nwc2
WITH FORMAT, NAME = 'nwcopy-Complete',
DESCRIPTION = 'A single file complete backup of nwcopy'

++++++++++++++++++++

backup log

USE master
EXEC sp_addumpdevice 'disk', 'nwchange', 'c:mssql7backupnwchange.bak'

BACKUP LOG nwcopy TO nwchange
WITH FORMAT,
NAME = 'nwcopy-Log1',
DESCRIPTION = 'Transaction log backup of nwcopy'

++++++++++++++++
diff backup

USE master

BACKUP DATABASE nwcopy to nwchange
WITH DIFFERENTIAL, NOINIT,
NAME = 'nwcopy-Diff',
DESCRIPTION = 'Differential backup of nwcopy'


Last update: Wednesday, 22-Sep-2004 15:44:11 PDT
Copyright 2002-2009 - PhilZone