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
asked 2 years ago39 views
2 Answers
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

answered 2 years ago
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
answered 2 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