Archiving question

Posted on 2009-04-20
Last Modified: 2012-05-06
archiving means that my old data will move to another tables, is this tables outside of my database or inside database? when i need to make query, am i going to make something special to find old record?
Question by:fahadman
    1 Comment
    LVL 142

    Accepted Solution

    the history/archive tables can be inside the same database, but can also be outside of the database.
    in sql server, you would at least put them into a different filegroup than the actual table.

    if you are really in the situation to create history/archive tables, you need to make that difference clear in the user forms, so the user searches by default only the current (active) data, and has to explicitely "extend" the search for the history data, if needed.
    for that, you then indeed need to query both the active and the archive table then, using a UNION ALL, or, if you work with a stored procedure that "hides" the exact table layout, eventually using a table variable storing the hits first, and  the returning the data from there.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    There are some very powerful Data Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a discu…
    So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now