--Coisas úteis -- selecionar os privilégios select * from session_privs; -- selecionar materialized views select mview_name from user_mviews; -- selecionar links select * from user_db_links; select * from all_db_links; -- criar link entre instâncias de um mesmo servidor CREATE DATABASE LINK nome_qualquer CONNECT TO nome_de_usuario IDENTIFIED BY senha_do_usuario USING 'itapissuma_dbdisc'; -- criar link de um servidor pra outro CREATE DATABASE LINK nome_qualquer CONNECT TO nome_de_usuario IDENTIFIED BY senha_do_usuario USING '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=itapissuma.cin.ufpe.br)(PORT=1521))) (CONNECT_DATA=(SID=dbproj)) )'; -- selecionar constraints SELECT cols.table_name, cols.column_name, cons.status FROM all_constraints cons, all_cons_columns cols WHERE cols.table_name = 'VW_HOTEL_UNIDADE' AND cons.constraint_type = 'P' AND cons.constraint_name = cols.constraint_name AND cons.owner = cols.owner ORDER BY cols.table_name, cols.position; -- criar log de mview na tabela master CREATE MATERIALIZED VIEW LOG ON tabela;