DB Link creation between ENV1 and ENV2
ENV1:-
SQL> select name from v$database;NAME
---------
ENV1
CREATE USER UC_FS_DBL01_CUSTOMER
IDENTIFIED BY env1
DEFAULT TABLESPACE EVAPP
TEMPORARY TABLESPACE TEMP
PROFILE DEFAULT
ACCOUNT UNLOCK;
CREATE ROLE UC_FS_DBL01_CUSTOMER_ROLE NOT IDENTIFIED;
GRANT CONNECT TO UC_FS_DBL01_CUSTOMER;
GRANT SELECT ON SYSADM.Table1 TO UC_FS_DBL01_CUSTOMER;
GRANT UC_FS_DBL01_CUSTOMER_ROLE TO SYS WITH ADMIN OPTION;
GRANT UC_FS_DBL01_CUSTOMER_ROLE TO SYSADM WITH ADMIN OPTION;
GRANT UC_FS_DBL01_CUSTOMER_ROLE TO TLAWSON WITH ADMIN OPTION;
GRANT UC_FS_DBL01_CUSTOMER_ROLE TO UC_FS_DBL01_CUSTOMER;
commit;
ENV2:-
CREATE public DATABASE LINK "UC_FS_DBL01_CUSTOMER.WORLD"
CONNECT TO UC_FS_DBL01_CUSTOMER
IDENTIFIED BY env1 USING 'ENV1';
COMMIT;
--public database link "UC_FS_DBL01_CUSTOMER.WORLD" created.
Now to check if DB link is created or not Run below statement
select count(*) from SYSADM.Table1@UC_FS_DBL01_CUSTOMER.WORLD;
No comments:
Post a Comment