Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Oracle DB Link


Êý¾Ý¿âÖ®¼äµÄÁ´½Ó½¨Á¢ÔÚDATABASE LINKÉÏ¡£Òª´´½¨Ò»¸öDB LINK£¬±ØÐëÏÈÔÚÿ¸öÊý¾Ý¿â·þÎñÆ÷ÉÏÉèÖÃÁ´½Ó×Ö·û´®¡£
  
1¡¢ ÅäÖÃTNS £¬ $ORACLE_HOME/NETWORK/ADMIN/tnsname.ora
10gstandby =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = HFCC-KF-3068)(PORT = 1522))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = 10gstandby)
    )
  )
  
2¡¢´´½¨Êý¾Ý¿âÁ´½Ó£¬
create public database link DB_LINK_NAME connect to TargetDatabaseUserName identified by TargetDatabasePassword using 'TargetDatabaseSIDName';
×¢£ºTargetDatabaseSIDNameΪ¸ÃOracleÊý¾Ý¿âËùÔÚµÄÖ÷»úÉϵÄtnsnames.oraÎļþÀï±ß¶¨ÒåµÄÊý¾Ý¿âÁ¬½Ó´®¡£
  
SQL>create public database link dvd connect to system identified by system using 'orcl10g';
  
Ôò´´½¨ÁËÒ»¸öÒÔsystemÓû§ºÍorcl10gÊý¾Ý¿âµÄÁ´½Ódvd£¬ÎÒÃDzéѯdvdÊý¾Ý:
  
SQL>select * from all_users@dvd;  
  
ÕâÑù¾Í¿ÉÒ԰ѱ¾µØºÍÔ¶³ÌµÄÊý¾Ý×ö³ÉÒ»¸öÕûÌåÀ´´¦Àí¡£
  
3¡¢½¨Á¢Í¬Òå´Ê£¬ÎªÁËʹÓйطֲ¼Ê½²Ù×÷¸ü͸Ã÷£¬ORACLEÊý¾Ý¿âÀïÓÐͬÒå´ÊµÄ¶ÔÏósynonym
  
SQL>create synonym synTest for all_users@dvd;
  
ÓÚÊǾͿÉÒÔÓÃsynTestÀ´Ìæ´ú´ø@·ûºÅµÄ·Ö²¼Ê½Á´½Ó²Ù×÷all_users@dvd;
  
4¡¢²é¿´ËùÓеÄÊý¾Ý¿âÁ´½Ó£º
  
SQL>select owner,object_name from dba_objects where object_type='DATABASE LINK';
5¡¢²é¿´Êý¾Ý¿âÁ¬½Ó
sql> select owner, db_link from dba_db_links;
ower    db_link
public   DVD.REGRESS.RDBMS.DEV.US.ORACLE.COM
6¡¢É¾³ýÊý¾Ý¿âÁ¬½Ó
ÏÈ´ÓµÚ5²½Öв鿴Êý¾Ý¿âÁ¬½Ó£¬È¡µÃÆädb_linkµÄÃû³Æ
sql>drop public database link DVD.REGRESS.RDBMS.DEV.US.ORACLE.COM
Êý¾Ý¿âÁ¬½ÓËȶªÆú


Ïà¹ØÎĵµ£º

Oracle ×óÁ¬½Ó ÓÒÁ¬½Ó

1. select * from t1 left join t2 on t1.c1 = t2.c2
ÊÇ×ó±ßµÄ±í£¨t1£© È«²¿ÏÔʾ£¬t2ûÓеÄÓÃnull´úÌæ¡£ ÓÒÁ¬½ÓÏà·´£¨t2£©
2. £¨+£©µÄÁ¬½ÓʱÁíÒ»¸öÈ«²¿ÏÔʾ¡£
select * from t1 left join t2 on t1.c1 = t2.c2 ºÍ select * from a,b where t1.c1 = t2.c2(+) Ч¹ûÒ»Ñù¡£
3. FULL OUTER JOIN:È«Íâ¹ØÁª
¡¡¡¡SELECT e.last ......

ORACLEËÀËø²éѯ¼´´¦Àí

¹ØÓÚÊý¾Ý¿âËÀËøµÄ¼ì²é·½·¨
Ò»¡¢         Êý¾Ý¿âËÀËøµÄÏÖÏó
³ÌÐòÔÚÖ´ÐеĹý³ÌÖУ¬µã»÷È·¶¨»ò±£´æ°´Å¥£¬³ÌÐòûÓÐÏìÓ¦£¬Ò²Ã»ÓгöÏÖ±¨´í¡£
¶þ¡¢        
ËÀËøµÄÔ­Àí
µ±¶ÔÓÚÊý¾Ý¿âij¸ö±íµÄijһÁÐ×ö¸üлòɾ³ýµÈ²Ù×÷£¬Ö´ÐÐÍê±Ïºó¸ÃÌõÓï¾ä ......

linuxϵͳÖÐÅäÖÃoracle¿ª»ú×ÔÆô¶¯

Centos  redhat ,oracle10g,oracle11g¾ùÊÊÓÃ
 
1.       ±àд½Å±¾£º
# vi  startoracle.sh
#11gµÄ»°Ö»ÊÇÕâ¸öĿ¼ÓÐËùÇø±ð
ORACLE_HOME=/home/oracle/product/10.2.0/db_1;export ORACLE_HOME
 
ORACLE_SID=orcl;export ORACLE_SID #ÕâÀïÅäÉÏÄãµÄ±¾µØʾÀýÃû
&nbs ......

oracleº¯Êý´óÈ« Êý×Ö´¦Àíº¯Êý


oracleº¯Êý´óÈ«-Êý×Ö´¦Àíº¯Êý
F.3    Êý×Öº¯Êý
º¯Êý½ÓÊÜNUMBERÀàÐ͵IJÎÊý²¢·µ»ØNUMBERÀàÐ͵ÄÊýÖµ.³¬Ô½º¯ÊýºÍÈý½Çº¯ÊýµÄ·µ»ØÖµ¾«È·µ½36λ.ACOS¡¢ASIN¡¢ATAN¡¢ATAN2µÄ½á¹û¾«È·µ½36λ.
l         ABS
Óï·¨:   ABS(x)
¹¦ÄÜ:   µÃµ½xµÄ¾ø¶ÔÖ ......

ubuntu 10.04 Ï°²×°oracle 11g

°²×°²½Ö裺
1. °²×°JDK£¬°²×°·½·¨¼û
Ubuntu
10.04ϵĴSUN JAVA¿ª·¢»·¾³
½â¾öÖÐÎÄÂÒÂëÎÊÌ⣬ÔÚjreĿ¼ÏÂ×ÖÌåĿ¼Öн¨Á¢"fallback"Ŀ¼£¬È»ºócopy»òÕßlinkÄãϲ»¶µÄ×ÖÌåÖÁĿ¼ÏÂ.
2. °²×°±ØÒªµÄÈí¼þ°ü
11gËùÐèÒªµÄÈí¼þ°ü²¢²»¶à£¬Ö»Òª°²×°build-essential,rpm,libaio,ksh,libtool,libstdc++5
sudo apt-get install ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ