Just for Refresh : Steps to upgrade Oracle from 11.1.0.6.0 to 11.1.0.7.0
steps to upgrade 11.1.0.6.0 to 11.1.0.7.0
Step1:
using winSCP or anyother tool copy the patch file p6890831_111070_Linux-x86-64.zip to the environment from the machine where you are having patch file.
Step2:
login : oracle
password:
Uncompress the binary source
$unzip p6890831_111070_Linux-x86-64.zip
Example:-
After unzipping , you can find the below folder Disk1
c111ptqhdd009: /home/oracle
$ cd /oracle/app/patches/
c111ptqhdd009: /oracle/app/patches
$ ls
Disk1 p6890831_111070_Linux-x86-64.zip
Step3:
Bring down the application
Step4:
login : oracle
password:
Bring down the database
sqlplus ‘/as sysdba’
sql>shutdown immediate;
sql>exit
>ps -ef |grep pmon
Make sure that oracle is not running
>lsnrctl stop
>lsnrctl status
Make sure that the listener is not running.
Take a cold database backup
Controlfiles, datafiles, redo logs, archive files, tempfiles must be included in the backup. If the files are in different paths, the same has to be backedup.
>mkdir /backup_date
>cp /App1/oracle/oradata/orcl/*.* /backup/backup_date
>cd $ORACLE_HOME/dbs
>cp inittest.ora inittest.ora_bkpdate
>cp spfiletest.ora spfiletest.or_bkpdate
>cp orapwtest.ora orapwtest.ora_bkpdate
(more…)
Oracle : Move datafile to different location
From time to time a DBA might need move an Oracle database datafile from one location to another. Reasons for this might include: I/O balancing for performance reasons, or to rectify incorrect naming standards.
Choose one of the following procedures based on the log mode of your database (select log_mode from sys.v_$database):
Database is in ARCHIVELOG mode
- Take the datafile offline with the “ALTER DATABASE DATAFILE ‘/old/location’ OFFLINE;” command.
- Copy or move the datafile to its new location. On Unix this can be done with the “dd” command.
Example:
dd if=/old/location of=/new/location bs=4096 SQL> ALTER DATABASE RENAME FILE '/old/location' TO '/new/location'; SQL> RECOVER DATAFILE '/new/location'; SQL> ALTER DATABASE DATAFILE '/new/location' ONLINE;
Database is in NOARCHIVELOG mode
- Shutdown the database
- Copy or move the datafile to its new location. On Unix this can be done with the “dd” command. Example:
dd if=/old/location of=/new/location bs=4096
- Start SQL*Plus, do a “STARTUP MOUNT” and rename the file:
SQL> ALTER DATABASE RENAME FILE '/old/location' TO '/new/location'; SQL> ALTER DATABASE OPEN;