Posts

Showing posts from January, 2011

Oracle Export-Import with QUERY parameter on LINUX box

There's this one time when I like to purge a certain table but it is very large. It creates a lot of archive logs when I am performing delete statements using a where clause as a delimiter for the rows I'd like to delete. It is very time consuming and it eats space on the disk. And one more thing is that, there are more rows that I need to delete that the rows I need to keep. So I just tried to purge this very large table using Oracle' EXP and IMP utility. My plan is to export the rows that I want to keep and truncate the table I am purging. Afterwards, I will IMP the dumpfile into that same table. Here's what I did: Environment: OS: RHELinux 5.4 32bit DB: Oracle 10.2.0.4 SQL Query: SQL> select * from sh.sales      where time_id = to_date('28-DEC-01:00:00:00',      'DD-MON-RR:HH24:MI:SS'); The output of this query are the rows that I want to keep. My gameplan is: 1. Perform EXP using QUERY parameter. 2. T

How to Restore RMAN backup from one server to another server.

I remembered one time when I was assigned to restore RMAN backup files from PROD server located locally to a TEST server located abroad. I will present how I successfully accomplished my task in this blog. Environment: PROD Server Operating System: RHEL 5.4 Database: Oracle Database 10.2.0.1 TEST Server: Operating System: RHEL 5.4 Database: Oracle Database 10.2.0.4 (residing in a Oracle VM and the directories of all Oracle related files are the same with the PROD environment.) Task:  Restore the latest RMAN backup from PROD server to TEST server. How To Do It: 1. Check the RMAN backup generated in the PROD server and validate if it is a good backup. ***The client has a backup generated using the following command: RMAN> backup incremental level 0 database plus archivelog; I reviewed the RMAN logs generated and took note of the location of the backup files generated by this backup. This will be the backupsets I will use to restore the T