oracle ¶¨Ê± ×÷Òµ Àý×Ó
sql > variable jobno number ;
sql > begin
sql > DBMS_JOB.submit(:jobno, ' pro_name(); ' ,sysdate, ' sysdate+1 ' );
dbms_job.submit(:job1, ' MYPROC; ' ,sysdate, ' sysdate+1/1440 ' );¡¡¡¡ -- ÿÌì1440·ÖÖÓ£¬¼´Ò»·ÖÖÓÔËÐÐtest¹ý³ÌÒ»´Î
sql > commit ;
sql > end ;
------------------------------------
ÔÚÃüÁî¿ØÖÆ̨ÖÐÕâÑù¾Í¿ÉÒÔ½¨²úÒ»¸ö×÷ÒµÁË¡£sysdate±íʾµ±Ç°×÷Òµ½«À´Ö´ÐеÄʱ¼ä£¬sysdate+1±íʾµ÷ÓÃƵÂÊ¡£
ÃèÊö INTERVAL²ÎÊýÖµ
ÿÌìÎçÒ¹12µã 'TRUNC(SYSDATE + 1)'
ÿÌìÔçÉÏ8µã30·Ö 'TRUNC(SYSDATE + 1) + £¨8*60+30£©/(24*60)'
ÿÐÇÆÚ¶þÖÐÎç12µã 'NEXT_DAY(TRUNC(SYSDATE ), ''TUESDAY'' ) + 12/24'
ÿ¸öÔµÚÒ»ÌìµÄÎçÒ¹12µã 'TRUNC(LAST_DAY(SYSDATE ) + 1)'
ÿ¸ö¼¾¶È×îºóÒ»ÌìµÄÍíÉÏ11µã 'TRUNC(ADD_MONTHS(SYSDATE + 2/24, 3 ), 'Q' ) -1/24'
ÿÐÇÆÚÁùºÍÈÕÔçÉÏ6µã10·Ö 'TRUNC(LEAST(NEXT_DAY(SYSDATE, ''SATURDAY"), NEXT_DAY(SYSDATE, "SUNDAY"))) + £¨6×60+10£©/£¨24×60£©'
select * from user_jobs
²éѯ×÷Òµ¼Ç¼
1£®È·±£OracleµÄ¹¤×÷ģʽÔÊÐíÆô¶¯ÈÎÎñ¶ÓÁйÜÀíÆ÷
Oracle¶¨Ê±Ö´ÐГJob Queue”µÄºǫ́³ÌÐòÊÇSNP½ø³Ì£¬¶øÒªÆô¶¯SNP½ø³Ì£¬Ê×ÏÈҪȷ±£Õû¸öϵͳµÄģʽÊÇ¿ÉÒÔÆô¶¯SNP½ø³ÌµÄ£¬ÕâÐèÒªÒÔDBAµÄÉí·ÝÈ¥Ö´ÐÐÈçÏÂÃüÁ
svrmgrl>; alter system enable restricted session;
»òsql>; alter system disenable restricted session;
ÀûÓÃÈçÉÏÃüÁî¸ü¸ÄϵͳµÄ»á»°·½Ê½Îªdisenable restricted£¬ÎªSNPµÄÆô¶¯´´ÔìÌõ¼þ¡£
2£®È·±£OracleµÄϵͳÒѾÅäÖÃÁËÈÎÎñ¶ÓÁйÜÀíÆ÷µÄÆô¶¯²ÎÊý
SNPµÄÆô¶¯²ÎÊýλÓÚOracleµÄ³õʼ»¯ÎļþÖУ¬¸ÃÎļþ·ÅÔÚ¡
Ïà¹ØÎĵµ£º
ÎÒÔÚoracle 9iµÄ»·¾³Ï¿ª·¢ÁËocciµÄÓ¦Ó㬽á¹û·Åµ½10g(10.2.0.3)·þÎñÆ÷ÉÏÔËÐв»ÁË(Ö»×°ÁËwindows °æµÄ10g·þÎñ¶Ë)£¬Ö»ºÃ°ÑËùÓÐÒÀÀµµÄ9iµÄdll¿½¹ýÈ¥£¬½á¹ûÁ¬½Óocci±¨´í£º
Error while trying to retrieve text for error ORA-32101
µ½http://www.oracle.com/technology/global/cn/software/tech/oci/instantclient/index.ht ......
SQL ServerÀïµÄ ISNULL Óë Oracle ÖÐµÄ NULLIF²»Í¬:
SQL Server ÖÐÓÐÁ½¸ö²ÎÊý£¬Óï·¨£º
ISNULL(check_expression, replacement_value)
check_expression Óë replacement_value Êý¾ÝÀàÐͱØÐëÒ»ÖÂ
Èç¹û check_expression Ϊ NULL£¬Ôò·µ»Ø replacement_v ......
ºÜ¶àÅóÓÑÔÚJava¿ª·¢ÖУ¬Ê¹ÓÃOracleÊý¾Ý¿âµÄʱºò£¬¾³£»áÅöµ½ÓÐORA-01000: maximum open cursors exceeded.µÄ´íÎó¡£
ʵ¼ÊÉÏ£¬Õâ¸ö´íÎóµÄÔÒò£¬Ö÷Òª»¹ÊÇ´úÂëÎÊÌâÒýÆðµÄ¡£
ora-01000: maximum open cursors exceeded.
±íʾÒѾ´ïµ½Ò»¸ö½ø³Ì´ò¿ªµÄ×î´óÓαêÊý¡£
ÕâÑùµÄ´íÎóºÜÈÝÒ׳öÏÖÔÚJava´úÂëÖеÄÖ÷ÒªÔÒòÊÇ£ºJava´úÂëÔÚÖ´ ......
À俽±¸ÁËÒ»¸öÔÓÐÊý¾Ý¿â£¬Òª°ÑËûÒÆÖ²µ½ÐµÄÊý¾Ý¿âÖÐʱ£¬Òª×¢Òâһϣº
1.Oradim -new -sid [ʵÀýÃû:demo] -intpwd [PWD] -pfile= [Òª´´½¨ÊµÀýµÄÅäÖÃÎļþ£º*.ora]
2.set Oracle_SID=[ʵÀýÃû]£¨×°Íêºó¼ÇµÃÒªÔÚ×¢²á±íÀï¼ÓÉÏ:HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraDb10g_home1£ºORACLE_SID£¬ÖµÎªÊµÀýÃû¡££©
3.sql ......
oracel sqlplus
1). ÉèÖõ±Ç°sessionÊÇ·ñ¶ÔÐ޸ĵÄÊý¾Ý½øÐÐ×Ô¶¯Ìá½»
SQL>SET AUTO[COMMIT] {ON|OFF|IMM[EDIATE]| n}
2)£®ÔÚÓÃstartÃüÁîÖ´ÐÐÒ»¸ösql½Å±¾Ê±£¬ÊÇ·ñÏÔʾ½Å±¾ÖÐÕýÔÚÖ´ÐеÄSQLÓï¾ä
SQL> SET ECHO {ON|OFF}
3).ÊÇ·ñÏÔʾµ±Ç°sqlÓï¾ä²éѯ»òÐ޸ĵÄÐÐÊý
SQL> SET FEED[BACK] {6|n|ON|OFF}
ĬÈÏÖ»Óн ......