--ALTER SYSTEM SET GLOBAL_NAMES = FALSE
ALTER DATABASE RENAME GLOBAL_NAME TO VS01.ANVISA.GOV.BR
--select * from V$INSTANCE@ANVSSDF45N --select * from USER_TABLES@ANVSSDF45N
drop DATABASE LINK VS05
--CREATE PUBLIC DATABASE LINK DBSIGAVS06
CREATE DATABASE LINK ADMIN_VS05
--CONNECT TO CTXSYS IDENTIFIED BY
CONNECT TO admin IDENTIFIED BY
--USING '(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.103.2.97)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = vs01)))'
USING 'VS05'
/*
SELECT * FROM DBA_DB_LINKS order by created desc
SELECT * from GLOBAL_NAME
*/
--select * from DBSIGA.TB_CONTAGEM@DBSIGAVS06
--grant create database link to dbsiga
--revoke create database link from dbsiga