ORACLE ´¥·¢Æ÷
oracleѧϰ±Ê¼Ç_´¥·¢Æ÷
´¥·¢Æ÷
ÊÇÌض¨Ê¼þ³öÏÖµÄʱºò£¬×Ô¶¯Ö´ÐеĴúÂë¿é¡£ÀàËÆÓÚ´æ´¢¹ý³Ì£¬µ«ÊÇÓû§²»ÄÜÖ±½Óµ÷ÓÃËûÃÇ¡£
¹¦ÄÜ£º
1¡¢ ÔÊÐí/ÏÞÖƶԱíµÄÐÞ¸Ä
2¡¢ ×Ô¶¯Éú³ÉÅÉÉúÁУ¬±ÈÈç×ÔÔö×Ö¶Î
3¡¢ Ç¿ÖÆÊý¾ÝÒ»ÖÂÐÔ
4¡¢ ÌṩÉó¼ÆºÍÈÕÖ¾¼Ç¼
5¡¢ ·ÀÖ¹ÎÞЧµÄÊÂÎñ´¦Àí
6¡¢ ÆôÓø´ÔÓµÄÒµÎñÂß¼
¿ªÊ¼
create trigger biufer_employees_department_id
before insert or update
of department_id
on employees
referencing old as old_value
new as new_value
for each row
when (new_value.department_id<>80 )
begin
:new_value.commission_pct :=0;
end;
/
´¥·¢Æ÷µÄ×é³É²¿·Ö£º
1¡¢ ´¥·¢Æ÷Ãû³Æ
2¡¢ ´¥·¢Óï¾ä
3¡¢ ´¥·¢Æ÷ÏÞÖÆ
4¡¢ ´¥·¢²Ù×÷
1¡¢ ´¥·¢Æ÷Ãû³Æ
create trigger biufer_employees_department_id
ÃüÃûÏ°¹ß£º
biufer£¨before insert update for each row£©
employees ±íÃû
department_id ÁÐÃû
2¡¢ ´¥·¢Óï¾ä
±ÈÈ磺
±í»òÊÓͼÉϵÄDMLÓï¾ä
DDLÓï¾ä
Êý¾Ý¿â¹Ø±Õ»òÆô¶¯,startup shutdown µÈµÈ
before insert or update
of department_id
on employees
referencing old as old_value
new as new_value
for each row
˵Ã÷£º
1¡¢ ÎÞÂÛÊÇ·ñ¹æ¶¨ÁËdepartment_id £¬¶Ôemployees±í½øÐÐinsertµÄʱºò
2¡¢ ¶Ôemployees±íµÄdepartment_idÁнøÐÐupdateµÄʱºò
3¡¢ ´¥·¢Æ÷ÏÞÖÆ
when (new_value.department_id<>80 )
ÏÞÖƲ»ÊDZØÐëµÄ¡£´ËÀý±íʾÈç¹ûÁÐdepartment_id²»µÈÓÚ80µÄʱºò£¬´¥·¢Æ÷¾Í»áÖ´ÐС£
ÆäÖеÄnew_valueÊÇ´ú±í¸úÐÂÖ®ºóµÄÖµ¡£
4¡¢ ´¥·¢²Ù×÷
ÊÇ´¥·¢Æ÷µÄÖ÷Ìå
begin
:new_value.commission_pct :=0;
end;
Ö÷ÌåºÜ¼òµ¥£¬¾ÍÊǽ«¸üкóµÄcommission_pctÁÐÖÃΪ0
´¥·¢£º
insert into employees(employee_id,
last_name,first_name,hire_date,job_id,email,department_id,salary,commission_pct )
values( 12345,’Chen’,’Donny’, sysdate, 12, ‘donny@hotmail.com’,60,10000,.25);
select commission_pct from employees where employee_id=12345;
´¥·¢Æ÷²»»á֪ͨÓû§£¬±ã¸Ä±äÁËÓû§µÄÊäÈëÖµ¡£
´¥·¢Æ÷ÀàÐÍ£º
1¡¢ Óï¾ä´¥·¢Æ÷
2¡¢ Ðд¥·¢Æ÷
3¡¢ INSTEAD OF ´¥·¢Æ÷
4¡¢ ϵͳÌõ¼þ´¥·¢Æ÷
5¡¢ Óû§Ê¼þ´¥·¢Æ÷
1¡¢ Óï¾ä´¥·
Ïà¹ØÎĵµ£º
1¡¢±¸·Ý¹¤¾ß
Ö±½ÓʹÓòÙ×÷ϵͳʵÓóÌÐòcopy¡¢cp¾Í¿ÉÒÔ½øÐб¸·Ý²Ù×÷¡£µ«£¬OracleÇ¿ÁÒ½¨ÒéʹÓÃRecovery Manager£¨»Ö¸´¹ÜÀíÆ÷£¬¼òдRMAN£©¡£
RMANÄܹ»±¸·ÝÊý¾ÝÎļþ¡¢¿ØÖÆÎļþ¡¢¹éµµÈÕÖ¾ÒÔ¼°·þÎñÆ÷²ÎÊýÎļþ£¨spfile£©¡£±¸·Ý¿ÉÒÔ±»Ð´Èë´ÅÅÌ»ò´Å´ø¡£
2¡¢¸ÅÄîÓëÊõÓï
2.1¡¢È«²¿±¸·ÝÓ벿·Ö±¸·Ý
È«²¿±¸·Ý£¨whole backup£©ÊÇËùÓÐÊ ......
µ½Oralce·¾¶ÏÂ
D:\oracle\product\10.2.0\db_1\NETWORK\ADMIN
ZHG =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = leehong)(PORT = 1521))
)
(CONNECT_DATA =
& ......
±¸×¢£º
±¾²©ÄÚÈÝÊdzнÓÉÏÆÚÄÚÈݵÄÑÓÐø£¬ÓÉÓÚÄÚÈݹý³¤£¬Òò´Ë²ÉÓ÷ֶÎ˵Ã÷£¬ÒÔÃâ´ó¼Ò¿´ÆðÀ´Æ£¾ë£¬ÈôÁ˽â¸ü¶àÏêϸµÄ°²×°Á÷³Ì£¬Çë¼ÌÐø¹Ø×¢±¾²©¡£²ÎÕÕÔ°æ°²×°ÊÖ²á¶ÔÕÕ°²×°¡£
4£®Configure Oracle Installation Owner Shell Limits
<1>ÅäÖÃlimits.confÎļþ£¬ºìÉ«±êעΪÔö¼ÓµÄÅäÖÃÄÚÈÝ¡£
[root@myli ......
1¡¢ ´ò¿ªpl/sql ÖÐtools-preferences£¬ÉèÖÃConnectionÖеÄOracle HomeΪoracle9£¬OCI libraryΪoracle9 Èçͼ
2¡¢
½«oralce10Ŀ¼ÏµÄtnsnames.oraÎļþÀïÃæµÄËùÒªµ¼³öµÄoralce10µÄ·þÎñÅäÖà ¸´ÖƵ½oracle9Ŀ¼ÏµÄtnsnames.oraÎļþÀïÃæ
ORCL =
(DESCRIP ......
ÔÚOracleÖÐÒ»¸öÊÂÎñÊÇÓÉÒ»¸ö¿ÉÖ´ÐеÄSQLÓï¾ä¿ªÊ¼£¬Ò»¸ö¿ÉÖ´ÐÐSQLÓï¾ä²úÉú¶ÔʵÀýµÄµ÷Óá£ÔÚÊÂÎñ¿ªÊ¼Ê±£¬±»¸³¸øÒ»¸ö¿ÉÓûعö¶Î£¬¼Ç¼¸ÃÊÂÎñµÄ»Ø¹öÏî¡£Ò»¸öÊÂÎñÒÔÏÂÁÐÈκÎÒ»¸ö³öÏÖ¶ø½áÊø¡£
¡ôµ±COMMIT»òROLLBACK£¨Ã»ÓÐSAVEPOINT×Ӿ䣩Óï¾ä·¢³ö¡£
¡ôÒ»¸öDDLÓï¾ä±»Ö´ÐС£ÔÚDDLÓï¾äÖ´ÐÐÇ°¡¢ºó¶¼ÒþʽµØÌá½»¡£
¡ôÓû§³·Ïû¶ÔOra ......