ÈçºÎÅäÖòÅÄÜʹ¿Í»§¶ËÁ¬µ½oracleÊý¾Ý¿â
Ҫʹһ¸ö¿Í»§¶Ë»úÆ÷ÄÜÁ¬½Ó
oracle
Êý¾Ý¿â£¬ÐèÒªÔÚ¿Í»§¶Ë»úÆ÷ÉÏ°²×°
oracle
µÄ¿Í»§¶ËÈí¼þ£¬Î¨Ò»µÄÀýÍâ¾ÍÊÇ
java
Á¬½ÓÊý¾Ý¿âµÄʱºò£¬¿ÉÒÔÓÃ
jdbc thin
ģʽ£¬²»ÓÃ×°
oracle
µÄ¿Í»§¶ËÈí¼þ¡£¼ÓÈëÄãÔÚ»úÆ÷ÉÏ×°ÁË
oracle
Êý¾Ý¿â£¬¾Í²»ÐèÒªÔÚµ¥¶ÀÔڸûúÆ÷ÉÏ°²×°
oracle
¿Í»§¶ËÁË£¬ÒòΪװ
oracle
Êý¾Ý¿âµÄʱºò»á×Ô¶¯°²×°
oracle
¿Í»§¶Ë¡£
Óùý
sql server
Êý¾Ý¿âÈ»ºóÓÖÓÃ
oracle
µÄÐÂÊÖ¿ÉÄÜ»áÓÐÕâÑùµÄÒÉÎÊ£ºÎÊʲôÎÒÓÃ
sql server
µÄʱºò²»ÓÃ×°
sql server
µÄ¿Í»§¶ËÄØ£¿ÔÒòºÜ¼òµ¥£¬
sql server
Ò²ÊÇ
microsoft
µÄ£¬ËüÔÚ²Ù×÷ϵͳÖм¯³ÉÁË
sql server
¿Í»§¶Ë£¬Èç¹û
microsoft
Óë
oracle
ÓÐÐÒ飬½«
oracle
¿Í»§¶ËÒ²¼¯³Éµ½²Ù×÷ϵͳÖУ¬
ÄÇÎÒÃÇÒ²¾Í²»ÓÃÔÚ¿Í»§¶Ë»úÆ÷×°
Oracle
¿Í»§¶ËÈí»ú¾Í¿É·ÃÎÊÊý¾Ý¿âÁË£¬²»¹ý£¬ÕâºÃÏñÊDz»¿ÉÄÜʵÏÖµÄÊÂ
Çé¡£
IXDBA.NETÉçÇøÂÛ̳
Ò²ÓеÄÈË»áÎÊ£ºÎªÊ²Ã´ÔÚ
sql server
ÖÐûÓÐÕìÌý¶Ë¿Úһ˵£¬¶øÔÚ
oracle
ÖÐÒªÅäÖÃÕìÌý¶Ë¿Ú£¿Æäʵ
sql server
ÖÐÒ²ÓÐÕìÌý¶Ë¿Ú£¬Ö»²»¹ý
microsoft
½«ÕìÌý¶Ë¿Ú¹Ì¶¨Îª
1433
£¬²»ÔÊÐíÄãËæ±ã¸Ä¶¯£¬ÕâÑù¸øÄãÒ»¸ö´í¾õ¸Ð¾õ
sql server
ÖÐûÓÐÕìÌý¶Ë¿Ú£¬¿È£¬
microsoft
°ÑÌ«¶àµÄ¶«Î÷¶¼·â×°µ½ºÚºÐ×ÓÀ·½±ãʹÓõÄͬʱҲ´øÀ´µÄÐèÒª¸±
×÷Ó᣶ø
oracle
ÖеÄÕìÌý¶Ë¿ÚÖ±½ÓÔÚÅäÖÃÎļþÖУ¬ÔÊÐíËæ±ã¸Ä¶¯£¬Ö»²»¹ýÎÞÂÛÔõÑù¸Ä¶¯£¬ÒªÓë
oracle
·þÎñÆ÷¶ËÉèÖõÄÕìÌý¶Ë¿ÚÒ»Ö¡£
ºÃ£¬ÑÔ¹éÕý´«£¬ÎÒÃÇÈçºÎ×ö²ÅÄÜʹ¿Í»§
¶Ë»úÆ÷Á¬½Óµ½
oracle
Êý¾Ý¿âÄØ£¿
A
£®
°²×°Ïà¹ØÈí¼þ
B
£®
½øÐÐÊʵ±µÄÅäÖÃ
A
£®ÔÚÊʵ±µÄλÖð²×°Êʵ±µÄÈí¼þ£º
¡¡¡¡ÔÚ¿Í»§¶Ë»úÆ÷£º
1
£®ÔÚ¿Í»§¶Ë»úÆ÷ÉÏ°²×°
ORACLE
µÄ
Oracle Net
ͨѶÈí¼þ£¬Ëü°üº¬ÔÚ
oracle
µÄ¿Í»§¶ËÈí¼þÖС£
2
£®ÕýÈ·ÅäÖÃÁË
sqlnet.ora
Îļþ£º
NAMES.DIRECTORY_PATH = (TNSNAMES, ….)
NAMES.DEFAULT_DOMAIN=DB_DOMAIN
Ò»°ãÇé¿öÏÂÎÒÃDz»
ÓÃ
N
Ïà¹ØÎĵµ£º
µ±±¾»ú°²×°ÁËORACLEÊý¾Ý¿âºó£¬ÔÙ°²×°ÔËÐÐOC4JµÄ»°£¬»·¾³±äÁ¿“ORACLE_HOME”ÓëORACLEÊý¾Ý¿âÓгåÍ»£¬¿ÉÒÔ°´ÕÕÈçÏ·½·¨½â¾ö´ËÎÊÌ⣺
·½·¨Ò»
µÚÒ»²½£ºÔÚ»·¾³±äÁ¿ÖÐн¨“OC4J_HOME”£¬Ö¸¶¨µ½ÄãµÄOC4J°²×°¸ùĿ¼£»
µÚ¶þ²½£º´ò¿ªOC4J°²×°µÄĿ¼£¬¼´../OC4J/bin/£¬ÀïÃæÓÐÒ»¸öoc4j.cmd£¬ÓÒ¼üµ¥»÷¸ÃÎļþ£¬Ñ ......
80¡£LAST
¹¦ÄÜÃèÊö£º´ÓDENSE_RANK·µ»ØµÄ¼¯ºÏÖÐÈ¡³öÅÅÔÚ×îºóÃæµÄÒ»¸öÖµµÄÐУ¨¿ÉÄܶàÐУ¬ÒòΪֵ¿ÉÄÜÏàµÈ£©£¬Òò´ËÍêÕûµÄÓï·¨ÐèÒªÔÚ¿ªÊ¼´¦¼ÓÉÏÒ»¸ö¼¯ºÏº¯ÊýÒÔ´ÓÖÐÈ¡³ö¼Ç¼
SAMPLE£ºÏÂÃæÀý×ÓÖÐDENSE_RANK°´²¿ÃÅ·ÖÇø£¬ÔÙ°´Ó¶½ðcommission_pctÅÅÐò£¬FIRSTÈ¡³öÓ¶½ð×îµÍµÄ¶ÔÓ¦µÄËùÓÐÐУ¬È»ºóÇ°ÃæµÄMAXº¯Êý´ÓÕâ¸ö¼¯ºÏÖÐÈ¡³öнˮ×îµ ......
1. ²é¿´Oracle´´½¨¹ýÄÄЩÓû§
>select username from all_users;
2. ²é¿´Oracle´´½¨¹ýÄÄЩ±í¿Õ¼ä£¬±í¿Õ¼äµÄÃû×ֺʹóС
>select t.tablespace_name, round(sum(bytes/(1024*1024)),0) ts_size
from dba_tablespaces t, dba_data_files d
wher ......
select i.sid,i.sname,i.birthday,i.schooltime,i.sphone,c.classname,a.assnname,sum(decode(subject,'ÓïÎÄ',s.score,0)) as chin,
......
OracleÖÐDecode()º¯ÊýʹÓü¼ÇÉ
¡¡¡¡decode()º¯ÊýÊÇORACLE PL/SQLÊǹ¦ÄÜÇ¿´óµÄº¯ÊýÖ®Ò»£¬Ä¿Ç°»¹Ö»ÓÐORACLE¹«Ë¾µÄSQLÌṩÁ˴˺¯Êý£¬ÆäËûÊý¾Ý¿â³§É̵ÄSQLʵÏÖ»¹Ã»Óд˹¦ÄÜ¡£
DECODEº¯ÊýÊÇORACLE PL/SQLÊǹ¦ÄÜÇ¿´óµÄº¯ÊýÖ®Ò»£¬Ä¿Ç°»¹Ö»ÓÐORACLE¹«Ë¾µÄSQLÌṩÁ˴˺¯Êý£¬ÆäËûÊý¾Ý¿â³§É̵ÄSQLÊµÏ ......