Oracle 18c Database Manual Upgrade From 12.2.0.1 to 18.3.0.0.0 :-
Description:-
A manual upgrade consists of running SQL scripts and utilities from a command line to upgrade a database to the new Oracle Database release.
Oracle Database Releases That Support Direct Upgrade
Review the supported options for direct upgrades to the latest Oracle Database release.
You can perform a direct upgrade to the new release from the following releases:
• 11.2.0.3 and 11.2.0.4
• 12.1.0.1 and 12.1.0.2
• 12.2.0.1
Take RMAN backups before upgrade.
rman target / run { ALLOCATE CHANNEL chan_name TYPE DISK; BACKUP DATABASE FORMAT '/u01%U' TAG before_upgrade; BACKUP CURRENT CONTROLFILE FORMAT '/u01/control%U'; }
Ensure backup is complete.
SQL> SELECT * FROM v$backup WHERE status != 'NOT ACTIVE'; no rows selected
Empty Recycle bin.
SQL> PURGE DBA_RECYCLEBIN ; DBA Recyclebin purged.
Run Gather statistics to finish upgrade soon.
SQL> EXEC DBMS_STATS.GATHER_DICTIONARY_STATS; PL/SQL procedure successfully completed.
Run the preupgrade tool:
The preupgrade.jar Pre-Upgrade Information Tool is supplied with Oracle Database 18c.
This tool has reside in new oracle home.
/u01/app/oracle/product/18.3.0/db_1/rdbms/admin/preupgrade.jar
[oracle@ram ~]$ export ORACLE_SID=orcldb [oracle@ram ~]$ sqlplus / as sysdba SQL*Plus: Release 12.2.0.1.0 Production on Thu Feb 7 05:03:08 2019 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 2516582400 bytes Fixed Size 8623832 bytes Variable Size 671090984 bytes Database Buffers 1828716544 bytes Redo Buffers 8151040 bytes Database mounted. Database opened. SQL> [oracle@ram db_1]$ export ORACLE_SID=orcldb [oracle@ram db_1]$ export ORACLE_HOME=/u01/app/oracle/product/12.2.0.1/db_1 [oracle@ram db_1]$ /u01/app/oracle/product/12.2.0.1/db_1/jdk/bin/java -jar /u01/app/oracle/product/18.0.0/db_1/rdbms/admin/preupgrade.jar FILE DIR /u01/preupgrade1/ ================== PREUPGRADE SUMMARY ================== /u01/preupgrade1/preupgrade.log /u01/preupgrade1/preupgrade_fixups.sql /u01/preupgrade1/postupgrade_fixups.sql Execute fixup scripts as indicated below: Before upgrade log into the database and execute the preupgrade fixups @/u01/preupgrade1/preupgrade_fixups.sql After the upgrade: Log into the database and execute the postupgrade fixups @/u01/preupgrade1/postupgrade_fixups.sql Preupgrade complete: 2019-02-08T22:48:35
After run the above tool we will get below sql files.
[oracle@ram db_1]$ cd /u01/preupgrade1/ [oracle@ram preupgrade1]$ ls -lrt total 628 drwxr-xr-x. 3 oracle oinstall 4096 Feb 8 22:48 oracle -rw-r--r--. 1 oracle oinstall 7963 Feb 8 22:48 preupgrade_driver.sql -rw-r--r--. 1 oracle oinstall 14846 Feb 8 22:48 dbms_registry_extended.sql -rw-r--r--. 1 oracle oinstall 422048 Feb 8 22:48 preupgrade_package.sql -rw-r--r--. 1 oracle oinstall 14383 Feb 8 22:48 parameters.properties -rw-r--r--. 1 oracle oinstall 83854 Feb 8 22:48 preupgrade_messages.properties drwxr-xr-x. 3 oracle oinstall 4096 Feb 8 22:48 upgrade -rw-r--r--. 1 oracle oinstall 50172 Feb 8 22:48 components.properties -rw-r--r--. 1 oracle oinstall 2 Feb 8 22:48 checksBuffer.tmp -rw-r--r--. 1 oracle oinstall 5838 Feb 8 22:48 preupgrade_fixups.sql -rw-r--r--. 1 oracle oinstall 7593 Feb 8 22:48 postupgrade_fixups.sql -rw-r--r--. 1 oracle oinstall 5641 Feb 8 22:48 preupgrade.log
Run the preupgrade_fixup.sql
[oracle@ram ~]$ export ORACLE_SID=orcldb [oracle@ram ~]$ export ORACLE_HOME=/u01/app/oracle/product/12.2.0.1/db_1 [oracle@ram ~]$ export PATH=/u01/app/oracle/product/12.2.0.1/db_1/bin:$PATH [oracle@ram ~]$ cd /u01/preupgrade1/ [oracle@ram preupgrade1]$ sqlplus / as sysdba SQL*Plus: Release 12.2.0.1.0 Production on Fri Feb 8 22:57:55 2019 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production SQL> @/u01/preupgrade1/preupgrade_fixups.sql Executing Oracle PRE-Upgrade Fixup Script Auto-Generated by: Oracle Preupgrade Script Version: 18.0.0.0.0 Build: 1 Generated on: 2019-02-08 22:48:32 For Source Database: ORCLDB Source Database Version: 12.2.0.1.0 For Upgrade to Version: 18.0.0.0.0 Preup Preupgrade Action Issue Is Number Preupgrade Check Name Remedied Further DBA Action ------ ------------------------ ---------- ------------------------ 1. dictionary_stats YES None. 2. tablespaces_info NO Informational only. Further action is optional. The fixup scripts have been run and resolved what they can. However, there are still issues originally identified by the preupgrade that have not been remedied and are still present in the database. Depending on the severity of the specific issue, and the nature of the issue itself, that could mean that your database is not ready for upgrade. To resolve the outstanding issues, start by reviewing the preupgrade_fixups.sql and searching it for the name of the failed CHECK NAME or Preupgrade Action Number listed above. There you will find the original corresponding diagnostic message from the preupgrade which explains in more detail what still needs to be done. PL/SQL procedure successfully completed.
Check Timezone version :
Check if target database’s time zone version is lower than the source database time zone version.
SQL> SELECT version FROM v$timezone_file; VERSION ------- 26 SQL> SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value FROM DATABASE_PROPERTIES WHERE PROPERTY_NAME LIKE 'DST_%' ORDER BY PROPERTY_NAME; PROPERTY_NAME VALUE ------------------------ ----- DST_PRIMARY_TT_VERSION 26 DST_SECONDARY_TT_VERSION 0 DST_UPGRADE_STATE NONE
Upgrade Database from 12.2.0.1 to 18c :-
Shutdown the 12c database:
SQL> shut immediate Database closed. Database dismounted. ORACLE instance shut down.
Copy the parameter and password file from the 12c home to the new 18c home.
[oracle@ram ~]$ cd /u01/app/oracle/product/12.2.0.1/db_1/dbs/ [oracle@ram dbs]$ ls -lrth total 20K -rwxrwxr-x. 1 oracle oinstall 3.1K May 15 2015 init.ora -rwxrwxr-x. 1 oracle oinstall 24 Feb 7 04:01 lkORCLDB -rw-r-----. 1 oracle oinstall 3.5K Feb 7 04:06 orapworcldb -rwxrwxr-x. 1 oracle oinstall 3.5K Feb 8 22:44 spfileorcldb.ora -rwxrwxr-x. 1 oracle oinstall 1.6K Feb 8 23:06 hc_orcldb.dat [oracle@ram dbs]$ cp spfileorcldb.ora orapworcldb /u01/app/oracle/product/18.0.0/db_1/dbs/
Set new ORACLE_HOME for 18c location and startup database in upgrade mode :
[oracle@ram ~]$ export ORACLE_SID=orcldb [oracle@ram ~]$ export ORACLE_HOME=/u01/app/oracle/product/18.0.0/db_1 [oracle@ram ~]$ export PATH=/u01/app/oracle/product/18.0.0/db_1/bin:$PATH [oracle@ram ~]$ sqlplus / as sysdba SQL*Plus: Release 18.0.0.0.0 - Production on Fri Feb 8 23:10:39 2019 Version 18.3.0.0.0 Copyright (c) 1982, 2018, Oracle. All rights reserved. Connected to an idle instance. SQL> startup upgrade ORACLE instance started. Total System Global Area 2516580184 bytes Fixed Size 8660824 bytes Variable Size 671088640 bytes Database Buffers 1828716544 bytes Redo Buffers 8114176 bytes Database mounted. Database opened.
Run the dbupgrade utility :
[oracle@ram ~]$ /u01/app/oracle/product/18.0.0/db_1/bin/dbupgrade -n 4 -l /u01/ Argument list for [/u01/app/oracle/product/18.0.0/db_1/rdbms/admin/catctl.pl] Run in c = 0 Do not run in C = 0 Input Directory d = 0 Echo OFF e = 1 Simulate E = 0 Forced cleanup F = 0 Log Id i = 0 Child Process I = 0 Log Dir l = /u01/ Priority List Name L = 0 Upgrade Mode active M = 0 SQL Process Count n = 4 SQL PDB Process Count N = 0 Open Mode Normal o = 0 Start Phase p = 0 End Phase P = 0 Reverse Order r = 0 AutoUpgrade Resume R = 0 Script s = 0 Serial Run S = 0 RO User Tablespaces T = 0 Display Phases y = 0 Debug catcon.pm z = 0 Debug catctl.pl Z = 0 catctl.pl VERSION: [18.0.0.0.0] STATUS: [Production] BUILD: [RDBMS_18.3.0.0.0DBRU_LINUX.X64_180627] /u01/app/oracle/product/18.0.0/db_1/rdbms/admin/orahome = [/u01/app/oracle/product/18.0.0/db_1] /u01/app/oracle/product/18.0.0/db_1/bin/orabasehome = [/u01/app/oracle/product/18.0.0/db_1] catctlGetOrabase = [/u01/app/oracle/product/18.0.0/db_1] Analyzing file /u01/app/oracle/product/18.0.0/db_1/rdbms/admin/catupgrd.sql Log file directory = [/u01/] catcon::set_log_file_base_path: ALL catcon-related output will be written to [/u01/catupgrd_catcon_93556.lst] catcon::set_log_file_base_path: catcon: See [/u01/catupgrd*.log] files for output generated by scripts catcon::set_log_file_base_path: catcon: See [/u01/catupgrd_*.lst] files for spool files, if any Number of Cpus = 1 Database Name = orcldb DataBase Version = 12.2.0.1.0 Parallel SQL Process Count = 4 Components in [orcldb] Installed [APS CATALOG CATJAVA CATPROC CONTEXT DV JAVAVM OLS ORDIM OWM SDO XDB XML XOQ] Not Installed [APEX EM MGW ODM RAC WK] ------------------------------------------------------ Phases [0-108] Start Time:[2019_02_08 23:13:44] ------------------------------------------------------ *********** Executing Change Scripts *********** Serial Phase #:0 [orcldb] Files:1 Time: 26s *************** Catalog Core SQL *************** Serial Phase #:1 [orcldb] Files:5 Time: 64s Restart Phase #:2 [orcldb] Files:1 Time: 0s *********** Catalog Tables and Views *********** Parallel Phase #:3 [orcldb] Files:19 Time: 43s Restart Phase #:4 [orcldb] Files:1 Time: 0s ************* Catalog Final Scripts ************ Serial Phase #:5 [orcldb] Files:7 Time: 28s ***************** Catproc Start **************** Serial Phase #:6 [orcldb] Files:1 Time: 18s ***************** Catproc Types **************** Serial Phase #:7 [orcldb] Files:2 Time: 19s Restart Phase #:8 [orcldb] Files:1 Time: 0s **************** Catproc Tables **************** Parallel Phase #:9 [orcldb] Files:66 Time: 52s Restart Phase #:10 [orcldb] Files:1 Time: 0s ************* Catproc Package Specs ************ Serial Phase #:11 [orcldb] Files:1 Time: 134s Restart Phase #:12 [orcldb] Files:1 Time: 0s ************** Catproc Procedures ************** Parallel Phase #:13 [orcldb] Files:94 Time: 22s Restart Phase #:14 [orcldb] Files:1 Time: 1s Parallel Phase #:15 [orcldb] Files:117 Time: 39s Restart Phase #:16 [orcldb] Files:1 Time: 0s Serial Phase #:17 [orcldb] Files:17 Time: 5s Restart Phase #:18 [orcldb] Files:1 Time: 1s ***************** Catproc Views **************** Parallel Phase #:19 [orcldb] Files:32 Time: 47s Restart Phase #:20 [orcldb] Files:1 Time: 0s Serial Phase #:21 [orcldb] Files:3 Time: 13s Restart Phase #:22 [orcldb] Files:1 Time: 1s Parallel Phase #:23 [orcldb] Files:24 Time: 340s Restart Phase #:24 [orcldb] Files:1 Time: 1s Parallel Phase #:25 [orcldb] Files:12 Time: 208s Restart Phase #:26 [orcldb] Files:1 Time: 1s Serial Phase #:27 [orcldb] Files:1 Time: 0s Serial Phase #:28 [orcldb] Files:3 Time: 4s Serial Phase #:29 [orcldb] Files:1 Time: 0s Restart Phase #:30 [orcldb] Files:1 Time: 1s *************** Catproc CDB Views ************** Serial Phase #:31 [orcldb] Files:1 Time: 0s Restart Phase #:32 [orcldb] Files:1 Time: 1s Serial Phase #:34 [orcldb] Files:1 Time: 0s ***************** Catproc PLBs ***************** Serial Phase #:35 [orcldb] Files:288 Time: 38s Serial Phase #:36 [orcldb] Files:1 Time: 0s Restart Phase #:37 [orcldb] Files:1 Time: 0s Serial Phase #:38 [orcldb] Files:2 Time: 12s Restart Phase #:39 [orcldb] Files:1 Time: 0s *************** Catproc DataPump *************** Serial Phase #:40 [orcldb] Files:3 Time: 76s Restart Phase #:41 [orcldb] Files:1 Time: 1s ****************** Catproc SQL ***************** Parallel Phase #:42 [orcldb] Files:13 Time: 226s Restart Phase #:43 [orcldb] Files:1 Time: 1s Parallel Phase #:44 [orcldb] Files:11 Time: 19s Restart Phase #:45 [orcldb] Files:1 Time: 1s Parallel Phase #:46 [orcldb] Files:3 Time: 3s Restart Phase #:47 [orcldb] Files:1 Time: 0s ************* Final Catproc scripts ************ Serial Phase #:48 [orcldb] Files:1 Time: 5s Restart Phase #:49 [orcldb] Files:1 Time: 0s ************** Final RDBMS scripts ************* Serial Phase #:50 [orcldb] Files:1 Time: 5s ************ Upgrade Component Start *********** Serial Phase #:51 [orcldb] Files:1 Time: 0s Restart Phase #:52 [orcldb] Files:1 Time: 1s ********** Upgrading Java and non-Java ********* Serial Phase #:53 [orcldb] Files:2 Time: 334s ***************** Upgrading XDB **************** Restart Phase #:54 [orcldb] Files:1 Time: 1s Serial Phase #:56 [orcldb] Files:3 Time: 6s Serial Phase #:57 [orcldb] Files:3 Time: 7s Parallel Phase #:58 [orcldb] Files:9 Time: 5s Parallel Phase #:59 [orcldb] Files:25 Time: 13s Serial Phase #:60 [orcldb] Files:4 Time: 15s Serial Phase #:61 [orcldb] Files:1 Time: 0s Serial Phase #:62 [orcldb] Files:31 Time: 5s Serial Phase #:63 [orcldb] Files:1 Time: 0s Parallel Phase #:64 [orcldb] Files:6 Time: 5s Serial Phase #:65 [orcldb] Files:2 Time: 36s Serial Phase #:66 [orcldb] Files:3 Time: 54s **************** Upgrading ORDIM *************** Restart Phase #:67 [orcldb] Files:1 Time: 1s Serial Phase #:69 [orcldb] Files:1 Time: 1s Parallel Phase #:70 [orcldb] Files:2 Time: 58s Serial Phase #:71 [orcldb] Files:1 Time: 90s Restart Phase #:72 [orcldb] Files:1 Time: 0s Parallel Phase #:73 [orcldb] Files:2 Time: 15s Serial Phase #:74 [orcldb] Files:2 Time: 2s ***************** Upgrading SDO **************** Restart Phase #:75 [orcldb] Files:1 Time: 0s Serial Phase #:77 [orcldb] Files:1 Time: 63s Serial Phase #:78 [orcldb] Files:1 Time: 2s Restart Phase #:79 [orcldb] Files:1 Time: 0s Serial Phase #:80 [orcldb] Files:1 Time: 59s Restart Phase #:81 [orcldb] Files:1 Time: 1s Parallel Phase #:82 [orcldb] Files:3 Time: 85s Restart Phase #:83 [orcldb] Files:1 Time: 1s Serial Phase #:84 [orcldb] Files:1 Time: 5s Restart Phase #:85 [orcldb] Files:1 Time: 1s Serial Phase #:86 [orcldb] Files:1 Time: 8s Restart Phase #:87 [orcldb] Files:1 Time: 0s Parallel Phase #:88 [orcldb] Files:4 Time: 114s Restart Phase #:89 [orcldb] Files:1 Time: 0s Serial Phase #:90 [orcldb] Files:1 Time: 1s Restart Phase #:91 [orcldb] Files:1 Time: 1s Serial Phase #:92 [orcldb] Files:2 Time: 11s Restart Phase #:93 [orcldb] Files:1 Time: 0s Serial Phase #:94 [orcldb] Files:1 Time: 1s Restart Phase #:95 [orcldb] Files:1 Time: 0s ******* Upgrading ODM, WK, EXF, RUL, XOQ ******* Serial Phase #:96 [orcldb] Files:1 Time: 19s Restart Phase #:97 [orcldb] Files:1 Time: 0s *********** Final Component scripts *********** Serial Phase #:98 [orcldb] Files:1 Time: 2s ************* Final Upgrade scripts ************ Serial Phase #:99 [orcldb] Files:1 Time: 153s ******************* Migration ****************** Serial Phase #:100 [orcldb] Files:1 Time: 0s *** End PDB Application Upgrade Pre-Shutdown *** Serial Phase #:101 [orcldb] Files:1 Time: 1s Serial Phase #:102 [orcldb] Files:1 Time: 0s Serial Phase #:103 [orcldb] Files:1 Time: 80s ***************** Post Upgrade ***************** Serial Phase #:104 [orcldb] Files:1 Time: 5s **************** Summary report **************** Serial Phase #:105 [orcldb] Files:1 Time: 2s *** End PDB Application Upgrade Post-Shutdown ** Serial Phase #:106 [orcldb] Files:1 Time: 0s Serial Phase #:107 [orcldb] Files:1 Time: 0s Serial Phase #:108 [orcldb] Files:1 Time: 23s ------------------------------------------------------ Phases [0-108] End Time:[2019_02_08 23:59:27] ------------------------------------------------------ Grand Total Time: 2746s LOG FILES: (/u01//catupgrd*.log) Upgrade Summary Report Located in: /u01//upg_summary.log Grand Total Upgrade Time: [0d:0h:45m:46s]
Execute Post-Upgrade Status Tool, utlu122s.sql.
SQL> @utlu122s.sql
Oracle Database Release 18 Post-Upgrade Status Tool 02-09-2019 00:16:5
Component Current Full Elapsed Time
Name Status Version HH:MM:SS
Oracle Server UPGRADED 18.3.0.0.0 00:24:12
JServer JAVA Virtual Machine VALID 18.3.0.0.0 00:01:38
Oracle XDK UPGRADED 18.3.0.0.0 00:00:45
Oracle Database Java Packages UPGRADED 18.3.0.0.0 00:00:19
OLAP Analytic Workspace UPGRADED 18.3.0.0.0 00:00:20
Oracle Label Security UPGRADED 18.3.0.0.0 00:00:09
Oracle Database Vault UPGRADED 18.3.0.0.0 00:00:30
Oracle Text UPGRADED 18.3.0.0.0 00:00:53
Oracle Workspace Manager UPGRADED 18.3.0.0.0 00:00:55
Oracle Real Application Clusters UPGRADED 18.3.0.0.0 00:00:00
Oracle XML Database UPGRADED 18.3.0.0.0 00:02:25
Oracle Multimedia UPGRADED 18.3.0.0.0 00:02:44
Spatial UPGRADED 18.3.0.0.0 00:05:50
Oracle OLAP API UPGRADED 18.3.0.0.0 00:00:17
Upgrade Datapatch 00:02:27
Final Actions 00:02:33
Post Upgrade 00:00:04
Post Upgrade Datapatch 00:00:24
Total Upgrade Time: 00:44:17
Database time zone version is 26. It is older than current release time
zone version 31. Time zone upgrade is needed using the DBMS_DST package.
Summary Report File = /u01//upg_summary.log
00:16:53 SQL>
00:16:53 SQL> @catuppst.sql
00:21:32 SQL> Rem
00:21:32 SQL> Rem $Header: rdbms/admin/catuppst.sql /main/60 2017/08/03 17:44:03 wesmith Exp $
00:21:32 SQL> Rem
00:21:32 SQL> Rem catuppst.sql
00:21:32 SQL> Rem
00:21:32 SQL> Rem Copyright (c) 2006, 2017, Oracle and/or its affiliates.
00:21:32 SQL> Rem All rights reserved.
00:21:32 SQL> Rem
00:21:32 SQL> Rem NAME
00:21:32 SQL> Rem catuppst.sql - CATalog UPgrade PoST-upgrade actions
00:21:32 SQL> Rem
00:21:32 SQL> Rem DESCRIPTION
00:21:32 SQL> Rem This post-upgrade script performs remaining upgrade actions that
00:21:32 SQL> Rem do not require that the database be open in UPGRADE mode.
00:21:32 SQL> Rem Automatically apply the latest PSU.
00:21:32 SQL> Rem
00:21:32 SQL> Rem NOTES
00:21:32 SQL> Rem You must be connected AS SYSDBA to run this script.
00:21:32 SQL> Rem
00:21:32 SQL> Rem BEGIN SQL_FILE_METADATA
00:21:32 SQL> Rem SQL_SOURCE_FILE: rdbms/admin/catuppst.sql
00:21:32 SQL> Rem SQL_SHIPPED_FILE: rdbms/admin/catuppst.sql
00:21:32 SQL> Rem SQL_PHASE: UPGRADE
00:21:32 SQL> Rem SQL_STARTUP_MODE: UPGRADE
00:21:32 SQL> Rem SQL_IGNORABLE_ERRORS: NONE
00:21:32 SQL> Rem SQL_CALLING_FILE: rdbms/admin/catupgrd.sql
00:21:32 SQL> Rem END SQL_FILE_METADATA
00:21:32 SQL> Rem
00:21:32 SQL> Rem MODIFIED (MM/DD/YY)
00:21:32 SQL> Rem wesmith 08/07/17 - bug 22187143: fix dba_part/subpart_key_columns_v$
00:21:32 SQL> Rem cmlim 05/01/17 - bug 25248712 - Move the copy for bug 19651064
00:21:32 SQL> Rem from catuppst.sql to a1201000.sql
00:21:32 SQL> Rem cmlim 04/08/17 - bug 25248712: cut down on # of parallel slaves
00:21:32 SQL> Rem spawned
00:21:32 SQL> Rem frealvar 03/10/17 - move the gather_fixed_objects_stats code for Bug
00:21:32 SQL> Rem 14258301 as a preupgrade check
00:21:32 SQL> Rem raeburns 03/08/17 - Bug 25616909: Use UPGRADE for SQL_PHASE
00:21:32 SQL> Rem stanaya 12/08/16 - Bug-25191487 : adding sql metadata
00:21:32 SQL> Rem pyam 11/10/16 - 70732: add catalog app upgrade for post-shutdown
00:21:32 SQL> Rem anighosh 09/15/16 - Bug 24669189: Cleanup utlmmig replacement tables
00:21:32 SQL> Rem vperiwal 07/07/16 - 23726702: remove ORA-65173
00:21:32 SQL> Rem cmlim 06/06/16 - bug 23215791: add more DBUA_TIMESTAMPS during db
00:21:32 SQL> Rem upgrades
00:21:32 SQL> Rem anupkk 04/03/16 - Bug 22917286: Moved call to olstrig.sql to
00:21:32 SQL> Rem olsdbmig.sql
00:21:32 SQL> Rem raeburns 02/29/16 - Bug 22820096: revert ALTER TYPE to default
00:21:32 SQL> Rem CASCADE
00:21:32 SQL> Rem rmorant 02/11/16 - Bug22340563 add parallel hint
00:21:32 SQL> Rem atomar 02/04/16 - move aq action to release specific script
00:21:32 SQL> Rem raeburns 12/09/15 - Bug 22175911: add SERVEROUTPUT OFF after
00:21:32 SQL> Rem catuptabdata.sql
00:21:32 SQL> Rem rmorant 11/27/15 - bug22271668 add append hint
00:21:32 SQL> Rem welin 11/11/15 - Bug 21099929: 12.2 cleanup
..............................
.............................
............................
00:21:32 SQL> Rem rburns 10/23/06 - Created
00:21:32 SQL> Rem
00:21:32 SQL>
00:21:32 SQL> @@?/rdbms/admin/sqlsessstart.sql
00:21:32 SQL> Rem
00:21:32 SQL> Rem $Header: rdbms/admin/sqlsessstart.sql /main/2 2017/05/28 22:46:11 stanaya Exp $
00:21:32 SQL> Rem
00:21:32 SQL> Rem sqlsessstart.sql
00:21:32 SQL> Rem
00:21:32 SQL> Rem Copyright (c) 2013, 2017, Oracle and/or its affiliates.
00:21:32 SQL> Rem All rights reserved.
00:21:32 SQL> Rem
00:21:32 SQL> Rem NAME
00:21:32 SQL> Rem sqlsessstart.sql - SQL session start
00:21:32 SQL> Rem
00:21:32 SQL> Rem DESCRIPTION
00:21:32 SQL> Rem Any commands which should be run at the start of all oracle
00:21:32 SQL> Rem supplied scripts.
00:21:32 SQL> Rem
00:21:32 SQL> Rem NOTES
00:21:32 SQL> Rem See sqlsessend.sql for the corresponding end script.
00:21:32 SQL> Rem
00:21:32 SQL> Rem BEGIN SQL_FILE_METADATA
00:21:32 SQL> Rem SQL_SOURCE_FILE: rdbms/admin/sqlsessstart.sql
00:21:32 SQL> Rem SQL_SHIPPED_FILE: rdbms/admin/sqlsessstart.sql
00:21:32 SQL> Rem SQL_PHASE: SQLSESSSTART
00:21:32 SQL> Rem SQL_STARTUP_MODE: NORMAL
00:21:32 SQL> Rem SQL_IGNORABLE_ERRORS: NONE
00:21:32 SQL> Rem END SQL_FILE_METADATA
00:21:32 SQL> Rem
00:21:32 SQL> Rem MODIFIED (MM/DD/YY)
00:21:32 SQL> Rem surman 03/08/13 - 16462837: Common start and end scripts
00:21:32 SQL> Rem surman 03/08/13 - Created
00:21:32 SQL> Rem
00:21:32 SQL>
00:21:32 SQL> alter session set "_ORACLE_SCRIPT" = true;
Session altered.
Elapsed: 00:00:00.00
00:21:32 SQL>
00:21:32 SQL> Rem =====================================================================
00:21:32 SQL> Rem Assure CHAR semantics are not used in the dictionary
00:21:32 SQL> Rem =====================================================================
00:21:32 SQL> ALTER SESSION SET NLS_LENGTH_SEMANTICS=BYTE;
Session altered.
Elapsed: 00:00:00.00
00:21:32 SQL>
00:21:32 SQL>
00:21:32 SQL>
00:21:32 SQL> Rem =====================================================================
00:21:32 SQL> Rem Begin Catalog App Upgrade for Post-shutdown. All additional code
00:21:32 SQL> Rem should be placed after this.
00:21:32 SQL> Rem =====================================================================
00:21:32 SQL> @@catappupgbeg2.sql
00:21:32 SQL> Rem
00:21:32 SQL> Rem $Header: rdbms/admin/catappupgbeg2.sql /main/4 2017/09/29 14:04:55 pyam Exp $
00:21:32 SQL> Rem
00:21:32 SQL> Rem catappupgbeg2.sql
00:21:32 SQL> Rem
00:21:32 SQL> Rem Copyright (c) 2016, 2017, Oracle and/or its affiliates.
00:21:32 SQL> Rem All rights reserved.
00:21:32 SQL> Rem
00:21:32 SQL> Rem NAME
00:21:32 SQL> Rem catappupgbeg2.sql - <one-line expansion of the name>
00:21:32 SQL> Rem
00:21:32 SQL> Rem DESCRIPTION
00:21:32 SQL> Rem <short description of component this file declares/defines>
00:21:32 SQL> Rem
00:21:32 SQL> Rem NOTES
00:21:32 SQL> Rem <other useful comments, qualifications, etc.>
00:21:32 SQL> Rem
00:21:32 SQL> Rem BEGIN SQL_FILE_METADATA
00:21:32 SQL> Rem SQL_SOURCE_FILE: rdbms/admin/catappupgbeg2.sql
00:21:32 SQL> Rem SQL_SHIPPED_FILE:
00:21:32 SQL> Rem SQL_PHASE: INSTALL
00:21:32 SQL> Rem SQL_STARTUP_MODE: NORMAL
00:21:32 SQL> Rem SQL_IGNORABLE_ERRORS: NONE
00:21:32 SQL> Rem SQL_CALLING_FILE:
00:21:32 SQL> Rem END SQL_FILE_METADATA
00:21:32 SQL> Rem
00:21:32 SQL> Rem MODIFIED (MM/DD/YY)
00:21:32 SQL> Rem pyam 09/27/17 - Bug 26856671: alter system with scope=memory
00:21:32 SQL> Rem pyam 08/28/17 - Bug 25857770: set _enable_cdb_upgrade_capture
00:21:32 SQL> Rem only during upgrade
00:21:32 SQL> Rem pyam 06/09/17 - RTI 19984265: catch no_data_found
00:21:32 SQL> Rem pyam 11/17/16 - Catalog Application Upgrade Begin Part 2
00:21:32 SQL> Rem pyam 11/17/16 - Created
00:21:32 SQL> Rem
00:21:32 SQL>
00:21:32 SQL> @@?/rdbms/admin/sqlsessstart.sql
00:21:32 SQL> Rem
00:21:32 SQL> Rem $Header: rdbms/admin/sqlsessstart.sql /main/2 2017/05/28 22:46:11 stanaya Exp $
00:21:32 SQL> Rem
00:21:32 SQL> Rem sqlsessstart.sql
00:21:32 SQL> Rem
00:21:32 SQL> Rem Copyright (c) 2013, 2017, Oracle and/or its affiliates.
00:21:32 SQL> Rem All rights reserved.
00:21:32 SQL> Rem
00:21:32 SQL> Rem NAME
00:21:32 SQL> Rem sqlsessstart.sql - SQL session start
00:21:32 SQL> Rem
00:21:32 SQL> Rem DESCRIPTION
00:21:32 SQL> Rem Any commands which should be run at the start of all oracle
00:21:32 SQL> Rem supplied scripts.
00:21:32 SQL> Rem
00:21:32 SQL> Rem NOTES
00:21:32 SQL> Rem See sqlsessend.sql for the corresponding end script.
00:21:32 SQL> Rem
00:21:32 SQL> Rem BEGIN SQL_FILE_METADATA
00:21:32 SQL> Rem SQL_SOURCE_FILE: rdbms/admin/sqlsessstart.sql
00:21:32 SQL> Rem SQL_SHIPPED_FILE: rdbms/admin/sqlsessstart.sql
00:21:32 SQL> Rem SQL_PHASE: SQLSESSSTART
00:21:32 SQL> Rem SQL_STARTUP_MODE: NORMAL
00:21:32 SQL> Rem SQL_IGNORABLE_ERRORS: NONE
00:21:32 SQL> Rem END SQL_FILE_METADATA
......................
......................
......................
00:21:52 SQL> Rem BEGIN SQL_FILE_METADATA
00:21:52 SQL> Rem SQL_SOURCE_FILE: rdbms/admin/nothing.sql
00:21:52 SQL> Rem SQL_SHIPPED_FILE: rdbms/admin/nothing.sql
00:21:52 SQL> Rem SQL_PHASE: NOTHING
00:21:52 SQL> Rem SQL_STARTUP_MODE: NORMAL
00:21:52 SQL> Rem SQL_IGNORABLE_ERRORS: NONE
00:21:52 SQL> Rem SQL_CALLING_FILE: NONE
00:21:52 SQL> Rem END SQL_FILE_METADATA
00:21:52 SQL> Rem
00:21:52 SQL>
00:21:52 SQL> Rem =======================================================================
00:21:52 SQL> Rem EM End
00:21:52 SQL> Rem =======================================================================
00:21:52 SQL>
00:21:52 SQL>
00:21:52 SQL> Rem =======================================================================
00:21:52 SQL> Rem Do Java longer identifiers name translation, if necessary
00:21:52 SQL> Rem =======================================================================
00:21:52 SQL>
00:21:52 SQL> declare
00:21:52 2 ret varchar2(20);
00:21:52 3 begin
00:21:52 4 ret := dbms_java_test.funcall('-lid_translate_all', ' ');
00:21:52 5 exception
00:21:52 6 when others then
00:21:52 7 null;
00:21:52 8 end;
00:21:52 9 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.01
00:21:52 SQL>
00:21:52 SQL> Rem =======================================================================
00:21:52 SQL> Rem Java longer identifiers name translation End
00:21:52 SQL> Rem =======================================================================
00:21:52 SQL>
00:21:52 SQL> Rem =======================================================================
00:21:52 SQL> Rem Signal 'end' of catuppst.sql before catbundle.sql is executed
00:21:52 SQL> Rem =======================================================================
00:21:52 SQL> SELECT dbms_registry_sys.time_stamp('POSTUP_END') as timestamp from dual;
TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP POSTUP_END 2019-02-09 00:21:52
DBUA_TIMESTAMP POSTUP_END FINISHED 2019-02-09 00:21:52
DBUA_TIMESTAMP POSTUP_END NONE 2019-02-09 00:21:52
1 row selected.
Elapsed: 00:00:00.01
00:21:52 SQL>
00:21:52 SQL> -- DBUA_TIMESTAMP: catuppst.sql finished
00:21:52 SQL> SELECT dbms_registry_sys.time_stamp('CATUPPST') as timestamp from dual;
TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP CATUPPST 2019-02-09 00:21:52
DBUA_TIMESTAMP CATUPPST FINISHED 2019-02-09 00:21:52
DBUA_TIMESTAMP CATUPPST NONE 2019-02-09 00:21:52
1 row selected.
Elapsed: 00:00:00.01
00:21:52 SQL>
00:21:52 SQL> Rem Set errorlogging off
00:21:52 SQL> SET ERRORLOGGING OFF;
00:21:52 SQL>
00:21:52 SQL> Rem
00:21:52 SQL> Rem Set _ORACLE_SCRIPT to false
00:21:52 SQL> Rem
00:21:52 SQL> ALTER SESSION SET "_ORACLE_SCRIPT"=false;
Session altered.
Elapsed: 00:00:00.00
00:21:52 SQL>
00:21:52 SQL> Rem *********************************************************************
00:21:52 SQL> Rem END catuppst.sql
00:21:52 SQL> Rem *********************************************************************
Execute utlrp.sql script to compile invalid objects.
SQL> select count(*) from dba_objects where status='INVALID'; COUNT(*) ---------- 1765 1 row selected.
00:27:47 SQL> @utlrp.sql
00:28:27 SQL> Rem
00:28:27 SQL> Rem $Header: rdbms/admin/utlrp.sql /main/23 2017/03/20 12:21:12 raeburns Exp $
00:28:27 SQL> Rem
00:28:27 SQL> Rem utlrp.sql
00:28:27 SQL> Rem
00:28:27 SQL> Rem Copyright (c) 1998, 2017, Oracle and/or its affiliates.
00:28:27 SQL> Rem All rights reserved.
00:28:27 SQL> Rem
00:28:27 SQL> Rem NAME
00:28:27 SQL> Rem utlrp.sql - Recompile invalid objects
00:28:27 SQL> Rem
00:28:27 SQL> Rem DESCRIPTION
00:28:27 SQL> Rem This script recompiles invalid objects in the database.
00:28:27 SQL> Rem
00:28:27 SQL> Rem When run as one of the last steps during upgrade or downgrade,
00:28:27 SQL> Rem this script will validate all remaining invalid objects. It will
00:28:27 SQL> Rem also run a component validation procedure for each component in
00:28:27 SQL> Rem the database. See the README notes for your current release and
00:28:27 SQL> Rem the Oracle Database Upgrade book for more information about
00:28:27 SQL> Rem using utlrp.sql
00:28:27 SQL> Rem
00:28:27 SQL> Rem Although invalid objects are automatically re-validated when used,
00:28:27 SQL> Rem it is useful to run this script after an upgrade or downgrade and
00:28:27 SQL> Rem after applying a patch. This minimizes latencies caused by
00:28:27 SQL> Rem on-demand recompilation. Oracle strongly recommends running this
00:28:27 SQL> Rem script after upgrades, downgrades and patches.
00:28:27 SQL> Rem
00:28:27 SQL> Rem NOTES
00:28:27 SQL> Rem * This script must be run using SQL*PLUS.
00:28:27 SQL> Rem * You must be connected AS SYSDBA to run this script.
00:28:27 SQL> Rem * There should be no other DDL on the database while running the
00:28:27 SQL> Rem script. Not following this recommendation may lead to deadlocks.
00:28:27 SQL> Rem
00:28:27 SQL> Rem BEGIN SQL_FILE_METADATA
00:28:27 SQL> Rem SQL_SOURCE_FILE: rdbms/admin/utlrp.sql
00:28:27 SQL> Rem SQL_SHIPPED_FILE: rdbms/admin/utlrp.sql
00:28:27 SQL> Rem SQL_PHASE: UTILITY
00:28:27 SQL> Rem SQL_STARTUP_MODE: NORMAL
00:28:27 SQL> Rem SQL_IGNORABLE_ERRORS: NONE
00:28:27 SQL> Rem SQL_CALLING_FILE: NONE
00:28:27 SQL> Rem END SQL_FILE_METADATA
00:28:27 SQL> Rem
00:28:27 SQL> Rem MODIFIED (MM/DD/YY)
00:28:27 SQL> Rem raeburns 03/09/17 - Bug 25616909: Use UTILITY for SQL_PHASE
00:28:27 SQL> Rem gviswana 06/26/03 - Switch default to parallel if appropriate
00:28:27 SQL> Rem gviswana 06/12/03 - Switch default back to serial
00:28:27 SQL> Rem gviswana 05/20/03 - 2814808: Automatic parallelism tuning
00:28:27 SQL> Rem rburns 04/28/03 - timestamps and serveroutput for diagnostics
00:28:27 SQL> Rem gviswana 04/13/03 - utlrcmp.sql load -> catproc
00:28:27 SQL> Rem gviswana 06/25/02 - Add documentation
00:28:27 SQL> Rem gviswana 11/12/01 - Use utl_recomp.recomp_serial
00:28:27 SQL> Rem rdecker 11/09/01 - ADD ALTER library support FOR bug 1952368
00:28:27 SQL> Rem rburns 11/12/01 - validate all components after compiles
00:28:27 SQL> Rem rburns 11/06/01 - fix invalid CATPROC call
00:28:27 SQL> Rem rburns 09/29/01 - use 9.2.0
00:28:27 SQL> Rem rburns 09/20/01 - add check for CATPROC valid
00:28:27 SQL> Rem rburns 07/06/01 - get version from instance view
00:28:27 SQL> Rem rburns 05/09/01 - fix for use with 8.1.x
00:28:27 SQL> Rem arithikr 04/17/01 - 1703753: recompile object type# 29,32,33
00:28:27 SQL> Rem skabraha 09/25/00 - validate is now a keyword
00:28:27 SQL> Rem kosinski 06/14/00 - Persistent parameters
00:28:27 SQL> Rem skabraha 06/05/00 - validate tables also
00:28:27 SQL> Rem jdavison 04/11/00 - Modify usage notes for 8.2 changes.
00:28:27 SQL> Rem rshaikh 09/22/99 - quote name for recompile
00:28:27 SQL> Rem ncramesh 08/04/98 - change for sqlplus
00:28:27 SQL> Rem usundara 06/03/98 - merge from 8.0.5
00:28:27 SQL> Rem usundara 04/29/98 - creation (split from utlirp.sql).
00:28:27 SQL> Rem Mark Ramacher (mramache) was the original
00:28:27 SQL> Rem author of this script.
00:28:27 SQL> Rem
00:28:27 SQL>
00:28:27 SQL> Rem ===========================================================================
00:28:27 SQL> Rem BEGIN utlrp.sql
00:28:27 SQL> Rem ===========================================================================
00:28:27 SQL>
00:28:27 SQL> @@utlprp.sql 0
00:28:27 SQL> Rem Copyright (c) 2003, 2017, Oracle and/or its affiliates.
00:28:27 SQL> Rem All rights reserved.
00:28:27 SQL> Rem
00:28:27 SQL> Rem NAME
00:28:27 SQL> Rem utlprp.sql - Recompile invalid objects in the database
00:28:27 SQL> Rem
00:28:27 SQL> Rem DESCRIPTION
..........................
..........................
..........................
Function dropped.
Elapsed: 00:00:00.01
00:37:06 SQL> SET serveroutput off
00:37:06 SQL>
00:37:06 SQL>
00:37:06 SQL> Rem =====================================================================
00:37:06 SQL> Rem Run component validation procedure
00:37:06 SQL> Rem =====================================================================
00:37:06 SQL>
00:37:06 SQL> SET serveroutput on
00:37:06 SQL> EXECUTE dbms_registry_sys.validate_components;
PL/SQL procedure successfully completed.
Elapsed: 00:00:05.82
00:37:12 SQL> SET serveroutput off
00:37:12 SQL>
00:37:12 SQL>
00:37:12 SQL> Rem =======================================================================
00:37:12 SQL> Rem END utlrp.sql
00:37:12 SQL> Rem =======================================================================
Set COMPATIBLE parameter :
00:37:12 SQL> show parameter compatible; NAME TYPE VALUE ------------------------------------ ----------- ---------- compatible string 12.2.0 noncdb_compatible boolean FALSE SQL> ALTER SYSTEM SET COMPATIBLE = '18.0.0' SCOPE=SPFILE; System altered.
Restart the database :
SQL> shut immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area 2365584808 bytes Fixed Size 8660392 bytes Variable Size 587202560 bytes Database Buffers 1761607680 bytes Redo Buffers 8114176 bytes Database mounted. Database opened. SQL> show parameter compatible NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ compatible string 18.0.0 noncdb_compatible boolean FALSE
Compile Fixed objects stats :
SQL> EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS; PL/SQL procedure successfully completed.
Upgrade Time Zone version :
SQL> DECLARE l_tz_version PLS_INTEGER; BEGIN l_tz_version := DBMS_DST.get_latest_timezone_version; DBMS_OUTPUT.put_line('l_tz_version=' || l_tz_version); DBMS_DST.begin_prepare(l_tz_version); END; / l_tz_version=31 A prepare window has been successfully started. PL/SQL procedure successfully completed.
Now check the upgrade timezone version,we are going to upgrade DST_SECONDARY_TT_VERSION is 31
SQL> COLUMN property_name FORMAT A30 COLUMN property_value FORMAT A20 SELECT property_name, property_value FROM database_properties WHERE property_name LIKE 'DST_%' ORDER BY property_name; PROPERTY_NAME PROPERTY_VALUE ------------------------------ -------------------- DST_PRIMARY_TT_VERSION 26 DST_SECONDARY_TT_VERSION 31 DST_UPGRADE_STATE PREPARE
Shutdown and startup database in normal mode.
SQL> SHUTDOWN IMMEDIATE; Database closed. Database dismounted. ORACLE instance shut down. SQL> STARTUP; ORACLE instance started. Total System Global Area 2365584808 bytes Fixed Size 8660392 bytes Variable Size 587202560 bytes Database Buffers 1761607680 bytes Redo Buffers 8114176 bytes Database mounted. Database opened.
Upgrade the database zone file.
SQL> SET SERVEROUTPUT ON DECLARE l_failures PLS_INTEGER; BEGIN DBMS_DST.upgrade_database(l_failures); DBMS_OUTPUT.put_line('DBMS_DST.upgrade_database : l_failures=' || l_failures); DBMS_DST.end_upgrade(l_failures); DBMS_OUTPUT.put_line('DBMS_DST.end_upgrade : l_failures=' || l_failures); END; /SQL> Table list: "IX"."AQ$_ORDERS_QUEUETABLE_S" Number of failures: 0 Table list: "IX"."AQ$_STREAMS_QUEUE_TABLE_S" Number of failures: 0 Table list: "IX"."AQ$_ORDERS_QUEUETABLE_L" Number of failures: 0 Table list: "IX"."AQ$_STREAMS_QUEUE_TABLE_L" Number of failures: 0 Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_S" Number of failures: 0 Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_L" Number of failures: 0 DBMS_DST.upgrade_database : l_failures=0 An upgrade window has been successfully ended. DBMS_DST.end_upgrade : l_failures=0 PL/SQL procedure successfully completed.
dba_tstz_tables view displays the tables that are processed by the time zone file upgrade, and their current upgrade status.
SQL> SELECT owner,table_name,upgrade_in_progress FROM dba_tstz_tables ORDER BY 1,2;
Once the upgrade is complete, check the time zone file version.
SQL> SELECT * FROM v$timezone_file; FILENAME VERSION CON_ID -------------------- ---------- ------- timezlrg_31.dat 31 0 SQL> COLUMN property_name FORMAT A30 COLUMN property_value FORMAT A20 SELECT property_name, property_value FROM database_properties WHERE property_name LIKE 'DST_%' ORDER BY property_name; PROPERTY_NAME PROPERTY_VALUE ------------------------------ -------------- DST_PRIMARY_TT_VERSION 31 DST_SECONDARY_TT_VERSION 0 DST_UPGRADE_STATE NONE
Reference: Steps to Upgrade Time Zone File and Timestamp with Time Zone Data
Post-upgrade checks:
Run “postupgrade_fixups.sql” to check post upgrade status.
SQL> @/u01/preupgrade1/postupgrade_fixups.sql Session altered. PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. Package created. No errors. Package body created. PL/SQL procedure successfully completed. No errors. Package created. No errors. Package body created. No errors. Executing Oracle POST-Upgrade Fixup Script Auto-Generated by: Oracle Preupgrade Script Version: 18.0.0.0.0 Build: 1 Generated on: 2019-02-08 22:48:34 For Source Database: ORCLDB Source Database Version: 12.2.0.1.0 For Upgrade to Version: 18.0.0.0.0 Preup Preupgrade Action Issue Is Number Preupgrade Check Name Remedied Further DBA Action ------ ------------------------ ---------- ---------------------------- 3. old_time_zones_exist YES None. 4. post_dictionary YES None. 5. post_fixed_objects NO Informational only. Further action is optional. The fixup scripts have been run and resovled what they can. However, there are still issues originally identified by the preupgrade that have not been remedied and are still present in the database. Depending on the severity of the specific issue, and the nature of the issue itself, that could mean that your database upgrade is not fully complete. To resolve the outstanding issues, start by reviewing the postupgrade_fixups.sql and searching it for the name of the failed CHECK NAME or Preupgrade Action Number listed above. There you will find the original corresponding diagnostic message from the preupgrade which explains in more detail what still needs to be done. PL/SQL procedure successfully completed. Session altered.
Check Database version and status.
SQL> select name,version,open_mode from v$database,v$instance; NAME VERSION OPEN_MODE --------- ----------------- -------------------- ORCLDB 18.0.0.0.0 READ WRITE
Reference : Oracle DB 18c – Complete Checklist for Manual Upgrades to Non-CDB Oracle Database 18c (Doc ID 2418045.1)
Catch Me On:- Hariprasath Rajaram Telegram:https://t.me/joinchat/I_f4DkeGfZuxgMIoJSpQZg LinkedIn:https://www.linkedin.com/in/hariprasathdba Facebook:https://www.facebook.com/HariPrasathdba FB Group:https://www.facebook.com/groups/894402327369506/ FB Page:https://www.facebook.com/dbahariprasath/? Twitter:https://twitter.com/hariprasathdba