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)05/31 Report--
The main content of this article is to explain "what are the methods and steps to upgrade oracle silently". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what are the steps to upgrade oracle silently?"
1. 11.2.0.1 environment (database to be upgraded)
SQL > select * from v$version BANNER----Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit ProductionPL/SQL Release 11.2.0.1.0-ProductionCORE11.2.0.4. 0ProductionTNS for Linux: Version 11.2.0.1.0-ProductionNLSRTL Version 11.2.0.1.0-Production [root@localhost ~] # su-oracle [oracle@localhost ~] $cat .bash _ profile export ORACLE_SID=orclexport ORACLE_BASE=/u01/app/oracleexport ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libexport CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlibexport PATH=$ORACLE_HOME/ Bin:$PATH:$HOME/binalias sqlplus='rlwrap sqlplus'2 、 Preparatory work before upgrading
2.1. Back up the database
Upgrading the database is a risky process that requires careful planning and careful handling. First of all, it is necessary to make a full backup of the database, including data files, control files, archive files, log files, parameter files, password files and so on. You can back up the entire ORACLE_HOME directory and restore it if there is a problem with the upgrade. Backup methods can use dump data pump, tar,rman and so on.
Such as: RMAN complete
[oracle@localhost ~] $export ORACLE_SID= Oracle [oracle @ localhost ~] $rman target / RMAN > backup database format'/ home/oracle/rmanbak/df_%t_%s_%p.bak'
Back up the old ORACLE_HOME and oraInventory
[oracle@localhost ~] $tar-cvfp product.tar.gz / u01/app/oracle/ [oracle@localhost ~] $tar-cvfp oraInventory.tar.gz / u01/app/oraInventory/2.2, cleanly close database SQL > shutdown immediate;2.3, turn off database listening
During the upgrade of the database, the listening file of the database will be reconfigured. It is recommended to turn off listening normally, as follows:
[oracle@localhost ~] $lsnrctl stop [oracle@localhost ~] $netstat-an | grep 15212.4, close OEM
EM needs to be turned off during the upgrade
[oracle@localhost ~] $emctl stop dbconsole [oracle@localhost ~] $netstat-an | grep 11582.5, do not operate on any existing files in the database
During the upgrade, I edited the listening files of the database, resulting in configuration monitoring and EM errors, so I did not operate any original files of the database.
3. Install the oracle 11.2.0.4 software package
Upload the installation package of oracle 11.2.0.4 to the / home/oracle directory, unzip it and get the database directory.
[oracle@localhost ~] $lsp13390677_112040_Linux-x86-64_1of7.zip p13390677_112040_Linux-x86-642of7.zip[ oracle @ localhost ~] $unzip p13390677_112040_Linux-x86-641of7.zip[ oracle @ localhost ~] $unzip p13390677_112040_Linux-x86-642of7.zip[ oracle @ localhost ~] $lsdatabase
Start installing the database software 11.2.0.4.
[oracle@localhost] $cd database [oracle@localhost ~] $. / runInstaller-silent-debug-force-ignorePrereq\ DECLINE_SECURITY_UPDATES=true\ oracle.install.option=INSTALL_DB_SWONLY\ UNIX_GROUP_NAME=oinstall\ INVENTORY_LOCATION=/u01/app/oraInventory\ ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/dbhome_1\ ORACLE_BASE=/u01/app/oracle\ oracle.install.db.InstallEdition=EE\ oracle.install.db.DBA_GROUP=dba\ oracle.install.db.OPER_GROUP=oinstall
Note: INVENTORY_LOCATION can share a directory with older versions. ORACLE_BASE remains the same as the old version, and ORACLE_HOME points to a new directory, 11.2.0.4/dbhome_1 (formerly 11.2.0/db_1).
However, these directories can be specified at will, and I did it above just to facilitate version control.
The installation process takes about 15 minutes (depending on the model configuration time), and some i386 packages need to be installed when there is a warning [WARNING] during the installation process. Just view the log installation.
The following words indicate that the upgrade was successful.
As a root user, execute the following script (s): 1. / u01/oracle/app/product/11.2.0.4/dbhome_1/root.shSuccessfully Setup Software.
Switch to root user to execute the script.
[root@localhost ~] # / u01/oracle/app/product/11.2.0.4/dbhome_1/root.sh4, configure new environment variables, copy parameter files and listening files
4.1. configure the new environment variable [oracle@localhost ~] $whoami oracle [oracle@localhost ~] $cat .bash _ profile export ORACLE_SID=orclexport ORACLE_BASE=/u01/app/oracleexport ORACLE_HOME=$ORACLE_BASE/product/11.2.0.4/dbhome_1export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/libexport CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlibexport PATH=$ORACLE_HOME/bin:$PATH:$HOME/binalias sqlplus='rlwrap sqlplus'
As you can see above, I only modified one parameter of the new environment variable compared to the old one:
New parameter: ORACLE_HOME=$ORACLE_BASE/product/11.2.0.4/dbhome_1 old parameter: ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
Note: after 10g, it is generally not necessary to set LD_LIBRARY_PATH in the environment variable, but once you migrate the ORACLE_HOME to another directory, you also need to add this variable to the environment variable.
After source, the environment variable points to the newly installed location 11.2.0.4.
[oracle@localhost ~] $source .bash _ profile [oracle @ localhost ~] $env | grep ORAORACLE_SID=orclORACLE_BASE=/u01/app/oracleORACLE_HOME=/u01/app/oracle/product/11.2.0.4/dbhome_14.2, modify / etc/oratab content to the latest location [oracle@localhost ~] $vim / etc/orataborcl:/u01/app/oracle/product/11.2.0.4/db_1:N4.3, Copy the parameter file to the new directory [oracle@localhost ~] $cd / u01/app/oracle/product/11.2.0/db_1/dbs/ [Oracle @ localhost dbs] $cp-a * / u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/4.4, Copy the listening TNS configuration file to the new directory [oracle@localhost admin] $cd / u01/app/oracle/product/11.2.0/db_1/network/admin/ [Oracle @ localhost dbs] $cp-a * / u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin4.5, and start listening
First modify the path in the listener.ora under the new location, and then start listening.
[oracle@localhost admin] $lsnrctl start5, upgrade database
Be careful to exit oracle users and re-su-oracle, and then sqlplus can see the words 11.2.0.4.0.
[oracle@19_mysql-slave] $sqlplus / as sysdbaSQL*Plus: Release 11.2.0.4.0 Production on Mon Mar 30 12:10:30 2020Copyright (c) 1982, 2013, Oracle. All rights reserved.Connected to an idle instance.SQL > startup upgradeORACLE instance started.Total System Global Area 1603411968 bytesFixed Size 2253664 bytesVariable Size 1006636192 bytesDatabase Buffers 587202560 bytesRedo Buffers 7319552 bytesDatabase mounted.Database opened.SQL > @ $ORACLE_HOME/rdbms/admin/catupgrd.sql-the script will run for about 30 minutes
The above catupgrd.sql script runs for a full 30 minutes, and the database is shutdown immediate after execution. At this time, we can restart the database.
[oracle@localhost admin] $sqlplus / nologSQL > conn / as sysdbaSQL > startupSQL > select * from v$version BANNER----Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit ProductionPL/SQL Release 11.2.0.4.0-ProductionCORE 11.2.0. 4.0 ProductionTNS for Linux: Version 11.2.0.4.0-ProductionNLSRTL Version 11.2.0.4.0-Production6, Run utlrp.sql to compile the failed object
Check for invalid objects:
SQL > select * from dba_objects where status! = 'VALID';SQL > SELECT count (*) FROM dba_objects WHERE status='INVALID'
Run utlrp.sql to compile the failed object.
SQL > @? / rdbms/admin/utlrp
The script takes about 3 minutes. At this point, the database has been upgraded.
Finally, there is no problem with restarting the database is that the upgrade is successful.
7. Update database service script
Change the dbstart and dbshut,ORACLE_HOME_LISTNER=$1 under / u01/app/oracle/product/11.2.0.4/dbhome_1/bin/ to $ORACLE_HOME.
# ORACLE_HOME_LISTNER=$1ORACLE_HOME_LISTNER=$ORACLE_HOME8, check after upgrade to confirm SQL > select status from vastness instance status-OPEN # Note: after successfully opening the database, it will be OPEN, not OPEN MIGRATESQL > select * from v$version BANNER----Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit ProductionPL/SQL Release 11.2.0.4.0-ProductionCORE 11.2.0. 4.0 ProductionTNS for Linux: Version 11.2.0.4.0-ProductionNLSRTL Version 11.2.0.4.0-Production9, EM needs to be rebuilt after a successful upgrade (there is no EM to ignore this step)
Create the EM database manually:
# emca- reposdrop [oracle@localhost admin] $emca- reposdrop####emca-reposcreate [oracle@localhost admin] $emca- reposcreate # emca-config dbcontrol db [oracle@localhost admin] $emca-config dbcontrol db so far, I believe you have a better understanding of "what are the steps to upgrade oracle silently". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.