Share via


How to get DB Backup of specified Data Range in MS SQL Server 2005

Question

Monday, January 17, 2011 7:24 AM

Hi,

I want to take the backup of database from 1 jan 2011 to 5 jan 2011.

Does anyone knows, please tell me how to take.

Thanks in Advance

Regards

Brijendra

 

All replies (4)

Tuesday, January 18, 2011 4:35 AM ✅Answered

Hi Brijendra,

In that case you need to write custom script to copy the tables which have "create_date" in that time frame in sys.all_objects. For the "updated" tables you may have to query the records based on a date identifier column in the table (if it has one).

SQL Server does not have an Out of the box option to backup tables based on the criteria that you have specified.

Pradeep Adiga
Blog: sqldbadiaries.com


Monday, January 17, 2011 7:29 AM

Create a job and schedule it... Do you want one bak file that contains all backups or just 5 files based on date?Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/


Monday, January 17, 2011 4:17 PM

Like Uri mentioned you may create a job for taking the database backup. In the job schedule enter the desired start and end dates as shown in the below example.

 

Pradeep Adiga
Blog: sqldbadiaries.com


Tuesday, January 18, 2011 4:09 AM

Dear Uri/Pradeep,

Actually I don't want to take full backup of the database. I want to take the backup of those records from all the tables of a database, that has been created or updated between 1 jan 2011 to 5 Jan 2011.

Please help..

 

Regards

Brijendra