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
已提問 5 年前檢視次數 635 次
2 個答案
1
已接受的答案

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
已回答 5 年前
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
已回答 5 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南