Skip to content

Oracle 18c – DBUA In Silent Mode

GOAL

How to Run DBUA in Silent mode ?

SOLUTION

You can use DBUA with the -silent command line option to carry out noninteractive (“silent”) upgrades.

In silent mode, DBUA does not present a user interface. DBUA writes messages (including information, errors, and warnings) to a log file in ORACLE_HOME/cfgtools/dbua/upgradesession_timestamp, where session_timestamp represents the timestamp for the upgrade that DBUA has run.

 

All the features of the Interactive DBUA are available in non-interactive as well ,some of those

  • It is the recommended method for performing Database upgrade at Release and patch level.
  • DBUA performs major release upgrade of oracle database that are supported for direct upgrade.
  • It performs all the upgrade tasks automatically.
  • DBUA performs preupgrade check and lists the unsatisfied prerequisites.
  • DBUA has option to upgrade timezone information, make user tablespaces to read only, take RMAN backup before upgrade starts.
  • DBUA also provides opportunity to restore database backup to rollback DB upgrade.
  • It can upgrade existing Listener to 18c or create new listener in 18c during upgrade.
  • DBUA shows progress of Upgrade activity in an enhanced manner.

 

DBUA captures all the activities in logs located at

If Oracle Base is set then the log files will be generated under $ORACLE_BASE/cfgtoollogs/dbua/upgradesession_<timestamp>/<SID>/

If Oracle Base is not set then the log files will be generated under $ORACLE_HOME/cfgtoollogs/dbua/upgradesession_<timestamp>/<SID>/

If Oracle Home is Read Only then the log files will be generated under $ORACLE_BASE/cfgtoollogs/dbua/upgradesession_<timestamp>/<SID>/

Note:
-l flag can be used for custom log directory.

 

Supported Oracle Versions for 18c Upgrade

 

  • DBUA can upgrade only supported versions of direct upgrade.

    Direct Upgrade to 18.x:

    Source Database Target Database
    11.2.0.3 and Higher 18.x
    12.1.0.x (12.1.0.1 – 12.1.0.2) 18.x
    12.2.0.1 18.x

     

    Indirect Upgrade to 18.x:

     
    Source Database Intermediate upgrade path Target database
    11.2.0.1/11.2.0.2 –> 11.2.0.3/11.2.0.4 –> 18.x
    11.1.0.6/11.1.0.7 –> 11.2.0.3/11.2.0.4 –> 18.x
    10.2.0.2, 10.2.0.3, 10.2.0.4, 10.2.0.5 –> 11.2.0.3/11.2.0.4/12.1.0.1/12.1.0.2 –> 18.x
    10.1.0.5 –> 11.2.0.3/11.2.0.4/12.1.0.1/12.1.0.2 –> 18.x
    9.2.0.8 or earlier –> 11.2.0.3/11.2.0.4 –> 18.x

DBUA Silent Mode

Execution steps:

When you run DBUA by using the command-line option, you can specify all valid DBUA options in a script form. The script form enables you to avoid entering configuration information in a graphic user interface dialog.

dbua -silent [<command> [options]]

-silent

-sid | -dbName

-sid

-dbName

Following are the possible options:

[-asmsnmpPassword ]

[-backupLocation ]

[-changeUserTablespacesReadOnly – <true | false> ]

[-createGRP – <true | false> ]

[-createListener – <true | false> ]

[-dbName  ]

[-oracleHome ]

[-sysDBAUserName ]

[-sysDBAPassword ]

[-dbsnmpPassword ]

[-disableUpgradeScriptLogging – <true | false> ]

[-emConfiguration – <DBEXPRESS | CENTRAL | BOTH | NONE>]

[-dbsnmpPassword ]

[-emPassword ]

[-emUser ]

[-emExpressPort ]

[-omsHost ]

[-omsPort ]

[-asmsnmpPassword ]

[-ignorePreReqs – <true | false> ]

[-ignoreScriptErrors – <true | false> ]

[-initParam ]

[-initParamsEscapeChar ]

[-excludeInitParams ]

[-keepDeprecatedParams – <true | false> ]

[-localListenerWithoutAlias ]

[-listeners ]

[-localRacSid ]

[-logDir ]

[-newGlobalDbName ]

[-newSid ]

[-oracleHomeUserPassword ]

[-pdbs ]

-sid | -dbName

-sid

[-oracleHome ]

[-sysDBAUserName ]

[-sysDBAPassword ]

-dbName

[-oracleHome ]

[-sysDBAUserName ]

[-sysDBAPassword ]

[-pdbsWithPriority ]

-sid | -dbName

-sid

[-oracleHome ]

[-sysDBAUserName ]

[-sysDBAPassword ]

-dbName

[-oracleHome ]

[-sysDBAUserName ]

[-sysDBAPassword ]

[-performFixUp – <true | false> ]

[-postUpgradeScripts ]

[-preUpgradeScripts ]

[-recompile_invalid_objects – <true | false> ]

[-upgrade_parallelism ]

[-upgradeTimezone – <true | false> ]

[-upgradeXML ]

[-useExistingBackup – <true | false> ]

[-useGRP ]

Below is the description of options / flags :

[-asmsnmpPassword – <Specify ASMSNMP user password>]
[-backupLocation – <Specify directory to back-up your database before starting the upgrade>]
[-changeUserTablespacesReadOnly – <true | false> Change user tablespaces read only for the duration of the upgrade.]
[-createGRP – <true | false> To create a guaranteed restore point when database is in archive log and flashback mode.]
[-createListener – <true | false> To create a listener in newer release Oracle home specify listenrName:lsnrPort.]
[-dbName – <Specify Database Name>]
[-oracleHome – <Specify the Oracle home path of the database>]
[-sysDBAUserName – <User name with SYSDBA privileges>]
[-sysDBAPassword – <Password for sysDBAUserName user name>]
[-dbsnmpPassword – <Specify DBSNMP user password>]
[-disableUpgradeScriptLogging – <true | false> This command disables the detailed log generation for running SQL scripts during the upgrade process. By default this is enabled. To enable the log generation, don’t specify this command.]
[-emConfiguration – <DBEXPRESS | CENTRAL | BOTH | NONE>]
[-dbsnmpPassword – <Specify DBSNMP user password>]
[-emPassword – <Specify EM admin user password>]
[-emUser – <Specify EM admin username to add or modify targets>]
[-emExpressPort – <Specify the port where EM Express will be configured>]
[-omsHost – <Specify EM management server host name>]
[-omsPort – <Specify EM management server port number>]
[-asmsnmpPassword – <Specify ASMSNMP user password>]
[-ignorePreReqs – <true | false> Ignore error conditions in pre-upgrade checks.]
[-ignoreScriptErrors – <true | false> Specify this flag for ignoring ORA errors during custom scripts.]
[-initParam – <Specify a comma separated list of initialization parameter values of the format name=value,name=value>]
[-initParamsEscapeChar – <Specify escape character for comma when a specific initParam has multiple values. If the escape character is not specified backslash is the default escape character>]
[-excludeInitParams – <Specify a comma separated list of initialization parameters to be excluded.>]
[-keepDeprecatedParams – <true | false> To retain deprecated parameters during database upgrade.]
[-localListenerWithoutAlias – To set LOCAL_LISTENER without TNS Alias.]
[-listeners – <To register the database with existing listeners, specify listeners by comma separated listenerName:Oracle Home. Listeners from lower release home are migrated to newer release home. Specifying -listeners lsnrName1,lsnrName2 or -listeners lsnrName1:<Oracle home path>,-listeners lsnrName2:<Oracle home path>, DBUA searches specified listeners from GI home (if configured), target home and source home>]
[-localRacSid – <Specify the local System Identifier of the cluster database if the cluster database is not registered in OCR>]
[-logDir – <Specify the path to a custom log directory>]
[-newGlobalDbName – <Specify New Global Database Name. This option can only be used for Oracle Express Edition upgrade>]
[-newSid – <Specify New System Identifier. This option can only be used for Oracle Express Edition upgrades>]
[-oracleHomeUserPassword – <Specify Oracle Home user password>]
[-pdbs – <Specify a comma separated list with the names of the pluggable databases (PDB) that will be upgraded. Specify ALL to select all or NONE to select none of the pluggable databases for upgrade>]
-sid | -dbName
-sid – <Specify System Identifier>
[-oracleHome – <Specify the Oracle home path of the database>]
[-sysDBAUserName – <User name with SYSDBA privileges>]
[-sysDBAPassword – <Password for sysDBAUserName user name>]
-dbName – <Specify Database Name>
[-oracleHome – <Specify the Oracle home path of the database>]
[-sysDBAUserName – <User name with SYSDBA privileges>]
[-sysDBAPassword – <Password for sysDBAUserName user name>]
[-pdbsWithPriority – <Specify a comma separated list of pluggable databases (PDB) to be upgraded along with its corresponding priorities (being 1 the top priority) of the format <pdb name>:<upgrade priority>,<pdb name>:<upgrade priority> >]
-sid | -dbName
-sid – <Specify System Identifier>
[-oracleHome – <Specify the Oracle home path of the database>]
[-sysDBAUserName – <User name with SYSDBA privileges>]
[-sysDBAPassword – <Password for sysDBAUserName user name>]
-dbName – <Specify Database Name>
[-oracleHome – <Specify the Oracle home path of the database>]
[-sysDBAUserName – <User name with SYSDBA privileges>]
[-sysDBAPassword – <Password for sysDBAUserName user name>]
[-performFixUp – <true | false> Enable or disable fix ups for the silent upgrade mode.]
[-postUpgradeScripts – <Specify a comma separated list of SQL scripts with their complete pathnames. These scripts will be executed at the end of the upgrade>]
[-preUpgradeScripts – <Specify a comma separated list of SQL scripts with their complete pathnames. These scripts will be executed before the upgrade>]
[-recompile_invalid_objects – <true | false> Recompile invalid objects as part of the upgrade.]
[-upgrade_parallelism – <Specify number of CPU’s to be used for parallel upgrade>]
[-upgradeTimezone – <true | false> Upgrade the timezone files of the database.]
[-upgradeXML – <Specify the path to the existing pre-upgrade XML file> This option only applies to in-place database upgrades.]
[-useExistingBackup – <true | false> To restore database using existing RMAN backup.]
[-useGRP – <Specify the name of the existing guaranteed restore point> To restore the database using a specified guaranteed restore point.]

Example

The following command selects the database orcl for upgrade using the noninteractive (“silent”) option:

dbua -silent -sid orcl

 

Few more Cases for Running DBUA in Noninteractive (”Silent”) Mode

dbua -silent -sid sidb112 -backupLocation /u01/sidb1123/backup -sysDBAUserName sys -sysDBAPassword <password> -oracleHome /u01/app/product/11.2.0/dbhome_1 -upgradeTimezone true

dbua -silent -sid sidb1123 -backupLocation /u01/sidb1123/backup -sysDBAUserName sys -sysDBAPassword <password> -oracleHome /u01/app/product/11.2.0/dbhome_1 -upgrade_parallelism 1 -upgradeTimezone true

dbua -silent -sid db1124 -backupLocation /u01/sidb1123/backup -sysDBAUserName sys -sysDBAPassword <password> -performFixUp true -upgradeTimezone true

dbua -silent -dbName rdbcdb -oracleHome /u01/app/product/11.2.0/dbhome_1 -sysDBAUserName sys -sysDBAPassword <password> -backupLocation /u01/sidb1123/backup -recompile_invalid_objects true -upgradeTimezone true

dbua -silent -dbName amdb -oracleHome /u01/app/product/11.2.0/dbhome_1 -sysDBAUserName sys -sysDBAPassword <password> -recompile_invalid_objects true -useGRP GRP_20170620bfupgrade -upgradeTimezone true

dbua -silent -dbName rdb121 -oracleHome /u01/app/product/12.1.0/dbhome_2 -sysDBAUserName sys -sysDBAPassword <password> -backupLocation /u01/sidb1123/backup -recompile_invalid_objects true -upgradeTimezone true

dbua -silent -dbName ronedb -oracleHome /u01/app/product/12.1.0/dbhome_2 -sysDBAUserName sys -sysDBAPassword <password> -changeUserTablespacesReadOnly true -recompile_invalid_objects true -upgradeTimezone true -createGRP true

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: