Eu tenho vários procedimentos de loja, que analisam logs do oracle usando o log miner. Esses procedimentos são executados no usuário C##ADMIN do CDB que criou para esta forma.
Agora quero comparar os valores registrados com os valores ativos, então preciso poder acessar cada pdb do CDB.
Depois de várias pesquisas, me deparei com o database link
que parece uma possível resposta. mas quando estou tentando criar um link de banco de dados, ele diz ORA-02011: duplicate database link name
. e quando estou tentando largar, estou recebendo ORA-65230: internal database link cannot be altered or dropped
.
Estou tentando executar as seguintes consultas, mas falhou: (mesmo quando conectado como: / as sysdba
)
SELECT * FROM ALL_TABLES@testpdb;
ORA-12541: TNS:no listener
*Cause: The connection request could not be completed because the listener
is not running.
*Action: Ensure that the supplied destination address matches one of
the addresses used by the listener - compare the TNSNAMES.ORA entry with
the appropriate LISTENER.ORA file (or TNSNAV.ORA if the connection is to
go by way of an Interchange). Start the listener on the remote machine.
SELECT * FROM test.TABLE1@testpdb;
ORA-12541: TNS:no listener
*Cause: The connection request could not be completed because the listener
is not running.
*Action: Ensure that the supplied destination address matches one of
the addresses used by the listener - compare the TNSNAMES.ORA entry with
the appropriate LISTENER.ORA file (or TNSNAV.ORA if the connection is to
go by way of an Interchange). Start the listener on the remote machine.
Então minhas perguntas são:
- Está usando links de banco de dados é a maneira correta?
- Se for, como configurá-lo?
- Como posso usá-lo?
- Tenho alguma alternativa para atingir meu objetivo?
Esse erro significa que seu ouvinte não está em execução. Comece seu ouvinte.
Isso apenas funciona normalmente sem fazer nada:
Uma alternativa é a cláusula CONTAINERS , mas que tem algumas sérias limitações (o objeto consultado deve existir em todos os containers).