Urgent Requirement

  • Requirement :

    Database : with 520 tables (not all the tables contain huge data volume).

    One procedure , using the condition "DateCreated" (column) should be written. Which needs to filter (transfers) 6 months data into another Database on the same server or another server.

    and that procedure must delete the older data of 6 months before, once the transfer is done. And this procedure will be scheduled every month first sunday.

    Any ideas..... please post replies here, as its a very urgent task..!!!

    Cheers,
    - Win.

    " Have a great day "

  • do all 520 tables have the DateCreated column with a default of getdate(), so that the tables can be queried individually to archive off the data as desired?

    if not, you could add the column today, but if you have a backup from 6 months ago, you could restore that as a different database, and determine what is "new" in the current production database, to help define what is older.

    why is it urgent? are you running out of disk space?

    what happens if a parent record is 6 months old, but a child record related to the parent is 3 months old? maybe you mean just certain tables should be archived?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Thanks Lowell for your Quick response ..

    do all 520 tables have the DateCreated column with a default of getdate(), so that the tables can be queried individually to archive off the data as desired?

    - Yes all the tables have "DateCreated" column

    if not, you could add the column today, but if you have a backup from 6 months ago, you could restore that as a different database, and determine what is "new" in the current production database, to help define what is older.

    - Requirement is that the data older than 6 months should be moved to another server with the same database name. For better performance this requirement was raised and this must be finished by today,...

    why is it urgent? are you running out of disk space?

    - Its a requirement now from my Administration and our request tooo, to improve the performance.

    what happens if a parent record is 6 months old, but a child record related to the parent is 3 months old? maybe you mean just certain tables should be archived?

    - Yes, i mean that the data older than 6 months should be moved out from Live DB and should be deleted once the transfer of data is succeeded. If the child record is required then we will pull the data from the archived DB. That will not be a problem...

    If wrong, Suggest me !!!

    Any scripts or the tools please...!!

    Cheers,
    - Win.

    " Have a great day "

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply