Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to analyze the DG problem encountered in Oracle 12c PDB

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

How to analyze the DG problem encountered in Oracle 12c PDB, aiming at this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

PDB in Oracle 12c suddenly complicates the format of the data file, so Data Guard is necessary. Once a problem occurs, the lost database is global. I didn't expect to encounter some minor problems when building Data Guard.

The problem stems from the creation of a PDB. After I built the Data Guard earlier, there was no problem with the log application of the master and slave libraries. After a few days, I added another PDB according to the needs and imported some data supplies for use. The data file was created as required and then the data was imported, but looking at the status of the standby library found that the MRP exception stopped.

The status of DG Broker detection is as follows:

DGMGRL > show configuration

Configuration-dg_testdb

Protection Mode: MaxPerformance

Members:

Testdb-Primary database

S2testdb-Physical standby database

Error: ORA-16766: Redo Apply is stopped

Fast-Start Failover: DISABLED

Configuration Status:

ERROR (status updated 6 seconds ago)

DGMGRL >

The error log of the repository is as follows:

You can see that the creation failed because the slave database does not have a corresponding path, but the error is characterized by the following error message:

Automatic Copy of Standby datafiles for create pdb failed with error-65169. Files need to be copied manually

The slave database can view the status information of PDB as follows. There is a problem with the PDB of TBILLMOB.

SQL > show pdbs

CON_ID CON_NAME OPEN MODE RESTRICTED

-

2 PDB$SEED READ ONLY NO

3 TCYMOB0 READ ONLY NO

4 MACTVDB READ ONLY NO

5 TBILLMOB MOUNTED

If you try to switch containers, an error is thrown.

SQL > alter session set container=TBILLMOB

ERROR:

ORA-65011: Pluggable database TBILLMOB does not exist.

This error looks at MetaLink and does not give any other suggestions, which is obviously different from 11g's handling. We have no choice but to fix the problem first, that is, export from the main library and restore from the standby database.

At this time, the problem comes, when the main library backup, how to select the corresponding data file, in which PDB and so on.

Use RMAN to complete a specific backup. It needs to be stated here that there is a default new system user sysbackup in 12c.

Rman target'"/ as sysbackup"'

Check the schema information as follows, it turns out that this is how it is marked.

Because the newly created PDB data file is not synchronized at all, it can be backed up directly.

RMAN > backup format'/ tmp/pdb_tbillmob.dmp' pluggable database tbillmob

Restore and restore on the repository, assuming the backup set and control files are under / tmp.

RMAN > catalog start with'/ tmp'

RMAN > restore pluggable database tbillmob from'/ tmp/pdb_tbillmob.dmp'

Starting restore at 2016-10-25 11:32:18

Allocated channel: ORA_DISK_1

Channel ORA_DISK_1: SID=2838 device type=DISK

RMAN-00571: =

RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =

RMAN-00571: =

RMAN-03002: failure of restore command at 10/25/2016 11:32:19

RMAN-06509: only SPFILE or control file can be restored from AUTOBACKUP

The right way is like this.

RMAN > restore pluggable database tbillmob

After the restore, open the log application.

SQL > recover managed standby database disconnect from session

Open the reserve library.

SQL > alter database open

Try to open all PDB

SQL > alter pluggable database all open

Pluggable database altered.

Check the status of PDB as follows:

SQL > show pdbs

CON_ID CON_NAME OPEN MODE RESTRICTED

-

2 PDB$SEED READ ONLY NO

3 TCYMOB0 READ ONLY NO

4 MACTVDB READ ONLY NO

5 TBILLMOB READ ONLY NO

If you check it again, the relationship between the master and standby will be normal.

DGMGRL > show configuration

Configuration-dg_testdb

Protection Mode: MaxPerformance

Members:

Testdb-Primary database

S2testdb-Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:

SUCCESS (status updated 51 seconds ago)

DGMGRL >

On this basis, we further test that a test directory is re-created under the directory of the main library PDB, and the standby library does not exist to see if adding data files will be successful.

Mkdir-p / home/U01/app/oracle/oradata/testdb/pdb/tbillmob/test

SQL > alter tablespace users add datafile'/ home/U01/app/oracle/oradata/testdb/pdb/tbillmob/test/users02.dbf'size 10m

View the information of the repository as follows:

Of course I operate under the premise of standby_file_management=auto. If it is standby_file_management=manual, there are still some differences.

This is the answer to the question about how to analyze the DG problem encountered in Oracle 12c PDB. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report