DB version:10gR2
I am new to stored Outlines and I've been asked to review a Stored Outline Creation script. This is the script
-- Log in as SYS
-- Grant necessary privileges to the User executing SQL in question.
grant create any outline to rec_sch
/
grant execute on dbms_outln to rec_sch
/
grant execute on dbms_outln_edit to rec_sch
/
-- Connect to that user(rec_sch) to create the outline
select name, category, used, sql_text from dba_outlines;
ALTER SESSION SET NLS_DATE_FORMAT='DD-MON-YYYY';
alter session set create_stored_outlines = TRUE;
declare
v_sqlstring varchar2(5000);
begin
v_sqlstring:= 'The SQL in Question';
execute immediate v_sqlstring;
end;
/
--After granting the UPDATE privilege on the outln.ol$ table to rec_sh user
--log in as rec_sh
alter session set create_stored_outlines = FALSE;
ALTER SYSTEM set use_stored_outlines = default;
update <font color="red"><b>outln.ol$</b></font>
set sql_text ='The SQL in Question';
Is this script Ok?
Message was edited by:
user609308