Archiving Data

  • Hi all. Im pretty much a newbie with SQL Server and this forum. I have browsed around and there is TONS of info on this site! :w00t: But because I am so new, Im not even sure what keywords to use for a search, so I am asking for some help to get me started.

    I do have some pretty good knowledge of databases with MS Access and VBA. Our company just moved our DB's to SQL Server 2005 so I am learning on the fly.

    Here is what I need. Like I said, if I can get a good start, hopefully I can finish it.

    I need several SQL commands that will go behind a button. For each of the commands, I will be given a string containing a list of Jobs.

    Command 1:Move all records of each specified Jobs to an archive database at a specified location.

    Command 2:Remove all records of each specified Jobs from the database.

    Command 3:Move all records of each specified Jobs back to the database from the archive database.

    Command 4:Remove all records of each specified Jobs from the archive database.

    And then a way to check for the success of each of the above commands.

    Thanks in advance!

  • Firstly I would like to recommend you to watch the SQL Server 2005 videos (free):

    https://www.microsoft.com/Sqlserver/2005/en/us/demos.aspx#express

    Next, what you need looks like a method to hide some data during a specific time, if it's true, will be a little bit difficult to write useful examples because depends on tables structures.

    If you are trying to create a Disaster Recovery environment, take a look at Mirroring, Log Shipping, and Cluster features.

    ---------------------
    Alex Rosa
    http://www.keep-learning.com/blog

  • Thanks Alex I will watch those videos and hopefully they will help me develop some of the code I need.

    The tables are pretty basic. There is a job number and then some associated data.

  • Ok Try this thing

    You have to copy u r exsiting data & log files and paste them to data folder of install location of SQL Server. then u can attache the data file in sql server 2005. so you can move complete data sucessfully from access to SQL server.

    Thanks

    Raghuraj S Parihar

    SQL DBA

  • It sounds like you need a job that will purge and archive data on a scheduled basis.

    About how many tables are involved? Do you have some sort of last modified date?

  • It all will depend on some metrics...

    How big are your affected tables?

    What's the percentaje of rows affected by each archive & purge process?

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Viewing 6 posts - 1 through 5 (of 5 total)

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