January 6, 2009 at 12:01 am
Hi,
I want to archive(take a backup and keep it in new db) records of the year 1999 and I want to delete them from the main prodcution database. Please tell me how can I do this.
Can I take the backup of records only? or I have to take the backup of whole Database?
Thanks a lot,
Venki
Thank You
January 6, 2009 at 12:33 am
Backups are of a complete database or filegroup.
I would suggest creating the table(s) in the new database and, if on the same server, select the rows from the original table(s) into the new table(s) and then do delete from the original tables where exists (Select 1 from new_table where old_table.primary_key = new_table.primary_key.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
January 6, 2009 at 8:31 am
Replication is definitely not the tool for what you want.
* Noel
January 9, 2009 at 3:23 am
Select into and then deleting is an option but beware to fire these queries if the number of records in your table is huge. Delete might take ages.
Can you answer these questions:
How many records do you have in total?
How many records you want archive?
-Vikas Bindra
January 9, 2009 at 5:45 am
Im having similar issue. log file at subscriber grows larger while archiving data at publisher.
giving large head ache.
pls suggest soln.......
January 9, 2009 at 6:49 am
Jack Corbett already suggested the correct solution. If the deletes are huge, then you need to write a loop to do the deletes in groups of 10 or 20,000 rows at a time.
--Jeff Moden
Change is inevitable... Change for the better is not.
January 9, 2009 at 10:26 am
renu.ap (1/9/2009)
Im having similar issue. log file at subscriber grows larger while archiving data at publisher.giving large head ache.
pls suggest soln.......
if transactional integrity is not a problem at susbcriber take a look at MaxcmdinTran parameter.
* Noel
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply