1. - COMMAND
  2. from root: chown -R ora1025:dba /db/aas3m1p
  3. screen
  4. su – ora1025
  5. export ORACLE_SID=aas3m11p
  6. cd /MIGRAZIONE/export/aas3m11p/upgrade
  7. startup mount
  8. @rename_datafile_aas3m11p.sql
  9. alter database noarchivelog;
  10. alter database open upgrade;
  11. spool pre1025upgrade.log
  12. @?/rdbms/admin/utlu102i.sql
  13. spool off
  14. spool upgrade_1023_to_1025.log
  15. @?/rdbms/admin/catupgrd.sql
  16. spool off
  17. SHUTDOWN IMMEDIATE
  18. STARTUP
  19. @?/rdbms/admin/utlrp.sql
  20. spool post1025upgrade.log
  21. @?/rdbms/admin/utlu102s.sql
  22. spool off
  23. cd /MIGRAZIONE/export/aas3m11p/upgrade
  24. spool pre12Cupgrade.log
  25. @preupgrd.sql
  26. EXECUTE dbms_preup.purge_recyclebin_fixup;
  27. EXECUTE dbms_stats.gather_dictionary_stats;
  28. @preupgrd.sql
  29. check again file /appl/oracle/product/DE/10.2.0.5/OraBase/cfgtoollogs/aas3m11p/preupgrade/preupgrade.log
  30. IMPORTANT, check that fixup scripts are not empty!!! optionaly rerun preupgrade.sql again to generate them
  31. @/appl/oracle/product/DE/10.2.0.5/OraBase/cfgtoollogs/aas3m11p/preupgrade/preupgrade_fixups.sql
  32. /MIGRAZIONE/export/aas3m11p/upgrade/backup_full_pre12Cupgrade.sh
  33. shu immediate;
  34. END OF 10G
  35. correct /etc/oratab to point to new 12c OH
  36. from root: chown -R oas31212:dba /db/aas3m1p
  37. open new screen session and sudo to oas31212 user
  38. Set new oracle environment and check env|grep ORACLE and env|grep appl .. all path should point to new 12c HOME
  39. mv /db/aas3m1p/admin/diag/rdbms/aas3m11p/aas3m11p/trace/alert_aas3m11p.log /db/aas3m1p/admin/diag/rdbms/aas3m11p/aas3m11p/trace/alert_aas3m11p.log_bkp
  40. cd $ORACLE_HOME/rdbms/admin
  41. sqlplus '/ as sysdba'
  42. startup upgrade
  43. Exit
  44. $ORACLE_HOME/perl/bin/perl catctl.pl -n 30 -l /MIGRAZIONE/export/aas3m11p/upgrade/logs catupgrd.sql
  45. open another session and tail alert log file:
  46. tail -f /db/aas3m1p/admin/diag/rdbms/aas3m11p/aas3m11p/trace/alert_aas3m11p.log
  47. monitor alert log file (step 33) and upgrade logs
  48. grep ORA- /MIGRAZIONE/export/aas3m11p/upgrade/logs/*
  49. POST UPGRADE STEPS
  50. check upgrade logs for ORA- errors
  51. grep “Rem BEGIN catuppst.sql” /MIGRAZIONE/export/aas3m11p/upgrade/logs/*
  52. not shown, you must execute as per document
  53. startup database
  54. $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b utlrp -d '.' utlrp.sql
  55. SPOOL postupgrade.log
  56. @/appl/oracle/product/DE/10.2.0.5/OraBase/cfgtoollogs/aas3m11p/preupgrade/postupgrade_fixups.sql
  57. spool utlu121s_upg.log
  58. @?/rdbms/admin/utlu121s.sql
  59. $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b utluiobj -d '.' utluiobj.sql
  60. Drop all public db links
  61. select 'drop public database link '||db_link||';' from dba_db_links where owner='PUBLIC';
  62. 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
  63. @/MIGRAZIONE/export/aas3m11p/upgrade/drop_private_db_links.sql
  64. Check there is no db link in database anymore:
  65. select * from dba_db_links;
  66. check and correct /MIGRAZIONE/export/aas3m11p/upgrade/imp_schemas_backup.par to have latest export file and new log file and correct directory name!!!!
  67. @/MIGRAZIONE/export/aas3m11p/upgrade/STEP1_postupgrade_12c.sql
  68. /MIGRAZIONE/export/aas3m11p/upgrade/imp_schemas_backup.sh
  69. @/MIGRAZIONE/export/aas3m11p/upgrade/STEP2_postupgrade_12c.sql
  70. import db links from metadata export:
  71. Correct /MIGRAZIONE/export/aas3m11p/upgrade/imp_db_links.par > correct directory, dump file and log file
  72. Execute
  73. impdp \“\/ as sysdba\” parfile=imp_db_links.par
  74. Create following link manually as user does not have requested privileges and db link is not imported
  75. CREATE DATABASE LINK “DLAS3DE001” CONNECT TO “TAS3DE” IDENTIFIED BY “TAS3DE” USING 'ADE000';
  76. Create rman user:
  77. alter profile ADMIN_PROFILE limit PASSWORD_VERIFY_FUNCTION NULL;
  78. create user rman identified by sgana profile admin_profile;
  79. grant sysdba,connect to rman;
  80. alter profile ADMIN_PROFILE limit PASSWORD_VERIFY_FUNCTION VERIFYIBM;
  81. Execute 2x utlrp.sql
  82. @?/rdbms/admin/utlrp.sql
  83. Was addded to: MASTER_GRANTS_AAS3.sql
  84. grant select on sys.dba_role_privs to BIPORTALAS32;
  85. grant select on sys.dba_role_privs to BIPORTALAS33;