Professional Documents
Culture Documents
Database Upgrade: 8i To 9i
Database Upgrade: 8i To 9i
NOTE:
Pre-Upgrade
List all objects that are not VALID before the upgrade.
Check for corruption in the dictionary. Use the following commands in sqlplus.
Select distinct(trunc(last_refresh))
from dba_snapshot_refresh_times;
lsnrctl stop
Ensure no files need media recovery and also are in backup mode. Following
commands should return no rows.
Commit;
Ensure the users sys and system have 'SYSTEM' as their default tablespace.
Optionally ensure the aud$ is in the system tablespace when auditing is enabled.
$ORACLE_HOME/dbs/orapw<SID>.
Shutdown the database
$ sqlplus “/ as sysdba”
SQL> Shutdown immediate
Make following changes in init.ora file (make a backup of the init.ora file before doing
these changes)
o Ensure that the shared_pool_size and the large_pool_size are at least 150 MB
If required copy the listener.ora and the tnsnames.ora to the new location
Update the oratab entry to set the new ORACLE_HOME and disable automatic startup:
<SID>:<new ORACLE_HOME>:N
Update the environment variables like ORACLE_HOME and PATH using .profile file.
For HP-UX systems verify the SHLIB_PATH parameter points to the new release
directories.
Change the permissions of all the database files, if you are using new o/s user for
upgrade.
Upgrade Process
$ cd $ORACLE_HOME/rdbms/admin
Sqlplus /nolog
SQL> Connect / as sysdba
Spool the output so you can take a look at possible errors after the upgrade:
Display the contents of the component registry to determine which components need
to be upgraded:
SQL> @cmpdbmig.sql
o Jserver JAVAVM
o Oracle XDK for Java
o Oracle 9i RAC
o Oracle Data Mining
o OLAP analytical Workspace
o Oracle 9i Java Packages
o Messaging Gateway
o Oracle Workspace Manager
o OLAP Catalog
o Oracle Label Security.
Post Upgrade
SQL> @utlrp
If there are still objects that are not valid after running the script run the following:
spool invalid_post.lst
spool off
Now compare the invalid objects in the above created file 'invalid_post.lst' with the
invalid objects before the database was upgraded (page 1, point 4)
o Modify the parameter log_archive_dest (specify only the path) Make sure it
ends with a '/' (remove the format)
o Modify the parameter log_archive_format and add the format that was
previously removed from the log_archive_dest
E.g log_archive_format = arch%t_SID_%s.log
$ sqlplus /nolog
SQL> Shutdown
This will create a spfile as a copy of the init.ora file located in the
$ORACLE_HOME/dbs directory.
For the upgraded intstance modify the ORACLE_HOME parameter to point to the new
ORACLE_HOME.
$ lsnrctl
LSNRCTL> start <listenername>
Check the rollback segments that are online to take then offline and drop.
NAME VALUE
------------------------------------ ---------
undo_management AUTO
undo_retention 9600
undo_suppress_errors TRUE
undo_tablespace UNDOTBS
To use the new features in 9i, change the compatible parameter to the new release.
When everything is well tested, update the compatible parameter in the init.ora and
restart the database with the new release number.
COMPATIBLE=9.0.X
Remove all the hidden parameters from pfile/spfile and bounce the database.
Parameters to remove –
Sort_area_size
sort_area_retained_size
Parameter to add –
workarea_size_policy
pga_aggregate_target
_average_dirties_half_life
_lm_statistics
allow_partial_sn_results
always_anti_join
always_semi_join
arch_io_slaves
b_tree_bitmap_plans
backup_disk_io_slaves
cache_size_threshold
cleanup_rollback_entries
close_cached_open_cursors
compatible_no_recovery
complex_view_merging
cpu_count
db_block_checkpoint_batch
db_block_lru_extended_statisti
db_block_lru_latches
db_block_lru_statistics
db_block_max_dirty_target
db_file_simultaneous_writes
delayed_logging_block_cleanout
discrete_transactions_enabled
distributed_lock_timeout
distributed_recovery_connectio
distributed_transactions
fast_full_scan_enabled
freeze_DB_for_fast_instance_re
gc_defer_time
gc_latches
gc_lck_procs
gc_releasable_locks
gc_rollback_locks
hash_multiblock_io_count
instance_nodeset
job_queue_interval
job_queue_keep_connections
large_pool_min_alloc
lgwr_io_slaves
lm_locks
lm_procs
lm_procs
lm_ress
lock_sga_areas
log_block_checksum
log_files
log_simultaneous_copies
log_small_entry_max_size
ogms_home
ops_admin_group
ops_interconnects
optimizer_percent_parallel
optimizer_search_limit
parallel_default_max_instances
parallel_min_message_pool
parallel_server_idle_time
parallel_transaction_resource_
push_join_predicate
row_cache_cursors
sequence_cache_entries
sequence_cache_hash_buckets
shared_pool_reserved_min_alloc
snapshot_refresh_interval
snapshot_refresh_keep_connecti
snapshot_refresh_processes
sort_direct_writes
sort_multiblock_read_count
sort_read_fac
sort_spacemap_size
sort_write_buffer_size
sort_write_buffers
spin_count
temporary_table_locks
text_enable
use_ism
dblink_encrypt_login
log_archive_buffers
log_archive_buffer_size
Deprecated parameters: