Oracle ¿ç¿â ²éѯ ¸´ÖƱíÊý¾Ý
ÔÎĵØÖ·£ºhttp://www.cnblogs.com/chinhr/archive/2009/04/22/1440914.html
·½·¨Ò»£º
ÔÚÄ¿Ç°¾ø´ó²¿·ÖÊý¾Ý¿âÓзֲ¼Ê½²éѯµÄÐèÒª¡£ÏÂÃæ¼òµ¥µÄ½éÉÜÈçºÎÔÚoracleÖÐÅäÖÃʵÏÖ¿ç¿â·ÃÎÊ¡£
±ÈÈçÏÖÔÚÓÐ2¸öÊý¾Ý¿â·þÎñÆ÷£¬°²×°ÁË2¸öÊý¾Ý¿â¡£Êý¾Ý¿âserver AºÍB¡£ÏÖÔÚÀ´ÊµÏÖÔÚA¿âÖзÃÎÊBµÄÊý¾Ý¿â¡£
µÚÒ»²½¡¢ÅäÖÃA·þÎñÆ÷¶ËµÄtnsnames.oraÎļþ£¨TNSNAMES.ORA Network Configuration File£©£¬¸ÃÎļþ´æ·ÅµÄλÖÃΪ£º
$ORACLE_HOME/network/admin/tnsnames.ora
ÐèÒªÔÚ¸ÃÎļþÖÐÔö¼Ó¶ÔB¿âµÄÅäÖÃÏ¸ñʽÈçÏÂ
ZBCDB3 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.50.6)(PORT = 1523))
)
(CONNECT_DATA =
(SERVICE_NAME = zbcdb3)
)
)
ÈôÔÚA¿âµÄÁíÍâһ̨¿Í»§¶ËÀ´·ÃÎÊBµÄÊý¾Ý¿âµÄ»°£¬Í¬Ê±Ò²Ó¦¸ÃÐ޸Ŀͻ§¶ËµÄÏàÓ¦µÄÎļþ¡£
µÚ¶þ²½¡¢ÔÚA·þÎñÆ÷µÄÒ»¸ö¿âÖн¨Á¢BµÄÒ»¸öÊý¾ÝµÄDBLINK¡£Óï·¨ÈçÏ£º
create database link dcmdb connect to dcmdb identified by dcmoptr using 'zbcdb3' ;
È»ºó¿ÉÒÔʵÏÖ·Ö²¼Ê½²éѯ£º
select * from tabname@dcmdb where 1=1;
·½·¨¶þ£º
Ê×ÏÈ´´½¨Êý¾Ý¿âÁ´½Ó:
CREATE PUBLIC DATABASE LINK Êý¾ÝÁ´Ãû³Æ CONNECT TO µÇ½Óû§Ãû IDENTIFIED BY ÃÜÂë USING '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ¶Ô·½Oracle·þÎñÆ÷µÄIPµØÖ·)(PORT = ¶Ë¿ÚºÅ))
)
(CONNECT_DATA =
(SERVICE_NAME = ¶Ô·½Oracle·þÎñÆ÷·þÎñÃû)
)
)'
ÆäÖÐ Êý¾ÝÁ´Ãû³Æ ΪÌí¼Óµ½±¾µØOracleÊý¾Ý¿â¿ØÖÆ̨(Oracle Enterprise Manager Console)Ê÷½ÚµãµÄ·þÎñÃû
Òª²éѯ¶Ô·½Êý¾Ý¿âµÄ±íTableNameÓï¾äÈçÏÂ:
SELECT ×Ö¶ÎÃû from TableName@Êý¾ÝÁ´Ãû³Æ;
¸´ÖƱíÊý¾Ý£º
insert into ±íÃû£¨×Ö¶ÎÃû£© £¨SELECT ×Ö¶ÎÃû from TableName@Êý¾ÝÁ´Ãû³Æ£©;
Ïà¹ØÎĵµ£º
ѧÉúÔÚѧϰjdbcµÄʱºò£¬»áÎʵ½Ôõôµ÷Óô洢¹ý³Ì£¬ÏÖÔÚ½«javaµ÷ÓÃoracle´æ´¢¹ý³ÌµÄʾÀý×ܽáÈçÏ¡££¨¹ØÓÚµ÷ÓÃsqlserverµÄ´æ´¢¹ý³Ì½«ÔÚÏ´νøÐÐС½áÇë¹Ø×¢£©
Ò»£ºÎÞ·µ»ØÖµµÄ´æ´¢¹ý³Ì
´æ´¢¹ý³ÌΪ£º
• create or replace procedure adddept(deptno number,dname varc ......
oracle8µÄROWID½á¹¹
2004-04-23 15:18 pm
À´×Ô£ºLinuxÎĵµ
µØÖ·£ºhttp://linux.sheup.com/linux/linux3983.htm
1¡¢ÎªÊ²Ã´Ê¹ÓÃROWID
ORACLE°ÑROWID×÷ΪB-Ê÷ºÍÆäÄÚ²¿Ëã·¨±êʾROWµÄΨһ±êʾ¡£
ÔÚORACLE8ÒÔÇ°µÄ°æ±¾ÖУ¬ROWID±êʾFILE¡¢BLOCK¡¢ROW NUMBER£¬Ö»ÓÃÒ»¸öÊý×Ö´ú
±íFILEºÅ¡£
ÔÚORACLE8ÖУ¬Ò»¸öDATAFILEÓÐÁ½ ......
oracle 8i ÒÔºó¼Ó´¦µÄ¹¦ÄÜ£¬Oracleר¼Ò¿Éͨ¹ýÒ»ÖÖ¼òµ¥µÄ·½Ê½À´ÎªCBOÊÕ¼¯Í³¼ÆÊý¾Ý¡£Ä¿Ç°£¬ÒѾ²»ÔÙÍƼöÄãʹÓÃÀÏʽµÄ·ÖÎö±íºÍdbms_utility·½·¨À´Éú³ÉCBOͳ¼ÆÊý¾Ý¡£ÄÇЩ¹ÅÀϵķ½Ê½ÉõÖÁÓпÉÄÜΣ¼°SQLµÄÐÔÄÜ£¬ÒòΪËüÃDz¢·Ç×ÜÊÇÄܹ»²¶×½µ½ÓйرíºÍË÷ÒýµÄ¸ßÖÊÁ¿ÐÅÏ¢¡£ CBOʹÓöÔÏóͳ¼Æ£¬ÎªËùÓÐSQLÓï¾äÑ¡Ôñ×î¼Ñµ ......
ÈçºÎʹexpµÄ°ïÖúÒÔ²»Í¬µÄ×Ö·û¼¯ÏÔʾ:
ÖÐÎÄÏÔʾ£ºset nls_lang=simplified chinese_china.zhs16gbk
Ó¢ÎÄÏÔʾ£ºset nls_lang=American_america
EXPµÄËùÓвÎÊý£¨À¨ºÅÖÐΪ²ÎÊýµÄĬÈÏÖµ£©£º
USERID Óû§Ãû/¿ÚÁî È磺 USERID=duanl/duanl &nbs ......
ÒÔϾÝ˵ÃüÁî¾ùÖ¸ÔÚPL/SQLÖУ¬ÔÚCommand WindowÖÐÖ´ÐеÄÃüÁî¡£
²»¶ÏËѼ¯ÕûÀí
1¡¢the account is locked"µÄ½â¾ö·½·¨
ÓÃsysÒÔsysdbaµÄÉí·ÝÀ´½øÐеǼ,ÔÚsys״̬ÊÇlockedµÄʱºòÒ²ÊÇÄܵǼµÄ.È»ºóÔÙʹÓÃÃüÁî
alter user sys account unlockÀ´½øÐнâËø ......