- COMMAND
from root: chown -R ora1025:dba /db/aas3m1p
screen
su – ora1025
export ORACLE_SID=aas3m11p
cd /MIGRAZIONE/export/aas3m11p/upgrade
startup mount
@rename_datafile_aas3m11p.sql
alter database noarchivelog;
alter database open upgrade;
spool pre1025upgrade.log
@?/rdbms/admin/utlu102i.sql
spool off
spool upgrade_1023_to_1025.log
@?/rdbms/admin/catupgrd.sql
spool off
SHUTDOWN IMMEDIATE
STARTUP
@?/rdbms/admin/utlrp.sql
spool post1025upgrade.log
@?/rdbms/admin/utlu102s.sql
spool off
cd /MIGRAZIONE/export/aas3m11p/upgrade
spool pre12Cupgrade.log
@preupgrd.sql
EXECUTE dbms_preup.purge_recyclebin_fixup;
EXECUTE dbms_stats.gather_dictionary_stats;
@preupgrd.sql
check again file /appl/oracle/product/DE/10.2.0.5/OraBase/cfgtoollogs/aas3m11p/preupgrade/preupgrade.log
IMPORTANT, check that fixup scripts are not empty!!! optionaly rerun preupgrade.sql again to generate them
@/appl/oracle/product/DE/10.2.0.5/OraBase/cfgtoollogs/aas3m11p/preupgrade/preupgrade_fixups.sql
/MIGRAZIONE/export/aas3m11p/upgrade/backup_full_pre12Cupgrade.sh
shu immediate;
END OF 10G
correct /etc/oratab to point to new 12c OH
from root: chown -R oas31212:dba /db/aas3m1p
open new screen session and sudo to oas31212 user
Set new oracle environment and check env|grep ORACLE and env|grep appl .. all path should point to new 12c HOME
mv /db/aas3m1p/admin/diag/rdbms/aas3m11p/aas3m11p/trace/alert_aas3m11p.log /db/aas3m1p/admin/diag/rdbms/aas3m11p/aas3m11p/trace/alert_aas3m11p.log_bkp
cd $ORACLE_HOME/rdbms/admin
sqlplus '/ as sysdba'
startup upgrade
Exit
$ORACLE_HOME/perl/bin/perl catctl.pl -n 30 -l /MIGRAZIONE/export/aas3m11p/upgrade/logs catupgrd.sql
open another session and tail alert log file:
tail -f /db/aas3m1p/admin/diag/rdbms/aas3m11p/aas3m11p/trace/alert_aas3m11p.log
monitor alert log file (step 33) and upgrade logs
grep ORA- /MIGRAZIONE/export/aas3m11p/upgrade/logs/*
POST UPGRADE STEPS
check upgrade logs for ORA- errors
grep “Rem BEGIN catuppst.sql” /MIGRAZIONE/export/aas3m11p/upgrade/logs/*
not shown, you must execute as per document
startup database
$ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b utlrp -d '.
' utlrp.sql
SPOOL postupgrade.log
@/appl/oracle/product/DE/10.2.0.5/OraBase/cfgtoollogs/aas3m11p/preupgrade/postupgrade_fixups.sql
spool utlu121s_upg.log
@?/rdbms/admin/utlu121s.sql
$ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b utluiobj -d '.
' utluiobj.sql
Drop all public db links
select 'drop public database link '||db_link||';' from dba_db_links where owner='PUBLIC';
drop all db links (only private links can be dropped by this script): execute script and copy/paste result to sqlplus command line as sys
@/MIGRAZIONE/export/aas3m11p/upgrade/drop_private_db_links.sql
Check there is no db link in database anymore:
select * from dba_db_links;
check and correct /MIGRAZIONE/export/aas3m11p/upgrade/imp_schemas_backup.par to have latest export file and new log file and correct directory name!!!!
@/MIGRAZIONE/export/aas3m11p/upgrade/STEP1_postupgrade_12c.sql
/MIGRAZIONE/export/aas3m11p/upgrade/imp_schemas_backup.sh
@/MIGRAZIONE/export/aas3m11p/upgrade/STEP2_postupgrade_12c.sql
import db links from metadata export:
Correct /MIGRAZIONE/export/aas3m11p/upgrade/imp_db_links.par > correct directory, dump file and log file
Execute
impdp \“\/ as sysdba\” parfile=imp_db_links.par
Create following link manually as user does not have requested privileges and db link is not imported
CREATE DATABASE LINK “DLAS3DE001” CONNECT TO “TAS3DE” IDENTIFIED BY “TAS3DE” USING 'ADE000';
Create rman user:
alter profile ADMIN_PROFILE limit PASSWORD_VERIFY_FUNCTION NULL;
create user rman identified by sgana profile admin_profile;
grant sysdba,connect to rman;
alter profile ADMIN_PROFILE limit PASSWORD_VERIFY_FUNCTION VERIFYIBM;
Execute 2x utlrp.sql
@?/rdbms/admin/utlrp.sql
Was addded to: MASTER_GRANTS_AAS3.sql
grant select on sys.dba_role_privs to BIPORTALAS32;
grant select on sys.dba_role_privs to BIPORTALAS33;