Ò»¡¢ ³£ÓÃÈÕÆÚÊý¾Ý¸ñʽ
1.Y»òYY»òYYY ÄêµÄ×îºóһ룬Á½Î»»òÈýλ
SQL> Select to_char(sysdate,'Y') from dual;
TO_CHAR(SYSDATE,'Y')
--------------------
7
SQL> Select to_char(sysdate,'YY') from dual;
TO_CHAR(SYSDATE,'YY')
---------------------
07
SQL> Select to_char(sysdate,'YYY') from dual;
TO_CHAR(SYSDATE,'YYY')
----------------------
007
2.Q ¼¾¶È 1¡«3ÔÂΪµÚÒ»¼¾¶È£¬2±íʾµÚ¶þ¼¾¶È¡£
SQL> Select to_char(sysdate,'Q') from dual;
TO_CHAR(SYSDATE,'Q')
--------------------
2
3.MM Ô·ÝÊý
SQL> Select to_char(sysdate,'MM') from dual;
TO_CHAR(SYSDATE,'MM')
---------------------
05
4.RM Ô·ݵÄÂÞÂí±íʾ £¨VÔÚÂÞÂíÊý×ÖÖбíʾ 5£©
SQL> Select to_char(sysdate,'RM') from dual;
TO_CHAR(SYSDATE,'RM')
---------------------
V
5.Month ÓÃ9¸ö×Ö·û³¤¶È±íʾµÄÔ·ÝÃû
SQL> Select to_char(sysdate,'Month') from dual;
TO_CHAR(SYSDATE,'MONTH')
------------------------
5ÔÂ
6.WW µ±ÄêµÚ¼¸ÖÜ £¨2007Äê5ÔÂ29ÈÕΪ2007ÄêµÚ22ÖÜ£©
SQL> Select to_char(sysdate,'WW') from dual;
TO_C ......
µÚÒ»¸öbug fix Óõ½ OracleµÄUpdateÓï¾ä
update Table1 set Web=-1 where ProgID=N‘123’
CodeReview ʱ
Do we need a COMMIT; in the Oracle version?
ÉÏÍø²éÁËÒ»ÏÂOracle COMMITÓ÷¨
COMMIT
Purpose
Use the COMMIT statement to end your current transaction and make permanent all changes performed in the transaction. A transaction is a sequence of SQL statements that Oracle Database treats as a single unit. This statement also erases all savepoints in the transaction and releases transaction locks.
Until you commit a transaction:
You can see any changes you have made during the transaction by querying the modified tables, but other users cannot see the changes. After you commit the transaction, the changes are visible to other users' statements that execute after the commit.
You can roll back (undo) any changes made during the transaction with the ROLLBACK statement (see ROLLBACK.
Oracle Database issues an implicit COMMIT before and after any data definition language (DD ......
¾³£Óõ½µÄÊý¾Ý¿âµ¼Èëµ¼³ö£¬Ã¿´ÎÓö¼Òª²éѯ£¬°ÑÓï¾ä±£ÁôÔÚÕâ±ß·½±ãÒÔºó²éÔÄ
//¿ìËÙµ¼ÈëÊý¾Ýµ½ÁíÒ»¸öÊý¾Ý¿âµÄÓï¾ä
ÀýÈ磺
imp tms/tms@TMS_192.168.0.104 file=c:\1.dmp buffer=30720 show=no ignore=yes grants=yes rows=yes full=yes
·¾¶ÎªOracle·¾¶
imp tms/tms@TMS file=d:\tmsbf_all.dmp buffer=30720 show=no ignore=yes grants=yes rows=yes full=yes
imp tms/tms@TMS_127.0.0.1 file=d:\fk.dmp buffer=30720 show=no ignore=yes grants=yes rows=yes full=yes
//µ¼³öÊý¾Ý¿â
exp tms/tms@TMS_192.168.1.104 file=d:\tmsbf_all.dmp owner=(tms) //µ¼³öÖ¸¶¨·½°¸Êý¾Ý
exp tms/tms@TMS_192.168.0.249 file=d:\tmsbf_all.dmp full=y //µ¼³öÕû¸öÊý¾Ý¿âÊý¾Ý ......
ÓÐʱÔÚ½øÐÐÏîÄ¿¿ª·¢¹ý³ÌÖУ¬ÓÉÓÚһЩÎó²Ù×÷»áµ¼ÖÂÊý¾Ý¿âµÄ±í¸øÎóɾ³ýµô£¬ÎªÁ˱ÜÃâÕâÒ»Çé¿öµÄ·¢Éú£¬ÈçºÎÑϸñ¿ØÖÆijÓû§²»ÄܶÔ×Ô¼ºµÄ¿â½øÐÐDROPȨÏÞ£¬ÐèÒª½øÐÐÏà¹ØÉèÖã¬ÓÉÓÚĬÈÏconnectµÄȨÏÞÒ²ÊǾßÓÐdrop×Ô¼ºÓû§µÄ±í½á¹¹£¬Í¨¹ýproduct_user_profileÖ»ÄÜÏÞÖÆsql*plusµÄ²Ù×÷£¬¶ø²»ÄÜÏÞÖÆÆäËüµÚÈý·½oracleÁ¬½Ó¹¤¾ß£¬×îÓÐЧµÄ·½·¨¾ÍÊÇͨ¹ýÔÚsystemÓû§Ï½¨Á¢´¥·¢Æ÷À´ÏÞÖÆ¡£
¾ßÌåÈçÏ£º
Õâ¸ötrigger½¨µ½ÁËsystemÓû§Ï£¬TEMP¼¸¸öÓû§¶¼ÎÞ·¨Dop×Ô¼ºµÄ¶ÔÏó£¬Äã¿ÉÒÔ²ÎÕÕ½øÐÐÐ޸ġ£
CREATE OR REPLACE TRIGGER "TRG_DENY_DROP_UBISP" BEFORE
DROP ON DATABASE
BEGIN
IF (ORA_DICT_OBJ_OWNER='TEMP_ODS' OR
ORA_DICT_OBJ_OWNER='TEMP_MID' OR
ORA_DICT_OBJ_OWNER='TEMP_DW' OR
ORA_DICT_OBJ_OWNER='TEMP_REPORT' OR
ORA_DICT_OBJ_OWNER='TEMP_WEB' OR
ORA_DICT_OBJ_OWNER='TEMP_REPORT_NEW')
AND ORA_LOGIN_USER<>'TEMP_ADMIN'---ÅųýµÄÓû§
&n ......
1. ÉèÖÃÒ³ÃæÏÔʾ×ÜÐÐÊý
1) ²é¿´Ä¿Ç°µÄpagesize,ĬÈÏÊÇ14:
Sqlplus´úÂë
1. show pagesize;
show pagesize;
2) ½«pagesizeÉèÖúÃ100,Ôò¿ÉÒÔÒ»´ÎÏÔʾ¹»¶àÐмǼÁË:
Sqlplus´úÂë
1. set pagesize 100;
set pagesize 100;
2. ÉèÖÃÐеĿí¶È
1) ²é¿´Ä¿Ç°µÄlinesize,ĬÈÏÊÇ80:
Sqlplus´úÂë
1. show linesize;
show linesize;
2) ÉèÖóÉ100»òÕ߸ü¿í¶¼¿ÉÒÔ:
Sqlplus´úÂë
1. set linesize 100;
set linesize 100;
......
±³¾°£ºÔÚwindows 2003 serverÉÏ°²×°ÁËOracle 9.2.0.1.0£¬ÏÖ´òË㽫ÆäÉý¼¶µ½9.2.0.8°æ±¾¡£
1.Éý¼¶oracle£¨administratorÓû§È¨ÏÞ£©
(1)µ½metalinkÏÂÔØÉý¼¶Ñ¹Ëõ°ü£¬patchºÅΪ4547809£¬Ñ¹Ëõ°üÃû³ÆΪ p4547809_92080_WINNT.zip£¬for windows 32bit¡£
(2)½âѹËõzip£¬Ï±߰üº¬Ò»¸öDisk1ºÍreadme.htmlÎļþ¡£°²×°Éý¼¶²¹¶¡Ö®Ç°£¬ÔÚ¹ÜÀíÖÐÍ£µôËùÓеÄoracleÏà¹Ø·þÎñ£¬ÔÚÃüÁîÌáʾ·ûÖÐlsnrctl stop,Í£µô¼àÌýÆ÷¡£
(3)ÔÚË«»÷DiskϵÄsetup.exeÇ°£¬È·±£»·¾³±äÁ¿ÖÐÓÐORACLE_HOME±äÁ¿£¬²¢ÒÑÕýÈ·ÉèÖ᣷ñÔò»á³öÏÖ´íÎ󣨴íÎóÍüÁË£©¡£
(4)Ë«»÷setup.exe,×Ô¶¯Éý¼¶µ½9.2.0.8£¬ÃüÁîÌáʾ·ûÌáʾ°²×°Íê³Éºó£¬ËµÃ÷×é¼þÒѾ°²×°ÉÏ¡£
(5)4²½²¢Ã»ÓÐupdate×é¼þ£¬ËùÒÔ»¹ÐèÒªupdate.´ËʱÐèÒª¿ªÆôOracleµÄ·þÎñ£¬×îºÃÊÇÖØÆðµçÄÔ£¬OracleĬÈÏ·þÎñ»á×ÔÆô¶¯¡£
(6)ÒÔsysdbaÉí·ÝµÇ¼Êý¾Ý¿âºó,SQL>startup °²×°oracleÓÐÓÐjvmºÍxdbµÄÓû§È·±£init.oraÖеIJÎÊýSHARED_POOL_SIZE ºÍJAVA_POOL_SIZE Ϊ150m¡£·½·¨ÊDz鿴ÏÖÓÐÁ½¸ö²ÎÊý´óС
SQL>SHOW PARAMETER SHARED_POOL_SIZE
SQL>SHOW PARAMETER JAVA_POOL_SIZE
È ......