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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠