mercredi 4 février 2015

Import Oracle dump on Amazon RDS

I have dump files from a production instance and I need to import it into our RDS instance.


I followed the instructions from http://ift.tt/1Kfhxvl (from p23) and http://ift.tt/1ArGAsd (which is more or less the same)


The files are on the EC2 instance and I can connect to the RDS instance, the user has correct rights.


I correctly installed perl libraries to run the script



$ perl -e 'use DBI; print $DBI::VERSION,"\n";'
1.633
$ perl -e 'use DBD::Oracle; print $DBD::Oracle::VERSION,"\n";'
1.74


I've configured the variables to point to my RDS info - From the Test Connection of the http://ift.tt/1ArGAsd site, it passes correctly



$ perl test.pl
Got here without dying


However when running the copy script, it fails with the following error:



$ perl copy_to_rds.pl <myfile>.dmp
DBD::Oracle::db do warning: ORA-24344: success with compilation error (DBD SUCCESS_WITH_INFO: OCIStmtExecute) [for Statement "create or replace package perl_global as fhutl_file.file_type; end;"] at copy_to_rds.pl line 25.
DBD::Oracle::st execute failed: ORA-06550: Ligne 1, colonne 7 :
PLS-00905: object <myrdsuser>.PERL_GLOBAL is invalid
ORA-06550: Ligne 1, colonne 7 :
PL/SQL: Statement ignored (DBD ERROR: error possibly near <*> indicator at char 6 in 'BEGIN <*>perl_global.fh := utl_file.fopen(:dirname, :fname, 'wb', :chunk); END;') [for Statement "BEGIN perl_global.fh := utl_file.fopen(:dirname, :fname, 'wb', :chunk); END;" with ParamValues: :chunk=8192, :dirname='DATA_PUMP_DIR', :fname='<myfile>.dmp'] at copy_to_rds.pl line 30.
ORA-06550: Ligne 1, colonne 7 :
PLS-00905: object <myrdsuser>.PERL_GLOBAL is invalid
ORA-06550: Ligne 1, colonne 7 :
PL/SQL: Statement ignored (DBD ERROR: error possibly near <*> indicator at char 6 in 'BEGIN <*>perl_global.fh := utl_file.fopen(:dirname, :fname, 'wb', :chunk); END;')


Thanks for your attention and help, Fred





Aucun commentaire:

Enregistrer un commentaire