Best way to remove old data from db?

Hi,
I am looking some ways to keep my database small and remove old data from database and archive it somewhere else. the data may need to be put back to the database in the future. One of the things I am conserned is how to enforce constraints? In other words, when I remove data, all the related pk/fk data should be removed together. Any suggestions will be greatly appreciated.
Thanks

hope this may help u
concept is : exp/imp & truncate will reclaim the space
method1
do an export and secure the dump(say dump1) for future purpose.
delete the unwanted data.
commit.
now again export the tables ( say dump2).
now do the import(dump2).
/*now this import will reclaim the the unused space.*/
method 2
/* depennded on volume of data */
-- create backup of existing table for future
create table backup_table nologging as select * from original_table;
-- create copy1 of existing table
create table copy_table nologging as select * from original_table;
-- truncate the original table, so that highwater mark is reset.
truncate table original_table;
-- insert data from copy_table into original table
insert /*+ APPEND */ into original_table select * copy_table where(ur conditions for data);
commit all the work.
/* now u have 3 tables
backup_table - with all the data - for future reload
original_table - with unwanted data deleted and space reclaimed.
copy_table - copy of original table.
now u drop the copy_table
drop table copy_table;
regards

Similar Messages

  • What is the best way to remove personal data from the hard drive in preparation for selling my old Mac?

    I am going to sell or perhaps donate my old Power Mac G5.  Is there an easier, yet comprehensive way to remove my data from the hard-drive?  My best approach is dumping anything I do not want found into the trash.
    I am running Mac OS 10.5.8 on the powermac G5

    For better security than the simple Erase (which does not actually over-write the data blocks, only clears the directory), choose Security Options, and Zero all data, one pass.
    After a Zero all data, the only way to recover the data is to dis-assemble the drive in a clean room and use expensive test gear to recover a little of the data. That is good for all but Military Secrets.
    If you really trust no one under any circumstances, remove the drive and beat it to death with a hammer.

  • What is the best way to transfer my date from my old iMac to my new iMac?

    what is the best way to transfer my date from my old iMac to my new iMac? I don't have a time capsule, so I cannot use time machine.
    thanks

    Your best bet by far is to use Setup Assistant when the new Mac first starts up to transfer directly from the old one. 
    It's similar to Migration Assistant, but doing it that way will avoid having an extra user account.
    Either way, you can connect them via FireWire, Thunderbolt, or your network, but avoid wireless if at all possible.  You can connect both to your netwrork via Ethernet, or put a single cable between the two. 
    See Using Setup Assistant on Mountain Lion or Lion for details.

  • What is the best way to remove all info from a MacBook Pro before passing it along to someone else?          passing it on to someone?

    What is the best way to remove all info from a MacBook Pro before passing it on to someone else?

    Read this: http://www.tuaw.com/2010/09/24/mac-101-preparing-your-old-mac-for-sale-or-recycl ing/

  • Is there a way to remove old responses from the Acrobat Tracker?

    Is there a way to remove old responses from the Tracker if I have deleted the original sources? In other words, Acrobat.com and my desktop are out of sync.How I can get rid of any of these files.

    nvm. I found it.

  • I am moving from PC to Mac.  My PC has two internal drives and I have a 3Tb external.  What is best way to move the data from the internal drives to Mac and the best way to make the external drive read write without losing data

    I am moving from PC to Mac.  My PC has two internal drives and I have a 3Tb external.  What is best way to move the data from the internal drives to Mac and the best way to make the external drive read write without losing data

    Paragon even has non-destriuctive conversion utility if you do want to change drive.
    Hard to imagine using 3TB that isn't NTFS. Mac uses GPT for default partition type as well as HFS+
    www.paragon-software.com
    Some general Apple Help www.apple.com/support/
    Also,
    Mac OS X Help
    http://www.apple.com/support/macbasics/
    Isolating Issues in Mac OS
    http://support.apple.com/kb/TS1388
    https://www.apple.com/support/osx/
    https://www.apple.com/support/quickassist/
    http://www.apple.com/support/mac101/help/
    http://www.apple.com/support/mac101/tour/
    Get Help with your Product
    http://docs.info.apple.com/article.html?artnum=304725
    Apple Mac App Store
    https://discussions.apple.com/community/mac_app_store/using_mac_apple_store
    How to Buy Mac OS X Mountain Lion/Lion
    http://www.apple.com/osx/how-to-upgrade/
    TimeMachine 101
    https://support.apple.com/kb/HT1427
    http://www.apple.com/support/timemachine
    Mac OS X Community
    https://discussions.apple.com/community/mac_os

  • Best Way to port the data from one DB to another DB using Biztalk

    Hi,
    please suggest best way to move the data from one db to another DB using biztalk.
    Currently I am doing like that, for each transaction(getting from different source tables) through receive port, and do some mapping (some custom logic for data mapping), then insert to target normalized tables(multiple tables) and back to update the status
    of transaction in source table in sourceDB. It is processing one by one.
    How/best we we can do it using  bulk transfer and update the status. Since it has more than 10000 transaction per call.
    Thanks,
    Vinoth

    Hi Vinoth,
    For SQL Bulk inserts you can always use SQL Bulk Load
    adapter.
    http://www.biztalkgurus.com/biztalk_server/biztalk_blogs/b/biztalksyn/archive/2005/10/23/processing-a-large-flat-file-message-with-biztalk-and-the-sqlbulkinsert-adapter.aspx
    However, even though a SQL Bulk Load adapter can efficiently insert a large amount of data into SQL you are still stuck with the issues of transmitting the
    MessageBox database and the memory issues of dealing with really large messages.
    I would personally suggest you to use SSIS, as you have mentioned that records have to be processed in specific time of day as opposed to when the
    records are available.
    Please refer to this link to get more information about SSIS: http://msdn.microsoft.com/en-us/library/ms141026.aspx
    If you have any more questions related to SSIS, please ask it in
    SSIS 
    forum and you will get specific support.
    Rachit

  • Best way to accept a date from a user

    Hi Guys,
    Whats the best way to get a date from a user and add it in an
    insert record to access.
    I have a form that adds a record and it works well enough as
    long as the data added is in the correct format.
    Untill now ive just had a text box with an explination to the
    user on how to add the date and what format....
    But Im fed up with having to change bad entrys and need to
    place a control or something on the form but dont know whats
    easiest and best?
    Any ideas welcome.
    Thanks

    If you want today's date set the database up to insert the
    date
    automatically. If you want other dates than today's use a
    date picker or
    calendar to insert the date.
    Dave
    "Tag2007" <[email protected]> wrote in
    message
    news:epj87p$mar$[email protected]..
    > Hi Guys,
    >
    > Whats the best way to get a date from a user and add it
    in an insert
    record to
    > access.
    >
    > I have a form that adds a record and it works well
    enough as long as the
    data
    > added is in the correct format.
    >
    > Untill now ive just had a text box with an explination
    to the user on how
    to
    > add the date and what format....
    >
    > But Im fed up with having to change bad entrys and need
    to place a
    control or
    > something on the form but dont know whats easiest and
    best?
    >
    > Any ideas welcome.
    > Thanks
    >

  • Purchasing new iMac (27 i5), what is best method to transfer programs/files/documents from 24" iMAC?  What is the best method to remove personal data from OS?

    Purchasing a new iMac (27 i5), what is the best method to transfer programs/files,documents from a 24" iMac?
    What is the best method to remove personal data from the 24" iMac?

    Use setup assistant which is offered when you setup your new Mac.  It will transfer information from a Time Machine backup, Clone or another Mac.
    It's best to do this during setup to avoid issues with duplicate IDs.
    Regards

  • What is the best way to remove crayon writing from my Ipad?

    What is the best way to remove crayon writing from my Ipad?

    All Apple recommends is a damp cloth.
    Depending on how much and thick it is, I'd use a dry papertowel or your fingernail to scrape the bulk of it off (I suggest fingernail so that you use something that can't really scratch the iPad)
    Once you get most of it, then use a damp, not wet, cloth, maybe one that you moistened with warm water to help cut through the waxy nature of the crayon.
    What you don't want to do is use chemicals or anything like a scrubby pad because you don't want to scratch the surface in your efforts to clean it.

  • HT4759 i have lost my iphone i dont have iemi number but i used icloud id on that as there any way to locate my phone and if not located the plz tell my the way i remove my data from it. thanks

    i have lost my iphone i dont have iemi number but i used icloud id on that as there any way to locate my phone and if not located the plz tell my the way i remove my data from it. thanks

    Go to icloud.com.  Log in with your Apple ID & Password.  Go to the Find My iPhone section.  Perform a remote wipe of the device.
    You don't have to have downloaded any app.  You only have to have enabled the Find My iPhone option under Settings > iCloud.  If you did not do that, then you cannot remotely access the device.
    If that's the case, then change ALL of your account passwords; email, banking, etc.  All of them.  And then monitor those accounts very closely!

  • HT5922 I have some devices that i no longer use with AirPlay. What's the best way to remove those devices from the AirPlay List?

    Bonjour,
    I have some devices that i no longer use with AirPlay. What's the best way to remove those devices from the AirPlay List?

    In article <e35sc3$ru1$[email protected]>,
    "-->dan mode" <[email protected]> wrote:
    > > All
    > > I have a website I would like to remove from the
    internet, However I am
    > > planning on keeping the IP for a development
    location and would like to
    > > put
    > > a page up that says this site is no longer
    available. Is this how you do
    > > it
    > > or are there other pages to display when a site is
    removed.
    > > Thanks
    > > Dave
    Depending on how long the site has been active, it may be
    already
    spidered by search engines and cached. However, for the most
    part, I
    usually use my FTP program OR even Dreamweaver itself (now
    that I can)
    to delete files on the server just as I do locally. Hit the
    delete and
    confirm

  • What is the best way to mimic the data from production to other server?

    Hi,
    here we user streams and advanced replication to send the data for 90% of tables from production to another production database server. if one goes down can use another one. is there any other best option rather using the streams and replication? we are having lot of problems with streams these days they keep break and get calls.
    I heard about data guard but dont know what is use of it? please advice the best way to replicate the data.
    Thanks a lot.....

    RAC, Data Guard. The first one is active-active, that is, you have two or more nodes accessing the same database on shared storage and you get both HA and load balancing. The second is active-passive (unless you're on 11.2 with Active Standby or Snapshot Standby), that is one database is primary and the other is standby, which you normally cannot query or modify, but to which you can quickly switch in case primary fails. There's also Logical Standby - it's based on Streams and generally looks like what you seem to be using now (sort of.) But it definitely has issues. You can also take a look at GoldenGate or SharePlex.

  • Best way to remove unwanted signs from string

    Which is the best way to purify a string from possible dangerous signs? I want to remove all characters that is not a-z or 0-9? how would I go about?

    read the string character by character, and check to
    see if they're characters you want to remove or not,
    by comparing them to the ascii values of characters
    you permit. I've used this before, but I can't
    remember what exactly it permits, and I'm too lazy to
    look up the ascii table :) But this sort of thing
    works.
    int c = in.read();
    while(c!=-1){
    if((c<33)||(c<58&&c>44)){
         out.write(c);
    I thought about that too. But the values in the ASCII table... arn't they a little volatile to use? I mean, will my application work on other systems or systems with other languages?

  • HT201493 Is there any way to remove old locations from the 'Notify Me' list?

    I would like to remove old/unused locations from the 'Notify Me' list.... I tried to uninstall and reinstall the app, but the locations still exist on reinstall.

    Hi, Phnxbane, and welcome to the Community,
    You may certainly remove all profile data by leaving those settings as "blank" or "not specified."  I find the easiest way to do this is to open the profile settings from within the Skype "client" software.
    Removing/deleting an account name from the Skype search directory closes the account.  More details about this can be found here: 'Can I delete my Skype account?' 
    Regards,
    Elaine
    Was your question answered? Please click on the Accept as a Solution link so everyone can quickly find what works! Like a post or want to say, "Thank You" - ?? Click on the Kudos button!
    Trustworthy information: Brian Krebs: 3 Basic Rules for Online Safety and Consumer Reports: Guide to Internet Security Online Safety Tip: Change your passwords often!

Maybe you are looking for

  • Wireless Keyboard don't connect with new mac mini

    Hi, I just received my new Mac mini server 2011 and bought an Apple wireless keyboard (already have a magic mouse). At first start up of my Mac mini picks up my magic mouse and I can use it but does not pick up my wireless keyboard? Is this normal? A

  • How do I block Google from knowing where I am?

    while a search for just about anything, brings millions of results. when you decide to select anyone of them, it will take you to a preset, based on Google having found your whereabouts. for example I live in London Ontario, my ISP is in Kitchener ON

  • Rotating line width

    A tangental question to the arrow issue previously posted. I tagged this question to the end of the other thread but it may have gotten lost. http://www.youtube.com/watch?v=RnRZn_p8MFk In the example I gave the arrow thickness was only in the vertica

  • POSC OUTBOUND ISSUE

    Hi All, I am  trying to  run  POSC Outbound  Scenario. I am  getting an error when  i  try to save  Pick WT  .The  Error Message  is  as Follows Storage bin GI-ZONE is not assigned to storage type 9020 Message no. /SCWM/L3010 . I have  done the  foll

  • Part of my scren isblack and grey whats gone wrong please help

    part of my screen is black and grey whats gone wrong ? Please Help