oracle dblink 实践详解

--1、数据源数据库建用户


   create user escm
    identified by "Superv1"
    --default tablespace escm_test
    temporary tablespace TEMP
    profile DEFAULT;
  -- Grant/Revoke role privileges
  grant connect to escm;
  grant resource to escm;
 
--2、本地建Dblink,这个是用来从上面的数据源取数据
create database link escm
  connect to ESCM identified by "Superv1"
  using ‘(DESCRIPTION =
    (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 1111.11.0.60)(PORT = 1111))   )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = GYL)
    )
  )‘;
        
        
--3、在目标库上建数据表和空间

toad建立的表空间

--4建用户

 create user CHINAC11

    identified by "111111"
    default tablespace CHINACOAL
    temporary tablespace TEMP
    profile DEFAULT;
  -- Grant/Revoke role privileges
  grant connect to CHINACOAL;
  grant resource to CHINACOAL;
    grant dba to CHINACOAL;
    GRANT CREATE SESSION TO CHINACOAL;
 
 
--5  非常顺利

select * from dual@ESCM

select userenv(‘language‘) from dual;


select parameter,value from nls_database_parameters  where parameter like ‘%CHARACTERSET‘; 


 

oracle dblink 实践详解,布布扣,bubuko.com

oracle dblink 实践详解

上一篇:【SQL Server DBA】日常巡检2:windows性能监控器


下一篇:《高效学习OpenGL》 之 反馈 glFeedbackBuffer(), glPassThrough()