0

I have oracle dump file in my AWS ec2 instance, I want to import this dump file to Oracle database in AWS RDS.

I tried using with Oracle SQL developer and also using Perl script.

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Oracle.Procedural.Importing.html

How to import oracle dump from ec2 instance to RDS in AWS

Using Oracle SQL Developer method, the 'Database Copy' option is not enabled. Using Perl, getting a lot of error while running the script.

[root@ip-172-28-1-70 oracle]# perl dump_exp.pl     
install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at (eval 4) line 3.
    Perhaps the DBD::Oracle perl module hasn't been fully installed,
    or perhaps the capitalisation of 'Oracle' isn't right.
    Available drivers: DBM, ExampleP, File, Gofer, Mem, Proxy, SQLite, Sponge.
     at dump_exp.pl line 23.

this both methods are not working for me, and am not aware of Perl.

Please suggest me if have any better method.

jawad846
  • 683
  • 1
  • 9
  • 21
  • Please [edit] your post and show us the "lots of errors". Without seeing these, it's hard to suggest you a good way on how to approach the situation. – Corion Feb 06 '19 at 09:33
  • please go through the error @Corion – jawad846 Feb 06 '19 at 11:28
  • The error is quite descriptive: `Perhaps the DBD::Oracle perl module hasn't been fully installed`. Most likely, this is the case. – Corion Feb 06 '19 at 11:33
  • Tried using cpan DBD::Oracle command & cpan> install DBD::Oracle, getting this at the end. YAML is also installed 'Warning: No success on command[/usr/bin/perl Makefile.PL] 'YAML' not installed, will not store persistent state ZARQUON/DBD-Oracle-1.76.tar.gz /usr/bin/perl Makefile.PL -- NOT OK Running make test Make had some problems, won't test Running make install Make had some problems, won't install Failed during this command: ZARQUON/DBD-Oracle-1.76.tar.gz : writemakefile NO '/usr/bin/perl Makefile.PL' returned status 512' @Corion – jawad846 Feb 06 '19 at 13:01
  • Yes, but that is a different problem. Most likely, the Oracle client libraries are not installed. You don't show the output of ` /usr/bin/perl Makefile.PL` but most likely it tells you that. See also `https://metacpan.org/pod/distribution/DBD-Oracle/` and https://stackoverflow.com/questions/11407513/perl-dbdoracle-module-installation – Corion Feb 06 '19 at 13:34
  • Thanks@Corion, Error is gone. – jawad846 Feb 07 '19 at 13:11

1 Answers1

0

AWS RDS does not allow directory access.

  1. You need install Oracle XE on Amazon EC2.
  2. Create db_link on Oracle XE EC2 between Oracle XE and Oracle RDS.
  3. Use a db_link between Oracle XE and Oracle RDS to transfer files using the procedure DBMS_FILE_TRANSFER.

If you can export using the original export exp, you can import from any workstation with oracle client and the original import utility imp.

Dmitry Demin
  • 2,006
  • 2
  • 15
  • 18
  • I followed Oracle Data pump method by installing Oracle XE in EC2 instance, created db_link with RDS. Thanks @Dmitry – jawad846 Feb 07 '19 at 13:10