Restoring an rdsadmin_rman_util tablespace backup for Oracle

0

Hi All,

I am having trouble restoring a tablespace backup that I created using the rdsadmin_rman_util.backup_tablesapce Amazon RDS procedure.

I followed this page: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.Oracle.CommonDBATasks.RMAN.html

I restored a snapshot of Database A to Database B. I then created a tablespace backup on Database B, sent that backup to S3, loaded that backup into Database B and then ran an import script. The script can be found here: https://paste2.org/G8ANWsmb

The command I ran to create the backup:
BEGIN
rdsadmin.rdsadmin_rman_util.backup_tablespace(
p_owner => 'SYS',
p_directory_name => 'DATA_PUMP_DIR',
p_tablespace_name => '<tablespace_name>',
p_parallel => 1,
p_rman_to_dbms_output => FALSE);
END;
/

From SQL*Plus I executed my script:
SQL> @import.sql
declare
*
ERROR at line 1:
ORA-39001: invalid argument value
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.DBMS_DATAPUMP", line 4087
ORA-06512: at "SYS.DBMS_DATAPUMP", line 4338
ORA-06512: at line 8

Using a very similar version of the above script, I have imported database dumps many times before but the dumps came from DBA's managing an on-prem DB and they didn't use rdsadmin to create the dumps.

I am open to an alternative way of importing the dump, my only requirement is that I need to remap the schema and tablespace name.

Any and all help will be greatly appreciated. :) Thank you.

Regards,
Russell

RussG
asked 5 years ago618 views
2 Answers
1
Accepted Answer

Howdy Russell,

It looks like you are trying to use Data Pump to import an RMAN backup, which won't work. Data Pump can only import from dump files created by Data Pump. The RDSADMIN_RMAN_UTIL creates standard RMAN backupsets for restore on a customer-managed instance using RMAN (RMAN restore isn't supported for Amazon RDS for Oracle DB instances).

To use your import.sql, you would need to use dump files creates using DBMS_DATAPUMP or expdp.

Hope this helps. Thanks!
Michael

AWS
answered 5 years ago
0

Hi MichaelB@AWS,

Thank you for the fast reply. :)

Thanks for clearing up the RMAN/data pump confusion I had. I'm now using expdp instead of the RMAN util. For anyone who comes across this post and needs a little more help, this is what I'm running from my EC2 instance which has a configured tnsnames.ora file:

expdp <user>/<pass>@<database> directory=data_pump_dir dumpfile=<tablespace_name>.dmp tablespaces=<tablespace_name>

In the above, <database> is a net_service_name defined in tnsnames.ora:
https://docs.oracle.com/database/121/NETRF/tnsnames.htm#NETRF260

  • RussG
RussG
answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions