Hi, I have learned in the past two hours a lot of approaches that don't work. I'm asking for a fresh pair of eyes, please. Using Oracle 19c on aws rds, the rdsadmin schema is what allows SYS level commands to execute in place of the usual ALTER statements. Also, rds uses log groups in lieu of the expected log group members. I have tried many, many variations on the syntax on code that seemingly passes the TOAD and SQL*Dev syntax checkers, but it all fails to run.
DECLARE
loggroups NUMBER :=0 ;
stmt VARCHAR2(128);
BEGIN
EXECUTE IMMEDIATE ('rdsadmin.rdsadmin_util.switch_logfile');
SELECT count(1) INTO loggroups FROM v$log;
IF loggroups < 9 THEN
EXECUTE IMMEDIATE ('rdsadmin.rdsadmin_util.add_logfile(128M)');
END IF;
END;
/
/* this works outside of the block EXEC rdsadmin.rdsadmin_util.switch_logfile; */
ASKER
rdsadmin.rdsadmin_util.add_logfile(128M)
The parameter here (128M). What's the data type here?!
ASKER
Parameter name | Data type | Default | Required | Description |
---|---|---|---|---|
bytes | positive | null | No | The size of the log file in bytes. |
p_size | varchar2 | — | Yes | The size of the log file. You can specify the size in kilobytes (K), megabytes (M), or gigabytes (G). |
Oracle is an object-relational database management system. It supports a large number of languages and application development frameworks. Its primary languages are SQL, PL/SQL and Java, but it also includes support for C and C++. Oracle also has its own enterprise modules and application server software.
TRUSTED BY
Correct. Execute immediate executes the 'string'. It has no idea that it is a procedure, a select, or what.
So, you would need to provide the entire command to execute immediate.
So:, something like:
EXECUTE IMMEDIATE ('begin rdsadmin.rdsadmin_util.swi
That said, don't do that!
Just provide the procedure:
Open in new window