• No se han encontrado resultados

Identificación molecular

In document Universidad Nacional Mayor de San Marcos (página 80-86)

4. IDENTIFICACIÓN MOLECULAR DE LEVADURAS

6.7 Identificación molecular

In this practice, you simulate a migration cutover. The application (in your case sqlplus) is stopped after loading one more batch of GDP statistics. After verifying that there is no replication lag, you stop the Extract and then the Data Pump. On the remote node, which is about to host the new database for the application, after you verify that there is no lag, you stop the Replicat. Before allowing the application to use the new database, you begin capturing changes on the new database by enabling the fallback Extract, which will synchronize the old database with all SQL activity performed by the application.

Assumptions

Practices 8-1 and 8-2 have been completed and the fallback infrastructure is in place.

Tasks

1. Select the CDB12c window, where sqlplus is running. Connect to the simulapp schema (user simulapp). Execute the gdp_growth_by_year_2008.sql script, which will populate the GDP_GROWTH_BY_YEAR table with data for 2008. You are simulating the last activity on the old database before migration cutover.

SQL> connect simulapp/simulapp@ogg1 SQL> @gdp_growth_by_year_2008.sql

1 row created.

…Many lines omitted for brevity…

SQL> exit

Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

2. Exiting sqlplus symbolizes stopping the application. In a real-life production environment, all application server and external application connections to the database would be

stopped to prevent further activity on the database. The migration cutover has begun.

Select the OGG_SRC window. Enter the LAG command before stopping the Data Pump Extract:

GGSCI ([HOST] as C##OGG_ADMIN@CDB12c/CDB$ROOT) > info all Program Status Group Lag at Chkpt Time Since

GGSCI ([HOST] as C##OGG_ADMIN@CDB12c/CDB$ROOT) > stop extract ezdta

Oracle University and Error : You are not a Valid Partner use only

Sending STOP request to EXTRACT EZDTA ...

Request processed.

GGSCI ([HOST] as C##OGG_ADMIN@CDB12c/CDB$ROOT) > lag extract pzdta

Sending GETLAG request to EXTRACT PZDTA ...

Last record lag: 5 seconds.

At EOF, no more records to process.

GGSCI ([HOST] as C##OGG_ADMIN@CDB12c/CDB$ROOT) > stop extract pzdta

Sending STOP request to EXTRACT PZDTA ...

Request processed.

GGSCI ([HOST] as C##OGG_ADMIN@CDB12c/CDB$ROOT) > info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING

EXTRACT STOPPED EZDTA 00:00:00 00:03:16 EXTRACT STOPPED PZDTA 00:00:00 00:02:15 REPLICAT STOPPED RFBM 00:00:00 01:06:21

Oracle University and Error : You are not a Valid Partner use only

3. Select the OGG_TRG window. Enter a LAG command for the RZDTA Replicat group. If there is no lag, stop the Replicat:

GGSCI ([HOST] as C##OGG_DWNADM@DWNSTR/CDB$ROOT) > info all Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING

EXTRACT STOPPED EFBM 00:00:00 03:08:01 EXTRACT STOPPED PFBM 00:00:00 01:38:52 REPLICAT RUNNING RZDTA 00:00:00 00:00:07

GGSCI ([HOST] as C##OGG_DWNADM@DWNSTR/CDB$ROOT) > lag replicat rzdta

Sending GETLAG request to REPLICAT RZDTA ...

Last record lag: 7 seconds.

At EOF, no more records to process.

GGSCI ([HOST] as C##OGG_DWNADM@DWNSTR/CDB$ROOT) > stop replicat rzdta

Sending STOP request to REPLICAT RZDTA ...

Request processed.

4. The old database is not replicating information to the new database anymore. Before allowing the application to use the new database, you have to enable the Extract that synchronizes the new database with the old database.

GGSCI ([HOST] as C##OGG_DWNADM@DWNSTR/CDB$ROOT) > alter extract efbm, begin now

EXTRACT altered.

GGSCI ([HOST] as C##OGG_DWNADM@DWNSTR/CDB$ROOT) > start extract efbm

Sending START request to MANAGER ...

EXTRACT EFBM starting

GGSCI ([HOST] as C##OGG_DWNADM@DWNSTR/CDB$ROOT) > start extract pfbm

Sending START request to MANAGER ...

EXTRACT PFBM starting

GGSCI ([HOST] as C##OGG_DWNADM@DWNSTR/CDB$ROOT) > info all Program Status Group Lag at Chkpt Time Since Chkpt

Oracle University and Error : You are not a Valid Partner use only

EXTRACT RUNNING EFBM 00:00:00 00:00:05 EXTRACT RUNNING PFBM 00:00:00 20:45:21 REPLICAT STOPPED RZDTA 00:00:00 19:03:44

GGSCI ([HOST] as C##OGG_DWNADM@DWNSTR/CDB$ROOT) >

5. Select the OGG_SRC window, where GGSCI is connected to the replication source. You will start the RFBM Replicat so that the new database is replicated to the old database:

GGSCI ([HOST] as C##OGG_ADMIN@CDB12c/CDB$ROOT) > info all Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING

EXTRACT STOPPED EZDTA 00:00:00 19:26:13 EXTRACT STOPPED PZDTA 00:00:00 19:25:12 REPLICAT STOPPED RFBM 00:00:00 20:29:18

GGSCI ([HOST] as C##OGG_ADMIN@CDB12c/CDB$ROOT) > start replicat RFBM

Sending START request to MANAGER ...

REPLICAT RFBM starting

GGSCI ([HOST] as C##OGG_ADMIN@CDB12c/CDB$ROOT) > info all Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING

EXTRACT STOPPED EZDTA 00:00:00 19:29:31 EXTRACT STOPPED PZDTA 00:00:00 19:28:30 REPLICAT RUNNING RFBM 00:00:00 00:00:10

GGSCI ([HOST] as C##OGG_ADMIN@CDB12c/CDB$ROOT) >

6. The migration cutover has completed. You now allow the application to start using the new database. You simulate this by using sqlplus to connect to the “new” database, DWNSTR.

In real life, the Oracle RDBMS is accessed through middleware, for example, application servers. In this case, the JDBC connection strings are modified within the application server to force the client application to connect to the new database. Select the DWNSTR window and connect to the simulapp schema that is hosted on the oggdwn1 PDB. Execute the gdp_by_year_2009.sql and gdp_growth_by_year_2009.sql scripts to populate the GDP_BY_YEAR and GDP_GROWTH_BY_YEAR tables. Verify that the rows are correctly replicated to the old database, OGG1:

SQL> connect simulapp/simulapp@oggdwn1 Connected.

SQL> @gdp_by_year_2009.sql

Oracle University and Error : You are not a Valid Partner use only

1 row created.

…Many lines omitted for brevity…

SQL> @gdp_growth_by_year_2009.sql 1 row created.

…Many lines omitted for brevity…

SQL>

7. Connect to the “old” database and verify that GDP and GDP growth data for the year 2009 have been replicated. Select the CDB12c window and launch sqlplus, connecting to the simulapp schema in the ogg1 PDB database:

[OS prompt]$ sqlplus simulapp/simulapp@ogg1

SQL*Plus: Release 12.1.0.2.0 Production on Tue Mar 17 21:36:13 2015

Copyright (c) 1982, 2014, Oracle. All rights reserved.

Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> select max(gdp_year) from gdp_by_year;

MAX(GDP_YEAR) --- 2009

SQL> select max(gdp_year) from gdp_growth_by_year;

MAX(GDP_YEAR) --- 2009 SQL>

8. The simulated “application,” sqlplus, which is connected to the new database, has generated rows that have been successfully replicated to the old database.

This completes Practice 8-3. Continue with Practice 8-4.

Oracle University and Error : You are not a Valid Partner use only

Practice 8-4: Aborting the Migration

In document Universidad Nacional Mayor de San Marcos (página 80-86)

Documento similar