Oracle¶ÔĿ¼Îļþ(directory)µÄ¶Áд²Ù×÷
Create directoryÈÃÎÒÃÇ¿ÉÒÔÔÚOracleÊý¾Ý¿âÖÐÁé»îµÄ¶ÔÎļþ½øÐжÁд²Ù×÷£¬¼«´óµÄÌá¸ßÁËOracleµÄÒ×ÓÃÐԺͿÉÀ©Õ¹ÐÔ¡£
ÆäÓ﷨Ϊ:
create or replace directory exp_dir as '/tmp';
Ŀ¼´´½¨ÒԺ󣬾ͿÉÒ԰ѶÁдȨÏÞÊÚÓèÌØ¶¨Óû§£¬ÀýÈç:
grant read, write on directory exp_dir to eygle;
´ËʱÓû§eygle¾ÍÓµÓÐÁ˶ԸÃĿ¼µÄ¶ÁдȨÏÞ¡£
ÀýÈç:
µ±ÓÃSCOTT½øÐÐĿ¼´´½¨µÄʱºò,Ê×ÏÈÓ¦¸Ã¸³¸øSCOTT´´½¨Ä¿Â¼µÄȨÏÞ,Èç¹ûûÓÐÔò»á±¨Ò»Ï´íÎó
SQL> create or replace directory MY_DIR as 'd:\test';
create or replace directory MY_DIR as 'd:\test'
ORA-01031: ȨÏÞ²»×ã
SQL> GRANT CREATE ANY DIRECTORY TO scott;--ÊÚȨ¸øSCOTTÓû§´´½¨Ä¿Â¼È¨ÏÞ
Grant succeeded
SQL>create or replace directory MY_DIR as 'd:\test';--´´½¨ÁËÒ»¸öĿ¼ÃûΪ'MY_DIR'µÄĿ¼,ËûµÄ·¾¶ÊÇ'd:\test'
Directory created.
SQL>select * from all_directories;--²é¿´´´½¨µÄĿ¼
OWNER DIRECTORY_NAME DIRECTORY_PATH
SYS MY_DIR d:\test
SQL> drop directory my_dir;--ɾ³ýĿ¼
Directory dropped
дÈëÎļþ:
SQL> DECLARE
2 filehandle utl_file.file_type;
3 begin
4 filehandle := utl_file.fopen('MY_DIR','test.txt','w');
5 utl_file.put_line(filehandle,'test 1 write one.');
6 utl_file.put_line(filehandle,'ÄãºÃ!');
7 utl_file.fclose(fil
Ïà¹ØÎĵµ£º
ÍêÈ«¸ÉµôOracleËÀËø½ø³Ì
1.²éÄĸö¹ý³Ì±»Ëø:
²éV$DB_OBJECT_CACHEÊÓͼ:SELECT * from V$DB_OBJECT_CACHE WHERE OWNER='¹ý³ÌµÄËùÊôÓû§' AND CLOCKS!='0';
2. ²éÊÇÄÄÒ»¸öSID,ͨ¹ýSID¿ÉÖªµÀÊÇÄĸöSESSION:
²éV$ACCESSÊÓͼ:SELECT * from V$ACCESS WHERE OWNER='¹ý³ÌµÄËùÊôÓû§' AND NAME='¸Õ²Å²éµ½µÄ¹ý³ÌÃû';
3. ²é³öSI ......
½ñÌ칫˾ÒòΪҵÎñÐèÒª,ÐÞÒªÐÞ¸Äij¸ö×Ö¶ÎÊý¾ÝÀàÐÍÓÐnumber(5),±äΪnumber(5,2)ÐÍ
ÒªÊÇûÓÐÊý¾ÝµÄ»°Ö±½ÓÓÃÒÔÏÂÓï¾ä¼´¿É
alter table tb_test modify permile number(5,2);
µ«ÊÇÓÐÊý¾ÝµÄ»° ¾Í²»ÄÜÓÃÉÏÃæ·½·¨ÁË,
alter table tb_test add permile_temp number(5,2)
update tb_test set  ......
ÊÖÍ·ÕýÔÚ½øÐÐÒ»¸öÏîÄ¿£¬ÐèҪȫÎļìË÷£¬¾¹ýͬÊÂ×ÐϸËÑË÷·¢ÏÖ£ºoracleÌṩoracle textµÄÈ«ÎļìË÷¹¦ÄÜ¡£
oracle textµÄ¼òµ¥Ó¦ÓþͬʲâÊÔ½á¹ûÕý³££¬°´ÕÕÏîĿҪÇó(ÏîĿԤ¶¨·½°¸wordÎĵµ´æÈëÊý¾Ý¿â(blobÀàÐÍ))ʹÓÃoracle text²éѯ½á¹ûÈ·ÊÇΪ¿Õ£¬Í¬ÊÂÑо¿µ½´ËÖжϡ£
  ......
OracleÊý¾Ý¿âSCNºÅÏê½â:
¡¡¡¡ÏµÍ³¼ì²éµãscn(v$database(checkpoint_change#))
¡¡¡¡Êý¾ÝÎļþ¼ì²éµã(v$datafile(checkpoint_change#))
¡¡¡¡Êý¾ÝÎļþÖÕÖ¹scn(v$datafile(last_change#))
¡¡¡¡Êý¾ÝÎļþÖдæ·ÅµÄ¼ì²éµã
¡¡¡¡Æô¶¯scn (v$datafile_header(checkpoint_change#)
¡¡¡¡1¡¢ÏµÍ³¼ì²éµãscn
¡¡¡¡µ±Ò»¸ö¼ì²éµã¶¯×÷Íê³ ......
¡¶oracle´óÐÍÊý¾Ý¿âϵͳÔÚAIX/unixÉϵÄʵսÏê½â¡·ÌÖÂÛ23£º¹ØÓÚTivoli storage manage¡£ÎÄÆ½ Õâ¶ÎÈÕ×Ó¼äÓÐÈô¸ÉÕâ±¾ÊéµÄÅóÓÑÀ´ÓʼþÌÖÂÛTSMµÄÎÊÌ⣬ÒÔ¼°ÊDz»ÊÇÒªÉÏTSM±¸·ÝϵͳµÄÎÊÌâ¡£ÉõÖÁ°Ñ·½°¸·¢¹ýÀ´ÇëÎÒ¿´¿´£¬°Ñ¹Ø£¡Ð»Ð»Ð»Ð»´ó¼ÒµÄÐÅÈΣ¬¶ÔÕâ¸ö¶«Î÷ÎÒÒ²ÊÇÕ¾ÔÚ×îÖÕÓû§µÄ½Ç¶ÈÀ´¿´µÄ£¬ÕâÀïÎÒÃÇÌÖÂÛÌÖÂÛ£¬ÁÄÁÄ¡£ ÏÔÈ»£¬ºÃµÄ¼ ......