oracleÈ«ÎÄË÷ÒýÖ®datastore_3_FILE_DATASTORE
DATASTOREÊÇFILE_DATASTOREµÄ²âÊÔ
[oracle@rhel140 ~]$ cat OUTPUT.TXT
ORACLE
oracle
[oracle@rhel140 LOG]$ cat EMPXT_000_2012_2680.LOG
SOURCE
ABC
SQL> conn myuser/myuser
Connected.
SQL> CREATE TABLE T (ID NUMBER, DOCS VARCHAR2(1000));
Table created.
SQL> INSERT INTO T VALUES (1, 'OUTPUT.TXT');
1 row created.
SQL> commit;
Commit complete.
SQL> BEGIN
2 CTX_DDL.CREATE_PREFERENCE('TEST_FILE', 'FILE_DATASTORE');
3 CTX_DDL.SET_ATTRIBUTE('TEST_FILE', 'PATH', '/home/oracle');
4 END;
5 /
PL/SQL procedure successfully completed.
SQL> CREATE INDEX IND_T_DOCS ON T (DOCS) INDEXTYPE IS CTXSYS.CONTEXT
PARAMETERS ('DATASTORE TEST_FILE'); 2
Index created.
SQL> SELECT * from T WHERE CONTAINS(DOCS, 'ORACLE') > 0;
ID DOCS
---- --------------------
1 OUTPUT.TXT
ÐèҪעÒâµÄÊÇÔÚ½¨Á¢PREFERENCEµÄPATHÊôÐÔʱ²»ÄÜÓÿͻ§¶ËµÄĿ¼ºÍÎļþ£¬Ò»¶¨ÊÇ·þÎñÆ÷¶ËµÄĿ¼ºÍÎļþ£¬
ÎÒÓÃWINDOWSµÄĿ¼ʱ£¬ÔÚdr$index_errorÖоͻá³öÏÖÏÂÃæµÄ´íÎó
SQL> select * from ctxsys.dr$index_error;
ERR_IDX_ID ERR_TIMES ERR_TEXTKEY
---------- --------- ------------------
ERR_TEXT
--------------------------------------------------------------------------------
1181 13-MAY-09 AAAM52AAEAAAAGkAAA
DRG-11513: unable to open or write to file /home/oracle/OUTPUT.TXT
SQL> INSERT INTO T VALUES (2, 'LOG/EMPXT_000_2012_2680.LOG');
1 row created.
SQL> commit;
Commit complete.
SQL> exec CTX_DDL.SYNC_INDEX('IND_T_DOCS');
PL/SQL procedure successfully completed.
SQL> SELECT * from T WHERE CONTAINS(DOCS, 'SOURCE') > 0;
no rows selected
OracleËƺõÖ»Ö§³ÖÔÚFILE_DATASTOREÖÐÉèÖõÄ·¾¶ÖнøÐÐËÑË÷£¬¼´Ê¹ÏñÉÏÃæÕâ¸öÀý×ÓÖеÚ2Ìõ¼Ç¼£¬Îĵµ´æ´¢ÔÚ
Ö¸¶¨Â·¾¶ÏµÄ×ÓĿ¼ÖУ¬ÕâÖÖÇé¿öÒ²ÊÇûÓа취½øÐÐË÷ÒýµÄ¡£
Èç¹û½«ÎļþλÖôÓ/home/oracle/LOGŲµ½/home/oracleĿ¼Ï£¬Ôò¿ÉÒÔ½øÐÐË÷Òý£º
SQL> host mv /home/oracle/LOG/EMPXT_000_2012_2680.LOG /home/oracle
SQL> UPDATE T SET DOCS = 'EMPXT_000_2012_2680.LOG' WHERE ID = 2;
1 row updated.
SQL> COMMIT;
Commit complete.
SQL&g
Ïà¹ØÎĵµ£º
¹ØÓÚlatchºÍmutexµÄÎÊÌâ
from:http://www.itpub.net/thread-1004815-1-1.html
A:
latchÊÇãÅËø£¬ÊÇÒ»ÖÖ´®Ðл¯»úÖÆ£¬ÓÃÀ´±£»¤SGAÖеÄÄÚ´æ½á¹¹¡£
mutexÊÇʲô£¬Ò²ÊÇÒ»ÖÖ´®Ðл¯»úÖÆ£¬ÊÇ»¥³âËø£¿
¸öÈ˶ÔmutexûÓÐʲô¸ÅÄî¡£Õâ¸öÊÇ10GÐÂÒý½øµÄ£¿9IºÃÏñûÓа¡¡£
ÄÄλÃ÷°×ÈË£¬¸ø°ïæÏêϸ½âÊÍÏÂmutex£¬×îºÃ»¹ÄܺÍlatch ×öϱȽ ......
µÚÒ»²¿·Ö »ù±¾¸ÅÄî
Ò»¡¢ ......
Ò»¡£jobµÄÔËÐÐƵÂÊÉèÖÃ
1.ÿÌì¹Ì¶¨Ê±¼äÔËÐУ¬±ÈÈçÔçÉÏ8:10·ÖÖÓ£ºTrunc(Sysdate+1) + (8*60+10)/24*60
2.ToadÖÐÌṩµÄ£º
ÿÌ죺trunc(sysdate+1)
ÿÖÜ£ºtrunc(sysdate+7)
ÿÔ£ºtrunc(sysdate+30)
ÿ¸öÐÇÆÚÈÕ£ºnext_day(trunc(sysdate),'SUNDAY')
ÿÌì6µã£ºtrunc(sysdate+1)+6/24
°ë¸öСʱ£ºsysdate+30/1440
3.ÿ¸ö ......
1¡¢´´½¨´æ´¢¹ý³Ì
create or replace procedure test(var_name_1 in type,var_name_2 out type) as
--ÉùÃ÷±äÁ¿(±äÁ¿Ãû ±äÁ¿ÀàÐÍ)
begin
--´æ´¢¹ý³ÌµÄÖ´ÐÐÌå
end test;
´òÓ¡³öÊäÈëµÄʱ¼äÐÅÏ¢
E.g:
create or replace procedure test(workDate in Date) is
begin
dbms_output.putline('The input date i ......
Oracle Text¹¦ÄÜÊ®·ÖÇ¿´ó£¬¿ªÊ¼Ñ§Ï°£¬Ö÷Òª²Î¿¼
yangtingkun
µÄblogºÍÎĵµ½øÐС£
µÚÒ»²½ÏȸãÇå³þdatastoreµÄÀàÐÍ¡£
DATASTOREµÄÀàÐÍÈçÏ£º
DIRECT_DATASTORE
MULTI_COLUMN_DATASTORE
DETAIL_DATASTORE
FILE_DATASTORE
NESTED_DATASTORE
URL_DATASTORE
USER_DATASTORE
ÏÂÃæ¾Í¸÷ÖÖÀàÐͽøÐвâÊÔ£¬DIRECT_DATASTOREÊ ......