Uploaded by Thirumal Reddy

LINUX UPGRADE, PATCH AND HOME INSTALLATION sli1968

advertisement
This document represents the process of Home Installation, Upgrade and latest July security patch on
SLI1968.




CHANGE REQUEST PROCESS
HOME INSTALLATION
UPGRADE
LATEST JULY SECURITY PATCH
CHANGE REQUEST PROCESS
 Get the approvals and scheduled time from Application Owners.
 After approval, plan for a Change Request with one work order and task for Oracle team, one
task for alert team and one task for UNIX team.
 After approval of change request, Oracle DBA team can proceed with the activity at scheduled
time.
 During the scheduled time first alert team will snooze the alerts on the server
 Then application team will stop all the services that are running on the given server
 Once application services stopped, DBA team will proceed with the upgrade activity followed by
home installation
 After database activity gets completed, application team will restart the services and then alert
team will start the alerts again.
HOME INSTALLATION 11.2.0.4
 Need to set below paths for ORACLE_HOME,ORACLE_BASE,PATH before proceeding with the
activity.
export ORACLE_HOME=/d01/app/oracle/product/11.2.0.4/dbhome
export ORACLE_BASE=/d01/app/oracle
export ORATAB=/etc/oratab
export
PATH=$ORACLE_HOME/bin:/opt/bin:/bin:/usr/bin:/usr/ccs/bin:/GNU/bin/make:/usr/bin:/usr/local/bin
export
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib:/usr/openwin/lib:/usr/dt/lib:/usr
/ccs/lib
export TNS_ADMIN=/d01/app/oracle/product/11.2.0.4/dbhome/network
export TMPDIR=/tmp
 Place the home software at any location where space is available.
 Unzip the software and it will craete a folder called “DATABASE”.
 Go to database location and execute the runInstaller file using the below response file.
EXECUTE RESPONSE FILE USING BELOW COMMAND AND LOCATION
response2.txt
./runInstaller -ignoreSysPrereqs -ignorePrereq -waitforcompletion -showProgress -silent -responseFile
/d01/app/soft/database/response2.rsp
CHECK WHETHER HOME WAS INSTALLED SUCCESSFULLY OR NOT
DATABASE UPGRADE
 Ensure successful completion of last backup of database and home backup.
 Disable monitoring and jobs scheduled in crontab.
 Create one directory and place the pre-upgrade file utlu112i.sql which will be available in new
home /rdbms/admin location.
 Run this script in the present database and check for any recommendations like memory
parameters change and any new parameters needs to be added and check for compatibility.
 Check for invalid objects using the script utlrp.sql by running in current database.
 Validate the objects in case of any.
 Check for the file for any media recovery using below query.
SQL> select * from v$recover_file;
Query should return no rows
 Ensure no files are in backup mode by executing the following script as SYS:
SQL> select * from v$backup where status!='NOT ACTIVE';
Query should return no rows.
 To check if a standby database exists, issue the following query:
SQL> SELECT
SUBSTR(value,INSTR(value,'=',INSTR(UPPER(value),'SERVICE'))+1)
FROM v$parameter
WHERE name LIKE 'log_archive_dest%' AND UPPER(value) LIKE
'SERVICE%';
If this query returns a row, then sync the standby database with the Primary
database.
a. Make sure all the logs are transported to the standby server after a final log
switch in the primary.
b. Start the recovery of the standby database with the NODELAY option.
 It is REQUIRED that the recycle bin is empty before upgrading your database.
If there are any objects in recycle bin, purge them.
SQL> PURGE DBA_RECYCLEBIN;
 Create control file to trace using below statement
SQL> alter database backup controlfile to trace;
 Create pfile from spfile and place it new home location /dbs.
SQL> Create pfile from spfile;
 Shutdown listener
If a database specific listener exists, shutdown the listener. If the listener is a common
listener, then leave it running as not to affect other databases.
 Upgrade:




Shutdown the database.
Copy the edited pfile to the 11.2.0.4_64_EAMS Oracle Home dbs directory.
Change database entry in the oratab file by changing the entry pointing to new home
Confirm all environment variables are set to the Target 11gR2 directory:




ORA_SID (set to sid of database being upgraded)
ORACLE_HOME
ORACLE_BASE
PATH
 Start the database with all environment variables set in; change directory to
$ORACLE_HOME/rdbms/admin and start the database in upgrade mode:
$ cd $ORACLE_HOME/rdbms/admin
$ sqlplus /nolog
SQL> connect / as sysdba
SQL> startup upgrade
 Run the upgrade script from /admin location.
SQL> set echo on feedback on
SQL> @catupgrd.sql
NOTE! Upon completion, this script will shutdown the database.
 Start the database. With all environment variables set, change directory to
$ORACLE_HOME/rdbms/admin and start the database in normal mode:
$ cd $ORACLE_HOME/rdbms/admin
$ sqlplus /nolog
SQL> connect / as sysdba
…
SQL> startup
 Run database upgrade check script
$ cd $ORACLE_HOME/rdbms/admin
SQL> @utlu112s.sql
SQL> @$ORACLE_HOME/rdbms/admin/catuppst.sql
 Recompile invalid objects.
Recompile invalid objects with the script utlrp.sql:
SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql
 Restart the listener
SNAPSHOTS CAPTURED AFTER THE ACTIVITY:
TIME ZONE:
PATCH ACTIVITY
 Take the oraInventory file backup and full database backup for home.
 Next check the previous patches that was applied on server using below command
Oracle> opatch lsinventory
 From the above command you will get previous patches applied on that server.
 If the current patch is not installed and based on the client confirmation please proceed with
Latest patch apply
 Go to software location and unzip the patch software, you will get a folder with patch number.
 Check the Opatch version using opatch version. If the opatch version is higher or equal to
required version from readme file then you can proceed with patch apply directly and if is less
that required then you need to install the latest version by downloading from oracle support.
 Once above steps are done then follow below steps to patch apply
 Set the home path with below statement
export PATH=$ORACLE_HOME/bin:$PATH
export PATH=$ORACLE_HOME/OPatch:$PATH
 Go to patch folder location and apply below command.
Opatch apply <folder name>
 Once patch was applied successfully then check from below command whether patch was
applied successfully applied or not.
OPATCH CURRENT VERSION:
PATCHS APPLIED:
Download