关于pro*c中加入pl/sql trigger 触发器 编译错误问题
EXEC SQL EXECUTE
BEGIN
CREATE OR REPLACE TRIGGER DB_STARTUP_TRIGGER
AFTER STARTUP ON DATABASE
BEGIN
INSERT INTO AUDIT_ORACLE
VALUES (SYSDATE,
sys_context('USERENV', 'CURRENT_USER'),
sys_context('USERENV', 'IP_ADDRESS'),
'startup',
' ');
END DB_STARTUP_TRIGGER;
END;
END-EXEC;
错误信息
Error at line 57, column 3 in file audit_oracle.pc
CREATE OR REPLACE TRIGGER DB_STARTUP_TRIGGER
..1
PLS-S-00103, Encountered the symbol "CREATE" when expecting one of the following
:
begin case declare 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
<a single-quoted SQL string> pipe
Semantic error at line 56, column 2, file audit_oracle.pc:
BEGIN
.1
PCC-S-02347, PL/SQL found syntax errors
这是什么原因,SQLCHECK=SEMANTICS,已经设置了。
另外我在使用简单的PL/SQL块编译也有问题?其他SQL语句出现错误?是设置的问题吗?