BACKUP MODELS
1.FOR THIS BACKUP MODELS FIRST I HAVE CREATED A NEW DATABASE CALLED "SAMPLE". IN THAT DATABASE I CREATED A TABLE CALLED 'TBL_DESIG' WITH 3 COLUMNS AND ALSO INSERTED ONE ROW
2.NOW MY TABLE HAVE ONE RECORD
I TAKE FULL BACKUP OF MY SAMPLE DATABASE
3.AFTER SOME TIME I INSERTED ANOTHER RECORD INTO TABLE
I TAKE THE DIFFERENTIAL BACKUP
4.IN THE SAME WAY AFTER SOME TIME I INSERTED ANOTHER RECORD INTO TABLE
I TAKE THE LOG BACKUP IN THE FOLLOWING ..
CREATE TABLE TBL_DESIG(NUM INT,NAME VARCHAR(50),COURSE VARCHAR(50))
INSERT INTO TBL_DESIG VALUES(1,'SARAN','DBA')
1.FULL BACKUP
BACKUP DATABASE SAMPLE TO DISK='D:\BACKUP\MYFULL.BAK'
INSERT INTO TBL_DESIG VALUES(2,'MAHI','MGR')
2.DIFFERENTIAL BACKUP
BACKUP DATABASE SAMPLE TO DISK='D:\BACKUP\MYDIFF.BAK' WITH DIFFERENTIAL
INSERT INTO TBL_DESIG VALUES(3,'DEVI','DIRECT')
3.LOG OR TRANSACTIONAL LOG BACKUP
BACKUP LOG SAMPLE TO DISK='D:\BACKUP\MYLOG.BAK'
SELECT * FROM TBL_DESIG
RESTORING MODELS
IN THE RESTORE MODEL I DELETED THE ABOVE CREATED DATABASE
AND RESTORE IN THE FOLLOWING ORDER
RESTORE DATABASE SAMPLE FROM DISK='D:\BACKUP\MYFULL.BAK' WITH NORECOVERY
RESTORE SAMPLE FROM DISK='D:\BACKUP\MYDIFF.BAK' WITH NORECOVERY
RESTORE LOG SAMPLE FROM DISK='D:\BACKUP\MYLOG.BAK' WITH NORECOVERY
RESTORE DATABASE SAMPLE WITH RECOVERY
1.FOR THIS BACKUP MODELS FIRST I HAVE CREATED A NEW DATABASE CALLED "SAMPLE". IN THAT DATABASE I CREATED A TABLE CALLED 'TBL_DESIG' WITH 3 COLUMNS AND ALSO INSERTED ONE ROW
2.NOW MY TABLE HAVE ONE RECORD
I TAKE FULL BACKUP OF MY SAMPLE DATABASE
3.AFTER SOME TIME I INSERTED ANOTHER RECORD INTO TABLE
I TAKE THE DIFFERENTIAL BACKUP
4.IN THE SAME WAY AFTER SOME TIME I INSERTED ANOTHER RECORD INTO TABLE
I TAKE THE LOG BACKUP IN THE FOLLOWING ..
CREATE TABLE TBL_DESIG(NUM INT,NAME VARCHAR(50),COURSE VARCHAR(50))
INSERT INTO TBL_DESIG VALUES(1,'SARAN','DBA')
1.FULL BACKUP
BACKUP DATABASE SAMPLE TO DISK='D:\BACKUP\MYFULL.BAK'
INSERT INTO TBL_DESIG VALUES(2,'MAHI','MGR')
2.DIFFERENTIAL BACKUP
BACKUP DATABASE SAMPLE TO DISK='D:\BACKUP\MYDIFF.BAK' WITH DIFFERENTIAL
INSERT INTO TBL_DESIG VALUES(3,'DEVI','DIRECT')
3.LOG OR TRANSACTIONAL LOG BACKUP
BACKUP LOG SAMPLE TO DISK='D:\BACKUP\MYLOG.BAK'
SELECT * FROM TBL_DESIG
RESTORING MODELS
IN THE RESTORE MODEL I DELETED THE ABOVE CREATED DATABASE
AND RESTORE IN THE FOLLOWING ORDER
RESTORE DATABASE SAMPLE FROM DISK='D:\BACKUP\MYFULL.BAK' WITH NORECOVERY
RESTORE SAMPLE FROM DISK='D:\BACKUP\MYDIFF.BAK' WITH NORECOVERY
RESTORE LOG SAMPLE FROM DISK='D:\BACKUP\MYLOG.BAK' WITH NORECOVERY
RESTORE DATABASE SAMPLE WITH RECOVERY
No comments:
Post a Comment