Anuj Singh Oracle DBA

Search This Blog

Total Pageviews

Tuesday, 1 September 2026

oracle 26ai dbca.rsp file




 cat dbca.rsp
##############################################################################
##                                                                          ##
##                            DBCA response file                            ##
##                            ------------------                            ##
## Copyright(c) Oracle Corporation 1998,2026. All rights reserved.         ##
##                                                                          ##
## Specify values for the variables listed below to customize               ##
## your installation.                                                       ##
##                                                                          ##
## Each variable is associated with a comment. The comment                  ##
## can help to populate the variables with the appropriate                  ##
## values.                                                                  ##
##                                                                          ##
## IMPORTANT NOTE: This file contains plain text passwords and              ##
## should be secured to have read permission only by oracle user            ##
## or db administrator who owns this installation.                          ##
##############################################################################
#-------------------------------------------------------------------------------
# Do not change the following system generated value.
#-------------------------------------------------------------------------------
responseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v23.0.0

#-----------------------------------------------------------------------------
# Name          : gdbName
# Datatype      : String
# Description   : Global database name of the database
# Valid values  : . - when database domain isn't NULL
#                              - when database domain is NULL
# Default value : None
# Mandatory     : Yes
#-----------------------------------------------------------------------------
gdbName=orcl.localdomain

#-----------------------------------------------------------------------------
# Name          : sid
# Datatype      : String
# Description   : System identifier (SID) of the database
# Valid values  : Check Oracle12c Administrator's Guide
# Default value :  specified in GDBNAME
# Mandatory     : No
#-----------------------------------------------------------------------------
sid=orcl

#-----------------------------------------------------------------------------
# Name          : databaseConfigType
# Datatype      : String
# Description   : database conf type as Single Instance, Real Application Cluster, Real Application Cluster One Nodes database or Standard Edition High Availability
# Valid values  : SI\RAC\RACONENODE\SEHA
# Default value : SI
# Mandatory     : No
#-----------------------------------------------------------------------------
databaseConfigType=SI

#-----------------------------------------------------------------------------
# Name          : RACOneNodeServiceName
# Datatype      : String
# Description   : Service is required by application to connect to RAC One
#                 Node Database
# Valid values  : Service Name
# Default value : None
# Mandatory     : No [required in case DATABASECONFTYPE is set to RACONENODE ]
#-----------------------------------------------------------------------------
RACOneNodeServiceName=

#-----------------------------------------------------------------------------
# Name          : sehaServiceName
# Datatype      : String
# Description   : Service is required by application to connect to SEHA Database
# Valid values  : SEHA Service Name
# Default value : None
# Mandatory     : No [required in case DATABASECONFTYPE is set to SEHA ]
#-----------------------------------------------------------------------------
sehaServiceName=

#-----------------------------------------------------------------------------
# Name          : policyManaged
# Datatype      : Boolean
# Description   : Set to true if Database is policy managed and
#                 set to false if  Database is admin managed
# Valid values  : TRUE\FALSE
# Default value : FALSE
# Mandatory     : No
#-----------------------------------------------------------------------------
policyManaged=false

#-----------------------------------------------------------------------------
# Name          : managementPolicy
# Datatype      : String
# Description   : Set to AUTOMATIC or RANK based on management policy.
# Valid values  : AUTOMATIC\RANK
# Default value : AUTOMATIC
# Mandatory     : No
#-----------------------------------------------------------------------------
managementPolicy=AUTOMATIC

#-----------------------------------------------------------------------------
# Name          : createServerPool
# Datatype      : Boolean
# Description   : Set to true if new server pool need to be created for database
#                 if this option is specified then the newly created database
#                 will use this newly created serverpool.
#                 Multiple serverpoolname can not be specified for database
# Valid values  : TRUE\FALSE
# Default value : FALSE
# Mandatory     : No
#-----------------------------------------------------------------------------
createServerPool=false

#-----------------------------------------------------------------------------
# Name          : serverPoolName
# Datatype      : String
# Description   : Only one serverpool name need to be specified
#                  if Create Server Pool option is specified.
#                  Comma-separated list of Serverpool names if db need to use
#                  multiple Server pool
# Valid values  : ServerPool name

# Default value : None
# Mandatory     : No [required in case of RAC service centric database]
#-----------------------------------------------------------------------------
serverPoolName=

#-----------------------------------------------------------------------------
# Name          : cardinality
# Datatype      : Number
# Description   : Specify Cardinality for create server pool operation

# Valid values  : any positive Integer value
# Default value : Number of qualified nodes on cluster
# Mandatory     : No [Required when a new serverpool need to be created]
#-----------------------------------------------------------------------------
cardinality=

#-----------------------------------------------------------------------------
# Name          : force
# Datatype      : Boolean
# Description   : Set to true if new server pool need to be created by force
#                 if this option is specified then the newly created serverpool
#                 will be assigned server even if no free servers are available.
#                 This may affect already running database.
#                 This flag can be specified for Admin managed as well as policy managed db.
# Valid values  : TRUE\FALSE
# Default value : FALSE
# Mandatory     : No
#-----------------------------------------------------------------------------
force=false

#-----------------------------------------------------------------------------
# Name          : pqPoolName
# Datatype      : String
# Description   : Only one serverpool name needs to be specified
#                  if create server pool option is specified.
#                  Comma-separated list of serverpool names if use
#                  server pool. This is required to
#                  create Parallel Query (PQ) database. Applicable to Big Cluster
# Valid values  :  Parallel Query (PQ) pool name
# Default value : None
# Mandatory     : No [required in case of RAC service centric database]
#-----------------------------------------------------------------------------
pqPoolName=

#-----------------------------------------------------------------------------
# Name          : pqCardinality
# Datatype      : Number
# Description   : Specify Cardinality for create server pool operation.
#                 Applicable to Big Cluster
# Valid values  : any positive Integer value
# Default value : Number of qualified nodes on cluster
# Mandatory     : No [Required when a new serverpool need to be created]
#-----------------------------------------------------------------------------
pqCardinality=

#-----------------------------------------------------------------------------
# Name          : createAsContainerDatabase
# Datatype      : boolean
# Description   : flag to create database as container database
# Valid values  : Check Oracle12c Administrator's Guide
# Default value : false
# Mandatory     : No
#-----------------------------------------------------------------------------
createAsContainerDatabase=true

#-----------------------------------------------------------------------------
# Name          : numberOfPDBs
# Datatype      : Number
# Description   : Specify the number of pdb to be created
# Valid values  : 0 to 252
# Default value : 0
# Mandatory     : No
#-----------------------------------------------------------------------------
numberOfPDBs=1

#-----------------------------------------------------------------------------
# Name          : pdbName
# Datatype      : String
# Description   : Specify the pdbname/pdbanme prefix if one or more pdb need to be created
# Valid values  : Check Oracle12c Administrator's Guide
# Default value : None
# Mandatory     : No
#-----------------------------------------------------------------------------
pdbName=vihaan2

#-----------------------------------------------------------------------------
# Name          : useLocalUndoForPDBs
# Datatype      : boolean
# Description   : Flag to create local undo tablespace for all PDB's.
# Valid values  : TRUE\FALSE
# Default value : TRUE
# Mandatory     : No
#-----------------------------------------------------------------------------
useLocalUndoForPDBs=true

#-----------------------------------------------------------------------------
# Name          : pdbAdminPassword
# Datatype      : String
# Description   : PDB Administrator user password
# Valid values  : Check Oracle12c Administrator's Guide
# Default value : None
# Mandatory     : No
#-----------------------------------------------------------------------------

pdbAdminPassword=

#-----------------------------------------------------------------------------
# Name          : nodelist
# Datatype      : String
# Description   : Comma-separated list of cluster nodes
# Valid values  : Cluster node names
# Default value : None
# Mandatory     : No (Yes for RAC database-centric database )
#-----------------------------------------------------------------------------
nodelist=

#-----------------------------------------------------------------------------
# Name          : sehaNodeList
# Datatype      : String
# Description   : Comma-separated list of cluster nodes
# Valid values  : Cluster node names
# Default value : None
# Mandatory     : No (Yes for SEHA database)
#-----------------------------------------------------------------------------
sehaNodeList=

#-----------------------------------------------------------------------------
# Name          : templateName
# Datatype      : String
# Description   : Name of the template
# Valid values  : Template file name
# Default value : None
# Mandatory     : Yes
#-----------------------------------------------------------------------------
templateName=/u01/app/oracle/product/26.3.0/db/assistants/dbca/templates/General_Purpose.dbc

#-----------------------------------------------------------------------------
# Name          : sysPassword
# Datatype      : String
# Description   : Password for SYS user
# Valid values  : Check Oracle12c Administrator's Guide
# Default value : None
# Mandatory     : Yes
#-----------------------------------------------------------------------------
sysPassword=

#-----------------------------------------------------------------------------
# Name          : systemPassword
# Datatype      : String
# Description   : Password for SYSTEM user
# Valid values  : Check Oracle12c Administrator's Guide
# Default value : None
# Mandatory     : Yes
#-----------------------------------------------------------------------------
systemPassword=

#-----------------------------------------------------------------------------
# Name          : serviceUserPassword
# Datatype      : String
# Description   : Password for Windows Service user
# Default value : None
# Mandatory     : If Oracle home is installed with windows service user
#-----------------------------------------------------------------------------
serviceUserPassword=

#-----------------------------------------------------------------------------
# Name          : emConfiguration
# Datatype      : String
# Description   : Enterprise Manager Configuration Type
# Valid values  : CENTRAL|NONE
# Default value : NONE
# Mandatory     : No
#-----------------------------------------------------------------------------
emConfiguration=

#-----------------------------------------------------------------------------
# Name          : runCVUChecks
# Datatype      : Boolean
# Description   : Specify whether to run Cluster Verification Utility checks
#                 periodically in Cluster environment
# Valid values  : TRUE\FALSE
# Default value : FALSE
# Mandatory     : No
#-----------------------------------------------------------------------------
runCVUChecks=FALSE

#-----------------------------------------------------------------------------
# Name          : dbsnmpPassword
# Datatype      : String
# Description   : Password for DBSNMP user
# Valid values  : Check Oracle12c Administrator's Guide
# Default value : None
# Mandatory     : Yes, if emConfiguration is specified or
#                 the value of runCVUChecks is TRUE
#-----------------------------------------------------------------------------
dbsnmpPassword=

#-----------------------------------------------------------------------------
# Name          : omsHost
# Datatype      : String
# Description   : EM management server host name
# Default value : None
# Mandatory     : Yes, if CENTRAL is specified for emConfiguration
#-----------------------------------------------------------------------------
omsHost=

#-----------------------------------------------------------------------------
# Name          : omsPort
# Datatype      : Number
# Description   : EM management server port number
# Default value : None
# Mandatory     : Yes, if CENTRAL is specified for emConfiguration
#-----------------------------------------------------------------------------
omsPort=0

#-----------------------------------------------------------------------------
# Name          : emUser
# Datatype      : String
# Description   : EM Admin username to add or modify targets
# Default value : None
# Mandatory     : Yes, if CENTRAL is specified for emConfiguration
#-----------------------------------------------------------------------------
emUser=

#-----------------------------------------------------------------------------
# Name          : emPassword
# Datatype      : String
# Description   : EM Admin user password
# Default value : None
# Mandatory     : Yes, if CENTRAL is specified for emConfiguration
#-----------------------------------------------------------------------------
emPassword=

#-----------------------------------------------------------------------------
# Name          : dvConfiguration
# Datatype      : Boolean
# Description   : Specify "True" to configure and enable Oracle Database vault
# Valid values  : True/False
# Default value : False
# Mandatory     : No
#-----------------------------------------------------------------------------
dvConfiguration=false

#-----------------------------------------------------------------------------
# Name          : dvUserName
# Datatype      : String
# Description   : DataVault Owner
# Valid values  : Check Oracle12c Administrator's Guide
# Default value : None
# Mandatory     : Yes, if DataVault option is chosen
#-----------------------------------------------------------------------------
dvUserName=

#-----------------------------------------------------------------------------
# Name          : dvUserPassword
# Datatype      : String
# Description   : Password for DataVault Owner
# Valid values  : Check Oracle12c Administrator's Guide
# Default value : None
# Mandatory     : Yes, if DataVault option is chosen
#-----------------------------------------------------------------------------
dvUserPassword=

#-----------------------------------------------------------------------------
# Name          : dvAccountManagerName
# Datatype      : String
# Description   : DataVault Account Manager
# Valid values  : Check Oracle12c Administrator's Guide
# Default value : None
# Mandatory     : No
#-----------------------------------------------------------------------------
dvAccountManagerName=

#-----------------------------------------------------------------------------
# Name          : dvAccountManagerPassword
# Datatype      : String
# Description   : Password for  DataVault Account Manager
# Valid values  : Check Oracle12c Administrator's Guide
# Default value : None
# Mandatory     : No
#-----------------------------------------------------------------------------
dvAccountManagerPassword=

#-----------------------------------------------------------------------------
# Name          : olsConfiguration
# Datatype      : Boolean
# Description   : Specify "True" to configure and enable Oracle Label Security
# Valid values  : True/False
# Default value : False
# Mandatory     : No
#-----------------------------------------------------------------------------
olsConfiguration=false

#-----------------------------------------------------------------------------
# Name          : datafileJarLocation
# Datatype      : String
# Description   : Location of the data file jar
# Valid values  : Directory containing compressed datafile jar
# Default value : None
# Mandatory     : No
#-----------------------------------------------------------------------------
datafileJarLocation={ORACLE_HOME}/assistants/dbca/templates/

#-----------------------------------------------------------------------------
# Name          : datafileDestination
# Datatype      : String
# Description   : Location of the data file's
# Valid values  : Directory for all the database files
# Default value : $ORACLE_BASE/oradata
# Mandatory     : No
#-----------------------------------------------------------------------------
datafileDestination=+DATA/{DB_UNIQUE_NAME}/

#-----------------------------------------------------------------------------
# Name          : recoveryAreaDestination
# Datatype      : String
# Description   : Location of the data file's
# Valid values  : Recovery Area location
# Default value : $ORACLE_BASE/flash_recovery_area
# Mandatory     : No
#-----------------------------------------------------------------------------
recoveryAreaDestination=/u01/app/oracle/fast

#-----------------------------------------------------------------------------
# Name          : recoveryAreaSize
# Datatype      : String
# Description   : Recovery area size
# Mandatory     : No
#-----------------------------------------------------------------------------
recoveryAreaSize=14922MB

#-----------------------------------------------------------------------------
# Name          : configureWithOID
# Datatype      : Boolean
# Description   : To configure with OID or not
# Valid values  : TRUE / FALSE
# Default value : FALSE
# Mandatory     : No
#-----------------------------------------------------------------------------
configureWithOID=

#-----------------------------------------------------------------------------
# Name          : pdbOptionMap
# Datatype      : String
# Description   : Values for DB Options indicating whether they should be included in PDB
# Default value : None
# Mandatory     : No
#-----------------------------------------------------------------------------
pdbOptions=JSERVER:true,SPATIAL:true,OMS:true,IMEDIA:false,SAMPLE_SCHEMA:false,ORACLE_TEXT:true,CWMLITE:true,DV:true

#-----------------------------------------------------------------------------
# Name          : dbOptionMap
# Datatype      : String
# Description   : Values DB Options indicating whether they are enabled
# Default value : None
# Mandatory     : No
#-----------------------------------------------------------------------------
dbOptions=JSERVER:true,SPATIAL:true,OMS:true,IMEDIA:false,SAMPLE_SCHEMA:false,ORACLE_TEXT:true,CWMLITE:true,DV:true

#-----------------------------------------------------------------------------
# Name          : storageType
# Datatype      : String
# Description   : Specifies the storage on which the database is to be created
# Valid values  : FS (CFS for RAC), ASM
# Default value : FS
# Mandatory     : No
#-----------------------------------------------------------------------------
storageType=ASM

#-----------------------------------------------------------------------------
# Name          : diskGroupName
# Datatype      : String
# Description   : Specifies the disk group name for the storage
# Default value : DATA
# Mandatory     : No
#-----------------------------------------------------------------------------
diskGroupName=+DATA/{DB_UNIQUE_NAME}/

#-----------------------------------------------------------------------------
# Name          : asmsnmpPassword
# Datatype      : String
# Description   : Password for ASM Monitoring
# Default value : None
# Mandatory     : No
#-----------------------------------------------------------------------------
asmsnmpPassword=

#-----------------------------------------------------------------------------
# Name          : recoveryGroupName
# Datatype      : String
# Description   : Specifies the disk group name for the recovery area
# Default value : RECOVERY
# Mandatory     : No
#-----------------------------------------------------------------------------
recoveryGroupName=/u01/app/oracle/fast

#-----------------------------------------------------------------------------
# Name          : characterSet
# Datatype      : String
# Description   : Character set of the database
# Valid values  : Check Oracle12c National Language Support Guide
# Default value : "US7ASCII"
# Mandatory     : NO
#-----------------------------------------------------------------------------
characterSet=AL32UTF8

#-----------------------------------------------------------------------------
# Name          : nationalCharacterSet
# Datatype      : String
# Description   : National Character set of the database
# Valid values  : "UTF8" or "AL16UTF16". For details, check Oracle12c National Language Support Guide
# Default value : "AL16UTF16"
# Mandatory     : No
#-----------------------------------------------------------------------------
nationalCharacterSet=AL16UTF16

#-----------------------------------------------------------------------------
# Name          : registerWithDirService
# Datatype      : Boolean
# Description   : Specifies whether to register with Directory Service.
# Valid values  : TRUE \ FALSE
# Default value : FALSE
# Mandatory     : No
#-----------------------------------------------------------------------------
registerWithDirService=false


#-----------------------------------------------------------------------------
# Name          : dirServiceUserName
# Datatype      : String
# Description   : Specifies the name of the directory service user
# Mandatory     : YES, if the value of registerWithDirService is TRUE
#-----------------------------------------------------------------------------
dirServiceUserName=

#-----------------------------------------------------------------------------
# Name          : dirServicePassword
# Datatype      : String
# Description   : The password of the directory service user.
#                 You can also specify the password at the command prompt instead of here.
# Mandatory     : YES, if the value of registerWithDirService is TRUE
#-----------------------------------------------------------------------------
dirServicePassword=

#-----------------------------------------------------------------------------
# Name          : walletPassword
# Datatype      : String
# Description   : The password for wallet to created or modified.
#                 You can also specify the password at the command prompt instead of here.
# Mandatory     : YES, if the value of registerWithDirService is TRUE
#-----------------------------------------------------------------------------
walletPassword=

#-----------------------------------------------------------------------------
# Name          : listeners
# Datatype      : String
# Description   : Specifies list of listeners to register the database with.
#                 By default the database is configured for all the listeners specified in the
#                 $ORACLE_HOME/network/admin/listener.ora
# Valid values  : The list should be comma separated like "listener1,listener2".
# Mandatory     : NO
#-----------------------------------------------------------------------------
listeners=LISTENER

#-----------------------------------------------------------------------------
# Name          : skipListenerRegistration
# Datatype      : Boolean
# Description   : FALSE if no listener chosen for registration, else true.
# Valid values  : TRUE/FALSE
# Mandatory     : NO
#-----------------------------------------------------------------------------
skipListenerRegistration=false

#-----------------------------------------------------------------------------
# Name          : variablesFile
# Datatype      : String
# Description   : Location of the file containing variable value pair
# Valid values  : A valid file-system file. The variable value pair format in this file
#                 is =. Each pair should be in a new line.
# Default value : None
# Mandatory     : NO
#-----------------------------------------------------------------------------
variablesFile=

#-----------------------------------------------------------------------------
# Name          : variables
# Datatype      : String
# Description   : comma separated list of name=value pairs. Overrides variables defined in variablefile and templates
# Default value : None
# Mandatory     : NO
#-----------------------------------------------------------------------------
variables=ORACLE_BASE_HOME=/u01/app/oracle/product/26.3.0/db,DB_UNIQUE_NAME=orcl,ORACLE_BASE=/u01/app/oracle,PDB_NAME=,DB_NAME=orcl,ORACLE_HOME=/u01/app/oracle/product/26.3.0/db,SID=orcl

#-----------------------------------------------------------------------------
# Name          : initParams
# Datatype      : String
# Description   : comma separated list of name=value pairs. Overrides initialization parameters defined in templates
# Default value : None
# Mandatory     : NO
#-----------------------------------------------------------------------------
initParams=undo_tablespace=UNDOTBS1,enable_pluggable_database=true,sga_target=3438MB,db_block_size=8192BYTES,nls_language=ENGLISH,dispatchers=(PROTOCOL=TCP) (SERVICE=orclXDB),diagnostic_dest={ORACLE_BASE},remote_login_passwordfile=EXCLUSIVE,db_create_file_dest=+DATA/{DB_UNIQUE_NAME}/,processes=720,pga_aggregate_target=1146MB,nls_territory=UNITED KINGDOM,local_listener=LISTENER_ORCL,open_cursors=300,db_domain=localdomain,compatible=23.6.0,db_name=orcl

#-----------------------------------------------------------------------------
# Name          : enableArchive
# Datatype      : Boolean
# Description   : Specifies whether to enable archive log.
# Valid values  : TRUE \ FALSE
# Default value : FALSE
# Mandatory     : No
#-----------------------------------------------------------------------------
enableArchive=false

#-----------------------------------------------------------------------------
# Name          : useOMF
# Datatype      : Boolean
# Description   : Specifies whether to use OMF or not.
# Valid values  : TRUE \ FALSE
# Mandatory     : No
#-----------------------------------------------------------------------------
useOMF=true

#-----------------------------------------------------------------------------
# Name          : memoryPercentage
# Datatype      : String
# Description   : percentage of physical memory for Oracle
# Default value : None
# Mandatory     : NO
#-----------------------------------------------------------------------------
memoryPercentage=40

#-----------------------------------------------------------------------------
# Name          : databaseType
# Datatype      : String
# Description   : used for memory distribution when memoryPercentage specified
# Valid values  : MULTIPURPOSE|DATA_WAREHOUSING|OLTP
# Default value : MULTIPURPOSE
# Mandatory     : NO
#-----------------------------------------------------------------------------
databaseType=MULTIPURPOSE

#-----------------------------------------------------------------------------
# Name          : automaticMemoryManagement
# Datatype      : Boolean
# Description   : flag to indicate Automatic Memory Management is used
# Valid values  : TRUE/FALSE
# Default value : TRUE
# Mandatory     : NO
#-----------------------------------------------------------------------------
automaticMemoryManagement=false

#-----------------------------------------------------------------------------
# Name          : totalMemory
# Datatype      : String
# Description   : total memory in MB to allocate to Oracle
# Valid values  :
# Default value :
# Mandatory     : NO
#-----------------------------------------------------------------------------
totalMemory=0[oracle@ora26 ~]$

Sunday, 9 August 2026

oracle standby To activate the standby site if the primary site is not reachable.



To activate the standby site if the primary site is not reachable.


*****************************************************************************



dgmgrl /
DGMGRL for Linux: Release 19.0.0.0.0 - Production on Sun Aug 9 14:15:22 2026
Version 19.31.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

Welcome to DGMGRL, type "help" for information.
Connected to "orcl_stdy"
Connected as SYSDG.
DGMGRL> show configuration ;

Configuration - DG_CONF

  Protection Mode: MaxPerformance
  Members:
  orcl      - Primary database
    Error: ORA-1034: ORACLE not available   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 

    orcl_stdy - Physical standby database

Fast-Start Failover:  Disabled

Configuration Status:
ERROR   (status updated 0 seconds ago)

DGMGRL> SHOW DATABASE VERBOSE orcl_stdy;

Database - orcl_stdy

  Role:               PHYSICAL STANDBY
  Intended State:     APPLY-ON
  Transport Lag:      0 seconds (computed 172 seconds ago)
  Apply Lag:          0 seconds (computed 172 seconds ago)
  Average Apply Rate: 61.00 KByte/s
  Active Apply Rate:  0 Byte/s
  Maximum Apply Rate: 0 Byte/s
  Real Time Query:    OFF
  Instance(s):
    orcls

  Database Warning(s):
    ORA-16857: member disconnected from redo source for longer than specified threshold

  Properties:
    DGConnectIdentifier             = 'orcldstdy'
    ObserverConnectIdentifier       = ''
    FastStartFailoverTarget         = 'orcl'
    PreferredObserverHosts          = ''
    LogShipping                     = 'ON'
    RedoRoutes                      = ''
    LogXptMode                      = 'ASYNC'
    DelayMins                       = '0'
    Binding                         = 'optional'
    MaxFailure                      = '0'
    ReopenSecs                      = '300'
    NetTimeout                      = '30'
    RedoCompression                 = 'DISABLE'
    PreferredApplyInstance          = ''
    ApplyInstanceTimeout            = '0'
    ApplyLagThreshold               = '30'
    TransportLagThreshold           = '30'
    TransportDisconnectedThreshold  = '30'
    ApplyParallel                   = 'AUTO'
    ApplyInstances                  = '0'
    StandbyFileManagement           = ''
    ArchiveLagTarget                = '0'
    LogArchiveMaxProcesses          = '0'
    LogArchiveMinSucceedDest        = '0'
    DataGuardSyncLatency            = '0'
    LogArchiveTrace                 = '0'
    LogArchiveFormat                = ''
    DbFileNameConvert               = ''
    LogFileNameConvert              = ''
    ArchiveLocation                 = ''
    AlternateLocation               = ''
    StandbyArchiveLocation          = ''
    StandbyAlternateLocation        = ''
    InconsistentProperties          = '(monitor)'
    InconsistentLogXptProps         = '(monitor)'
    LogXptStatus                    = '(monitor)'
    SendQEntries                    = '(monitor)'
    RecvQEntries                    = '(monitor)'
    UserManagedParams               = ''
    HostName                        = 'oracentd19c'
    StaticConnectIdentifier         = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracentd19c)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl_stdy_DGMGRL)(INSTANCE_NAME=orcls)(SERVER=DEDICATED)))'
    TopWaitEvents                   = '(monitor)'
    SidName                         = '(monitor)'

  Log file locations:
    Alert log               : /u01/app/oracle/diag/rdbms/orcl_stdy/orcls/trace/alert_orcls.log
    Data Guard Broker log   : /u01/app/oracle/diag/rdbms/orcl_stdy/orcls/trace/drcorcls.log

Database Status:
WARNING



*********************************************************************************************************************

DGMGRL> FAILOVER TO orcl_stdy;               <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Performing failover NOW, please wait...
Failover succeeded, new primary is "orcl_stdy"



Configuration Status:
SUCCESS   (status updated 46 seconds ago)

DGMGRL> show configuration ;

Configuration - DG_CONF

  Protection Mode: MaxPerformance
  Members:
  orcl_stdy - Primary database
    orcl      - Physical standby database (disabled)
      ORA-16661: the standby database needs to be reinstated

Fast-Start Failover:  Disabled

Configuration Status:
SUCCESS   (status updated 38 seconds ago)




DGMGRL> DGMGRL> [oracle@oracentd19c ~]$ sqlme

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Aug 9 14:27:47 2026
Version 19.31.0.0.0

Copyright (c) 1982, 2026, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.31.0.0.0

[-PRIMARY-]sys@ORCL_STDY> SELECT db_unique_name, database_role, open_mode, switchover_status
FROM v$database;  2

DB_UNIQUE_NAME                 DATABASE_ROLE    OPEN_MODE
------------------------------ ---------------- --------------------
SWITCHOVER_STATUS
--------------------
orcl_stdy                      PRIMARY          READ WRITE
NOT ALLOWED


[-PRIMARY-]sys@ORCL_STDY> 
SELECT db_unique_name,
       database_role,
       open_mode,
       resetlogs_change#,
       resetlogs_time
FROM v$database;  



DB_UNIQUE_NAME                 DATABASE_ROLE    OPEN_MODE
------------------------------ ---------------- --------------------
RESETLOGS_CHANGE# RESETLOGS
----------------- ---------
orcl_stdy                      PRIMARY          READ WRITE
          4771662 09-AUG-26


[-PRIMARY-]sys@ORCL_STDY> SELECT current_scn FROM v$database;

CURRENT_SCN
-----------
    4777481

[-PRIMARY-]sys@ORCL_STDY> Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.31.0.0.0





On failed node 

SQL> startup ;
ORACLE instance started.

Total System Global Area 6710883904 bytes
Fixed Size                  9193024 bytes
Variable Size            1677721600 bytes
Database Buffers         5016387584 bytes
Redo Buffers                7581696 bytes
Database mounted.
ORA-16649: possible failover to another database prevents this database from
being opened


SQL>
SQL>
SQL>
SQL>
SQL>
SQL> select * from dual;

ADDR                   INDX    INST_ID     CON_ID D
---------------- ---------- ---------- ---------- -
0000000015940ADC          0          1          0 X



Database Status:
DISABLED - ORA-16623: member detected role change

DGMGRL> DGMGRL> [oracle@oracent19c ~]$
[oracle@oracent19c ~]$
[oracle@oracent19c ~]$
[oracle@oracent19c ~]$
[oracle@oracent19c ~]$ !sql
sqlme

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Aug 9 14:27:37 2026
Version 19.31.0.0.0

Copyright (c) 1982, 2026, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.31.0.0.0

SQL> SELECT db_unique_name, database_role, open_mode, switchover_status
FROM v$database;  2

DB_UNIQUE_NAME                 DATABASE_ROLE    OPEN_MODE
------------------------------ ---------------- --------------------
SWITCHOVER_STATUS
--------------------
orcl                           PRIMARY          MOUNTED
NOT ALLOWED


SQL> SELECT flashback_on
FROM v$database;  2

FLASHBACK_ON
------------------
YES





[oracle@oracentd19c ~]$ dgmgrl /
DGMGRL for Linux: Release 19.0.0.0.0 - Production on Sun Aug 9 14:34:37 2026
Version 19.31.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

Welcome to DGMGRL, type "help" for information.
Connected to "ORCL_STDY"
Connected as SYSDG.

DGMGRL> SHOW DATABASE VERBOSE orcl

Database - orcl

  Role:               PHYSICAL STANDBY
  Intended State:     APPLY-ON
  Transport Lag:      (unknown)
  Apply Lag:          (unknown)
  Average Apply Rate: (unknown)
  Active Apply Rate:  (unknown)
  Maximum Apply Rate: (unknown)
  Real Time Query:    OFF
  Instance(s):
    orcl

  Properties:
    DGConnectIdentifier             = 'orcl'
    ObserverConnectIdentifier       = ''
    FastStartFailoverTarget         = 'orcl_stdy'
    PreferredObserverHosts          = ''
    LogShipping                     = 'ON'
    RedoRoutes                      = ''
    LogXptMode                      = 'ASYNC'
    DelayMins                       = '0'
    Binding                         = 'optional'
    MaxFailure                      = '0'
    ReopenSecs                      = '300'
    NetTimeout                      = '30'
    RedoCompression                 = 'DISABLE'
    PreferredApplyInstance          = ''
    ApplyInstanceTimeout            = '0'
    ApplyLagThreshold               = '30'
    TransportLagThreshold           = '30'
    TransportDisconnectedThreshold  = '30'
    ApplyParallel                   = 'AUTO'
    ApplyInstances                  = '0'
    StandbyFileManagement           = ''
    ArchiveLagTarget                = '0'
    LogArchiveMaxProcesses          = '0'
    LogArchiveMinSucceedDest        = '0'
    DataGuardSyncLatency            = '0'
    LogArchiveTrace                 = '0'
    LogArchiveFormat                = ''
    DbFileNameConvert               = ''
    LogFileNameConvert              = ''
    ArchiveLocation                 = ''
    AlternateLocation               = ''
    StandbyArchiveLocation          = ''
    StandbyAlternateLocation        = ''
    InconsistentProperties          = '(monitor)'
    InconsistentLogXptProps         = '(monitor)'
    LogXptStatus                    = '(monitor)'
    SendQEntries                    = '(monitor)'
    RecvQEntries                    = '(monitor)'
    UserManagedParams               = ''
    HostName                        = 'oracent19c'
    StaticConnectIdentifier         = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracent19c)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl_DGMGRL)(INSTANCE_NAME=orcl)(SERVER=DEDICATED)))'
    TopWaitEvents                   = '(monitor)'
    SidName                         = '(monitor)'

  Log file locations:
    (Unknown)

Database Status:
DISABLED - ORA-16661: the standby database needs to be reinstated



on old primary




SQL> startup ;
ORACLE instance started.

Total System Global Area 6710883904 bytes
Fixed Size                  9193024 bytes
Variable Size            1677721600 bytes
Database Buffers         5016387584 bytes
Redo Buffers                7581696 bytes
Database mounted.
ORA-16649: possible failover to another database prevents this database from
being opened


on failed node !!


SQL> startup ;
ORACLE instance started.

Total System Global Area 6710883904 bytes
Fixed Size                  9193024 bytes
Variable Size            1677721600 bytes
Database Buffers         5016387584 bytes
Redo Buffers                7581696 bytes
Database mounted.
ORA-16649: possible failover to another database prevents this database from
being opened


SQL>
SQL>
SQL>
SQL>
SQL>
SQL> select * from dual;

ADDR                   INDX    INST_ID     CON_ID D
---------------- ---------- ---------- ---------- -
0000000015940ADC          0          1          0 X

SQL> Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.31.0.0.0






from active node !!!!!!!!!! from new prod REINSTATE DATABASE orcl

DGMGRL> REINSTATE DATABASE orcl;
Reinstating database "orcl", please wait...
Reinstatement of database "orcl" succeeded

DGMGRL> SHOW DATABASE VERBOSE orcl

Database - orcl

  Role:               PHYSICAL STANDBY
  Intended State:     APPLY-ON
  Transport Lag:      0 seconds (computed 1 second ago)
  Apply Lag:          0 seconds (computed 1 second ago)
  Average Apply Rate: 979.00 KByte/s
  Active Apply Rate:  0 Byte/s
  Maximum Apply Rate: 0 Byte/s
  Real Time Query:    OFF
  Instance(s):
    orcl

  Properties:
    DGConnectIdentifier             = 'orcl'
    ObserverConnectIdentifier       = ''
    FastStartFailoverTarget         = 'orcl_stdy'
    PreferredObserverHosts          = ''
    LogShipping                     = 'ON'
    RedoRoutes                      = ''
    LogXptMode                      = 'ASYNC'
    DelayMins                       = '0'
    Binding                         = 'optional'
    MaxFailure                      = '0'
    ReopenSecs                      = '300'
    NetTimeout                      = '30'
    RedoCompression                 = 'DISABLE'
    PreferredApplyInstance          = ''
    ApplyInstanceTimeout            = '0'
    ApplyLagThreshold               = '30'
    TransportLagThreshold           = '30'
    TransportDisconnectedThreshold  = '30'
    ApplyParallel                   = 'AUTO'
    ApplyInstances                  = '0'
    StandbyFileManagement           = ''
    ArchiveLagTarget                = '0'
    LogArchiveMaxProcesses          = '0'
    LogArchiveMinSucceedDest        = '0'
    DataGuardSyncLatency            = '0'
    LogArchiveTrace                 = '0'
    LogArchiveFormat                = ''
    DbFileNameConvert               = ''
    LogFileNameConvert              = ''
    ArchiveLocation                 = ''
    AlternateLocation               = ''
    StandbyArchiveLocation          = ''
    StandbyAlternateLocation        = ''
    InconsistentProperties          = '(monitor)'
    InconsistentLogXptProps         = '(monitor)'
    LogXptStatus                    = '(monitor)'
    SendQEntries                    = '(monitor)'
    RecvQEntries                    = '(monitor)'
    UserManagedParams               = ''
    HostName                        = 'oracent19c'
    StaticConnectIdentifier         = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracent19c)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl_DGMGRL)(INSTANCE_NAME=orcl)(SERVER=DEDICATED)))'
    TopWaitEvents                   = '(monitor)'
    SidName                         = '(monitor)'

  Log file locations:
    Alert log               : /u01/app/oracle/diag/rdbms/orcl/orcl/trace/alert_orcl.log
    Data Guard Broker log   : /u01/app/oracle/diag/rdbms/orcl/orcl/trace/drcorcl.log

Database Status:
SUCCESS





DGMGRL> show configuration ;

Configuration - DG_CONF

  Protection Mode: MaxPerformance
  Members:
  orcl_stdy - Primary database
    orcl      - Physical standby database

Fast-Start Failover:  Disabled

Configuration Status:
SUCCESS   (status updated 44 seconds ago)


on new standby !!!

SELECT recovery_mode
FROM v$archive_dest_status
WHERE dest_id = 1;  2    3

RECOVERY_MODE
----------------------------------
MANAGED REAL TIME APPLY

Sunday, 2 August 2026

grid get_groups.sh




from below down load the script 
curl -s -o get_groups.sh "https://raw.githubusercontent.com/maiconcarneiro/blog-dibiei/main/get_groups.sh"; chmod +x get_groups.sh



## script: get_groups.sh v1.3
## syntax: "./get_groups.sh" or  "./get_groups.sh -home " or "./get_groups.sh -home all"
##  ./get_groups.sh use the current $ORACLE_HOME as default path.
##
## https://dibiei.blog/2024/01/30/script-get_groups-sh-listando-os-grupos-de-so-de-um-oracle_home/
##
## Maicon Carneiro - dibiei.blog
## 11/01/2024 - v1.0 with FPP format standard
## 27/01/2024 - v1.1 support for multiple Oracle Home reading /etc/oratab
## 29/01/2024 - v1.2 support for OUI (Oracle Universal Installer) format
# 1) Execution without parameter use the current ORACLE_HOME
# 2) Execution with the PATH provided by user get the groups for the specified ORACLE_HOME
# 3) Execution with option "all" get the groups for all ORACLE_HOME listed in /etc/oratab file.
USER_OPTION=""
# Default format of the output (FPP or OUI)
#  FPP = Fleet Patching and Provisioning
#  OUI = Oracle Universal Installer
RESULT_TYPE="FPP"
# show script help usage
show_help() {
    echo "Uso: $0 [-home ] [-oui]"
    echo "  -home    : Oracle Home Patch. Example: /u01/app/oracle/product/19.0.0/dbhome_1"
    echo "  -oui     : Get the result with OUI format instead of FPP format"
    exit 1
}
# check parameters
while [[ $# -gt 0 ]]; do
    case $1 in
        -home)
            shift
            if [[ $# -eq 0 || $1 == -* ]]; then
                show_help
            fi
            USER_OPTION=$1
            ;;
        -oui)
            RESULT_TYPE="OUI"
            ;;
        *)
            show_help
            ;;
    esac
    shift
done
# Default Binary type (RDBMS or GRID)
BINARY_TYPE="RDBMS"
# YES for Fleet Patching and Provisioning (FPP) standard
FORCE_OSPER_GRP="YES"
addGroupValueFPP()
{
  GRP_NAME=$1
  GRP_VALUE=$2
  if [ -z $GRP_LIST_FPP ]; then
   GRP_LIST_FPP="$GRP_NAME=$GRP_VALUE"
  else
   GRP_LIST_FPP="${GRP_LIST_FPP},$GRP_NAME=$GRP_VALUE"
  fi
}
addGroupValueOUI()
{
  GROUP_NAME=$1
  GROUP_VALUE=$2
  GROUP_OUI=$GROUP_NAME
  if [ "$BINARY_TYPE" == "GRID" ]; then
   OUI_LINE="oracle.install.asm.${GROUP_OUI}=$GROUP_VALUE"
  else 
   
    if [ "$GROUP_NAME" != "OSDBA" ] && [ "$GROUP_NAME" != "OSOPER" ]; then
      GROUP_OUI="${GROUP_NAME}DBA"
    fi
    OUI_LINE="oracle.install.db.$GROUP_OUI"_GROUP="$GROUP_VALUE"
  fi
  GRP_LIST_OUI+=($OUI_LINE)
}
runGetGroups(){
if [ ! -z "$2" ]; then
 LIST_TYPE=$2
fi
# set the source Oracle Home
SOURCE_ORACLE_HOME=""
OH_PARAM=$1
if [ ! -z "$OH_PARAM" ]; then
 SOURCE_ORACLE_HOME=$OH_PARAM
 elif [ ! -z $ORACLE_HOME ]; then
  SOURCE_ORACLE_HOME=$ORACLE_HOME
 else
  echo "ORACLE_HOME is required."
  exit 1
fi
# check if the ORACLE_HOME exists
if [ ! -f "$SOURCE_ORACLE_HOME/rdbms/lib/config.c" ]; then
 echo "Invalid ORACLE_HOME: $SOURCE_ORACLE_HOME"
 exit 1
fi
# check binary type
if [ -f "$SOURCE_ORACLE_HOME/crs/install/rootcrs.sh" ]; then
 BINARY_TYPE="GRID"
fi
# function to read the "config.c" file and return the group value to the specific group name.
addGroupValue(){
 GRP_DEFINE=$1
 GRP_NAME=$2
 GRP_FORCE=$3
 GRP_VALUE=$(grep "#define $GRP_DEFINE" $SOURCE_ORACLE_HOME/rdbms/lib/config.c | awk -F '"' '{print $2}')
 if [[ ! -z "$GRP_VALUE" || $GRP_FORCE == "YES" ]]; then
  
  if [ "$RESULT_TYPE" == "FPP" ]; then
   addGroupValueFPP $GRP_NAME $GRP_VALUE
  else
   addGroupValueOUI $GRP_NAME $GRP_VALUE
  fi
 fi
}
# get all possible OS Groups value
GRP_LIST_FPP=""
GRP_LIST_OUI=()
addGroupValue "SS_DBA_GRP" "OSDBA"
addGroupValue "SS_OPER_GRP" "OSOPER" "$FORCE_OSPER_GRP"
# these groups are specific to RDBMS binary
if [ "$BINARY_TYPE" == "RDBMS" ]; then
 addGroupValue "SS_DGD_GRP"  "OSDG"
 addGroupValue "SS_KMT_GRP"  "OSKM"
 addGroupValue "SS_RAC_GRP"  "OSRAC"
 addGroupValue "SS_BKP_GRP"  "OSBACKUP"
fi;
addGroupValue "SS_ASM_GRP"  "OSASM"
if [ "$RESULT_TYPE" == "FPP" ]; then
  echo "$GRP_LIST_FPP"
 else
  for OUI_GROUP in "${GRP_LIST_OUI[@]}"; do
    echo "$OUI_GROUP"
  done
fi
}
# call the runGetGroups function based on the USER Option
if [ "$USER_OPTION" == "all" ]; then
 echo ""
 for OH_PATH in $(grep -v "^#" /etc/oratab | awk -F ":" '{print $2}' | sort -u | grep "^/"); do
  echo "Oracle Home: $OH_PATH"
  echo "$(runGetGroups $OH_PATH)"
  echo ""
 done
else
 runGetGroups "$USER_OPTION"
fi;






[grid@ora26 ~]$ ./get_groups.sh -home /u01/app/26.0.0/grid -oui
oracle.install.asm.OSDBA=asmdba
oracle.install.asm.OSOPER=asmoper
oracle.install.asm.OSASM=asmadmin

[grid@ora26 ~]$ ./get_groups.sh -home /u01/app/26.1.0/grid -oui   <<< new 
oracle.install.asm.OSDBA=dba
oracle.install.asm.OSOPER=
oracle.install.asm.OSASM=dba
[grid@ora26 ~]$

Wednesday, 8 July 2026

Upgrade Oracle Database 19c Non-CDB to Oracle AI Database 26ai PDB using AutoUpgrade

Oracle Database Upgrade Guide
Upgrade Oracle Database 19c Non-CDB to Oracle AI Database 26ai PDB using AutoUpgrade




Source Database: Oracle Database 19c (19.3 Non-CDB)   >>> to 

Target Database: Oracle AI Database 26ai (23.26.1)    <<<<

Upgrade Method: AutoUpgrade

Operating System: Oracle Linux

1. Objective

This document describes the procedure for upgrading an Oracle 19c Non-CDB database into an Oracle AI Database 26ai Pluggable Database (PDB) using Oracle AutoUpgrade.

2. Environment
Parameter	Value
Source Database	ORCL
Source Version	19.3.0.0
Target Version	Oracle AI Database 26ai (23.26.1)
Source Oracle Home	/u01/app/oracle/product/19.0.0/db_1
Target Oracle Home	/u01/app/oracle/product/26.0.0/dbhome_1
Target CDB	cdb26i
Target PDB	ORCL

3. Install Oracle AI Database 26ai Software

Set Environment
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/26.0.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=cdb26i
export SOFTWARE_DIR=/home/oracle
export ORA_INVENTORY=/u01/app/oraInventory



Create Oracle Home
mkdir -p $ORACLE_HOME

Extract Software
cd $ORACLE_HOME

pwd

/u01/app/oracle/product/26.0.0/dbhome_1


unzip -oq ${SOFTWARE_DIR}/LINUX.X64_2326100_db_home.zip



unzip -oq ${SOFTWARE_DIR}/LINUX.X64_2326100_db_home.zip
Install Software
./runInstaller \
-ignorePrereq \
-waitforcompletion \
-silent \
-responseFile ${ORACLE_HOME}/install/response/db_install.rsp \
installOption=INSTALL_DB_SWONLY \
UNIX_GROUP_NAME=oinstall \
INVENTORY_LOCATION=${ORA_INVENTORY} \
ORACLE_HOME=${ORACLE_HOME} \
ORACLE_BASE=${ORACLE_BASE} \
installEdition=EE \
OSDBA=dba \
OSBACKUPDBA=dba \
OSDGDBA=dba \
OSKMDBA=dba \
OSRACDBA=dba

After installation completes, execute:

root.sh

as the root user.

4. Create the Target 26ai Container Database

Create the database storage location.

mkdir -p /u01/app/oracle/oradata/cdb26i

Run DBCA to create database 

from Oracle home 

dbca -silent -createDatabase \
-templateName General_Purpose.dbc \
-gdbname cdb26i \
-sid cdb26i \
-responseFile NO_VALUE \
-characterSet AL32UTF8 \
-sysPassword sys \
-systemPassword sys \
-createAsContainerDatabase true \
-numberOfPDBs 0 \
-databaseType MULTIPURPOSE \
-memoryMgmtType auto_sga \
-totalMemory 1536 \
-storageType FS \
-datafileDestination "/u01/app/oracle/oradata/cdb26i" \
-redoLogFileSize 50 \
-emConfiguration NONE \
-ignorePreReqs



5. Resolve ORADISM Permission Issue

If DBCA fails with:

DBT-10011 Incorrect ownership/permissions detected for oradism

Login as root and execute:

cd $ORACLE_HOME/bin

chown root:oinstall oradism

chmod 4750 oradism

Verify:

ls -l oradism

Expected:

-rwsr-x--- root oinstall

Re-run DBCA after correcting the permissions.

6. Update AutoUpgrade Utility

Backup the existing JAR.

cd $ORACLE_HOME/rdbms/admin

mv autoupgrade.jar autoupgrade.jar.$(date +%F)

Download the latest version.

wget https://download.oracle.com/otn-pub/otn_software/autoupgrade.jar

Copy the new JAR into:

$ORACLE_HOME/rdbms/admin


7. Configure Archive Log Mode

Login as SYSDBA.

sqlplus / as sysdba 


ALTER SYSTEM SET db_recovery_file_dest_size=20G;
ALTER SYSTEM SET db_recovery_file_dest='/u01/app/oracle/fast_recovery_area26ai';
ALTER SYSTEM SET db_create_file_dest='/u01/app/oracle/oradata/cdb26i';

SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALTER DATABASE ARCHIVELOG;
ALTER DATABASE OPEN;




download new autoupgrade.jar’


[oracle@grid26 bin]$ wget https://download.oracle.com/otn-pub/otn_software/autoupgrade.jar
--2026-07-08 11:51:49--  https://download.oracle.com/otn-pub/otn_software/autoupgrade.jar
Resolving download.oracle.com (download.oracle.com)... 184.26.56.105
Connecting to download.oracle.com (download.oracle.com)|184.26.56.105|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/otn_software/autoupgrade.jar [following]
--2026-07-08 11:51:49--  https://edelivery.oracle.com/otn-pub/otn_software/autoupgrade.jar
Resolving edelivery.oracle.com (edelivery.oracle.com)... 2a02:26f0:fd00:49c::366, 2a02:26f0:fd00:496::366, 23.206.11.197
Connecting to edelivery.oracle.com (edelivery.oracle.com)|2a02:26f0:fd00:49c::366|:443... failed: Connection timed out.
Connecting to edelivery.oracle.com (edelivery.oracle.com)|2a02:26f0:fd00:496::366|:443... failed: Connection timed out.
Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.206.11.197|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://download.oracle.com/otn-pub/otn_software/autoupgrade.jar?AuthParam=1783508296_6803ca6de5ae52af25c1456debc09601 [following]
--2026-07-08 11:56:11--  https://download.oracle.com/otn-pub/otn_software/autoupgrade.jar?AuthParam=1783508296_6803ca6de5ae52af25c1456debc09601
Connecting to download.oracle.com (download.oracle.com)|184.26.56.105|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7174061 (6.8M) [application/x-jar]
Saving to: ‘autoupgrade.jar’

autoupgrade.jar                           100%[==================================================================================>]   6.84M  21.8MB/s    in 0.3s

2026-07-08 11:56:11 (21.8 MB/s) - ‘autoupgrade.jar’ saved [7174061/7174061]




pwd
/u01/app/oracle/product/26.0.0/dbhome_1/rdbms/admin   
[oracle@grid26 admin]$ mv autoupgrade.jar autoupgrade.jar.`date +"%Y"-"%m"-"%d"`

[oracle@grid26 admin]$ mv /u01/app/oracle/product/26.0.0/dbhome_1/bin/autoupgrade.jar .

[oracle@grid26 admin]$ ls -ltr auto*
-rw-r----- 1 oracle oinstall 6729196 Jan 17 07:17 autoupgrade.jar.2026-07-08
-rw-r--r-- 1 oracle oinstall 7174061 Jul  3 10:58 autoupgrade.jar

[oracle@grid26 admin]$


8. Create AutoUpgrade Configuration File

Example:

global.global_log_dir=/home/oracle/upgrade

upg1.sid=ORCL
upg1.target_cdb=cdb26i
upg1.source_home=/u01/app/oracle/product/19.0.0/db_1
upg1.target_home=/u01/app/oracle/product/26.0.0/dbhome_1
upg1.target_pdb_name=orcl
upg1.start_time=NOW
upg1.upgrade_node=grid26
upg1.run_utlrp=yes
upg1.timezone_upg=yes
upg1.target_version=26
upg1.restoration=no
9. Run AutoUpgrade Analysis

Execute:

$ORACLE_HOME/jdk/bin/java \
-jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar \
-config /home/oracle/upgrade/config.txt \
-mode analyze

Monitor jobs:

lsj

If analysis reports:

FLASH_RECOVERY_AREA_SETUP
ARCHIVE_MODE_ON

Configure the FRA and enable ARCHIVELOG mode, then rerun the analysis until all prechecks succeed.

10. Start the Upgrade

Execute:

$ORACLE_HOME/jdk/bin/java \
-jar $ORACLE_HOME/rdbms/admin/autoupgrade.jar \
-config /home/oracle/upgrade/config.txt \
-mode deploy

Monitor progress using:

lsj

Typical stages include:

PRECHECKS
PREFIXUPS
DRAIN
DBUPGRADE
NONCDBTOPDB
POSTCHECKS
POSTFIXUPS
POSTUPGRADE
SYSUPDATES




upg>

 /u01/app/oracle/product/26.0.0/dbhome_1/jdk/bin/java -jar $ORACLE_BASE/product/26.0.0/dbhome_1/rdbms/admin/autoupgrade.jar -config /home/oracle/upgrade/config.txt -mode deploy
AutoUpgrade 26.4.260701 launched with default internal options

Processing config file ...
+--------------------------------+
| Starting AutoUpgrade execution |
+--------------------------------+
1 Non-CDB(s) will be processed
Type 'help' to list console commands




upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|                     MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------------------+
| 102|   ORCL|PRECHECKS|EXECUTING|RUNNING|  13:05:25|20s ago|Loading database information|
+----+-------+---------+---------+-------+----------+-------+----------------------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|PREFIXUPS|EXECUTING|RUNNING|  13:05:25| 6s ago|Executing fixups|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|PREFIXUPS|EXECUTING|RUNNING|  13:05:25| 2s ago|Executing fixups|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|PREFIXUPS|EXECUTING|RUNNING|  13:05:25|69s ago|Executing fixups|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+------------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|           MESSAGE|
+----+-------+---------+---------+-------+----------+-------+------------------+
| 102|   ORCL|PREFIXUPS|EXECUTING|RUNNING|  13:05:25|23s ago|Refreshing DB info|
+----+-------+---------+---------+-------+----------+-------+------------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+------------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|           MESSAGE|
+----+-------+---------+---------+-------+----------+-------+------------------+
| 102|   ORCL|PREFIXUPS|EXECUTING|RUNNING|  13:05:25|39s ago|Refreshing DB info|
+----+-------+---------+---------+-------+----------+-------+------------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+-------------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|            MESSAGE|
+----+-------+---------+---------+-------+----------+-------+-------------------+
| 102|   ORCL|PREFIXUPS|EXECUTING|RUNNING|  13:05:25| 0s ago|Re-Executing Checks|
+----+-------+---------+---------+-------+----------+-------+-------------------+
Total jobs 1

upg> lsj
+----+-------+-----+---------+-------+----------+-------+------------------------+
|Job#|DB_NAME|STAGE|OPERATION| STATUS|START_TIME|UPDATED|                 MESSAGE|
+----+-------+-----+---------+-------+----------+-------+------------------------+
| 102|   ORCL|DRAIN|EXECUTING|RUNNING|  13:05:25| 0s ago|Disabling RAC if present|
+----+-------+-----+---------+-------+----------+-------+------------------------+
Total jobs 1

upg> lsj
+----+-------+-----+---------+-------+----------+-------+------------------------+
|Job#|DB_NAME|STAGE|OPERATION| STATUS|START_TIME|UPDATED|                 MESSAGE|
+----+-------+-----+---------+-------+----------+-------+------------------------+
| 102|   ORCL|DRAIN|EXECUTING|RUNNING|  13:05:25|49s ago|Disabling RAC if present|
+----+-------+-----+---------+-------+----------+-------+------------------------+
Total jobs 1

upg> lsj
+----+-------+-----+---------+-------+----------+-------+------------------+
|Job#|DB_NAME|STAGE|OPERATION| STATUS|START_TIME|UPDATED|           MESSAGE|
+----+-------+-----+---------+-------+----------+-------+------------------+
| 102|   ORCL|DRAIN|EXECUTING|RUNNING|  13:05:25|55s ago|Executing describe|
+----+-------+-----+---------+-------+----------+-------+------------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+---------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|        MESSAGE|
+----+-------+---------+---------+-------+----------+-------+---------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|55s ago|0%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+---------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+---------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|        MESSAGE|
+----+-------+---------+---------+-------+----------+-------+---------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|85s ago|0%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+---------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+---------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|        MESSAGE|
+----+-------+---------+---------+-------+----------+-------+---------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|48s ago|0%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+---------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+--------+---------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME| UPDATED|        MESSAGE|
+----+-------+---------+---------+-------+----------+--------+---------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|103s ago|0%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+--------+---------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+--------+---------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME| UPDATED|        MESSAGE|
+----+-------+---------+---------+-------+----------+--------+---------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|112s ago|3%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+--------+---------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|80s ago|23%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|58s ago|23%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|89s ago|23%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25| 3s ago|29%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|53s ago|29%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|56s ago|50%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25| 5s ago|53%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|33s ago|53%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+--------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME| UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+--------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|100s ago|53%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+--------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|76s ago|53%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|23s ago|53%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|97s ago|53%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25| 4s ago|53%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|72s ago|53%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|83s ago|53%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|12s ago|53%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|65s ago|53%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|73s ago|53%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|12s ago|53%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+--------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME| UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+--------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|117s ago|53%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+--------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|68s ago|53%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|37s ago|67%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|53s ago|67%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|78s ago|67%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|96s ago|71%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|28s ago|76%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|75s ago|76%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|87s ago|76%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|89s ago|76%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|88s ago|81%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+--------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME| UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+--------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|110s ago|81%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+--------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+-------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME|UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+-------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|96s ago|81%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+-------+----------------+
Total jobs 1

upg> lsj
+----+-------+---------+---------+-------+----------+--------+----------------+
|Job#|DB_NAME|    STAGE|OPERATION| STATUS|START_TIME| UPDATED|         MESSAGE|
+----+-------+---------+---------+-------+----------+--------+----------------+
| 102|   ORCL|DBUPGRADE|EXECUTING|RUNNING|  13:05:25|107s ago|81%Upgraded ORCL|
+----+-------+---------+---------+-------+----------+--------+----------------+
Total jobs 1

upg> lsj
+----+-------+--------+---------+-------+----------+-------+-------------------+
|Job#|DB_NAME|   STAGE|OPERATION| STATUS|START_TIME|UPDATED|            MESSAGE|
+----+-------+--------+---------+-------+----------+-------+-------------------+
| 102|   ORCL|DISPATCH|EXECUTING|RUNNING|  13:05:25|65s ago|Restarting Database|
+----+-------+--------+---------+-------+----------+-------+-------------------+
Total jobs 1

upg>



Time drifted forward by (1162941) micro seconds at 25745163397 whereas allowed drift is 1000000

Time drift error is a message which can be ignored, and to remove it you can set:

SQL> alter system set event=”10795 trace name context forever, level 2″ scope=spfile;
Then bounce the DB instances to implement the event/change.



upg> -------------------------------------------------
job 102 has not shown progress in last 25 minutes
database [ORCL]
Stage    [DISPATCH]
Operation[EXECUTING]
Status   [RUNNING]
Info     [Restarting Database]
[Review log files for further information]
-----------------------------------------------
Logs: /home/oracle/upgrade/ORCL/102
-----------------------------------------------

upg> lsj
+----+-------+--------+---------+-------+----------+------------+-------------------+
|Job#|DB_NAME|   STAGE|OPERATION| STATUS|START_TIME|     UPDATED|            MESSAGE|
+----+-------+--------+---------+-------+----------+------------+-------------------+
| 102|   ORCL|DISPATCH|EXECUTING|RUNNING|  13:05:25|!!!1604s ago|Restarting Database|
+----+-------+--------+---------+-------+----------+------------+-------------------+
Total jobs 1





11. Time Drift Message

During the upgrade, the following informational message may appear:

Time drifted forward...

To suppress this message in future database startups:

ALTER SYSTEM SET EVENT='10795 trace name context forever, level 2' SCOPE=SPFILE;

Restart the database for the change to take effect.

12. Verify Upgrade

Connect to the target CDB.

sqlplus / as sysdba

Check the PDB status.

SHOW PDBS;

Expected output:

PDB$SEED

ORCL

Verify the Oracle version.

SELECT banner_full
FROM v$version


BANNER_FULL
--------------------------------------------------------------------------------
Oracle AI Database 26ai Enterprise Edition Release 23.26.1.0.0 - Production
Version 23.26.1.0.0





13. Verify AutoUpgrade Completion

Review the AutoUpgrade summary.

/home/oracle/upgrade/cfgtoollogs/upgrade/auto/status/status.log

Expected results:

Stage	Status
PRECHECKS	SUCCESS
PREFIXUPS	SUCCESS
DRAIN	SUCCESS
DBUPGRADE	SUCCESS
NONCDBTOPDB	SUCCESS
POSTCHECKS	SUCCESS



POSTFIXUPS	SUCCESS
POSTUPGRADE	SUCCESS
SYSUPDATES	SUCCESS



14. Log Locations
Purpose	Location
AutoUpgrade Logs	/home/oracle/upgrade/ORCL/102/
Summary Report	/home/oracle/upgrade/cfgtoollogs/upgrade/auto/status/status.log
DB Upgrade Summary	/home/oracle/upgrade/ORCL/102/dbupgrade/upg_summary.log
DBCA Logs	/u01/app/oracle/cfgtoollogs/dbca/cdb26i/






[oracle@grid26 ~]$ export PATH=$ORACLE_HOME/OPatch:$PATH
[oracle@grid26 ~]$ opatch lsinventory | grep -E "(^Patch.*applied)|(^Sub-patch)"
Patch  38743688     : applied on Sun Jan 18 12:04:30 GMT 2026
Patch  38743669     : applied on Sun Jan 18 12:03:58 GMT 2026
[oracle@grid26 ~]$




opatch lsinventory
Oracle Interim Patch Installer version 12.2.0.1.48
Copyright (c) 2026, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/26.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/26.0.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.48
OUI version       : 12.2.0.9.0
Log file location : /u01/app/oracle/product/26.0.0/dbhome_1/cfgtoollogs/opatch/opatch2026-07-08_16-48-12pm_1.log

Lsinventory Output file location : /u01/app/oracle/product/26.0.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2026-07-08_16-48-12pm.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: grid26
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1):

Oracle Database 26ai                                                 23.0.0.0.0
There are 1 products installed in this Oracle Home.
CLID: P

Interim patches (2) :

Patch  38743688     : applied on Sun Jan 18 12:04:30 GMT 2026
Unique Patch ID:  -1768679395
Patch description:  "OCW RELEASE UPDATE 23.26.1.0.0 (GOLD IMAGE) (38743688) Gold Image"
   Created on 17 Jan 2026, 11:49:55 hrs PST8PDT





Tuesday, 9 June 2026

Oracle PDB status





set lines 200
column name format a30
col restricted for a15
select inst_id, con_id, name, open_mode, restricted from gv$pdbs
order by 1,2;






set lines 200
column name format a30
col open_status for a15
col restricted for a14
select inst_id,
       con_id,
       name,
       open_mode,
       case
            when open_mode like 'READ%' then 'GOOD'
            else 'Validate'
       end as open_status,
       restricted,
       case
            when restricted = 'NO' then 'GOOD**'
            else 'CHECK...'
       end as restricted_status
from gv$pdbs
order by 1,2;






set pagesize 0
SELECT '[PDB Info]' || CHR(10)
     || TRIM(SUBSTR('Instance ID               : ' ||	inst_id,1,60)) || CHR(10)
     || TRIM(SUBSTR('Container ID              : ' ||	con_id,1,60)) || CHR(10)
     || TRIM(SUBSTR('PDB Name                  : ' ||	name,1,60)) || CHR(10)
	 || TRIM(SUBSTR('Open Mode***              : ' ||	open_mode,1,60)) || CHR(10)
     || TRIM(SUBSTR('Restricted**              : ' ||	restricted,1,60)) || CHR(10)
     || TRIM(SUBSTR('DBID                      : ' ||	dbid,1,60)) || CHR(10)
     || TRIM(SUBSTR('CON_UID                   : ' ||	con_uid,1,60)) || CHR(10)
     || TRIM(SUBSTR('Open Time                 : ' ||	TO_CHAR(open_time,'DD-MON-YYYY HH24:MI:SS'),1,60)) || CHR(10)
     || TRIM(SUBSTR('Creation Time             : ' || 	TO_CHAR(creation_time,'DD-MON-YYYY HH24:MI:SS'),1,60)) || CHR(10)
     || TRIM(SUBSTR('Recovery Status           : ' ||	recovery_status,1,60)) || CHR(10)
     || TRIM(SUBSTR('Application Root          : ' ||	application_root,1,60)) || CHR(10)
     || TRIM(SUBSTR('Application PDB           : ' ||	application_pdb,1,60)) || CHR(10)
     || TRIM(SUBSTR('Application Seed          : ' ||	application_seed,1,60)) || CHR(10)
     || TRIM(SUBSTR('Proxy PDB                 : ' ||	proxy_pdb,1,60)) || CHR(10)
     || TRIM(SUBSTR('Local Undo                : ' ||	local_undo,1,60)) || CHR(10)
     || TRIM(SUBSTR('Total Size (MB)           : ' ||	ROUND(total_size/1024/1024,2),1,60)) || CHR(10)
     || TRIM(SUBSTR('Diagnostics Size (MB)     : ' ||	ROUND(diagnostics_size/1024/1024,2),1,60)) || CHR(10)
     || TRIM(SUBSTR('Audit Files Size (MB)     : ' ||	ROUND(audit_files_size/1024/1024,2),1,60)) || CHR(10)
     || TRIM(SUBSTR('Max Size (MB)             : ' || 	ROUND(max_size/1024/1024,2),1,60)) || CHR(10)
     || TRIM(SUBSTR('Last Changed By           : ' || 	last_changed_by,1,60)) || CHR(10)
     || TRIM(SUBSTR('Tenant ID                 : ' || 	tenant_id,1,60)) || CHR(10)
     || TRIM(SUBSTR('Upgrade Level             : ' || 	upgrade_level,1,60))
AS pdb_info
FROM gv$pdbs
ORDER BY inst_id, con_id
;
set pagesize 100

Friday, 22 May 2026

Oracle database size2

Size of Oracle database 
Oracle database size 



col "Database Size" format a20
col "Free space"      format a20
col "Used space"     format a20
select round(sum(used.bytes)/1024/1024/1024 ) || ' GB' "Database Size" , round(sum(used.bytes)/1024/1024/1024 ) - round(free.SS/1024/1024/1024) || ' GB' "Used space" 
, round(free.SS /1024/1024/1024) || ' GB' "Free space" 
from (select bytes from v$datafile 
union all 
select bytes from v$tempfile 
union all 
select bytes from v$log) used , (select sum(bytes) SS from dba_free_space) free 
group by free.SS 
/ 


Database Size        Used space           Free space
-------------------- -------------------- --------------------
2 GB                 2 GB                 0 GB


========================================================

set linesize 100 set numf 999999999999999999999 col SIZE1 for a14 select "size",dbms_xplan.format_size("size") size1 from ( select ( select sum(bytes) data_size from v$datafile ) + ( select nvl(sum(bytes),0) temp_size from v$tempfile ) + ( select sum(bytes) redo_size from sys.v_$log ) + ( select sum(BLOCK_SIZE*FILE_SIZE_BLKS) controlfile_size from v$controlfile) "size" from dual ) ; size SIZE1 ---------------------- -------------- 13781958656 12G

pdb size COL PDB_NAME FOR A30 COL PDB_SIZEGB FOR 99999.99 SELECT d.con_id, c.name AS pdb_name, SUM(d.bytes) / 1024 / 1024 / 1024 AS pdb_sizegb FROM v$datafile d JOIN v$containers c ON d.con_id = c.con_id GROUP BY d.con_id, c.name ORDER BY d.con_id;

col NAME for a15 col SIZEH for a12 select con_id, name, open_mode, total_size/1024/1024/1024 "PDB_SIZE_GB", dbms_xplan.format_size(total_size) sizeh from v$pdbs; CON_ID NAME OPEN_MODE PDB_SIZE_GB SIZEH ---------------------- --------------- ---------- ---------------------- ------------ 2 PDB$SEED READ ONLY 1 1296M 3 ORCLPROD READ WRITE 418 418G
select con_id,bytes,dbms_xplan.format_size(bytes) sizeh from ( select con_id,sum(bytes) bytes from cdb_data_files group by con_id ) ; CON_ID BYTES SIZEH ---------------------- ---------------------- ------------ 1 7203717120 6870M 3 437542977536 407G select ( select sum(bytes)/1024/1024/1024 data_size from v$datafile ) + ( select nvl(sum(bytes),0)/1024/1024/1024 temp_size from v$tempfile ) + ( select sum(bytes)/1024/1024/1024 redo_size from sys.v$log ) + ( select sum(BLOCK_SIZE*FILE_SIZE_BLKS)/1024/1024/1024 controlfile_size from v$controlfile) "Size in GB" from dual


With Database name .. set linesize 300 col "Database Size" for a20 col "Free space" for a20 col "Used space" for a20 col hostname for a37 col Instance for a15 col DB_unique_name for a15 col Tdate heading 'Date' alter session set nls_date_format='dd-mm-yyyy hh24:mi' ; select sysdate Tdate,SYS_CONTEXT('USERENV','HOST') hostname,sys_context('USERENV', 'INSTANCE_NAME') Instance ,SYS_CONTEXT('USERENV','DB_UNIQUE_NAME') DB_unique_name, round(sum(used.bytes)/1024/1024/1024 ) || ' GB' "Database Size" , round(sum(used.bytes)/1024/1024/1024 ) - round(free.SS/1024/1024/1024) || ' GB' "Used space" , round(free.SS /1024/1024/1024) || ' GB' "Free space" from (select bytes from v$datafile union all select bytes from v$tempfile union all select bytes from v$log) used , (select sum(bytes) SS from dba_free_space) free group by free.SS / --- with ARCHIVELOG status set linesize 300 col "Database Size" for a20 col "Free space" for a20 col "Used space" for a20 col hostname for a37 col Instance for a15 col DB_unique_name for a15 col Tdate heading 'Date' alter session set nls_date_format='dd-mm-yyyy hh24:mi' ; select sysdate Tdate,SYS_CONTEXT('USERENV','HOST') hostname,sys_context('USERENV', 'INSTANCE_NAME') Instance ,SYS_CONTEXT('USERENV','DB_UNIQUE_NAME') DB_unique_name, round(sum(used.bytes)/1024/1024/1024 ) || ' GB' "Database Size" ,round(sum(used.bytes)/1024/1024/1024 ) - round(free.SS/1024/1024/1024) || ' GB' "Used space" ,round(free.SS /1024/1024/1024) || ' GB' "Free space",LOG_MODE from (select bytes from v$datafile union all select bytes from v$tempfile union all select bytes from v$log) used , (select sum(bytes) SS from dba_free_space) free,(select LOG_MODE from v$database) group by free.SS,LOG_MODE / ----- select ( select sum(bytes)/1024/1024/1024 data_size from dba_data_files ) + ( select nvl(sum(bytes),0)/1024/1024/1024 temp_size from dba_temp_files ) + ( select sum(bytes)/1024/1024/1024 redo_size from sys.v_$log ) + ( select sum(BLOCK_SIZE*FILE_SIZE_BLKS)/1024/1024/1024 controlfile_size from v$controlfile) "Size in GB" from dual Size in GB ---------- 1.82537842 on standby !! ================================== select ( select sum(bytes)/1024/1024/1024 data_size from v$datafile ) + ( select nvl(sum(bytes),0)/1024/1024/1024 temp_size from v$tempfile ) + ( select sum(bytes)/1024/1024/1024 redo_size from sys.v$log ) + ( select sum(BLOCK_SIZE*FILE_SIZE_BLKS)/1024/1024/1024 controlfile_size from v$controlfile) "Size in GB" from dual set linesize 200 col "Database Size" for a20 col "Free space" for a20 col "Used space" for a20 col hostname for a35 col Instance for a15 col DB_unique_name for a15 col Tdate heading 'Date' alter session set nls_date_format='dd-mm-yyyy hh24:mi' ; select sysdate Tdate,SYS_CONTEXT('USERENV','HOST') hostname,sys_context('USERENV', 'INSTANCE_NAME') Instance , SYS_CONTEXT('USERENV','DB_UNIQUE_NAME') DB_unique_name, ( select sum(bytes)/1024/1024/1024 data_size from v$datafile ) + ( select nvl(sum(bytes),0)/1024/1024/1024 temp_size from v$tempfile ) + ( select sum(bytes)/1024/1024/1024 redo_size from sys.v$log ) + ( select sum(BLOCK_SIZE*FILE_SIZE_BLKS)/1024/1024/1024 controlfile_size from v$controlfile) "Size in GB" from dual; with SGA .. set lines 400 col platform_name format a30 col open_mode format a20 col host_name format a20 col version format a10 col status format a20 col uptime format a60 col name format a10 col "DB size GB" for 99999999.99 SELECT D.NAME,D.PLATFORM_NAME,D.CREATED, D.OPEN_MODE,substr(I.HOST_NAME,1,20) HOST_NAME ,I.VERSION, I.ARCHIVER,I.STATUS, FLOOR (SYSDATE - STARTUP_TIME) || ' DAYS(S) '|| TRUNC (24* ( (SYSDATE - STARTUP_TIME) - TRUNC (SYSDATE - STARTUP_TIME))) || ' HOUR(S) '|| MOD ( TRUNC (1440* ( (SYSDATE - STARTUP_TIME) - TRUNC (SYSDATE - STARTUP_TIME))),60)|| ' MINUTE(S) '|| MOD (TRUNC (86400* ( (SYSDATE - STARTUP_TIME) - TRUNC (SYSDATE - STARTUP_TIME))),60)|| ' SECONDS' UPTIME, (select ( select sum(bytes)/1024/1024/1024 data_size from v$datafile ) + ( select nvl(sum(bytes),0)/1024/1024/1024 temp_size from v$tempfile ) + ( select sum(bytes)/1024/1024/1024 redo_size from sys.v$log ) + ( select sum(BLOCK_SIZE*FILE_SIZE_BLKS)/1024/1024/1024 controlfile_size from v$controlfile) from dual) "DB size GB", ( SELECT ROUND(BYTES/1024/1024/1024) "mem GB" FROM V$SGAINFO WHERE NAME = 'Maximum SGA Size' ) "SGA max size GB" FROM V$DATABASE D INNER JOIN V$INSTANCE I ON UPPER(D.NAME) = UPPER(I.INSTANCE_NAME); === file location !!! select distinct substr(name, 1, instr(name, '/',-1)) PATH from ( select name from v$datafile union all select NAME from v$controlfile union all select MEMBER name from v$logfile union all select name from v$tempfile ) order by 1; select '===========================================================' || chr(10) || 'Total Physical Size = ' || round(redolog_size_gb+dbfiles_size_gb+tempfiles_size_gb+archlog_size_gb+ctlfiles_size_gb,2) || ' GB' || chr(10) || '===========================================================' || chr(10) || ' Redo Logs Size : ' || round(redolog_size_gb,3) || ' GB' || chr(10) || ' Data Files Size : ' || round(dbfiles_size_gb,3) || ' GB' || chr(10) || ' Temp Files Size : ' || round(tempfiles_size_gb,3) || ' GB' || chr(10) || ' Archive Log Size : ' || round(archlog_size_gb,3) || ' GB' || chr(10) || ' Control Files Size : ' || round(ctlfiles_size_gb,3) || ' GB' || chr(10) || '===========================================================' || chr(10) || 'Actual Database Size = ' || db_size_gb || ' GB' || chr(10) || '===========================================================' || chr(10) || ' Used Database Size : ' || used_db_size_gb || ' GB' || chr(10) || ' Free Database Size : ' || free_db_size_gb || ' GB' as summary from ( select sys_context('USERENV', 'DB_NAME') db_name ,(select sum(bytes)/1024/1024/1024 redo_size from v$log ) redolog_size_gb ,(select sum(bytes)/1024/1024/1024 data_size from dba_data_files ) dbfiles_size_gb ,(select nvl(sum(bytes),0)/1024/1024/1024 temp_size from dba_temp_files ) tempfiles_size_gb ,(select sum(bytes)/1024/1024/1024 from v$log where sequence# in (select sequence# from v$loghist)) archlog_size_gb ,(select sum(block_size*file_size_blks)/1024/1024/1024 controlfile_size from v$controlfile) ctlfiles_size_gb ,round(sum(used.bytes)/1024/1024/1024,3) db_size_gb ,round(sum(used.bytes)/1024/1024/1024,3) - round(free.f/1024 /1024/ 1024) used_db_size_gb ,round(free.f/1024/1024/1024,3) free_db_size_gb from (select bytes from v$datafile union all select bytes from v$tempfile) used ,(select sum(bytes) as f from dba_free_space) free group by free.f); from web COLUMN name NEW_VALUE _instname NOPRINT select lower(instance_name) name from v$instance; COLUMN conname NEW_VALUE _conname NOPRINT select case when a.conname = 'CDB$ROOT' then 'ROOT' when a.conname = 'PDB$SEED' then 'SEED' else a.conname end as conname from (select SYS_CONTEXT('USERENV', 'CON_NAME') conname from dual) a; COLUMN conid NEW_VALUE _conid NOPRINT select SYS_CONTEXT('USERENV', 'CON_ID') conid from dual; col bytes format 999,999,999,999,999,999 WITH sizes AS ( SELECT /*+ MATERIALIZE NO_MERGE */ /* 1e.77 */ 'Data' file_type, SUM(bytes) bytes FROM v$datafile UNION ALL SELECT 'Temp' file_type, SUM(bytes) bytes FROM v$tempfile UNION ALL SELECT 'Log' file_type, SUM(bytes) * MAX(members) bytes FROM v$log UNION ALL SELECT 'Control' file_type, SUM(block_size * file_size_blks) bytes FROM v$controlfile ), dbsize AS ( SELECT /*+ MATERIALIZE NO_MERGE */ /* 1e.77 */ 'Total' file_type, SUM(bytes) bytes FROM sizes ) SELECT d.dbid, d.name db_name, s.file_type, s.bytes, ROUND(s.bytes/POWER(10,9),3) gb, CASE WHEN s.bytes > POWER(10,15) THEN ROUND(s.bytes/POWER(10,15),3)||' P' WHEN s.bytes > POWER(10,12) THEN ROUND(s.bytes/POWER(10,12),3)||' T' WHEN s.bytes > POWER(10,9) THEN ROUND(s.bytes/POWER(10,9),3)||' G' WHEN s.bytes > POWER(10,6) THEN ROUND(s.bytes/POWER(10,6),3)||' M' WHEN s.bytes > POWER(10,3) THEN ROUND(s.bytes/POWER(10,3),3)||' K' WHEN s.bytes > 0 THEN s.bytes||' B' END display FROM v$database d, sizes s UNION ALL SELECT d.dbid, d.name db_name, s.file_type, s.bytes, ROUND(s.bytes/POWER(10,9),3) gb, CASE WHEN s.bytes > POWER(10,15) THEN ROUND(s.bytes/POWER(10,15),3)||' P' WHEN s.bytes > POWER(10,12) THEN ROUND(s.bytes/POWER(10,12),3)||' T' WHEN s.bytes > POWER(10,9) THEN ROUND(s.bytes/POWER(10,9),3)||' G' WHEN s.bytes > POWER(10,6) THEN ROUND(s.bytes/POWER(10,6),3)||' M' WHEN s.bytes > POWER(10,3) THEN ROUND(s.bytes/POWER(10,3),3)||' K' WHEN s.bytes > 0 THEN s.bytes||' B' END display FROM v$database d, dbsize s; ==== -- with Pluggable database size compute sum of GB on report break on report set linesize 300 pagesize 300 col datafile_name for a100 col container for a20 col gb for 9999999.99 select c.name container, sum(BYTES)/1024/1024/1024 GB from x$kcvfh x, v$datafile d, v$containers c where d.file# = x.hxfil and d.con_id = c.con_id --and c.name in ('PDB$SEED','CDB$ROOT') group by c.name ; CONTAINER GB -------------------- ----------- PDB9 138.66 ANUJV 5.19 PDB$SEED 4.91 CDB$ROOT 4.15 ----------- sum 152.90 Via Email !!!! Script /home/oracle/DBA/db_report.sql SET MARKUP HTML ON SPOOL ON set termout off set pagesize 999 set linesize 300 set feedback off SET MARKUP HTML ON TABLE "class=sysaud cellspacing=2 border='2' width='95%' align='center' " ENTMAP OFF spool db_report.html set pause off prompt prompt DATABASE Size prompt prompt set linesize 300 col "Database Size" for a20 col "Free space" for a20 col "Used space" for a20 col hostname for a35 col Instance for a15 col DB_unique_name for a15 col Tdate heading 'Date' alter session set nls_date_format='dd-mm-yyyy hh24:mi' ; select sysdate Tdate,SYS_CONTEXT('USERENV','HOST') hostname,sys_context('USERENV', 'INSTANCE_NAME') Instance ,SYS_CONTEXT('USERENV','DB_UNIQUE_NAME') DB_unique_name, round(sum(used.bytes)/1024/1024/1024 ) || ' GB' "Database Size" , round(sum(used.bytes)/1024/1024/1024 ) - round(free.SS/1024/1024/1024) || ' GB' "Used space" , round(free.SS /1024/1024/1024) || ' GB' "Free space" from (select bytes from v$datafile union all select bytes from v$tempfile union all select bytes from v$log) used , (select sum(bytes) SS from dba_free_space) free group by free.SS / spool off exit ====================== cat dbsize.sql SET MARKUP HTML ON SPOOL ON set termout off set pagesize 999 set linesize 300 set feedback off SET MARKUP HTML ON TABLE "class=sysaud cellspacing=2 border='2' width='95%' align='center' " ENTMAP OFF alter session set nls_date_format='dd-mm-yyyy hh24:mi' ; set linesize 300 col "Database Size" for a20 col "Free space" for a20 col "Used space" for a20 col hostname for a35 col Instance for a15 col DB_unique_name for a15 col Tdate heading 'Date' spool DB.html append select sysdate Tdate,SYS_CONTEXT('USERENV','HOST') hostname,sys_context('USERENV', 'INSTANCE_NAME') Instance ,SYS_CONTEXT('USERENV','DB_UNIQUE_NAME') DB_unique_name, round(sum(used.bytes)/1024/1024/1024 ) || ' GB' "Database Size" , round(sum(used.bytes)/1024/1024/1024 ) - round(free.SS/1024/1024/1024) || ' GB' "Used space" , round(free.SS /1024/1024/1024) || ' GB' "Free space" from (select bytes from v$datafile union all select bytes from v$tempfile union all select bytes from v$log) used , (select sum(bytes) SS from dba_free_space) free group by free.SS / cat asm1.sql set feedback off var v number ; begin :v := nvl('95',90); end; / alter session set nls_date_format='dd-mm-yyyy hh24:mi' ; set feedback off pagesize 1000 head off underline _ linesize 150 SET MARKUP HTML ON SPOOL ON set termout off set pagesize 999 set linesize 300 set feedback off SET MARKUP HTML ON TABLE "class=sysaud cellspacing=2 border='2' width='95%' align='center' " ENTMAP OFF spool ASM.html col total_gb format 999,999,999 heading 'total gb ' col mb_avail format 999,999,999 heading 'mb avail' col used format 999.99 heading '% used' col volume_name format a10 col volume_device format a25 col mountpath format a15 col attention format a20 col name format a15 select g.group_number , g.name , g.state , g.total_mb/1024 total_gb , trunc((g.free_mb/1024),2) free_gb , usable_file_mb usable_file_mb , count(DISK_NUMBER) Total_Disks , trunc(max(d.TOTAL_MB/1024),2) disk_size , (round((1- (g.free_mb / g.total_mb))*100, 2)) "TotalUsed%" , case when (ROUND((1- (g.free_mb / g.total_mb))*100, 2)>:v) then :v||'% full ***' else 'Good' end as attention from v$asm_diskgroup g,v$asm_disk d where 1=1 and d.group_number = g.group_number --and g.Name not in ('GRID' ) group by g.group_number, g.name,g.state, g.total_mb/1024, trunc((g.free_mb/1024),2), usable_file_mb,(round((1- (g.free_mb / g.total_mb))*100, 2)) ORDER BY "TotalUsed%" desc ;

Oracle DBA

anuj blog Archive