반응형
/**********************************************************************************************
-- Title : [2k5] 일반 백업(full, differential, log, bulk-logged) 및 복사전용(copy-only) 백업
-- Reference : dbRang.com
-- Key word : backup database differential, copy only
**********************************************************************************************/
drop database backupDB;
create database backupDB;
create table ttt (a int, b varchar(100));
insert into ttt values (1, '전체백업 직전');
--전체 백업
backup database backupDB to disk = 'd:\backupDB_bak';
insert into ttt values (2, '증분백업 직전');
--증분 백업
backup database backupDB to disk = 'd:\backupDB_bak'
with differential;
insert into ttt values (3, '복사 전용 백업 직전');
--복사 전용 백업
backup database backupDB to disk = 'd:\backupDB_bak'
with copy_only;
insert into ttt values (4, '2차 증분 백업 직전');
--증분 백업
backup database backupDB to disk = 'd:\backupDB_bak'
with differential;
--확인
restore filelistonly from disk = 'd:\backupDB_bak';
restore verifyonly from disk = 'd:\backupDB_bak';
restore labelonly from disk = 'd:\backupDB_bak';
restore headeronly from disk = 'd:\backupDB_bak'; --여기서 확인 가능(IsCopyOnly필드)
-- Title : [2k5] 일반 백업(full, differential, log, bulk-logged) 및 복사전용(copy-only) 백업
-- Reference : dbRang.com
-- Key word : backup database differential, copy only
**********************************************************************************************/
drop database backupDB;
create database backupDB;
create table ttt (a int, b varchar(100));
insert into ttt values (1, '전체백업 직전');
--전체 백업
backup database backupDB to disk = 'd:\backupDB_bak';
insert into ttt values (2, '증분백업 직전');
--증분 백업
backup database backupDB to disk = 'd:\backupDB_bak'
with differential;
insert into ttt values (3, '복사 전용 백업 직전');
--복사 전용 백업
backup database backupDB to disk = 'd:\backupDB_bak'
with copy_only;
insert into ttt values (4, '2차 증분 백업 직전');
--증분 백업
backup database backupDB to disk = 'd:\backupDB_bak'
with differential;
--확인
restore filelistonly from disk = 'd:\backupDB_bak';
restore verifyonly from disk = 'd:\backupDB_bak';
restore labelonly from disk = 'd:\backupDB_bak';
restore headeronly from disk = 'd:\backupDB_bak'; --여기서 확인 가능(IsCopyOnly필드)
반응형