Purging Data

  • Hello All,
    Please let me know how to purge data in production.

  • DBA_007 - Thursday, February 21, 2019 1:40 AM

    Hello All,
    Please let me know how to purge data in production.

    It depends on the application logic and schema design. You can delete data if you do not need it anymore. You can use table partition to archive a data.

    Muthukkumaran Kaliyamoorthy
    https://www.sqlserverblogforum.com/

  • DBA_007 - Thursday, February 21, 2019 1:40 AM

    Hello All,
    Please let me know how to purge data in production.

    What do you mean by "purge"? As it delete everything? I.e. DROP DATABASE YourProductDatabase;? Could you elaborate on what your actual goal is here please?

    Thanks.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • I want to delete old data and please let me know how to partition tables with detailed steps from start to end.

  • DBA_007 - Thursday, February 21, 2019 2:17 AM

    I want to delete old data and please let me know how to partition tables with detailed steps from start to end.

    Let's not get off on the wrong foot here please, but maybe take a step back and think about what you're posting before making demands.

    I'm afraid what you're after still isn't clear. A DROP will delete your old data, as it'll delete the entire database. That appears to not be what you want, so what do you want? The fact that you're saying you want to do this in your production environment is a bit of a concern; deleting all your data in your production environment means you have no data left (and thus no production).

    Have a think about what you're after, and reply with more detail. Explain your actual goal in it's entirety. Why do you want to "purge" your production environment? How do you want to achieve it? Would it not be easier to just rebuild the database? Surely you have the entire thing in source control, so you could DROP it and recreate and it and presto, you have your database in with no data.

    In regards to your demand for detailed steps on how to partition tables, I recommend here, here, or here as a good start. If you struggle with any of those sites, this should help:

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • muthukkumaran Kaliyamoorthy - Thursday, February 21, 2019 2:08 AM

    DBA_007 - Thursday, February 21, 2019 1:40 AM

    Hello All,
    Please let me know how to purge data in production.

    It depends on the application logic and schema design. You can delete data if you do not need it anymore. You can use table partition to archive a data.

    Sorry to intervene, but more of a question than an answer, im not sure how partitioning works internally

    i have similar issue with historical data and my idea was creating a separate schema HIST. and moving that data in there
    are queries set on the partition itself, so the query results become faster because the total number of rows is lower since some of them have been "purged" into a separate partition?

  • How to purge Historical data from a Database

  • DBA_007 - Thursday, February 21, 2019 7:45 AM

    How to purge Historical data from a Database

    I've tried to help here, but we're getting no where other than you making comments which tell us nothing (previously it was purge data, now it's historic). Best I can suggest, without any knowledge of your database(s) or data is:
    DELETE FROM YourTable
    WHERE IsHistory = 1;

    And repeat that for all your tables.

    If you really need help, but don't want to tell any of the users here any information, I suggest getting a consultant in and paying them to learn about your environment and do the work.

    Good luck, but I'm out.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • DBA_007 - Thursday, February 21, 2019 2:17 AM

    I want to delete old data and please let me know how to partition tables with detailed steps from start to end.

    Detailed partitioning steps are at this link: http://bfy.tw/MQdD.

    Eddie Wuerch
    MCM: SQL

Viewing 9 posts - 1 through 8 (of 8 total)

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