Startup Upgrade Mode

What does the "startup upgrade" command do?  How is the startup upgrade different from a normal startup?

Answer:  Starting in 10g, the "startup upgrade" command is used during upgrade procedures.  It differs from a normal startup because only certain operations are permitted. Once the database is started in upgrade mode, only queries on fixed views execute without errors until after the catctl.pl script is run.  Before running catctl.pl, queries on any other view or the use of PL/SQL returns an error.

Start the database in upgrade mode for a multitenant container database (CDB):

SQL> alter pluggable database all open upgrade;

For a non-CDB issue this startup command:

SQL> startup upgrade

Pre-upgrade checks include:

SQL> STARTUP UPGRADE
SQL> SPOOL pre_upgrade_check.log
SQL> @?/rdbms/admin/utlu111i.sql
SQL> SPOOL OFF

########################

[oracle3@servername admin]$ cat utlip.sql

Rem Copyright (c) 1998, 2007, Oracle. All rights reserved.

Rem

Rem   NAME

Rem     utlip.sql - UTiLity script to Invalidate Pl/sql

Rem

Rem   DESCRIPTION

Rem

Rem     *WARNING*   *WARNING*  *WARNING*  *WARNING*  *WARNING*  *WARNING*

Rem     Do not run this script directly.

Rem

Rem     utlip.sql is automatically executed when required for database

Rem     upgrades.

Rem     Use utlirp.sql if you are looking to invalidate and recompile

Rem     PL/SQL for a 32-bit to 64-bit conversion. Use dbmsupgnv.sql

Rem     to convert all PL/SQL to NATIVE or dbmsupgin.sql to convert all

Rem     PL/SQL to INTERPRETED.

Rem

Rem     *WARNING*   *WARNING*  *WARNING*  *WARNING*  *WARNING*  *WARNING*

################


Also will share one issue,when we noticed multiple packages or plsql objects are getting invalid frequently then we can acutlay do the below sinario.

Stratup upgrade-->run utlirp.sql to make all plsql objects are invalidate-->then stratup normal mode -->run utlrp.

it will fix the issue.


No comments: