ACE Director Alum Daniel Morgan, founder of Morgan's Library, is scheduling
complimentary technical Workshops on Database Security for the first 30
Oracle Database customers located anywhere in North America, EMEA, LATAM, or
APAC that send an email to
asra_us@oracle.com. Request a Workshop for
your organization today.
Purpose
Undocumented but Streams related
AUTHID
CURRENT_USER
Data Types
TYPE connect_info IS RECORD (
username VARCHAR2(30),
password VARCHAR2(30),
connect_identifier VARCHAR2(30),
connect_key VARCHAR2(??),
i_customer_id BINARY_INTEGER);
dbms_recoverable_script.add_forward_block(
script_id IN RAW,
block IN CLOB,
dblink_forward IN VARCHAR2,
block_comment IN VARCHAR2,
block_num IN NUMBER);
dbms_recoverable_script.create_script(
invoking_pkg_owner IN VARCHAR2,
invoking_pkg IN VARCHAR2,
invoking_proc IN VARCHAR2,
script_comment IN VARCHAR2,
script_id OUT RAW);
CREATE OR REPLACE PACKAGE testpkg AUTHID CURRENT_USER IS
PROCEDURE display_string(teststr IN VARCHAR2);
END testpkg;
/
CREATE OR REPLACE PACKAGE BODY testpkg IS
PROCEDURE display_string(teststr IN VARCHAR2) IS
BEGIN
dbms_output.put_line(teststr);
END;
END testpkg;
/
SELECT * FROM dba_recoverable_script;
SELECT * FROM dba_recoverable_script_blocks;
SELECT * FROM dba_recoverable_script_errors;
SELECT * FROM dba_recoverable_script_hist;
SELECT * FROM dba_recoverable_script_params;
set serveroutput on
DECLARE
r RAW(32);
BEGIN
dbms_recoverable_script.create_script('Test', 'A', 'B', 'C', r);
dbms_output.put_line(r);
END;
/
SELECT * FROM dba_recoverable_script;
SELECT * FROM dba_recoverable_script_blocks;
SELECT * FROM dba_recoverable_script_errors;
SELECT * FROM dba_recoverable_script_hist;
SELECT * FROM dba_recoverable_script_params;
-- replace the raw value with the one you receive
exec dbms_recoverable_script.drop_script(TO_RAW(TO_BLOB('CB68CBC3E4264A1680AE4620CFE6CD66')));
DECLARE
r RAW(32);
BEGIN
dbms_recoverable_script.create_script('Test1', 'DISPLAY_STRING', 'TESTPKG', 'SYS', r);
dbms_output.put_line(r);
dbms_recoverable_script.insert_param(r, 'TESTSTR', 'Morgan', 1);
dbms_recoverable_script.update_comment(r, 'Test2');
dbms_recoverable_script.run(r);
dbms_recoverable_script.drop_script(r);
END;
/
SELECT * FROM dba_recoverable_script;
SELECT * FROM dba_recoverable_script_blocks;
SELECT * FROM dba_recoverable_script_errors;
SELECT * FROM dba_recoverable_script_hist;
SELECT * FROM dba_recoverable_script_params;
dbms_recoverable_script.drop_script(
script_id IN RAW,
flags IN BINARY_INTEGER,
ignore_remote_error IN BOOLEAN,
check_owner IN BOOLEAN,
force IN BOOLEAN);
dbms_recoverable_script.modify_forward_block(
script_id IN RAW,
block_num IN VARCHAR2,
forward_block IN CLOB,
dblink_forward IN VARCHAR2,
action IN VARCHAR2);
dbms_recoverable_script.run(
script_id IN RAW,
forward IN BOOLEAN,
remote_state IN CLOB);
See CREATE_SCRIPT Demo Above
Overload 2
dbms_recoverable_script.run(
script_id IN RAW,
forward IN BOOLEAN,
remote_state IN CLOB,
flags IN BINARY_INTEGER,
conn_info IN dbms_recoverable_script.connect_info_set);