Método para migrar una base de datos acoplada ( Pluggable Database ) desde un contenedor en versión 12c 12.2.0.1 a un contenedor 18c 18.3.0.0, utilizando un DBLINK y luego aplicando el script de actualización a nivel de catálogos.
El siguiente es el escenario:
- Dos motores de base de datos instalados ( 12cR2 y 18cR3 )
- Varias instancias PDB existentes en ambos contenedores
- Migrar la instancia PDB Migración al contenedor en 18c con el nombre PDB_MIGRACION
- La migración se realiza a través de un dblink entre ambos contenedores de base de datos
- Una vez clonada la base de datos en el nuevo contenedor, proceder a actualizar el catálogo del diccionario de la base de datos.
Para entender completamente esta nota, es necesario conocimiento de sistema operativo LINUX y el manejo de contenedores de base de datos Oracle.
Ventajas:
- La base de datos a migrar, no es modificada en el proceso, permitiendo hacer un rollback del proceso.
- Proceso sencillo de aplicar y cero error de parte del lado humano.
Desventajas:
- Requerido espacio adicional, para realizar la clonación de la base de datos a trasladar.
login as: oracle
oracle@192.168.60.117's password:
Last login: Tue Jul 24 08:27:56 2018 from 192.168.61.210
[oracle@lab01 ~]$ . oraenv
ORACLE_SID = [oracle] ? cdb1
The Oracle base remains unchanged with value /opt/app/oracle
[oracle@lab01 ~]$ lsnrctl start
LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 24-JUL-2018 14:12:19
Copyright (c) 1991, 2018, Oracle. All rights reserved.
Starting /opt/app/oracle/product/18.0/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 18.0.0.0.0 - Production
System parameter file is /opt/app/oracle/product/18.0/network/admin/listener.ora
Log messages written to /opt/app/oracle/diag/tnslsnr/lab01/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=lab01)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=lab01)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 18.0.0.0.0 - Production
Start Date 24-JUL-2018 14:12:21
Uptime 0 days 0 hr. 0 min. 6 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/app/oracle/product/18.0/network/admin/listener.ora
Listener Log File /opt/app/oracle/diag/tnslsnr/lab01/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=lab01)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
[oracle@lab01 ~]$ sqlplus /nolog
SQL*Plus: Release 18.0.0.0.0 - Production on Tue Jul 24 14:12:33 2018
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 2516580872 bytes
Fixed Size 8899080 bytes
Variable Size 671088640 bytes
Database Buffers 1828716544 bytes
Redo Buffers 7876608 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0
[oracle@lab01 ~]$ ls -la
total 152
drwx------. 25 oracle oinstall 4096 Jul 24 09:17 .
drwxr-xr-x. 3 root root 4096 Jul 23 16:33 ..
drwxr-xr-x. 2 oracle oinstall 4096 Jul 24 08:25 .abrt
-rw-------. 1 oracle oinstall 1781 Jul 24 10:09 .bash_history
-rw-r--r--. 1 oracle oinstall 18 Mar 22 2017 .bash_logout
-rw-r--r--. 1 oracle oinstall 286 Jul 24 08:36 .bash_profile
-rw-r--r--. 1 oracle oinstall 124 Mar 22 2017 .bashrc
drwxr-xr-x. 2 oracle oinstall 4096 Jul 24 08:25 .cache
drwxr-xr-x. 5 oracle oinstall 4096 Jul 24 08:25 .config
drwx------. 3 oracle oinstall 4096 Jul 24 08:25 .dbus
drwxr-xr-x. 3 oracle oinstall 4096 Jul 24 08:26 Desktop
drwxr-xr-x. 2 oracle oinstall 4096 Jul 24 08:25 Documents
drwxr-xr-x. 2 oracle oinstall 4096 Jul 24 08:25 Downloads
-rw-r--r--. 1 oracle oinstall 500 May 7 2015 .emacs
-rw-------. 1 oracle oinstall 16 Jul 24 08:25 .esd_auth
drwx------. 4 oracle oinstall 4096 Jul 24 08:25 .gconf
drwxr-xr-x. 5 oracle oinstall 4096 Jul 24 08:25 .gnome2
drwxr-xr-x. 3 oracle oinstall 4096 Jul 24 08:25 .gnote
drwx------. 2 oracle oinstall 4096 Jul 24 08:25 .gnupg
-rw-r--r--. 1 oracle oinstall 142 Jul 24 08:25 .gtk-bookmarks
drwx------. 2 oracle oinstall 4096 Jul 24 08:25 .gvfs
-rw-------. 1 oracle oinstall 310 Jul 24 08:25 .ICEauthority
-rw-r--r--. 1 oracle oinstall 637 Jul 24 08:25 .imsettings.log
-rw-r--r--. 1 oracle oinstall 171 Mar 22 2016 .kshrc
drwxr-xr-x. 3 oracle oinstall 4096 Jul 24 08:25 .local
drwxr-xr-x. 4 oracle oinstall 4096 Jul 23 15:58 .mozilla
drwxr-xr-x. 2 oracle oinstall 4096 Jul 24 08:25 Music
drwxr-xr-x. 2 oracle oinstall 4096 Jul 24 08:25 .nautilus
drwxr-xr-x. 2 oracle oinstall 4096 Jul 24 09:59 .oracle_jre_usage
drwxr-xr-x. 2 oracle oinstall 4096 Jul 24 08:25 Pictures
drwxr-xr-x. 2 oracle oinstall 4096 Jul 24 08:25 Public
drwx------. 2 oracle oinstall 4096 Jul 24 08:25 .pulse
-rw-------. 1 oracle oinstall 256 Jul 24 08:25 .pulse-cookie
drwx------. 2 oracle oinstall 4096 Jul 23 17:02 .ssh
drwxr-xr-x. 2 oracle oinstall 4096 Jul 24 08:25 Templates
drwxr-xr-x. 2 oracle oinstall 4096 Jul 24 08:25 Videos
-rw-------. 1 oracle oinstall 2806 Jul 24 09:17 .viminfo
-rw-------. 1 oracle oinstall 2926 Jul 24 10:09 .xsession-errors
[oracle@lab01 ~]$ pwd
/home/oracle
[oracle@lab01 ~]$ cd $ORACLE_HOME
[oracle@lab01 18.0]$ pwd
/opt/app/oracle/product/18.0
[oracle@lab01 18.0]$ ls -la
total 344
drwxr-xr-x. 71 oracle oinstall 4096 Jul 24 08:44 .
drwxr-xr-x. 4 oracle oinstall 4096 Jul 24 09:56 ..
drwxr-xr-x. 2 oracle oinstall 4096 Jul 24 08:44 addnode
drwxr-xr-x. 6 oracle oinstall 4096 Feb 7 16:13 apex
drwxr-xr-x. 9 oracle oinstall 4096 Jul 18 11:44 assistants
drwxr-xr-x. 2 oracle oinstall 12288 Jul 24 08:44 bin
drwxr-xr-x. 4 oracle oinstall 4096 Jul 24 08:44 cfgtoollogs
drwxr-xr-x. 4 oracle oinstall 4096 Jul 24 08:44 clone
drwxr-xr-x. 6 oracle oinstall 4096 Jul 18 11:44 crs
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:11 css
drwxr-xr-x. 11 oracle oinstall 4096 Feb 7 16:14 ctx
drwxr-xr-x. 7 oracle oinstall 4096 Jul 18 11:44 cv
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:11 data
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:11 dbjava
drwxr-xr-x. 2 oracle oinstall 4096 Jul 24 14:12 dbs
drwxr-xr-x. 5 oracle oinstall 4096 Jul 24 08:44 deinstall
drwxr-xr-x. 3 oracle oinstall 4096 Jul 18 11:44 demo
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:11 diagnostics
drwxr-xr-x. 13 oracle oinstall 4096 Feb 7 16:12 dmu
drwxr-xr-x. 4 oracle oinstall 4096 Jul 18 11:44 drdaas
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:11 dv
-rw-r--r--. 1 oracle oinstall 852 Aug 18 2015 env.ora
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:11 has
drwxr-xr-x. 5 oracle oinstall 4096 Jul 18 11:44 hs
drwxr-xr-x. 10 oracle oinstall 4096 Jul 24 08:44 install
drwxr-xr-x. 2 oracle oinstall 4096 Feb 7 16:12 instantclient
drwxr-x---. 14 oracle oinstall 4096 Jul 24 08:43 inventory
drwxr-xr-x. 8 oracle oinstall 4096 Jul 18 11:44 javavm
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:12 jdbc
drwxr-xr-x. 7 oracle oinstall 4096 Jul 18 11:44 jdk
drwxr-xr-x. 2 oracle oinstall 4096 Jul 18 11:39 jlib
drwxr-xr-x. 10 oracle oinstall 4096 Jul 18 11:44 ldap
drwxr-xr-x. 3 oracle oinstall 20480 Jul 24 08:43 lib
drwxr-xr-x. 4 oracle oinstall 4096 Jul 24 08:55 log
drwxr-xr-x. 9 oracle oinstall 4096 Jul 18 11:44 md
drwxr-xr-x. 4 oracle oinstall 4096 Feb 7 16:11 mgw
drwxr-xr-x. 10 oracle oinstall 4096 Jul 18 11:44 network
drwxr-xr-x. 5 oracle oinstall 4096 Jul 18 11:44 nls
drwxr-xr-x. 8 oracle oinstall 4096 Feb 7 16:13 odbc
drwxr-xr-x. 5 oracle oinstall 4096 Feb 7 16:11 olap
drwxr-x---. 14 oracle oinstall 4096 Jun 3 19:20 OPatch
drwxr-xr-x. 3 oracle oinstall 4096 Jul 18 11:39 .opatchauto_storage
drwxr-xr-x. 7 oracle oinstall 4096 Jul 18 11:44 opmn
drwxr-xr-x. 4 oracle oinstall 4096 Feb 7 16:11 oracore
-rw-r-----. 1 oracle oinstall 56 Jul 23 17:04 oraInst.loc
drwxr-xr-x. 7 oracle oinstall 4096 Jul 18 11:44 ord
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:11 ordim
drwxr-xr-x. 4 oracle oinstall 4096 Feb 7 16:12 ords
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:11 oss
drwxr-xr-x. 8 oracle oinstall 4096 Jul 24 08:44 oui
drwxr-xr-x. 4 oracle oinstall 4096 Feb 7 16:11 owm
drwxr-xr-x. 7 oracle oinstall 4096 Jul 24 14:12 .patch_storage
drwxr-xr-x. 5 oracle oinstall 4096 Jul 18 11:44 perl
drwxr-xr-x. 6 oracle oinstall 4096 Feb 7 16:12 plsql
drwxr-xr-x. 6 oracle oinstall 4096 Jul 18 11:44 precomp
drwxr-xr-x. 2 oracle oinstall 4096 Feb 7 16:12 QOpatch
drwxr-xr-x. 5 oracle oinstall 4096 Feb 7 16:11 R
drwxr-xr-x. 4 oracle oinstall 4096 Feb 7 16:11 racg
drwxr-xr-x. 13 oracle oinstall 4096 Jul 18 11:44 rdbms
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:11 relnotes
-rwx------. 1 oracle oinstall 561 Jul 24 08:43 root.sh
-rwx------. 1 oracle oinstall 786 Feb 7 16:14 root.sh.old
-rw-r-----. 1 oracle oinstall 10 Feb 7 16:11 root.sh.old.1
-rwx------. 1 oracle oinstall 638 Jul 18 11:18 root.sh.old.2
-rw-r-----. 1 oracle oinstall 10 Feb 7 16:11 root.sh.old.3
-rwxr-x---. 1 oracle oinstall 1783 Mar 8 2017 runInstaller
-rw-r--r--. 1 oracle oinstall 2927 Oct 14 2016 schagent.conf
drwxr-xr-x. 5 oracle oinstall 4096 Feb 7 16:13 sdk
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:11 slax
drwxr-xr-x. 22 oracle oinstall 4096 Feb 7 16:13 sqldeveloper
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:11 sqlj
drwxr-xr-x. 5 oracle oinstall 4096 Jul 18 11:41 sqlpatch
drwxr-xr-x. 6 oracle oinstall 4096 Jul 24 08:43 sqlplus
drwxr-xr-x. 6 oracle oinstall 4096 Feb 7 16:11 srvm
drwxr-xr-x. 5 oracle oinstall 4096 Feb 7 16:11 suptools
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:12 ucp
drwxr-xr-x. 4 oracle oinstall 4096 Feb 7 16:11 usm
drwxr-xr-x. 2 oracle oinstall 4096 Feb 7 16:12 utl
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:11 wwg
drwxr-x---. 7 oracle oinstall 4096 Feb 7 16:11 xdk
[oracle@lab01 18.0]$ sqlcl
-bash: sqlcl: command not found
[oracle@lab01 18.0]$ sqlcl
-bash: sqlcl: command not found
El SQLCL no forma parte del software de instalación inicial de 18.3.0.0., es un pequeño gran detalle que se le fue el equipo de Oracle Database.
[oracle@lab01 18.0]$ cd R
[oracle@lab01 R]$ ls -la
total 20
drwxr-xr-x. 5 oracle oinstall 4096 Feb 7 16:11 .
drwxr-xr-x. 71 oracle oinstall 4096 Jul 24 08:44 ..
drwxr-xr-x. 15 oracle oinstall 4096 Feb 7 16:11 library
drwxr-xr-x. 5 oracle oinstall 4096 Feb 7 16:13 migration
drwxr-xr-x. 2 oracle oinstall 4096 Feb 7 16:13 server
[oracle@lab01 R]$ cd server
[oracle@lab01 server]$ ls -la
total 236
drwxr-xr-x. 2 oracle oinstall 4096 Feb 7 16:13 .
drwxr-xr-x. 5 oracle oinstall 4096 Feb 7 16:11 ..
-rw-r--r--. 1 oracle oinstall 4694 Jun 30 2015 rqadmin.sql
-rw-r--r--. 1 oracle oinstall 2537 Jul 17 2017 rqcfg.sql
-rw-r--r--. 1 oracle oinstall 30656 Mar 15 2017 rqcrt.sql
-rw-r--r--. 1 oracle oinstall 752 May 1 2017 rqdn.sql
-rw-r--r--. 1 oracle oinstall 3128 Sep 8 2015 rqdrp.sql
-rw-r--r--. 1 oracle oinstall 564 Oct 24 2013 rqgrant.sql
-rw-r--r--. 1 oracle oinstall 377 Jul 17 2017 rqnothing.sql
-rw-r--r--. 1 oracle oinstall 7836 Mar 24 2016 rqpdrp08.sql
-rw-r--r--. 1 oracle oinstall 131292 Apr 25 2017 rqproc.sql
-rw-r--r--. 1 oracle oinstall 12993 Oct 21 2016 rqsys.sql
-rw-r--r--. 1 oracle oinstall 1689 Jul 17 2017 rquncfg.sql
-rw-r--r--. 1 oracle oinstall 749 May 1 2017 rqup.sql
-rw-r--r--. 1 oracle oinstall 1353 Oct 3 2016 rquser.sql
[oracle@lab01 server]$ cd ..
[oracle@lab01 R]$ ls -la
total 20
drwxr-xr-x. 5 oracle oinstall 4096 Feb 7 16:11 .
drwxr-xr-x. 71 oracle oinstall 4096 Jul 24 08:44 ..
drwxr-xr-x. 15 oracle oinstall 4096 Feb 7 16:11 library
drwxr-xr-x. 5 oracle oinstall 4096 Feb 7 16:13 migration
drwxr-xr-x. 2 oracle oinstall 4096 Feb 7 16:13 server
[oracle@lab01 R]$ cd ..
[oracle@lab01 18.0]$ ls -la
total 344
drwxr-xr-x. 71 oracle oinstall 4096 Jul 24 08:44 .
drwxr-xr-x. 4 oracle oinstall 4096 Jul 24 09:56 ..
drwxr-xr-x. 2 oracle oinstall 4096 Jul 24 08:44 addnode
drwxr-xr-x. 6 oracle oinstall 4096 Feb 7 16:13 apex
drwxr-xr-x. 9 oracle oinstall 4096 Jul 18 11:44 assistants
drwxr-xr-x. 2 oracle oinstall 12288 Jul 24 08:44 bin
drwxr-xr-x. 4 oracle oinstall 4096 Jul 24 08:44 cfgtoollogs
drwxr-xr-x. 4 oracle oinstall 4096 Jul 24 08:44 clone
drwxr-xr-x. 6 oracle oinstall 4096 Jul 18 11:44 crs
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:11 css
drwxr-xr-x. 11 oracle oinstall 4096 Feb 7 16:14 ctx
drwxr-xr-x. 7 oracle oinstall 4096 Jul 18 11:44 cv
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:11 data
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:11 dbjava
drwxr-xr-x. 2 oracle oinstall 4096 Jul 24 14:12 dbs
drwxr-xr-x. 5 oracle oinstall 4096 Jul 24 08:44 deinstall
drwxr-xr-x. 3 oracle oinstall 4096 Jul 18 11:44 demo
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:11 diagnostics
drwxr-xr-x. 13 oracle oinstall 4096 Feb 7 16:12 dmu
drwxr-xr-x. 4 oracle oinstall 4096 Jul 18 11:44 drdaas
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:11 dv
-rw-r--r--. 1 oracle oinstall 852 Aug 18 2015 env.ora
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:11 has
drwxr-xr-x. 5 oracle oinstall 4096 Jul 18 11:44 hs
drwxr-xr-x. 10 oracle oinstall 4096 Jul 24 08:44 install
drwxr-xr-x. 2 oracle oinstall 4096 Feb 7 16:12 instantclient
drwxr-x---. 14 oracle oinstall 4096 Jul 24 08:43 inventory
drwxr-xr-x. 8 oracle oinstall 4096 Jul 18 11:44 javavm
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:12 jdbc
drwxr-xr-x. 7 oracle oinstall 4096 Jul 18 11:44 jdk
drwxr-xr-x. 2 oracle oinstall 4096 Jul 18 11:39 jlib
drwxr-xr-x. 10 oracle oinstall 4096 Jul 18 11:44 ldap
drwxr-xr-x. 3 oracle oinstall 20480 Jul 24 08:43 lib
drwxr-xr-x. 4 oracle oinstall 4096 Jul 24 08:55 log
drwxr-xr-x. 9 oracle oinstall 4096 Jul 18 11:44 md
drwxr-xr-x. 4 oracle oinstall 4096 Feb 7 16:11 mgw
drwxr-xr-x. 10 oracle oinstall 4096 Jul 18 11:44 network
drwxr-xr-x. 5 oracle oinstall 4096 Jul 18 11:44 nls
drwxr-xr-x. 8 oracle oinstall 4096 Feb 7 16:13 odbc
drwxr-xr-x. 5 oracle oinstall 4096 Feb 7 16:11 olap
drwxr-x---. 14 oracle oinstall 4096 Jun 3 19:20 OPatch
drwxr-xr-x. 3 oracle oinstall 4096 Jul 18 11:39 .opatchauto_storage
drwxr-xr-x. 7 oracle oinstall 4096 Jul 18 11:44 opmn
drwxr-xr-x. 4 oracle oinstall 4096 Feb 7 16:11 oracore
-rw-r-----. 1 oracle oinstall 56 Jul 23 17:04 oraInst.loc
drwxr-xr-x. 7 oracle oinstall 4096 Jul 18 11:44 ord
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:11 ordim
drwxr-xr-x. 4 oracle oinstall 4096 Feb 7 16:12 ords
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:11 oss
drwxr-xr-x. 8 oracle oinstall 4096 Jul 24 08:44 oui
drwxr-xr-x. 4 oracle oinstall 4096 Feb 7 16:11 owm
drwxr-xr-x. 7 oracle oinstall 4096 Jul 24 14:12 .patch_storage
drwxr-xr-x. 5 oracle oinstall 4096 Jul 18 11:44 perl
drwxr-xr-x. 6 oracle oinstall 4096 Feb 7 16:12 plsql
drwxr-xr-x. 6 oracle oinstall 4096 Jul 18 11:44 precomp
drwxr-xr-x. 2 oracle oinstall 4096 Feb 7 16:12 QOpatch
drwxr-xr-x. 5 oracle oinstall 4096 Feb 7 16:11 R
drwxr-xr-x. 4 oracle oinstall 4096 Feb 7 16:11 racg
drwxr-xr-x. 13 oracle oinstall 4096 Jul 18 11:44 rdbms
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:11 relnotes
-rwx------. 1 oracle oinstall 561 Jul 24 08:43 root.sh
-rwx------. 1 oracle oinstall 786 Feb 7 16:14 root.sh.old
-rw-r-----. 1 oracle oinstall 10 Feb 7 16:11 root.sh.old.1
-rwx------. 1 oracle oinstall 638 Jul 18 11:18 root.sh.old.2
-rw-r-----. 1 oracle oinstall 10 Feb 7 16:11 root.sh.old.3
-rwxr-x---. 1 oracle oinstall 1783 Mar 8 2017 runInstaller
-rw-r--r--. 1 oracle oinstall 2927 Oct 14 2016 schagent.conf
drwxr-xr-x. 5 oracle oinstall 4096 Feb 7 16:13 sdk
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:11 slax
drwxr-xr-x. 22 oracle oinstall 4096 Feb 7 16:13 sqldeveloper
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:11 sqlj
drwxr-xr-x. 5 oracle oinstall 4096 Jul 18 11:41 sqlpatch
drwxr-xr-x. 6 oracle oinstall 4096 Jul 24 08:43 sqlplus
drwxr-xr-x. 6 oracle oinstall 4096 Feb 7 16:11 srvm
drwxr-xr-x. 5 oracle oinstall 4096 Feb 7 16:11 suptools
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:12 ucp
drwxr-xr-x. 4 oracle oinstall 4096 Feb 7 16:11 usm
drwxr-xr-x. 2 oracle oinstall 4096 Feb 7 16:12 utl
drwxr-xr-x. 3 oracle oinstall 4096 Feb 7 16:11 wwg
drwxr-x---. 7 oracle oinstall 4096 Feb 7 16:11 xdk
[oracle@lab01 18.0]$ . oraenv
ORACLE_SID = [cdb1] ? cdb2
The Oracle base remains unchanged with value /opt/app/oracle
[oracle@lab01 18.0]$ lsnrctl start
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 24-JUL-2018 14:14:51
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Starting /opt/app/oracle/product/12.2.0.1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 12.2.0.1.0 - Production
System parameter file is /opt/app/oracle/product/12.2.0.1/network/admin/listener.ora
Log messages written to /opt/app/oracle/diag/tnslsnr/lab01/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=lab01)(PORT=1522)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1522)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=lab01)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 24-JUL-2018 14:14:53
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/app/oracle/product/12.2.0.1/network/admin/listener.ora
Listener Log File /opt/app/oracle/diag/tnslsnr/lab01/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=lab01)(PORT=1522)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1522)))
The listener supports no services
The command completed successfully
[oracle@lab01 18.0]$ sqlplus /nolog
SQL*Plus: Release 12.2.0.1.0 Production on Tue Jul 24 14:14:56 2018
Copyright (c) 1982, 2016, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 2516582400 bytes
Fixed Size 8795904 bytes
Variable Size 671090944 bytes
Database Buffers 1828716544 bytes
Redo Buffers 7979008 bytes
Database mounted.
Database opened.
SQL> desc v$pdbs
Name Null? Type
----------------------------------------- -------- ----------------------------
CON_ID NUMBER
DBID NUMBER
CON_UID NUMBER
GUID RAW(16)
NAME VARCHAR2(128)
OPEN_MODE VARCHAR2(10)
RESTRICTED VARCHAR2(3)
OPEN_TIME TIMESTAMP(3) WITH TIME ZONE
CREATE_SCN NUMBER
TOTAL_SIZE NUMBER
BLOCK_SIZE NUMBER
RECOVERY_STATUS VARCHAR2(8)
SNAPSHOT_PARENT_CON_ID NUMBER
APPLICATION_ROOT VARCHAR2(3)
APPLICATION_PDB VARCHAR2(3)
APPLICATION_SEED VARCHAR2(3)
APPLICATION_ROOT_CON_ID NUMBER
APPLICATION_ROOT_CLONE VARCHAR2(3)
PROXY_PDB VARCHAR2(3)
LOCAL_UNDO NUMBER
UNDO_SCN NUMBER
UNDO_TIMESTAMP DATE
CREATION_TIME DATE
DIAGNOSTICS_SIZE NUMBER
PDB_COUNT NUMBER
AUDIT_FILES_SIZE NUMBER
MAX_SIZE NUMBER
MAX_DIAGNOSTICS_SIZE NUMBER
MAX_AUDIT_SIZE NUMBER
SQL> set linesize 200
SQL> select con_id, name from v$pdbs;
CON_ID NAME
---------- ------------------------------------------------------------------------
2 PDB$SEED
3 MIGRACION
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
[oracle@lab01 18.0]$ . oraenv
ORACLE_SID = [cdb2] ? cdb1
The Oracle base remains unchanged with value /opt/app/oracle
[oracle@lab01 18.0]$ sqlplus /nolog
SQL*Plus: Release 18.0.0.0.0 - Production on Tue Jul 24 14:15:53 2018
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected.
SQL> select con_id, name from v$pdbs;
CON_ID NAME
---------- ------------------------------------------------------------------------
2 PDB$SEED
3 PDB1
4 PDB2
SQL> exit
Disconnected from Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0
[oracle@lab01 18.0]$ . oraenv
ORACLE_SID = [cdb1] ?
The Oracle base remains unchanged with value /opt/app/oracle
[oracle@lab01 18.0]$ sqlplus /nolog
SQL*Plus: Release 18.0.0.0.0 - Production on Tue Jul 24 14:22:28 2018
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected.
SQL> set linesize 200
SQL> select open_mode, name from v$pdbs;
OPEN_MODE NAME
---------- ------------------------------------------------------------------------
READ ONLY PDB$SEED
MOUNTED PDB1
MOUNTED PDB2
SQL> alter pluggable database pdb1 open;
Pluggable database altered.
SQL> exit
Disconnected from Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0
[oracle@lab01 18.0]$ ps -ef|grep oracle
root 3054 2441 0 14:12 ? 00:00:00 sshd: oracle [priv]
oracle 3058 3054 0 14:12 ? 00:00:00 sshd: oracle@pts/0
oracle 3059 3058 0 14:12 pts/0 00:00:00 -bash
oracle 3098 1 0 14:12 ? 00:00:00 /opt/app/oracle/product/18.0/bin/tnslsnr LISTENER -inherit
oracle 3105 1 0 14:12 ? 00:00:00 ora_pmon_cdb1
oracle 3107 1 0 14:12 ? 00:00:00 ora_clmn_cdb1
oracle 3109 1 0 14:12 ? 00:00:01 ora_psp0_cdb1
oracle 3111 1 12 14:12 ? 00:02:06 ora_vktm_cdb1
oracle 3115 1 0 14:12 ? 00:00:00 ora_gen0_cdb1
oracle 3117 1 0 14:12 ? 00:00:01 ora_mman_cdb1
oracle 3121 1 0 14:12 ? 00:00:01 ora_gen1_cdb1
oracle 3124 1 0 14:12 ? 00:00:00 ora_diag_cdb1
oracle 3126 1 0 14:12 ? 00:00:00 ora_ofsd_cdb1
oracle 3129 1 0 14:12 ? 00:00:01 ora_dbrm_cdb1
oracle 3131 1 0 14:12 ? 00:00:00 ora_vkrm_cdb1
oracle 3133 1 0 14:12 ? 00:00:00 ora_svcb_cdb1
oracle 3135 1 0 14:12 ? 00:00:00 ora_pman_cdb1
oracle 3137 1 0 14:12 ? 00:00:01 ora_dia0_cdb1
oracle 3139 1 0 14:12 ? 00:00:00 ora_dbw0_cdb1
oracle 3141 1 0 14:12 ? 00:00:00 ora_lgwr_cdb1
oracle 3143 1 0 14:12 ? 00:00:01 ora_ckpt_cdb1
oracle 3145 1 0 14:12 ? 00:00:00 ora_lg00_cdb1
oracle 3147 1 0 14:12 ? 00:00:00 ora_smon_cdb1
oracle 3149 1 0 14:12 ? 00:00:00 ora_lg01_cdb1
oracle 3151 1 0 14:12 ? 00:00:00 ora_smco_cdb1
oracle 3153 1 0 14:12 ? 00:00:00 ora_reco_cdb1
oracle 3155 1 0 14:12 ? 00:00:00 ora_w000_cdb1
oracle 3157 1 0 14:12 ? 00:00:00 ora_lreg_cdb1
oracle 3159 1 0 14:12 ? 00:00:00 ora_w001_cdb1
oracle 3161 1 0 14:12 ? 00:00:00 ora_pxmn_cdb1
oracle 3165 1 0 14:12 ? 00:00:03 ora_mmon_cdb1
oracle 3167 1 0 14:12 ? 00:00:00 ora_mmnl_cdb1
oracle 3169 1 0 14:12 ? 00:00:00 ora_d000_cdb1
oracle 3171 1 0 14:12 ? 00:00:00 ora_s000_cdb1
oracle 3173 1 0 14:12 ? 00:00:00 ora_tmon_cdb1
oracle 3176 1 0 14:12 ? 00:00:03 ora_m000_cdb1
oracle 3178 1 0 14:12 ? 00:00:04 ora_m001_cdb1
oracle 3183 1 0 14:12 ? 00:00:00 ora_tt00_cdb1
oracle 3185 1 0 14:12 ? 00:00:00 ora_tt01_cdb1
oracle 3187 1 0 14:12 ? 00:00:00 ora_tt02_cdb1
oracle 3189 1 0 14:12 ? 00:00:00 ora_aqpc_cdb1
oracle 3193 1 0 14:12 ? 00:00:00 ora_p000_cdb1
oracle 3195 1 0 14:12 ? 00:00:00 ora_p001_cdb1
oracle 3197 1 0 14:12 ? 00:00:00 ora_p002_cdb1
oracle 3199 1 0 14:12 ? 00:00:00 ora_p003_cdb1
oracle 3201 1 0 14:12 ? 00:00:00 ora_w002_cdb1
oracle 3203 1 0 14:12 ? 00:00:01 ora_cjq0_cdb1
oracle 3364 1 0 14:12 ? 00:00:00 ora_w003_cdb1
oracle 3388 1 0 14:13 ? 00:00:05 ora_m002_cdb1
oracle 3412 1 0 14:13 ? 00:00:00 ora_qm02_cdb1
oracle 3418 1 0 14:13 ? 00:00:00 ora_q003_cdb1
oracle 3420 1 0 14:13 ? 00:00:00 ora_w004_cdb1
oracle 3454 1 0 14:14 ? 00:00:00 /opt/app/oracle/product/12.2.0.1/bin/tnslsnr LISTENER -inherit
oracle 3465 1 0 14:15 ? 00:00:00 ora_pmon_cdb2
oracle 3467 1 0 14:15 ? 00:00:00 ora_clmn_cdb2
oracle 3469 1 0 14:15 ? 00:00:01 ora_psp0_cdb2
oracle 3471 1 12 14:15 ? 00:01:52 ora_vktm_cdb2
oracle 3475 1 0 14:15 ? 00:00:00 ora_gen0_cdb2
oracle 3477 1 0 14:15 ? 00:00:01 ora_mman_cdb2
oracle 3481 1 0 14:15 ? 00:00:01 ora_gen1_cdb2
oracle 3485 1 0 14:15 ? 00:00:00 ora_diag_cdb2
oracle 3487 1 0 14:15 ? 00:00:00 ora_ofsd_cdb2
oracle 3491 1 0 14:15 ? 00:00:01 ora_dbrm_cdb2
oracle 3493 1 0 14:15 ? 00:00:00 ora_vkrm_cdb2
oracle 3495 1 0 14:15 ? 00:00:00 ora_svcb_cdb2
oracle 3497 1 0 14:15 ? 00:00:00 ora_pman_cdb2
oracle 3499 1 0 14:15 ? 00:00:01 ora_dia0_cdb2
oracle 3501 1 0 14:15 ? 00:00:00 ora_dbw0_cdb2
oracle 3503 1 0 14:15 ? 00:00:00 ora_lgwr_cdb2
oracle 3505 1 0 14:15 ? 00:00:01 ora_ckpt_cdb2
oracle 3507 1 0 14:15 ? 00:00:00 ora_lg00_cdb2
oracle 3509 1 0 14:15 ? 00:00:00 ora_smon_cdb2
oracle 3511 1 0 14:15 ? 00:00:00 ora_lg01_cdb2
oracle 3513 1 0 14:15 ? 00:00:00 ora_smco_cdb2
oracle 3515 1 0 14:15 ? 00:00:00 ora_reco_cdb2
oracle 3517 1 0 14:15 ? 00:00:00 ora_w000_cdb2
oracle 3519 1 0 14:15 ? 00:00:00 ora_lreg_cdb2
oracle 3521 1 0 14:15 ? 00:00:00 ora_w001_cdb2
oracle 3523 1 0 14:15 ? 00:00:00 ora_pxmn_cdb2
oracle 3527 1 0 14:15 ? 00:00:03 ora_mmon_cdb2
oracle 3529 1 0 14:15 ? 00:00:00 ora_mmnl_cdb2
oracle 3531 1 0 14:15 ? 00:00:00 ora_d000_cdb2
oracle 3533 1 0 14:15 ? 00:00:00 ora_s000_cdb2
oracle 3535 1 0 14:15 ? 00:00:00 ora_tmon_cdb2
oracle 3545 1 0 14:15 ? 00:00:00 ora_tt00_cdb2
oracle 3547 1 0 14:15 ? 00:00:00 ora_tt01_cdb2
oracle 3549 1 0 14:15 ? 00:00:00 ora_tt02_cdb2
oracle 3551 1 0 14:15 ? 00:00:00 ora_aqpc_cdb2
oracle 3555 1 0 14:15 ? 00:00:00 ora_p000_cdb2
oracle 3557 1 0 14:15 ? 00:00:00 ora_p001_cdb2
oracle 3559 1 0 14:15 ? 00:00:00 ora_p002_cdb2
oracle 3561 1 0 14:15 ? 00:00:00 ora_p003_cdb2
oracle 3563 1 0 14:15 ? 00:00:00 ora_p004_cdb2
oracle 3565 1 0 14:15 ? 00:00:00 ora_p005_cdb2
oracle 3567 1 0 14:15 ? 00:00:00 ora_p006_cdb2
oracle 3569 1 0 14:15 ? 00:00:00 ora_p007_cdb2
oracle 3571 1 0 14:15 ? 00:00:02 ora_cjq0_cdb2
oracle 3777 1 0 14:15 ? 00:00:00 ora_qm02_cdb2
oracle 3781 1 0 14:15 ? 00:00:00 ora_q002_cdb2
oracle 3783 1 0 14:15 ? 00:00:00 ora_q003_cdb2
oracle 3812 1 0 14:16 ? 00:00:00 ora_w002_cdb2
oracle 3824 1 0 14:17 ? 00:00:02 ora_m003_cdb1
oracle 3914 1 0 14:22 ? 00:00:01 ora_m004_cdb1
oracle 3916 1 0 14:22 ? 00:00:00 ora_w005_cdb1
oracle 3918 1 0 14:22 ? 00:00:00 ora_w006_cdb1
oracle 3920 1 0 14:22 ? 00:00:00 ora_q001_cdb1
oracle 3922 1 0 14:23 ? 00:00:00 ora_w007_cdb1
oracle 3930 1 0 14:23 ? 00:00:00 oraclecdb1 (LOCAL=NO)
oracle 3981 1 0 14:25 ? 00:00:00 ora_w003_cdb2
oracle 4008 1 0 14:27 ? 00:00:00 ora_w004_cdb2
oracle 4023 1 0 14:28 ? 00:00:00 ora_w005_cdb2
oracle 4026 1 0 14:29 ? 00:00:00 ora_qm03_cdb1
oracle 4034 1 0 14:29 ? 00:00:00 ora_w006_cdb2
oracle 4037 3059 2 14:29 pts/0 00:00:00 ps -ef
oracle 4038 3059 0 14:29 pts/0 00:00:00 grep oracle
[oracle@lab01 18.0]$ . oraenv
ORACLE_SID = [cdb1] ? 12c
ORACLE_HOME = [/home/oracle] ?
ORACLE_BASE environment variable is not being set since this
information is not available for the current user ID oracle.
You can set ORACLE_BASE manually if it is required.
Resetting ORACLE_BASE to its previous value or ORACLE_HOME
The Oracle base remains unchanged with value /opt/app/oracle
[oracle@lab01 18.0]$ . oraenv
ORACLE_SID = [12c] ? cdb2
The Oracle base remains unchanged with value /opt/app/oracle
[oracle@lab01 18.0]$ sqlplus /nolog
SQL*Plus: Release 12.2.0.1.0 Production on Tue Jul 24 14:30:07 2018
Copyright (c) 1982, 2016, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected.
SQL> alter pluggable database migracion open;
Pluggable database altered.
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
[oracle@lab01 18.0]$ pwd
/opt/app/oracle/product/18.0
[oracle@lab01 18.0]$ cd $ORACLE_HOME
[oracle@lab01 12.2.0.1]$ cd network
[oracle@lab01 network]$ cd amdin
-bash: cd: amdin: No such file or directory
[oracle@lab01 network]$ cd admin
[oracle@lab01 admin]$ ls -la
total 28
drwxr-xr-x. 3 oracle oinstall 4096 Jul 24 10:00 .
drwxr-xr-x. 10 oracle oinstall 4096 Jul 24 09:59 ..
-rw-r--r--. 1 oracle oinstall 326 Jul 24 10:00 listener.ora
drwxr-xr-x. 2 oracle oinstall 4096 Jul 24 09:56 samples
-rw-r--r--. 1 oracle oinstall 1441 Aug 28 2015 shrept.lst
-rw-r--r--. 1 oracle oinstall 188 Jul 24 10:00 sqlnet.ora
-rw-r-----. 1 oracle oinstall 393 Jul 24 10:05 tnsnames.ora
[oracle@lab01 admin]$ vi tnsnames.ora
[oracle@lab01 admin]$ more tnsnames.ora
# tnsnames.ora Network Configuration File: /opt/app/oracle/product/18.0/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_CDB1 =
(ADDRESS = (PROTOCOL = TCP)(HOST = lab01)(PORT = 1521))
CDB1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = lab01)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = cdb1)
)
)
PDB1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = lab01)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pdb1)
)
)
PDB2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = lab01)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pdb2)
)
)
MIGRACION =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = lab01)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = migracion)
)
)
[oracle@lab01 admin]$ tnsping migracion
TNS Ping Utility for Linux: Version 12.2.0.1.0 - Production on 24-JUL-2018 14:32:20
Copyright (c) 1997, 2016, Oracle. All rights reserved.
Used parameter files:
/opt/app/oracle/product/12.2.0.1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = lab01)(PORT = 1522)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = migracion)))
OK (10 msec)
[oracle@lab01 admin]$ sqlplus system/oracle@migracion
SQL*Plus: Release 12.2.0.1.0 Production on Tue Jul 24 14:32:26 2018
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
[oracle@lab01 admin]$ sqlplus system/oracle@migracion
SQL*Plus: Release 12.2.0.1.0 Production on Tue Jul 24 14:32:42 2018
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Last Successful login time: Tue Jul 24 2018 14:32:26 -06:00
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> create user remote_clone_user identified by clone;
User created.
SQL> grant create session, create pluggable database to remote_clone_user;
Grant succeeded.
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
[oracle@lab01 admin]$ . oraenv
ORACLE_SID = [cdb2] ? cdb1
The Oracle base remains unchanged with value /opt/app/oracle
[oracle@lab01 admin]$ cd $ORACLE_HOME
[oracle@lab01 18.0]$ cd network
[oracle@lab01 network]$ cd admin
[oracle@lab01 admin]$ vi tnsnames.ora
[oracle@lab01 admin]$ tnsping migracion
TNS Ping Utility for Linux: Version 18.0.0.0.0 - Production on 24-JUL-2018 14:34:36
Copyright (c) 1997, 2018, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = lab01)(PORT = 1522)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = migracion)))
OK (10 msec)
Procedemos a crear un dblink entre los dos contenedores existentes.
[oracle@lab01 admin]$ sqlplus /nolog
SQL*Plus: Release 18.0.0.0.0 - Production on Tue Jul 24 14:34:55 2018
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected.
SQL> create database link clone_link connect to remote_clone_user identified by clone using 'MIGRACION';
Database link created.
SQL> desc user_tables@clone_link
Name Null? Type
----------------------------------------- -------- ----------------------------
TABLE_NAME NOT NULL VARCHAR2(128)
TABLESPACE_NAME VARCHAR2(30)
CLUSTER_NAME VARCHAR2(128)
IOT_NAME VARCHAR2(128)
STATUS VARCHAR2(8)
PCT_FREE NUMBER
PCT_USED NUMBER
INI_TRANS NUMBER
MAX_TRANS NUMBER
INITIAL_EXTENT NUMBER
NEXT_EXTENT NUMBER
MIN_EXTENTS NUMBER
MAX_EXTENTS NUMBER
PCT_INCREASE NUMBER
FREELISTS NUMBER
FREELIST_GROUPS NUMBER
LOGGING VARCHAR2(3)
BACKED_UP VARCHAR2(1)
NUM_ROWS NUMBER
BLOCKS NUMBER
EMPTY_BLOCKS NUMBER
AVG_SPACE NUMBER
CHAIN_CNT NUMBER
AVG_ROW_LEN NUMBER
AVG_SPACE_FREELIST_BLOCKS NUMBER
NUM_FREELIST_BLOCKS NUMBER
DEGREE VARCHAR2(10)
INSTANCES VARCHAR2(10)
CACHE VARCHAR2(5)
TABLE_LOCK VARCHAR2(8)
SAMPLE_SIZE NUMBER
LAST_ANALYZED DATE
PARTITIONED VARCHAR2(3)
IOT_TYPE VARCHAR2(12)
TEMPORARY VARCHAR2(1)
SECONDARY VARCHAR2(1)
NESTED VARCHAR2(3)
BUFFER_POOL VARCHAR2(7)
FLASH_CACHE VARCHAR2(7)
CELL_FLASH_CACHE VARCHAR2(7)
ROW_MOVEMENT VARCHAR2(8)
GLOBAL_STATS VARCHAR2(3)
USER_STATS VARCHAR2(3)
DURATION VARCHAR2(15)
SKIP_CORRUPT VARCHAR2(8)
MONITORING VARCHAR2(3)
CLUSTER_OWNER VARCHAR2(128)
DEPENDENCIES VARCHAR2(8)
COMPRESSION VARCHAR2(8)
COMPRESS_FOR VARCHAR2(30)
DROPPED VARCHAR2(3)
READ_ONLY VARCHAR2(3)
SEGMENT_CREATED VARCHAR2(3)
RESULT_CACHE VARCHAR2(7)
CLUSTERING VARCHAR2(3)
ACTIVITY_TRACKING VARCHAR2(23)
DML_TIMESTAMP VARCHAR2(25)
HAS_IDENTITY VARCHAR2(3)
CONTAINER_DATA VARCHAR2(3)
INMEMORY VARCHAR2(8)
INMEMORY_PRIORITY VARCHAR2(8)
INMEMORY_DISTRIBUTE VARCHAR2(15)
INMEMORY_COMPRESSION VARCHAR2(17)
INMEMORY_DUPLICATE VARCHAR2(13)
DEFAULT_COLLATION VARCHAR2(100)
DUPLICATED VARCHAR2(1)
SHARDED VARCHAR2(1)
EXTERNAL VARCHAR2(3)
CELLMEMORY VARCHAR2(24)
CONTAINERS_DEFAULT VARCHAR2(3)
CONTAINER_MAP VARCHAR2(3)
EXTENDED_DATA_LINK VARCHAR2(3)
EXTENDED_DATA_LINK_MAP VARCHAR2(3)
INMEMORY_SERVICE VARCHAR2(12)
INMEMORY_SERVICE_NAME VARCHAR2(1000)
CONTAINER_MAP_OBJECT VARCHAR2(3)
SQL> show parameter db_create
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_create_file_dest string
db_create_online_log_dest_1 string
db_create_online_log_dest_2 string
db_create_online_log_dest_3 string
db_create_online_log_dest_4 string
db_create_online_log_dest_5 string
SQL> exit
Disconnected from Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0
[oracle@lab01 admin]$ cd $ORACLE_BASE
[oracle@lab01 oracle]$ pwd
/opt/app/oracle
[oracle@lab01 oracle]$ cd oradata
[oracle@lab01 oradata]$ ls -la
total 16
drwxr-x---. 4 oracle oinstall 4096 Jul 24 10:00 .
drwxr-xr-x. 9 oracle oinstall 4096 Jul 24 09:56 ..
drwxr-x---. 5 oracle oinstall 4096 Jul 24 08:58 CDB1
drwxr-x---. 4 oracle oinstall 4096 Jul 24 10:03 cdb2
[oracle@lab01 oradata]$ cd CDB1
[oracle@lab01 CDB1]$ ls -la
total 2398000
drwxr-x---. 5 oracle oinstall 4096 Jul 24 08:58 .
drwxr-x---. 4 oracle oinstall 4096 Jul 24 10:00 ..
-rw-r-----. 1 oracle oinstall 18726912 Jul 24 14:36 control01.ctl
-rw-r-----. 1 oracle oinstall 18726912 Jul 24 14:36 control02.ctl
drwxr-x---. 2 oracle oinstall 4096 Jul 24 09:07 pdb1
drwxr-x---. 2 oracle oinstall 4096 Jul 24 09:07 pdb2
drwxr-x---. 2 oracle oinstall 4096 Jul 24 09:00 pdbseed
-rw-r-----. 1 oracle oinstall 209715712 Jul 24 14:12 redo01.log
-rw-r-----. 1 oracle oinstall 209715712 Jul 24 14:35 redo02.log
-rw-r-----. 1 oracle oinstall 209715712 Jul 24 14:12 redo03.log
-rw-r-----. 1 oracle oinstall 566239232 Jul 24 14:33 sysaux01.dbf
-rw-r-----. 1 oracle oinstall 880812032 Jul 24 14:33 system01.dbf
-rw-r-----. 1 oracle oinstall 34611200 Jul 24 09:03 temp01.dbf
-rw-r-----. 1 oracle oinstall 335552512 Jul 24 14:33 undotbs01.dbf
-rw-r-----. 1 oracle oinstall 5251072 Jul 24 14:12 users01.dbf
[oracle@lab01 CDB1]$ pwd
/opt/app/oracle/oradata/CDB1
[oracle@lab01 CDB1]$ sqlplus /nolog
SQL*Plus: Release 18.0.0.0.0 - Production on Tue Jul 24 14:36:43 2018
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected.
SQL> show parameter create
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
create_bitmap_area_size integer 8388608
create_stored_outlines string
db_create_file_dest string
db_create_online_log_dest_1 string
db_create_online_log_dest_2 string
db_create_online_log_dest_3 string
db_create_online_log_dest_4 string
db_create_online_log_dest_5 string
SQL> alter system set db_create_file_dest='/opt/app/oracle/oradata/CDB1' scope=both;
System altered.
Una vez, hecho los cambios a nivel de parámetros de configuración para ubicación de archivos de la base de datos, procedemos con la clonación de la instancia a través del dblink creado.
SQL> set timing on
SQL> create pluggable database pdb_migracion from migracion@clone_link;
Pluggable database created.
Elapsed: 00:00:14.41
SQL> select con_id, open_mode from v$pdbs;
CON_ID OPEN_MODE
---------- ----------
2 READ ONLY
3 READ WRITE
4 MOUNTED
5 MOUNTED
Elapsed: 00:00:00.02
SQL> select con_id, open_mode, name from v$pdbs;
CON_ID OPEN_MODE NAME
---------- ---------- -------------------------------------------------------------
2 READ ONLY PDB$SEED
3 READ WRITE PDB1
4 MOUNTED PDB2
5 MOUNTED PDB_MIGRACION
Elapsed: 00:00:00.00
SQL> alter pluggable database pdb_migracion open;
Warning: PDB altered with errors.
SQL> select con_id, name, open_mode from v$pdbs;
CON_ID NAME OPEN_MODE
---------- -------------------------------------------------------------- ----------
2 PDB$SEED READ ONLY
3 PDB1 MOUNTED
4 PDB2 MOUNTED
5 PDB_MIGRACION MIGRATE
SQL> exit
Disconnected from Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0
Aquí viene la magia. Vamos a migrar el catálogo de la instancia clonada a través del dblink.
[oracle@lab01 CDB1]$ cd $ORACLE_HOME/rdbms/admin
[oracle@lab01 admin]$ pwd
/opt/app/oracle/product/18.0/rdbms/admin
[oracle@lab01 admin]$ /opt/app/oracle/product/18.0/perl/bin/perl catctl.pl -c "PDB_MIGRACION" -l /tmp catupgrd.sql
Argument list for [catctl.pl]
Run in c = PDB_MIGRACION
Do not run in C = 0
Input Directory d = 0
Echo OFF e = 1
Simulate E = 0
Forced cleanup F = 0
Log Id i = 0
Child Process I = 0
Log Dir l = /tmp
Priority List Name L = 0
Upgrade Mode active M = 0
SQL Process Count n = 0
SQL PDB Process Count N = 0
Open Mode Normal o = 0
Start Phase p = 0
End Phase P = 0
Reverse Order r = 0
AutoUpgrade Resume R = 0
Script s = 0
Serial Run S = 0
RO User Tablespaces T = 0
Display Phases y = 0
Debug catcon.pm z = 0
Debug catctl.pl Z = 0
catctl.pl VERSION: [18.0.0.0.0]
STATUS: [Production]
BUILD: [RDBMS_18.3.0.0.0DBRU_LINUX.X64_180627]
/opt/app/oracle/product/18.0/rdbms/admin/orahome = [/opt/app/oracle/product/18.0]
/opt/app/oracle/product/18.0/bin/orabasehome = [/opt/app/oracle/product/18.0]
catctlGetOrabase = [/opt/app/oracle/product/18.0]
Analyzing file /opt/app/oracle/product/18.0/rdbms/admin/catupgrd.sql
Log file directory = [/tmp]
catcon::set_log_file_base_path: ALL catcon-related output will be written to [/tmp/catupgrd_catcon_5375.lst]
catcon::set_log_file_base_path: catcon: See [/tmp/catupgrd*.log] files for output generated by scripts
catcon::set_log_file_base_path: catcon: See [/tmp/catupgrd_*.lst] files for spool files, if any
Number of Cpus = 2
Database Name = cdb1
DataBase Version = 18.0.0.0.0
PDB Parallel SQL Process Count = [2] is higher or equal to CPU Count = [2]
Concurrent PDB Upgrades defaulting to CPU Count [2]
Parallel SQL Process Count (PDB) = 2
Parallel SQL Process Count (CDB$ROOT) = 4
Concurrent PDB Upgrades = 2
Generated PDB Inclusion:[PDB_MIGRACION]
CDB$ROOT Open Mode = [OPEN]
Start processing of PDBs (PDB_MIGRACION)
[/opt/app/oracle/product/18.0/perl/bin/perl catctl.pl -c 'PDB_MIGRACION' -l /tmp -I -i pdb_migracion -n 2 catupgrd.sql]
Argument list for [catctl.pl]
Run in c = PDB_MIGRACION
Do not run in C = 0
Input Directory d = 0
Echo OFF e = 1
Simulate E = 0
Forced cleanup F = 0
Log Id i = pdb_migracion
Child Process I = 1
Log Dir l = /tmp
Priority List Name L = 0
Upgrade Mode active M = 0
SQL Process Count n = 2
SQL PDB Process Count N = 0
Open Mode Normal o = 0
Start Phase p = 0
End Phase P = 0
Reverse Order r = 0
AutoUpgrade Resume R = 0
Script s = 0
Serial Run S = 0
RO User Tablespaces T = 0
Display Phases y = 0
Debug catcon.pm z = 0
Debug catctl.pl Z = 0
catctl.pl VERSION: [18.0.0.0.0]
STATUS: [Production]
BUILD: [RDBMS_18.3.0.0.0DBRU_LINUX.X64_180627]
/opt/app/oracle/product/18.0/rdbms/admin/orahome = [/opt/app/oracle/product/18.0]
/opt/app/oracle/product/18.0/bin/orabasehome = [/opt/app/oracle/product/18.0]
catctlGetOrabase = [/opt/app/oracle/product/18.0]
Analyzing file /opt/app/oracle/product/18.0/rdbms/admin/catupgrd.sql
Log file directory = [/tmp]
catcon::set_log_file_base_path: ALL catcon-related output will be written to [/tmp/catupgrdpdb_migracion_catcon_5574.lst]
catcon::set_log_file_base_path: catcon: See [/tmp/catupgrdpdb_migracion*.log] files for output generated by scripts
catcon::set_log_file_base_path: catcon: See [/tmp/catupgrdpdb_migracion_*.lst] files for spool files, if any
Number of Cpus = 2
Database Name = cdb1
DataBase Version = 18.0.0.0.0
Generated PDB Inclusion:[PDB_MIGRACION]
CDB$ROOT Open Mode = [OPEN]
Components in [PDB_MIGRACION]
Installed [APS CATALOG CATJAVA CATPROC CONTEXT DV JAVAVM OLS ORDIM OWM SDO XDB XML XOQ]
Not Installed [APEX EM MGW ODM RAC WK]
------------------------------------------------------
Phases [0-108] Start Time:[2018_07_24 15:02:42]
Container Lists Inclusion:[PDB_MIGRACION] Exclusion:[NONE]
------------------------------------------------------
*********** Executing Change Scripts ***********
Serial Phase #:0 [PDB_MIGRACION] Files:1 Time: 15s
*************** Catalog Core SQL ***************
Serial Phase #:1 [PDB_MIGRACION] Files:5 Time: 31s
Restart Phase #:2 [PDB_MIGRACION] Files:1 Time: 0s
*********** Catalog Tables and Views ***********
Parallel Phase #:3 [PDB_MIGRACION] Files:19 Time: 16s
Restart Phase #:4 [PDB_MIGRACION] Files:1 Time: 1s
************* Catalog Final Scripts ************
Serial Phase #:5 [PDB_MIGRACION] Files:7 Time: 13s
***************** Catproc Start ****************
Serial Phase #:6 [PDB_MIGRACION] Files:1 Time: 10s
***************** Catproc Types ****************
Serial Phase #:7 [PDB_MIGRACION] Files:2 Time: 7s
Restart Phase #:8 [PDB_MIGRACION] Files:1 Time: 0s
**************** Catproc Tables ****************
Parallel Phase #:9 [PDB_MIGRACION] Files:66 Time: 22s
Restart Phase #:10 [PDB_MIGRACION] Files:1 Time: 0s
************* Catproc Package Specs ************
Serial Phase #:11 [PDB_MIGRACION] Files:1 Time: 50s
Restart Phase #:12 [PDB_MIGRACION] Files:1 Time: 1s
************** Catproc Procedures **************
Parallel Phase #:13 [PDB_MIGRACION] Files:94 Time: 8s
Restart Phase #:14 [PDB_MIGRACION] Files:1 Time: 0s
Parallel Phase #:15 [PDB_MIGRACION] Files:117 Time: 13s
Restart Phase #:16 [PDB_MIGRACION] Files:1 Time: 0s
Serial Phase #:17 [PDB_MIGRACION] Files:17 Time: 3s
Restart Phase #:18 [PDB_MIGRACION] Files:1 Time: 1s
***************** Catproc Views ****************
Parallel Phase #:19 [PDB_MIGRACION] Files:32 Time: 16s
Restart Phase #:20 [PDB_MIGRACION] Files:1 Time: 0s
Serial Phase #:21 [PDB_MIGRACION] Files:3 Time: 8s
Restart Phase #:22 [PDB_MIGRACION] Files:1 Time: 1s
Parallel Phase #:23 [PDB_MIGRACION] Files:24 Time: 129s
Restart Phase #:24 [PDB_MIGRACION] Files:1 Time: 1s
Parallel Phase #:25 [PDB_MIGRACION] Files:12 Time: 72s
Restart Phase #:26 [PDB_MIGRACION] Files:1 Time: 1s
Serial Phase #:27 [PDB_MIGRACION] Files:1 Time: 0s
Serial Phase #:28 [PDB_MIGRACION] Files:3 Time: 3s
Serial Phase #:29 [PDB_MIGRACION] Files:1 Time: 0s
Restart Phase #:30 [PDB_MIGRACION] Files:1 Time: 1s
*************** Catproc CDB Views **************
Serial Phase #:31 [PDB_MIGRACION] Files:1 Time: 1s
Restart Phase #:32 [PDB_MIGRACION] Files:1 Time: 1s
Serial Phase #:34 [PDB_MIGRACION] Files:1 Time: 0s
***************** Catproc PLBs *****************
Serial Phase #:35 [PDB_MIGRACION] Files:288 Time: 17s
Serial Phase #:36 [PDB_MIGRACION] Files:1 Time: 0s
Restart Phase #:37 [PDB_MIGRACION] Files:1 Time: 0s
Serial Phase #:38 [PDB_MIGRACION] Files:2 Time: 3s
Restart Phase #:39 [PDB_MIGRACION] Files:1 Time: 1s
*************** Catproc DataPump ***************
Serial Phase #:40 [PDB_MIGRACION] Files:3 Time: 36s
Restart Phase #:41 [PDB_MIGRACION] Files:1 Time: 1s
****************** Catproc SQL *****************
Parallel Phase #:42 [PDB_MIGRACION] Files:13 Time: 73s
Restart Phase #:43 [PDB_MIGRACION] Files:1 Time: 1s
Parallel Phase #:44 [PDB_MIGRACION] Files:11 Time: 4s
Restart Phase #:45 [PDB_MIGRACION] Files:1 Time: 1s
Parallel Phase #:46 [PDB_MIGRACION] Files:3 Time: 2s
Restart Phase #:47 [PDB_MIGRACION] Files:1 Time: 1s
************* Final Catproc scripts ************
Serial Phase #:48 [PDB_MIGRACION] Files:1 Time: 4s
Restart Phase #:49 [PDB_MIGRACION] Files:1 Time: 1s
************** Final RDBMS scripts *************
Serial Phase #:50 [PDB_MIGRACION] Files:1 Time: 4s
************ Upgrade Component Start ***********
Serial Phase #:51 [PDB_MIGRACION] Files:1 Time: 1s
Restart Phase #:52 [PDB_MIGRACION] Files:1 Time: 0s
********** Upgrading Java and non-Java *********
Serial Phase #:53 [PDB_MIGRACION] Files:2 Time: 126s
***************** Upgrading XDB ****************
Restart Phase #:54 [PDB_MIGRACION] Files:1 Time: 0s
Serial Phase #:56 [PDB_MIGRACION] Files:3 Time: 5s
Serial Phase #:57 [PDB_MIGRACION] Files:3 Time: 3s
Parallel Phase #:58 [PDB_MIGRACION] Files:9 Time: 3s
Parallel Phase #:59 [PDB_MIGRACION] Files:25 Time: 5s
Serial Phase #:60 [PDB_MIGRACION] Files:4 Time: 6s
Serial Phase #:61 [PDB_MIGRACION] Files:1 Time: 0s
Serial Phase #:62 [PDB_MIGRACION] Files:31 Time: 3s
Serial Phase #:63 [PDB_MIGRACION] Files:1 Time: 0s
Parallel Phase #:64 [PDB_MIGRACION] Files:6 Time: 4s
Serial Phase #:65 [PDB_MIGRACION] Files:2 Time: 16s
Serial Phase #:66 [PDB_MIGRACION] Files:3 Time: 17s
**************** Upgrading ORDIM ***************
Restart Phase #:67 [PDB_MIGRACION] Files:1 Time: 0s
Serial Phase #:69 [PDB_MIGRACION] Files:1 Time: 2s
Parallel Phase #:70 [PDB_MIGRACION] Files:2 Time: 19s
Serial Phase #:71 [PDB_MIGRACION] Files:1 Time: 33s
Restart Phase #:72 [PDB_MIGRACION] Files:1 Time: 1s
Parallel Phase #:73 [PDB_MIGRACION] Files:2 Time: 9s
Serial Phase #:74 [PDB_MIGRACION] Files:2 Time: 2s
***************** Upgrading SDO ****************
Restart Phase #:75 [PDB_MIGRACION] Files:1 Time: 0s
Serial Phase #:77 [PDB_MIGRACION] Files:1 Time: 29s
Serial Phase #:78 [PDB_MIGRACION] Files:1 Time: 3s
Restart Phase #:79 [PDB_MIGRACION] Files:1 Time: 0s
Serial Phase #:80 [PDB_MIGRACION] Files:1 Time: 5s
Restart Phase #:81 [PDB_MIGRACION] Files:1 Time: 0s
Parallel Phase #:82 [PDB_MIGRACION] Files:3 Time: 37s
Restart Phase #:83 [PDB_MIGRACION] Files:1 Time: 0s
Serial Phase #:84 [PDB_MIGRACION] Files:1 Time: 5s
Restart Phase #:85 [PDB_MIGRACION] Files:1 Time: 0s
Serial Phase #:86 [PDB_MIGRACION] Files:1 Time: 6s
Restart Phase #:87 [PDB_MIGRACION] Files:1 Time: 1s
Parallel Phase #:88 [PDB_MIGRACION] Files:4 Time: 26s
Restart Phase #:89 [PDB_MIGRACION] Files:1 Time: 0s
Serial Phase #:90 [PDB_MIGRACION] Files:1 Time: 2s
Restart Phase #:91 [PDB_MIGRACION] Files:1 Time: 0s
Serial Phase #:92 [PDB_MIGRACION] Files:2 Time: 13s
Restart Phase #:93 [PDB_MIGRACION] Files:1 Time: 0s
Serial Phase #:94 [PDB_MIGRACION] Files:1 Time: 2s
Restart Phase #:95 [PDB_MIGRACION] Files:1 Time: 0s
******* Upgrading ODM, WK, EXF, RUL, XOQ *******
Serial Phase #:96 [PDB_MIGRACION] Files:1 Time: 10s
Restart Phase #:97 [PDB_MIGRACION] Files:1 Time: 0s
*********** Final Component scripts ***********
Serial Phase #:98 [PDB_MIGRACION] Files:1 Time: 3s
************* Final Upgrade scripts ************
Serial Phase #:99 [PDB_MIGRACION] Files:1 Time: 52s
******************* Migration ******************
Serial Phase #:100 [PDB_MIGRACION] Files:1 Time: 1s
*** End PDB Application Upgrade Pre-Shutdown ***
Serial Phase #:101 [PDB_MIGRACION] Files:1 Time: 2s
Serial Phase #:102 [PDB_MIGRACION] Files:1 Time: 9s
Serial Phase #:103 [PDB_MIGRACION] Files:1 Time: 21s
***************** Post Upgrade *****************
Serial Phase #:104 [PDB_MIGRACION] Files:1 Time: 4s
**************** Summary report ****************
Serial Phase #:105 [PDB_MIGRACION] Files:1 Time: 2s
*** End PDB Application Upgrade Post-Shutdown **
Serial Phase #:106 [PDB_MIGRACION] Files:1 Time: 1s
Serial Phase #:107 [PDB_MIGRACION] Files:1 Time: 2s
Serial Phase #:108 [PDB_MIGRACION] Files:1 Time: 0s
------------------------------------------------------
Phases [0-108] End Time:[2018_07_24 15:20:27]
Container Lists Inclusion:[PDB_MIGRACION] Exclusion:[NONE]
------------------------------------------------------
Grand Total Time: 1066s [PDB_MIGRACION]
LOG FILES: (/tmp/catupgrdpdb_migracion*.log)
Upgrade Summary Report Located in:
/tmp/upg_summary.log
Total Upgrade Time: [0d:0h:17m:46s]
Time: 1080s For PDB(s)
Grand Total Time: 1080s
LOG FILES: (/tmp/catupgrd*.log)
Grand Total Upgrade Time: [0d:0h:18m:0s]
[oracle@lab01 admin]$
[oracle@lab01 admin]$ sqlplus /nolog
SQL*Plus: Release 18.0.0.0.0 - Production on Tue Jul 24 15:30:02 2018
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected.
SQL> set linesize 200
SQL> /
CON_ID NAME OPEN_MODE
---------- --------------------------------------------------- ----------
2 PDB$SEED READ ONLY
3 PDB1 MOUNTED
4 PDB2 MOUNTED
5 PDB_MIGRACION MOUNTED
SQL> alter pluggable database PDB_MIGRACION open;
Pluggable database altered.
SQL> select con_id, name, open_mode from v$pdbs;
CON_ID NAME OPEN_MODE
---------- --------------------------------------------------- ----------
2 PDB$SEED READ ONLY
3 PDB1 MOUNTED
4 PDB2 MOUNTED
5 PDB_MIGRACION READ WRITE
Agregamos una nueva entrada al archivo de tnsnames.ora, para la conexión a la instancia nueva en 18c.
[oracle@lab01 admin]$ cd $ORACLE_HOME
[oracle@lab01 18.0]$ cd network/
[oracle@lab01 network]$ cd admin
[oracle@lab01 admin]$ vi tnsnames.ora
[oracle@lab01 admin]$ more tnsnames.ora
# tnsnames.ora Network Configuration File: /opt/app/oracle/product/18.0/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_CDB1 =
(ADDRESS = (PROTOCOL = TCP)(HOST = lab01)(PORT = 1521))
CDB1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = lab01)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = cdb1)
)
)
PDB1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = lab01)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pdb1)
)
)
PDB2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = lab01)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pdb2)
)
)
MIGRACION =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = lab01)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = migracion)
)
)
PDB_MIGRACION =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = lab01)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pdb_migracion)
)
)
[oracle@lab01 admin]$ tnsping pdb_migracion
TNS Ping Utility for Linux: Version 18.0.0.0.0 - Production on 26-JUL-2018 10:50:53
Copyright (c) 1997, 2018, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = lab01)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = pdb_migracion)))
OK (0 msec)
Probamos que nos podamos conectar sin problemas a la instancia acoplada.
[oracle@lab01 admin]$ sqlplus system/oracle@pdb_migracion
SQL*Plus: Release 18.0.0.0.0 - Production on Thu Jul 26 10:51:11 2018
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
Last Successful login time: Tue Jul 24 2018 14:23:09 -06:00
Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0
SQL>
No hay comentarios:
Publicar un comentario
Te agradezco tus comentarios. Te esperamos de vuelta.