oracle ´¥·¢Æ÷ÎÊÌâ - Oracle / ¸ß¼¶¼¼Êõ
SQL code:
create or replace trigger article_log_file
after update or delete or insert
on article
for each row
begin
if updating then
insert into log_file values
(old.authorID,'update',old.artcleName,sysdate);
else if deleting then
insert into log_file values
(old.authorID,'delete',old.artcleName,sysdate);
else if inserting then
insert into log_file values
(new.authorID,'insert',new.artcleName,sysdate);
end if;
end;
ËäÈ»Óï¾äÖ´ÐÐÁË£¬µ«±àÒëÆ÷Ìáʾ±àÒë´øÓдíÎ󣬶øÇÒÎÒ²åÈëʱҲ³öÏÖÁË´íÎó£¬ÍûÖ¸½Ì£¬³õѧ¡¡
ÎÒÊýÁËÏ£¬end if Ö»ÓÐÒ»¸ö£¬if È´ÓÐ3¸ö¡£
if ÒªÓë end if Æ¥Åä
else if ¸ÄΪ elsif ÊÔÊÔ
PL/SQL ifÓï¾äÓï·¨
if <Ìõ¼þ1> then
<Óï¾ä1>;
elsif <Ìõ¼þ2> then
<Óï¾ä2>;
elsif <Óï¾ä3> then
....
else
<Óï¾än>;
end if;
2Â¥»¹²»Ë¯¾õ£¿ ¹»ÇڷܵÄ
ÎÒ˯¾õÈ¥
create or replace trigger article_log_file
after update or delete or insert
on article
for each row
begin
if updating then
insert into log_file values
(old.authorID,'update',old.artcleName,sysdate);
elseif deleting then
insert into log_file values
(old.authorID,'delete',old.artcleName,sy
Ïà¹ØÎÊ´ð£º
ÎÒÊÇÓÃÔ¶³Ì×ÀÃæÁ¬²Ù×÷·þÎñÆ÷ÉϵÄÊý¾Ý¿â¡£
ÔÚ´´½¨Ò»¸öÓû§Ö®ºó£¬ÔÙÓÃPLSQLµÇ¼£¬ÔòPLSQLËÀµôÁË¡£
ÎҹصôPLSQLÖ®ºó£¬ÓÃÆäËûÓû§Ò²²»ÄܵǼ¡£
ÎÒ°ÑoracleµÄ·þÎñÍ£Ö¹£¬½á¹û¾ÍÊÇoracleµÄ·þÎñ״̬¾ÍÍ£ÁôÔÚ¡°Í ......
´ó¼ÒºÃ,ÎÒÏÖÔÚ°Ñoracle·þÎñÆ÷ÉÏÃæµÄÔʼÎļþ,ÏÂÔØµ½±¾»úÁË.ÎÒÏëÔÚ±¾»ú·ÃÎÊÊý¾Ý¿âÔõôÉèÖð¡.ÊDz»ÊÇÀàËÆ¿ÉÒÔ½¨Á¢Ò»¸öʲôÐéÄâ·þÎñÆ÷À´ÊµÏÖ.Çë´ó¼Ò³ö³öÖ÷Òâ
ÒýÓÃ
´ó¼ÒºÃ,ÎÒÏÖÔÚ°Ñoracle·þÎñÆ÷ÉÏÃæ ......
private static final String URL = "jdbc:oracle:thin:@localhost:1521:orcl";
private static final String USERNAME = "sys";
private static final String PASSWORD = "s ......
²éÁËÒ»ÌìµÄblob£¬»¹ÊÇûÀí½âµ½£¬ÎÒÏëÔÚVCÏ´æÈ¡¶þ½øÖƵÄÎļþ£¬Ê¹ÓõÄÊÇoo4o£¬ÕÕ×ŰïÖúÎĵµÉÏÃæµÄдÁËдÈëÊý¾Ý¿âµÄ´úÂ룬»¹ÊÇûд¶Ô£¬´íÎóÌáʾÊÇthis operation is not permitted on a empty LOB£¬ÕâÊÇʲôÒâ˼°¡£¿ÕÕ ......
oracle 11g °²×° 01092 ´íÎó,
ÈÕÖ¾ÐÅÏ¢£º
[oracle@linux trace]$ vi alert_orcl.log
MMON started with pid=14, OS id=9089
RESETLOGS after incomplete recovery UNTIL CHANGE 522752
Errors in file / ......