You are on page 1of 12

Upgradation from Oracle 10g to 11g

--------------------------------------

10g (10.2.0.4.0) --- 11g(11.1.0.6.0)

source: Target:

------- -------

10g home is ........10.2.0/db_1 11g home is .........11.2.0/db_1

pfile is located in dbs/pfile pfile is located in dbs/pfile

prd

In a .bash_profile we can mention only one oracle-home.

To run more than one database we have to export ORACLE_HOME AND SID

Open one terminal

-----------------

Install Oracle 10g software

Open another terminal


---------------------

Install Oracle 11g software (11.1.0.6.0)

give the location

Oracle base location: /home/app/oracle

Oracle home location: /home/oracle/product/11.1.0/db_1

Next

How to check whether it is successfully or not

$vi .bash_profile

$. .bash_profile

$sqlplus '/as sysdba'

connected to an idle instance

sql>exit

$cd $ORACLE_HOME
$CD rdbms

$cd admin]ls |grep utlu111i.sql

utlu111i.sql

(it is there)

This script provides information database to be upgraded

admin]$

sql>spool up.lst

This script we have to execute from 10g

sql>@/home/oracle/product/11.1.0/db_1/rdbms/admin/utlu111i.sql;

purpose is for pre-upgrade information

sql>spool off
sql>host

$vi up.list

This script contains all upgrade information according to that we have to modify.

Min system tablespace size is 264MB

Min undotbs 428MB

adequote means no problem

change the compatible in parameter files10.2.0.4.0 to 11.1.0.6.0

shared_pool_size should be 224MB

rename db_block_buffers to db_cache_size

$echo $ORACLE_HOME

This belongs to 10g

$sqlplus '/as sysdba'


sql>select name from v$database;

PRD

sql>select tablespace_name, sum(bytes)/1024/1024

from dba_data_files group by tablespace_name;

here it will show the size

Here it will display 10g sizes

But u have to increase accoding ot the recommandations mentioned

in up.lst file

sql>select name from v$datafile;

PRD

sql>alter database datafile '/home/prd/system.dbf' resize 300m;

database altered

sql>alter database datafile '/home/prd/undoprd.dbf' resize 500m;


database altered

sql>select tablespace_name, sum(bytes)/1024/1024

from dba_data_files group by tablespace_name;

now the tablespace size is adjusted to their requirements

shutdown the database server

sql>shutdown immediate;

goto dbs directory

dbs]$vi initprd.ora

//dignostic_dest=/home/prd/dd (dd or anything)

shared_pool_size=230m

save and exit

connect to 10g home


#xhost +

#su - oracle

$vi .bash_profile

$. .bash_profile;

sql>select * from v$version;

10.2.0.4.0

sql>shut immediate;

sql>exit

$cd $ORACLE_HOME/dbs

initprd.ora

copy this initprd.ora into 11g

goto 10g dbs


dbs]$mv initprd.ora /home/oracle/product/11.1.0/db_2/dbs/

$cd

exit

#xhost +

su - oracle

vi .bash_profile

. .bash_profile

$cd $ORACLE_HOME/dbs

$vi initprd.ora

compatible =11.1.0.6.0

save and exit

dbs]$cd
$vi .bash_profile

$echo $ORACLE_HOME

/home/oracle/product/11.1.0/db_1

$. .bash_profile

$sqlplus '/as sysdba'

connected to an idle instance

sql>startup upgrade; (Restrict mode nobody can access)

sql> @?/rdbms/admin/catupgrd.sql;

or
sql>@/home/oracle/product/11.1.0/db_1/rdbms/admin/catupgrd.sql

This will take 30 min

sql>select count(*) from tab;

sql>host

$sql>startup upgrade;

sql>select count(*) from dba_objects where status='INVALID';

1 row selected

sql>@?rdbms/admin/utlrp.sql

again check for invalid objects


sql>select count(*) from dba_objects where status='INVALID';

count (*)

1 row selected

execute the post upgrade script

sql>@?rdbms/admin/utlu111s.sql

sql>shutdown immediate

sql>startup
----------done---------------------