Oracle DB Link´´½¨
ÓÐʱºò£¬ÐèÒªÔÚÁ½¸öOracleÊý¾Ý¿âÖ®¼äÊÖ¹¤Í¬²½Êý¾Ýʱ£¬DBLinkÊÇ×î·½±ã¿ì½ÝµÄÊÖ¶ÎÖ®Ò»£¬´´½¨DBLinkµÄ·½Ê½Ò»°ãÊÇÕâÑù£º
create public database link <DBLinkÃû³Æ> connect to <±»Á¬½Ó¿âµÄÓû§Ãû> identified by <±»Á¬½Ó¿âµÄÃÜÂë> using '<Oracle¿Í»§¶Ë¹¤¾ß½¨Á¢µÄÖ¸Ïò±»Á¬½Ó¿â·þÎñÃû>';
create public database link XMDS_KF connect to XMDS identified by XMDS using 'XMDS_KF';
create public database link XMDS_KF connect to XMDS identified by XMDS using 'XMDS_KF';
µ«ÕâÖÖ·½Ê½Óиöȱµã¾ÍÊDZØÐëÒªÔÚ·þÎñÆ÷½¨Á¢Ò»¸ö±»Á¬½Ó¿âµÄ·þÎñÃû£¬Èç¹û²»½¨Ôò»á±¨´í£º
ORA-12154: TNS: ÎÞ·¨´¦Àí·þÎñÃû
£¬µ«Èç¹ûÖ±½ÓʹÓõØÖ·À´½¨DBLink£¬¾Í¿ÉÒÔÊ¡È¥ÅäÖ÷þÎñÃûµÄÂé·³ÁË£º
create public database link XMDS_KF connect to XMDS identified by XNDS using '(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 145.24.16.182)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = XMDS) ) )';
oracle dblink´´½¨¹ý³Ì
Á½Ì¨²»Í¬µÄÊý¾Ý¿â·þÎñÆ÷£¬´Óһ̨Êý¾Ý¿â·þÎñÆ÷µÄÒ»¸öÓû§¶ÁÈ¡Áíһ̨Êý¾Ý¿â·þÎñÆ÷ϵÄij¸öÓû§µÄÊý¾Ý£¬Õâ¸öʱºò¿ÉÒÔʹÓÃdblink¡£
ÆäʵdblinkºÍÊý¾Ý¿âÖеÄview²î²»¶à£¬½¨dblinkµÄʱºòÐèÒªÖªµÀ´ý¶ÁÈ¡Êý¾Ý¿âµÄipµØÖ·£¬ssidÒÔ¼°Êý¾Ý¿âÓû§ÃûºÍÃÜÂë¡£
´´½¨¿ÉÒÔ²ÉÓÃÁ½ÖÖ·½Ê½£º
1¡¢ÒѾÅäÖñ¾µØ·þÎñ
create public database
link fwq12 connect to fzept
identified by neu using 'fjept' Create DATABASE LINKÊý¾Ý¿âÁ´½ÓÃûCONNECT TO Óû§Ãû IDENTIFIED BY ÃÜÂë USING &lsquo
Ïà¹ØÎĵµ£º
--´´½¨±í¿Õ¼ä
create tablespace Ãû³Æ
(
datafile='·¾¶\Ãû³Æ.ora',
size='50M',
autoextend='on'
)
/
--´´½¨ÁÙʱ±í¿Õ¼ä
create temporary tablespace Ãû³Æ
(
tempfile='·¾¶\Ãû³Æ.ora',
size='50M',
autoextend='on'
)
/
--´´½¨Óû§
create user Óû§Ãû idtenified by ÃÜÂë
/
--ΪÓû§Ö¸¶¨ ......
а²×°ÁËһ̨Êý¾Ý¿â·þÎñÆ÷£¬°æ±¾ÊÇ10.2.0.1µÄ£¬ÒòΪÏÖÔÚ×îеÄÊÇ10.2.0.4µÄ¡£ °æ±¾µÍÁË£¬bug¶à¡£ËùÒԾͶÔÊý¾Ý¿â×öÁËÒ»¸öÉý¼¶¡£
·þÎñÆ÷ÊÇwindows 2003µÄϵͳ£¬¶¼ÊÇ¿ÉÊÓ»°²Ù×÷¡£ ÏÂÒ»²½µÄÎÊÌâ¡£ 10.2.0.4µÄpatchset ÀïÃæÒ²ÓÐÏêϸµÄ°²×°ËµÃ÷¡£ Ö®×ö¸ö×ܽá ......
1.µ¼ÈëÊý¾ÝÃüÁimp userid=fkprod/fkprod full=y file=xxx.dmp
2.µ¼³öÊý¾Ý¿â¶ÔÏóÃüÁ
ʹÓÃtools--->export user objectÖ»Äܵ¼³öÊý¾Ý±í½Å±¾²»ÄÜ´ø³öÊý¾Ý,
»òÕßʹÓÃexp user/pwd file=/dir/xxx.dmp log=xxx.log full=y commit=y ignore=y
×¢Ò⣺Èç¹ûÄãÒªÔ¶³ÌµÇ¼µ½Êý¾Ý¿â·þÎñÆ÷µ¼³ö£¬¿ÉÒÔÔÚ±¾µØSQLPLUS×öÈçÏÂÃüÁ ......
oracle¿Í»§¶Ë Á¬½ÓPL/SQL
ÏÂÔØ¿Í»§¶Ëµ½Ä³¸ö·¾¶
ÐÞ¸ÄÅäÖÃÎļþ
D:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\tnsnames.ora
# tnsnames.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
SQLCLUB =
(DESCRIPTION ......
ÖÚËùÖÜÖªµÄ¼¸¸ö½á¹û¼¯¼¯ºÏ²Ù×÷ÃüÁ½ñÌìÏêϸµØ²âÊÔÁËһϣ¬·¢ÏÖһЩÎÊÌ⣬¼Ç¼±¸¿¼¡£
¡¡¡¡¼ÙÉèÎÒÃÇÓÐÒ»¸ö±íStudent£¬°üÀ¨ÒÔÏÂ×Ö¶ÎÓëÊý¾Ý£º
¡¡¡¡drop table student;
¡¡¡¡create table student
¡¡¡¡(
¡¡¡¡id int primary key,
¡¡¡¡name nvarchar2(50) not null,
¡¡¡¡score number not null
¡¡¡¡);
¡¡¡¡insert into ......