oracle DBMS_LOCK.SLEEP()µÄʹÓÃ
Ò»
¡¢執ÐÐ ORACLE_HOME/rdbms/admin/dbmslock.sql À´´´½¨ dbms_lock;
-ÔÚDBAÉí·ÖÏÂgrant execute on dbms_lock to USERNAME;
-執ÐÐ測試´ú碼
begin
dbms_output.put_line(to_char(sysdate,'yyyymmddhh24miss'));
dbms_lock.sleep(60);
dbms_output.put_line(to_char(sysdate,'yyyymmddhh24miss'));
end;
---->
20090728092027
20090728092129
¶þ
1\´´½¨²âÊÔ±í
CREATE TABLE tbl_tt (ID NUMBER(4),addtime DATE);
2\¿ªÊ¼²âÊÔ
BEGIN
FOR i IN 1 .. 10
LOOP
INSERT INTO tbl_tt
VALUES (i, SYSDATE);
COMMIT;
DBMS_LOCK.sleep (5);
END LOOP;
END;
/
3\²éѯÊý¾Ý
ID ADDTIME
---------- -------------------
1 2008-01-14 13:10:20
2 2008-01-14 13:10:26
3 2008-01-14 13:10:31
4 2008-01-14 13:10:36
5 2008-01-14 13:10:41
6 2008-01-14 13:10:46
7 2008-01-14 13:10:51
8 2008-01-14 13:10:56
9 2008-01-14 13:11:01
10 2008-01-14 13:11:07
Ïà¹ØÎĵµ£º
Oracle TNS¼òÊö
ʲôÊÇTNS?
TNSÊÇOracle NetµÄÒ»²¿·Ö,רÃÅÓÃÀ´¹ÜÀíºÍÅäÖÃOracleÊý¾Ý¿âºÍ¿Í»§¶ËÁ¬½ÓµÄÒ»¸ö¹¤¾ß,ÔÚ´ó¶àÊýÇé¿öÏ¿ͻ§¶ËºÍÊý¾Ý¿âҪͨѶ,±ØÐëÅäÖÃTNS,µ±È»ÔÚÉÙÊýÇé¿öÏÂ,²»ÓÃÅäÖÃTNSÒ²¿ÉÒÔÁ¬½ÓOracleÊý¾Ý¿â,±ÈÈçͨ¹ýJDBC.Èç¹ûͨ¹ýTNSÁ¬½ÓOracle,ÄÇô¿Í»§¶Ë±ØÐë°²×°Oracle client³ÌÐò.
TNSÓÐÄÇЩÅäÖÃÎļþ ......
ORACLEÊý¾Ý¿âͨ¹ýsqlnet.oraÎļþÖеIJÎÊýsqlnet.authentication_services,²ÎÊýÎļþÖеÄremote_login_passwordfileºÍ¿ÚÁîÎļþpwdsid.oraÈýÕßÐͬ×÷ÓÃʵÏÖÉí·ÝÈÏÖ¤.
Sqlnet.authentication_services=(NTS)|(NONE)
NTS:²Ù×÷ϵͳÈÏÖ¤·½Ê½,²»Ê¹ÓÿÚÁîÎļþ;
NONE:¿ÚÁîÎļþÈÏÖ¤·½Ê½
Remote_login_passwordfile=(NONE)|(EXCLU ......
The following items are available in the network listener configuration file (listener.ora).
* Listener Address Section
* SID_LIST_listener_name Static Service Section
* Control Parameters
The listener.ora file is located in $ORACLE_HOME/n ......
×÷Õߣºeygle |English Version ¡¾×ªÔØʱÇëÒÔ³¬Á´½ÓÐÎʽ±êÃ÷ÎÄÕ³ö´¦ºÍ×÷ÕßÐÅÏ¢¼°±¾ÉùÃ÷¡¿
Á´½Ó£ºhttp://www.eygle.com/archives/2010/01/oracle_dba_notebook.html
½ñÌ죬ÊÕµ½Á˳ö°æÉç¿ìµÝ¶øÀ´µÄ¡¶Oracle DBAÊּǡ·Ò»ÊéµÄ24СʱСÑù£¬Õâ¸öСÑùͨ¹ýÖ®ºó£¬Êé¾Í¿ÉÒÔ³ÉÅúÓ¡Ë¢£¬Ö¸ÈÕ¿É´ýÁË¡£×î¿ìµÄ¹À¼ÆÊÇÏÂÖÜ¿ÉÒÔÉ ......
-- ÐòÁвÙ×÷ --
-- ´´½¨ÐòÁÐ
CREATE SEQUENCE u_sales_SEQ INCREMENT BY 1 START WITH 1 MINVALUE 1 NOCYCLE NOCACHE NOORDER;
-- ²é³öËùÓдæÔÚµÄÐòÁÐ
SELECT * from user_sequences
-- ɾ³ýÐòÁÐ
DROP SEQUENCE U_SALES_SEQ;
-- ²é³öÏÂÒ»¸öÐòÁÐID
SELECT U_SALES_SEQ. ......