In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
From: published on 08 / 07 / 2013 by Xifenfei
Contact: mobile (+ 86 13429648788) QQ (107644445)
Title: upgrade from 11GR2 to 12CR1 and insert CDB
Author: Fenfei ©all rights reserved [it may not be reproduced in any form without my consent, otherwise I have the right to pursue further legal liability]
ORACLE 12C has been released for more than ten days, one of the highlights is pdb, and there is no pdb in the database before 12C, that is to say, if you want to upgrade the previous database to 12C, and want the library to become a pdb, all you need to do is to upgrade the database from 12C to 12C, and then PLUG a NO-CDB database to CDB. This blog demonstrates that version 11.2.0.4 of ORACLE was unexpectedly released some time ago, upgraded to 12.1.0.1 and inserted into a cdb library.
ORACLE 12C upgrade version requirements
11.2.0.4 to 12.1.0.1 upgrade operation [upgrade overall reference document 1503653.1]
Current related component version information
SQL > select*fromv$version BANNER-OracleDatabase11g Enterprise Edition Release 11.2.0.4.0-64bit Production PL/SQL Release 11.2.0.4.0-Production CORE 11.2.0.4 .0 Production TNSforLinux: Version 11.2.0.4.0-Production NLSRTL Version 11.2.0.4.0-Production SQL > show parametername NAME TYPE VALUE-cell_offloadgroup_name string db_file_name_convert string db_name string ora11g db_unique_name string ora11g global_names boolean FALSE instance_name string ora11g lock_ Name_space string log_file_name_convert string processor_group_name string service_names string ora11g SQL > selectCOMP_NAME VERSION,STATUSfromdba_registry COMP_NAME VERSION STATUS-- OWB 11.2.0.4.0 VALID Oracle Application Express 3.2.1.00 . 12 VALID Spatial 11.2.0.4.0 VALID Oracle Multimedia 11.2.0.4.0 VALID Oracle XMLDatabase 11.2.0.4.0 VALID Oracle Text 11.2.0.4.0 VALID Oracle Expression Filter 11.2.0.4.0 VALID Oracle Rules Manager 11.2.0.4.0 VALID Oracle Workspace Manager 11.2.0.4.0 VALID OracleDatabaseCatalog Views 11.2.0.4.0 VALID OracleDatabasePackagesandTypes 11.2.0.4.0 VALID JServer JAVA Virtual Machine 11.2. 0.4.0 VALID Oracle XDK 11.2.0.4.0 VALID OracleDatabaseJava Packages 11.2.0.4.0 VALID OLAP Analytic Workspace 11.2.0.4.0 VALID Oracle OLAP API 11.2.0.4.0 VALID 16rowsselected.
Upgrade preparation work
Execute Pre-Upgrade Utility. For more information, please see Note 884522.1 How to Download and Run Oracle's Database Pre-Upgrade Utility.
SQL > @ / tmp/preupgrd.sql Loading Pre-Upgrade Package... Executing Pre-Upgrade Checks... Pre-Upgrade Checks Complete. * Results of the checks are located at: / u02/app/oracle/cfgtoollogs/ora11g/preupgrade/preupgrade.log Pre-Upgrade Fixup Script (runinsourcedatabase environment): / u02/app/oracle/cfgtoollogs/ora11g/preupgrade/preupgrade_fixups.sql Post-Upgrade Fixup Script ( Run shortly after upgrade): / u02/app/oracle/cfgtoollogs/ora11g/preupgrade/postupgrade_fixups.sql * * Fixup scripts must be reviewed prior to being executed. * * > > USER ACTION REQUIRED select*fromv$version BANNER CON_ID-OracleDatabase12c Enterprise Edition Release 12.1.0.1.0-64bit Production 0 PL/SQL Release 12.1. 0.1.0-Production 0 CORE 12.1.0.1.0 Production 0 TNSforLinux: Version 12.1.0.1.0-Production 0 NLSRTL Version 12.1.0.1.0-Production 0 SQL > selectCOMP_NAME VERSION,STATUSfromdba_registry COMP_NAME VERSION STATUS-Oracle Application Express 4.2.0.00.27 VALID OWB 11. 2.0.4.0 VALID Spatial 12.1.0.1.0 VALID Oracle Multimedia 12.1.0.1.0 VALID Oracle XMLDatabase 12.1.0.1.0 VALID Oracle Text 12.1.0.1.0 VALID Oracle Workspace Manager 12.1.0.1.0 VALID OracleDatabaseCatalog Views 12.1.0.1.0 VALID OracleDatabasePackagesandTypes 12.1.0.1.0 VALID JServer JAVA Virtual Machine 12.1.0.1.0 VALID Oracle XDK 12.1.0.1.0 VALID OracleDatabaseJava Packages 12 .1.0.1.0 VALID OLAP Analytic Workspace 12.1.0.1.0 VALID Oracle OLAP API 12.1.0.1.0 VALID 14rowsselected.
Comparison of oratab information before and after upgrade
Dbua is executed under the 12C environment variable shell. Be careful not to modify the oratab record manually, it will be automatically modified after execution.
-- before upgrading [oracle@xifenfei ~] $grepora11g/etc/oratab ora11g:/u02/app/oracle/product/11.2/db_1:N: # line added by Agent-- after upgrading [oracle@xifenfei ~] $grepora11g/etc/oratab ora11g:/u01/app/oracle/product/12.1/db_1:N: # line added by Agent
At this point, we can confirm that 11.2.0.4 has been successfully upgraded to 12.1.0.1, the upgrade process is relatively smooth, but the upgrade time is relatively long, which is probably related to my machine configuration.
NO-CDB PLUG CDB
Insert the database upgraded from 11.2.0.4 to 12.1.0.1 into a CDB database and make it part of CDB
Schematic diagram of PLUG operation
Database information after upgrade
SQL > selectcdb,NAME,dbidfromv$database; CDBNAME DBID-NO ORA11G 4215674657 SQL > select*fromv$version BANNER CON_ID-OracleDatabase12c Enterprise Edition Release 12.1.0.1.0-64bit Production 0 PL/SQL Release 12.1. 0.1.0-Production 0 CORE 12.1.0.1.0 Production 0 TNSforLinux: Version 12.1.0.1.0-Production 0 NLSRTL Version 12.1.0.1.0-Production 0
Create a XML metadata file
SQL > shutdown immediate Databaseclosed. Databasedismounted. ORACLE instance shut down. SQL > startup mount; ORACLE instance started. Total SystemGlobalArea 801701888 bytes FixedSize 2293496 bytes VariableSize 314573064 bytes DatabaseBuffers 478150656 bytes Redo Buffers 6684672 bytes Databasemounted. SQL > alterdatabaseopenreadonly; Databasealtered. SQL > EXECDBMS_PDB.DESCRIBE (pdb_descr_file = >'/ tmp/ora11g.xml'); PL/SQLproceduresuccessfully completed. SQL > shutdown immediate Databaseclosed. Databasedismounted. ORACLE instance shut down.
CDB database information
SQL > select*fromv$version BANNER CON_ID-OracleDatabase12c Enterprise Edition Release 12.1.0.1.0-64bit Production 0 PL/SQL Release 12.1. 0.1.0-Production 0 CORE 12.1.0.1.0 Production 0 TNSforLinux: Version 12.1.0.1.0-Production 0 NLSRTL Version 12.1.0.1.0-Production 0 SQL > show pdbs CON_ID CON_NAME OPENMODE RESTRICTED-2 PDB$SEED READONLY NO 3 PDB1 MOUNTED 4 PDB2 MOUNTED
Check whether the upgraded database is suitable for insertion into the cdb
SQL > setserveroutputon; declare compat boolean: = FALSE; begin compat: = dbms_pdb.check_plug_compatibility (pdb_descr_file = >'/ tmp/ora11g.xml'); if compat then dbms_output.put_line ('Yes'); else dbms_output.put_line (' No'); endif; end;SQL > 2 3 4 5 6 7 8 9 10 11 12 / No PL/SQLproceduresuccessfully completed.
Because this is the first time to insert, the display is No, so you can ignore the problem and continue to insert.
Insert no-cdb to cdb Library
SQL > CREATEPLUGGABLEDATABASEora11g USING'/tmp/ora11g.xml'NOCOPY; Pluggabledatabasecreated. SQL > show pdbs CON_ID CON_NAME OPENMODE RESTRICTED-2 PDB$SEED READONLY NO 3 PDB1 MOUNTED 4 PDB2 MOUNTED 5 ORA11G MOUNTED
According to the official document, if it is no-cdb plug cdb for the first time, you need to open the library first.
SQL > altersessionsetcontainer=ora11g; Session altered. SQL > alterdatabaseopen; alterdatabaseopen * ERRORatline 1: ORA-24344: successwithcompilation error SQL >! oerr ora 24344 24344, 00000, "successwithcompilation error" / * Cause: a sql/plsql compilation error occurred. / / * Action:ReturnOCI_SUCCESS_WITH_INFO alongwiththe error code SQL > show pdbs; CON_ID CON_NAME OPENMODE RESTRICTED-5 ORA11G READWRITE YES
ORA-24344 occurs, but the database is in normal open to read write mode, ignore the error and continue to execute
Execute noncdb_to_pdb script
SQL > altersessionsetcontainer=ora11g; Session altered. SQL > shutdown immediate PluggableDatabaseclosed. SQL > @ $ORACLE_HOME/rdbms/admin/noncdb_to_pdb.sql-when a Warning is encountered, the script automatically ignores the error and continues to execute. The problem will be fixed when the script is finally compiled, probably because some plslq exception SQL > alterpluggabledatabase "& pdbname" openrestricted; old 1:alterpluggabledatabase "& pdbname" openrestricted new 1:alterpluggabledatabase "ORA11G" openrestricted Warning: PDB alteredwitherrors.
Synchronize pdb information
[oracle@xifenfei] $sqlplus sys/xifenfei@ora11gassysdba SQL*Plus: Release 12.1.0.1.0 ProductiononMon Jul 1 03:05:42 2013 Copyright (c) 1982, 2013, Oracle. Allrights reserved. Connectedto: OracleDatabase12c Enterprise Edition Release 12.1.0.1.0-64bit Production Withthe Partitioning,RealApplication Clusters, Automatic Storage Management, OLAP, Advanced AnalyticsandRealApplication Testing options SYS% ora11g > alterpluggabledatabaseopenrestricted; Pluggabledatabasealtered. SYS% ora11g > execdbms_pdb.sync_pdb (); PL/SQLproceduresuccessfully completed. SYS% ora11g > alterpluggabledatabasecloseimmediate; Pluggabledatabasealtered. SYS% ora11g > alterpluggabledatabaseopen; Pluggabledatabasealtered.
Confirm that no-cdb plug cdb is successful
SYS% ora11g > conn / assysdba Connected. SYS% cdb1 > show pdbs CON_ID CON_NAME OPENMODE RESTRICTED-2 PDB$SEED READONLY NO 3 PDB1 MOUNTED 4 PDB2 MOUNTED 5 ORA11G READWRITENO
So far, the 11.2.0.4 database has been inserted into 12.1.0.1, and the 11GR2 has been transformed into a PDB in the CDB database.
Upgrade to Oracle 10.2.0.4ORACLE 12C PDB maintenance basis introduction expdp encounters ORA-39006/ORA-39213 failure resolution ORA-06553: PLS-801: internal error [56319] in-depth analysis of database version-related view settings pdb launches Oracle 10.2.0.x with cdb upgrade to 11.2.0.3ORACLE 12C PDB part of the functional test exp export Datagram EXP-00056/ORA-01403 error recovery accidentally deleted by rm Modification of props$.NLS_CHARACTERSET causes ORA-00900 abnormal recovery about ORACLE 11G password case sensitive conjecture (USER$.SPARE4) this entry is published on ORACLE 12C Oracle installation and upgrade catalog. Add a fixed link to your favorites.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.