Unable to backup AWS RDS Oracle DB using rdsadmin.rdsadmin_rman_util

0

Hi,

I tried to backup the RDS Oracle instance but failed. Here are the steps that I performed.

1) Create backup folder
exec rdsadmin.rdsadmin_util.create_directory(p_directory_name => 'mybackup');

2) Perform full backup
BEGIN
rdsadmin.rdsadmin_rman_util.backup_database_full(
p_owner => 'SYS',
p_directory_name => 'MYBACKUP',
p_rman_to_dbms_output => FALSE);
END;

3) List the files in directory "MYBACKUP"
SELECT * FROM TABLE(rdsadmin.rds_file_util.listdir(p_directory => 'MYBACKUP'));

Step 2 completed in less than a second and Step 3 only returned one row, with the field TYPE = 'directory'.

Anyone knows what went wrong with the above steps?

Thanks!

zoffy
질문됨 3년 전491회 조회
2개 답변
0

Hi there,

This procedure does not return until the underlying RMAN command completes executing (either successfully, or returning an error). So, if it completed in less than a second, it sounds like it didn't run at all. When executing PL/SQL procedures in SQLPlus, make sure server output is enabled (e.g. "set serverout on size 10000" [1]), and make sure a PL/SQL block is always followed by a slash character [2], which instructs SQLPlus to execute the block (just a semicolon isn't sufficient for PL/SQL).

You can also use the AWS console or the RDS_FILE_UTIL package to list and view RMAN output files in the BDUMP directory to see if the job completed with an error. If no file was generated, then the procedure probably wasn't executed.

SELECT * FROM table(rdsadmin.rds_file_util.listdir('BDUMP')) where filename like '%rman%' order by mtime;
SELECT text FROM table(rdsadmin.rds_file_util.read_text_file('BDUMP','rds-rman-validate-nnn.txt'));

Hope that helps. Thanks!
Michael

[1]: https://docs.oracle.com/en/database/oracle/oracle-database/19/sqpug/SET-system-variable-summary.html#GUID-5EA17047-1EBC-44BA-A21A-B4CEC27FD6B0
[2]: https://docs.oracle.com/en/database/oracle/oracle-database/19/sqpug/slash.html#GUID-F5EEC10C-6E74-4CCE-A196-C591F83C3D44

AWS
답변함 3년 전
0

Hi Michael,

Thanks for your reply with lots of valuable information.

We are dealing with a vendor that support our AWS services. After discussing with the support staff a few times, I suddenly can backup my DB today. The vendor didn't mention they fixed anything but I believe there must be something.

But the information that you provided really gives me enough information to diagnose the backup issues. I will mark it as "Answered".

zoffy
답변함 3년 전

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

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

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

관련 콘텐츠