--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';