In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
One, unplug the previous version of CDB from the previous version of PDB
1. Run the pre-upgrade information tool on PDB.
For example, the location named PDB running in salespdbCDB $ORACLE_HOME_12.2:
$ORACLE_BASE/product/12.1.0/dbhome_1/jdk/bin/java-jar / u01/app/oracle/product/19.3.0/dbhome_1/rdbms/admin/preupgrade.jar dir / tmp-c salespdb
2. Preupgrade_fixups.sql runs on your source database
For example:
CONNECT / AS SYSDBASQL > ALTER SESSION SET CONTAINER=salespdb;SQL > @ / tmp/preupgrade_fixups.sql
3. Follow all the recommendations listed in the preupgrade.log
4 、 Oracle APEX
It is installed by default in 12.1.0.2.0, but not installed by default in 12.2.0.1.0. If you do not uninstall APEX, the pdb version 12.1.0.2.0 of plug in 12.2.0.1.0 will report the following ORA-65346 error:
Of course, if you are using APEX, you need to install APEX in 12.2.0.1.0 without uninstalling APEX in 12.1.0.2.0.
Uninstall method:
SQL > select COMP_ID, STATUS from DBA_REGISTRY where COMP_ID='APEX'; COMP_ID STATUS-- APEX VALID$ cd $ORACLE_HOME/apex$ sqlplus / as sysdbaSQL > @ apxremov_con.sql
5. Close the PDB to be unplugged
For example, turn off PDB salespdb using the following command:
SQL > ALTER PLUGGABLE DATABASE salespdb CLOSE
6. Log in to CDB$ROOT again:
CONNECT / AS SYSDBASQL > ALTER SESSION SET CONTAINER=CDB$ROOT
7. Use the following SQL command syntax to unplug the previous version of PDB, where the name of the pdbPDB and the location of the pathPDB XML file:
ALTER PLUGGABLE DATABASE salespdb UNPLUG INTO'/ home/oracle/salespdb.xml'
When the command completes, the following response is displayed:
8. Delete the pluggable database salespdb, but keep the data file.
Oracle recommends that you clear the remaining information in the CDB view after performing the salespdb procedure and avoid future problems. As a best practice guide, first back up PDB to the destination CDB, and then DROP issues commands on the source.
To delete the pluggable database, enter the following command:
SQL > DROP PLUGGABLE DATABASE salespdb KEEP DATAFILES
Insert an earlier version of PDB into a later version of CDB
1. Copy xml and data files
To insert PDB from an earlier version of CDB to an earlier version of CDB, use the following CREATE PLUGGABLE DATABASE command.
This procedure example shows how to insert PDB when using files managed by Oracle. For more information about inserting PDB, refer to the Oracle Database Administrator's Guide.
Connect to a later version of CDB. Insert an earlier version of PDB using the following SQL command, where pdbPDB path is the name of the PDB and the path where the PDB XML file is located:
2. Create pdb
CREATE PLUGGABLE DATABASE salespdb USING'/ home/oracle/salespdb.xml' SOURCE_FILE_NAME_CONVERT= ('/ u01 *
Due to APEX
Solution: since APEX is not uninstalled during unplugging, you can delete the
But there will be a lot of mistakes in the future.
When the command completes, the following response is displayed:
Upgrade an earlier version of PDB to a later version
PDB opened in UPGRADE mode uses Parallel Upgrade Utility to upgrade an earlier release of PDB to the release level of CDB.
1. Switch to upgrade PDB
For example, enter the following command to switch to PDB salespdb:
SQL > ALTER SESSION SET CONTAINER=salespdb
2. Open PDB in upgrade mode.
SQL > ALTER PLUGGABLE DATABASE OPEN UPGRADE
3. Use the "parallel upgrade Utility" command (catctl.pl or shell utility dbupgrade) to upgrade PDB.
When upgrading PDB, use the commands that are usually used in parallel with Parallel Upgrade Utility. However, you can also add options to specify the PDB to upgrade. As shown in the following example, use the name of the PDB uppercase PDB:-c PDBnamesalespdb
$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catctl.pl-d\ $ORACLE_HOME/rdbms/admin-c 'salespdb'-l $ORACLE_BASE catupgrd.sql
4. View the results
The default file path for the log is in path, where the Oracle base path, the database name, and the date and time of the upgrade. The date and time strings are in the string format YYYY MM DD HH MM SC, where YYYY represents the year, MM represents the month, DD represents the day, HH represents hours, MM represents minutes, and SC represents seconds. Oracle_base/cfgtoollogs/dbname/upgradedatetimeOracle_basedbnameupgradedatetime for example:
5. Log in to SQL * Plus, then open PDB to perform the upgraded revision, and recompile the objects in the INVALID database:
SQL > STARTUP;SQL > ALTER SESSION SET CONTAINER=salespdb
6. Use the utility catcon.pl to run the script postupgrade_fixups.sql:
@ / tmp/postupgrade_fixups.sql
7. Use this utility to run from the directory catcon.pl:
@ $ORACLE_HOME/rdbms/admin/utlrp.sql
The script recompiles the objects in the INVALID database and places the log file named comp0.log in the current directory.
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.