É possível renomear um pdb durante o processo de duplicate rman?

Imagine um cenário composto por um ambiente Oracle Database 12.2 Single Tenant no qual a temos a necessidade de realizar um processo de duplicate para um novo cdb também Single Tenant no mesmo servidor.

A aplicação conecta no pdb como serviço, desta forma não podemos simplesmente realizar um duplicate pois o novo cdb conterá um pdb com o mesmo nome do pdb de origem, o que irá gerar um conflito nas conexões, uma vez que teremos registrado no listener 1 serviço com 2 instâncias, a de origem e a clonada, conforme exemplo grifado abaixo.
[oracle@tst-oracle12c:eximio /]$ lsnrctl status
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 23-AUG-2019 14:23:39
Copyright (c) 1991, 2016, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=tst-oracle12c)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                23-AUG-2019 08:56:09
Uptime                    0 days 5 hr. 27 min. 30 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /orabin01/app/oracle/product/12.2/dbhome_1/network/admin/listener.ora
Listener Log File         /orabin01/app/oracle/diag/tnslsnr/tst-oracle12c/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=tst-oracle12c)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=tst-oracle12c)(PORT=5500))(Security=(my_wallet_directory=/orabin01/app/oracle/admin/eximio/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "7743c5ddfc2d18a4e0530705a8c0c7b9" has 2 instance(s).
  Instance "eximio", status READY, has 1 handler(s) for this service...
  Instance "exitst", status READY, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "eximio" has 1 instance(s).
  Instance "eximio", status READY, has 1 handler(s) for this service...
Service "eximioXDB" has 2 instance(s).
  Instance "eximio", status READY, has 1 handler(s) for this service...
  Instance "exitst", status READY, has 1 handler(s) for this service...
Service "eximiopdb" has 2 instance(s).
  Instance "eximio", status READY, has 1 handler(s) for this service...
  Instance "exitst", status READY, has 1 handler(s) for this service...
Service "exitst" has 2 instance(s).
  Instance "exitst", status UNKNOWN, has 1 handler(s) for this service...
  Instance "exitst", status READY, has 1 handler(s) for this service...
The command completed successfully 
Podemos assim que o processo de duplicate finalizar, renomear o pdb. Porém ate que isso seja feito as conexões ja podem estar caindo na base clonada e aí teremos problema de consistência de dados.

É possível renomear um pdb durante o processo de duplicate rman? A resposta é não, não é possivel renomear um pdb através do duplicate, conforme pode ser confirado através da Doc ID 24359000.1.
Para evitar a situação mencionada acima, podemos definir um valor diferente de produção para o 
parametro db_domain, que por default está nulo.

No exemplo abaixo, foi alterado o parametro db_domain na instancia tst para tst.com antes de iniciar o processo de carga.
SQL>  show parameter db_domain;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_domain                            string      tst.com
Após o processo de carga ser realizado, podemos validar que o serviço registrado no lister para a nova base duplicada é eximiopdb.tst.com e não mais eximiopdb. Com isso evitamos qualquer impacto de conexao do ambiente principal.
[oracle@tst-oracle12c:eximio /]$ lsnrctl status

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 23-AUG-2019 14:54:27

Copyright (c) 1991, 2016, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=tst-oracle12c)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                23-AUG-2019 08:56:09
Uptime                    0 days 5 hr. 58 min. 18 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /orabin01/app/oracle/product/12.2/dbhome_1/network/admin/listener.ora
Listener Log File         /orabin01/app/oracle/diag/tnslsnr/tst-oracle12c/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=tst-oracle12c)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=tst-oracle12c)(PORT=5500))(Security=(my_wallet_directory=/orabin01/app/oracle/admin/eximio/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "7743c5ddfc2d18a4e0530705a8c0c7b9" has 1 instance(s).
  Instance "eximio", status READY, has 1 handler(s) for this service...
Service "7743c5ddfc2d18a4e0530705a8c0c7b9.tst.com" has 1 instance(s).
  Instance "exitst", status READY, has 1 handler(s) for this service...
Service "EXITST.tst.com" has 1 instance(s).
  Instance "exitst", status READY, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "eximio" has 1 instance(s).
  Instance "eximio", status READY, has 1 handler(s) for this service...
Service "eximioXDB" has 1 instance(s).
  Instance "eximio", status READY, has 1 handler(s) for this service...
Service "eximioXDB.tst.com" has 1 instance(s).
  Instance "exitst", status READY, has 1 handler(s) for this service...
Service "eximiopdb" has 1 instance(s).
  Instance "eximio", status READY, has 1 handler(s) for this service...
Service "eximiopdb.tst.com" has 1 instance(s).
  Instance "exitst", status READY, has 1 handler(s) for this service...
Service "exitst" has 1 instance(s).
  Instance "exitst", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@tst-oracle12c:eximio /]$
Por hoje, era isso :)

SHARE

Jhonata Lamim

  • Image
  • Image
  • Image
  • Image
  • Image

0 Comments:

Postar um comentário