After Upgrading a Database
Step 37:
Shutdown the database and startup the database.
$ sqlplus '/as sysdba' SQL> shutdown SQL> startup restrict
Step 38:
Complete the Step 38 only if you upgraded your database from release 8.1.7. Otherwise skip to Step 39.
A) If you are not using N-type columns for user data, ie. the query
select distinct OWNER, TABLE_NAME from DBA_TAB_COLUMNS where DATA_TYPE in ('NCHAR','NVARCHAR2', 'NCLOB') and OWNER not in ('SYS','SYSTEM','XDB');
did not return rows in Step 6 of this note then:
$ sqlplus '/as sysdba' SQL> shutdown immediate
and go to step 40.
B) IF your version 8 NLS_NCHAR_CHARACTERSET was UTF8:
You can look up your previous NLS_NCHAR_CHARACTERSET using this select:
select * from nls_database_parameters where parameter ='NLS_SAVED_NCHAR_CS';
then:
$ sqlplus '/as sysdba' SQL> shutdown immediate
and go to step 40.
C) IF you are using N-type columns for *user* data *AND* your previous NLS_NCHAR_CHARACTERSET was in the following list:
JA16SJISFIXED , JA16EUCFIXED , JA16DBCSFIXED , ZHT32TRISFIXED KO16KSC5601FIXED , KO16DBCSFIXED , US16TSTFIXED , ZHS16CGB231280FIXED ZHS16GBKFIXED , ZHS16DBCSFIXED , ZHT16DBCSFIXED , ZHT16BIG5FIXED ZHT32EUCFIXED
then the N-type columns *data* need to be converted to AL16UTF16:
To upgrade user tables with N-type columns to AL16UTF16 run the script utlnchar.sql:
$ sqlplus '/as sysdba' SQL> @utlnchar.sql SQL> shutdown immediate;
go to step 40.
D) IF you are using N-type columns for *user* data *AND * your previous NLS_NCHAR_CHARACTERSET was *NOT* in the following list:
JA16SJISFIXED , JA16EUCFIXED , JA16DBCSFIXED , ZHT32TRISFIXED KO16KSC5601FIXED , KO16DBCSFIXED , US16TSTFIXED , ZHS16CGB231280FIXED ZHS16GBKFIXED , ZHS16DBCSFIXED , ZHT16DBCSFIXED , ZHT16BIG5FIXED ZHT32EUCFIXED
then import the data exported in point 8 of this note. The recommended NLS_LANG during import is simply the NLS_CHARACTERSET, not the NLS_NCHAR_CHARACTERSET
After the import:
$ sqlplus '/as sysdba' SQL> shutdown immediate;
go to step 40.
Step 39:
if you are upgrading from 8.1.7.4 skip to Step 40
If , while following,
Note 553812.1 Actions for the DSTv4 update in the 10.2.0.4 patchset Note 1086400.1 Actions for the DSTv4 update in the 10.2.0.5 patchset
utltzpv4.sql found rows then restore the rows you backed up now.
Check if a "select * from dba_scheduler_jobs;" from the sqlplus found in the oracle_home on the server (!!! this is important !!! - do NOT use a remote client) gives "ORA-01882: timezone region %s not found" , if so then you need to run Fix1882.sql mentioned in Note 414590.1. This will not harm the database.
Step 40:
Now edit the init.ora:
- If you changed the value for NLS_LENGTH_SEMANTICS from CHAR to BYTE prior to the upgrade (see step 21), set it back to CHAR. Otherwise, do not change the value of the parameter to CHAR without careful evaluation and testing. Switching to CHAR semantics can break application code. See Note:144808.1 for further information about the usage of this parameter.
- If you changed the value for CLUSTER_DATABASE from TRUE to FALSE prior to the upgrade, set it back to TRUE
Step 41:
Startup the database:
SQL> startup
Create a server parameter file with a initialization parameter file
SQL> create spfile from pfile;
This will create a spfile as a copy of the init.ora file located in the $ORACLE_HOME/dbs directory.
Step 42:
Modify the listener.ora file: For the upgraded intstance(s) modify the ORACLE_HOME parameter to point to the new ORACLE_HOME.
Step 43:
Start the listener
$ lsnrctl LSNRCTL> start
Step 44:
Enable cron and batch jobs.
Step 45:
Change oratab entry to use automatic startup SID:ORACLE_HOME:Y
|