Friday 10 May 2013

Creating Oracle dump file from Amazon RDS using Local exp utility

In Our project our team is facing an issue of performance when they do connect to Amazon RDS Database Oracle 11g,Hence decided let us create a local copy of full database same as Amazon RDS so that all development testing is done in local and once everything goes fine we had a plan to move to AWS RDS

Initially I thought is is very easy task,just 
  1. create a dump file using Oracle Datapump and import to our local Database
  2. directly import from Oracle RDS instance using Oracle Datapump
As I found 2nd option is good I started working on 2nd option here we need to create a DB link as we are going to connect a Remote Database
create database link awseapdev connect to "eapdev" identified by "eapdev"  using '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=eapt.cg0rr8cmdden.us-west-1.rds.amazonaws.com)(PORT=1521))(CONNECT_DATA=(SID=EAPDB)))';
If you see in above command after USING if i specify SID it should work,But as in my local there is no write permission to change TNSNAME.ORA file I have entered the full TNS entries

Checking DB link with Oracle RDS from Local




Actual Challenge

As I have done many export and import I was in a impression now importing to a Local DB is a job of minutes,but I found lot of road blocks

Add caption

The above errors was due to below reasons

  1. Source and Target version are different
  2. Source (RDS) Oracle 11g Release 11.2.0.2.0 
  3. Target (Local) Oracle 10g Express Edition 10.2.0.1.0
After going through many sites I come to know migration by above from Higher to lower version 10.2.0 is having some bug below link is for reference

https://forums.oracle.com/forums/thread.jspa?messageID=10883615

Now I decided to use Export /Import utility of Oracle,I fallowed below steps to successful export the Oracle Dump in Local Machine from Oracle11g Amazon RDS
  • Used exp command
  • Used User Level Export example (EAPDEV)
  • Used full TNS entry with User name (As no permission to change Tnsnames.ora)
  • Used Dump file name with path (As no write permission)