If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
when i am trying to create the following trigger i am getting PLS-00103
<code>
create or replace
TRIGGER logon_audit
AFTER LOGON ON DATABASE
DECLARE sqlstr VARCHAR2(200) := 'alter session set "_optim_peek_user_binds"=false;';
BEGIN
BEGIN
IF (USER = 'SCOTT') THEN
execute immediate sqlstr;
END IF;
END logon_audit;
<code>
Error(12,16): PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: begin case declare end exception exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 6,415
Code:
CREATE OR replace TRIGGER logon_audit
after logon ON database
DECLARE
sqlstr VARCHAR2(200) := 'alter session set "_optim_peek_user_binds"=false;';
BEGIN
IF ( USER = 'SCOTT' ) THEN
EXECUTE IMMEDIATE sqlstr;
END IF;
END logon_audit;
__________________
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.