Upgrading to Oracle 12c - doag.org · upgrade to Oracle Database ... •If you are upgrading from...
-
Upload
doankhuong -
Category
Documents
-
view
228 -
download
1
Transcript of Upgrading to Oracle 12c - doag.org · upgrade to Oracle Database ... •If you are upgrading from...
Upgrading to Oracle 12c
Julian Dontcheff, Accenture
• More than 20 years of Database Experience
• Accenture Global Database Lead
• Accenture Exadata Chief Technology Architect
• First Oracle Certified Master in Europe: 2002
• Oracle ACE Director
• Accenture Oracle Lead for Finland
• Database Blog at
juliandontcheff.wordpress.com
Copyright © 2013 Accenture All rights reserved. 3
TOP DBA CHALLANGES
33% of DBAs handle close to 100 database instances each - with data
stores expanding by more than 20% per year
Copyright © 2013 Accenture All rights reserved. 4
TOP DBA CHALLANGES
Copyright © 2013 Accenture All rights reserved. 5
Memory Lane
Copyright © 2013 Accenture All rights reserved. 6
• Upgrade and data migration methods
• New upgrade features
• The new pre-upgrade tool
• Parallel processing for database upgrade
• Steps for running the parallel upgrade utility
• The steps for manually upgrading the Oracle database
• Required tasks to complete after the upgrade
• Recommended best practices after upgrading
• Deprecated and desupported features
Agenda
Copyright © 2013 Accenture All rights reserved. 7
• Direct upgrade is supported from:
– 11.2.0.2 or later
– 11.1.0.7
– 10.2.0.5
• If you are upgrading from 11.2.0.1 or 11.1.0.6, then you must first
upgrade to Oracle Database 11g Release 2 (11.2.0.2)
• If you are upgrading from 10.2.0.2, 10.2.0.3, 10.2.0.4, or 10.1.0.5, then
you must first upgrade to 10.2.0.5 or later
• For release 9.2.0.8, as follows: 9.2.0.8 -> 11.2.0.2 or 11.2.0.3 -> 12.1
Determine the Upgrade Path for 12.1.0
Copyright © 2013 Accenture All rights reserved. 8
• Database Upgrade Assistant (DBUA)
– DBUA is the recommended method for performing a major release
upgrade or patch release upgrade
• Manual upgrade using SQL scripts and utilities
– While a manual upgrade gives you finer control over the upgrade
process, it is more susceptible to error if any of the upgrade or pre-
upgrade steps are either not followed or are performed out of order
• Oracle Data Pump (Julian’s recommended method)
• CREATE TABLE AS SQL statement
Four Upgrade and Data Migration Methods
Copyright © 2013 Accenture All rights reserved. 9
• Oracle Data Pump is
my recommended
way to upgrade
• Not everything should
be done witout offline
maitenance
• Rather create a good,
’real 12c’,
defragmented
database
Four Upgrade and Data Migration Methods
Copyright © 2013 Accenture All rights reserved. 10
• Step 1: Prepare to upgrade the database
• Step 2: Test the upgrade process for Oracle database
• Step 3: Test the upgraded test database
• Step 4: Prepare and preserve the production database
• Step 5: Upgrade the production Oracle database
• Step 6: Tune and adjust the new production database
Upgrade Steps Workflow for Oracle Database
Copyright © 2013 Accenture All rights reserved. 11
• New pre-upgrade information tool
• Parallel processing for database upgrade
• DBUA can be restarted during the upgrade process
• Enhanced pre-upgrade and post-upgrade summary report
• Oracle grid infrastructure upgrade enhancements
• Pluggable databases
• Oracle XML database is installed when you upgrade
The following features are new for the upgrade
Copyright © 2013 Accenture All rights reserved. 12
• Oracle Database 12c introduces the preupgrd.sql pre-upgrade
information tool
• The new preupgrd.sql script replaces the utlu121i.sql script in earlier
versions of the pre-upgrade information tool
• The new tool creates 3 files under $ORACLE_BASE/cfgtoollogs
The new pre-upgrade tool
Copyright © 2013 Accenture All rights reserved. 13
• With the new pre-upgrade information tool, the default behavior of the
prerequisite upgrade checks has been enhanced in the following ways:
• A log file, preupgrade.log, is created containing the output of the
Pre-Upgrade Information Tool
• The preupgrade_fixups.sql script is created:
– to list and describe issues that can be fixed using SQL*Plus in
the source database
– it also attempts to resolve trivial issues when you execute it
• The postupgrade_fixups.sql script is created to address issues that
can be fixed after the database has been upgraded
Using the pre-upgrade information tool
Copyright © 2013 Accenture All rights reserved. 14
Using the pre-upgrade information tool
Copyright © 2013 Accenture All rights reserved. 15
The preupgrade.log file
Copyright © 2013 Accenture All rights reserved. 16
The preupgrade_fixups.sql script
Copyright © 2013 Accenture All rights reserved. 17
The postupgrade_fixups.sql scripts
Copyright © 2013 Accenture All rights reserved. 18
• Issues that cannot be resolved automatically by a fixup script are
flagged with ** USER ACTION REQUIRED **
• Fix the flagged issues that require you to complete manual procedures
• Run the pre-upgrade information tool as many times as needed for you
to work through and resolve warnings
• If you are installing 64-bit Oracle Database software but were
previously using a 32-bit Oracle Database installation, the database is
automatically converted to 64-bit during the upgrade to Oracle
Database 12c
Using the new preupgrd.sql pre-upgrade tool
Copyright © 2013 Accenture All rights reserved. 19
• Oracle Database 12c introduces the Parallel Upgrade Utility (catctl.pl),
which enables components that do not have to be upgraded in a
specific order to be upgraded at the same time, taking full advantage of
CPU capacity
• DBUA and the manual upgrade procedures take advantage of the new
Parallel Upgrade Utility
• The Parallel Upgrade Utility reduces the total amount of time it takes to
perform an upgrade by loading the database dictionary in parallel using
multiple SQL processes to upgrade the database
Parallel processing for database upgrade
Copyright © 2013 Accenture All rights reserved. 20
• Ensure the Pre-Upgrade Information Tool (preupgrd.sql) has been run
on the source database
• Start the database in upgrade mode: startup upgrade
• Run catctl.pl from the new Oracle home:
$ORACLE_HOME/perl/bin/perl catctl.pl catupgrd.sql
• Example:
– $ORACLE_HOME/perl/bin/perl catctl.pl -n 8 -l
$ORACLE_HOME/diagnostics catupgrd.sql
Steps for running the parallel upgrade utility
Copyright © 2013 Accenture All rights reserved. 21
Parallel Upgrade Utility (catctl.pl) Parameters
Copyright © 2013 Accenture All rights reserved. 22
• The catctl.pl utility loads data into the dictionary as fast as possible and
defers any work that can be done in normal mode instead of upgrade
mode
• When the upgrade is complete and if there are no errors, then the
status of the database is set to UPGRADED
• This behavior differs from earlier releases where the status of the
database was set to VALID after upgrading
• If any errors are logged to registry$error, then the status of the upgrade
is set to INVALID
Data Dictionary: upgrade and status displayed
Copyright © 2013 Accenture All rights reserved. 23
• In earlier releases of Oracle, after upgrading a database, VALID meant
that all objects in the data dictionary have been recompiled and are
ready for use
• In Oracle 12.1.0, obtaining a VALID status differs
• Running the utlrp.sql script in normal mode, recompiles data dictionary
objects and moves the data dictionary from an UPGRADED status to a
VALID status
• Running utlrp.sql ensures that the database is ready for use after
upgrading
Data Dictionary: upgrade and status displayed
Copyright © 2013 Accenture All rights reserved. 24
Copyright © 2013 Accenture All rights reserved. 25
Copyright © 2013 Accenture All rights reserved. 26
Copyright © 2013 Accenture All rights reserved. 27
Copyright © 2013 Accenture All rights reserved. 28
Copyright © 2013 Accenture All rights reserved. 29
Copyright © 2013 Accenture All rights reserved. 30
Copyright © 2013 Accenture All rights reserved. 31
Copyright © 2013 Accenture All rights reserved. 32
Copyright © 2013 Accenture All rights reserved. 33
Copyright © 2013 Accenture All rights reserved. 34
Copyright © 2013 Accenture All rights reserved. 35
Copyright © 2013 Accenture All rights reserved. 36
Copyright © 2013 Accenture All rights reserved. 37
Copyright © 2013 Accenture All rights reserved. 38
1. Run the pre-upgrade information tool
2. Backup the database
3. Shutdown the database and then startup upgrade
4. Run catctl.pl from the new Oracle home: $ORACLE_HOME/perl/bin/perl catctl.pl catupgrd.sql
If you choose to run the catupgrd.sql script, doing so now requires an
additional input parameter as follows:
SQL> catupgrd.sql PARALLEL=NO
Manually Upgrading Oracle Database: 12 steps
Copyright © 2013 Accenture All rights reserved. 39
5. Restart the database normally
6. Run utlu121s.sql, the post-upgrade status tool, to display a summary
of the upgrade results
7. Gather fixed object statistics:
SQL> execute dbms_stats.gather_fixed_objects_stats;
8. Run utlrp.sql to recompile any remaining stored PL/SQL and Java
9. Verify that all expected packages and classes are valid:
SQL> @utluiobj.sql
Manually Upgrading Oracle Database: 12 steps
Copyright © 2013 Accenture All rights reserved. 40
10. Run utlu121s.sql again to verify that all issues have been fixed
11. If you are upgrading a cluster database from releases 10.2, 11.1, or
11.2, then upgrade the database configuration in Oracle Clusterware using the following command: $ srvctl upgrade database -d
db-unique-name -o oraclehome
12. Check the log file for "Started: catuppst.sql" to verify that catuppst.sql
ran during the upgrade process: if catuppst.sql has not run, then run
it as follows:
SQL> @rdbms/admin/catuppst.sql
Manually Upgrading Oracle Database: 12 steps
Copyright © 2013 Accenture All rights reserved. 41
• Set environment variables on Linux and UNIX systems after manual
upgrades
• Upgrade the recovery catalog
• Upgrade the time zone file version
• Upgrade statistics tables created by the DBMS_STATS package
• Upgrade externally authenticated SSL users
Required tasks to complete after the upgrade
Copyright © 2013 Accenture All rights reserved. 42
• Configure the FTP and HTTP ports and HTTP authentication for Oracle
XML DB
• Install Oracle text supplied knowledge bases
• Update your Oracle Application Express configuration
• Configure fine-grained access to external network services
• Enable Database Vault
Required tasks to complete after the upgrade
Copyright © 2013 Accenture All rights reserved. 43
• Back up the database
• Gather fixed objects statistics with DBMS_STATS
• Reset passwords to enforce case-sensitivity
• Understand changes with oracle grid infrastructure
• Understand oracle ASM and oracle grid infrastructure installation and
upgrade
• Add new features as appropriate
• Develop new administrative procedures as needed
Recommended best practices after upgrading
Copyright © 2013 Accenture All rights reserved. 44
• Set threshold values for tablespace alerts
• Migrate from rollback segments to automatic undo mode
• Configure oracle data guard broker
• Migrate tables from the LONG data type to the LOB data type
• Migrate your upgraded oracle databases to use unified auditing
• Test the upgraded production oracle database
• Add new init.ora parameters
Recommended best practices after upgrading
Copyright © 2013 Accenture All rights reserved. 45
• The catupgrd.sql upgrade script is deprecated in oracle database 12c
• The new parallel upgrade utility, catctl.pl replaces catupgrd.sql
• Oracle recommends database upgrades be performed with the new
parallel upgrade utility, catctl.pl
• Oracle Enterprise Manager Database Control is desupported and is no
longer available
• Oracle introduces Oracle Enterprise Manager Database Express
(Oracle EM Express) as a replacement
Deprecated and desupported features
Copyright © 2013 Accenture All rights reserved. 46
Deprecated and desupported features
Copyright © 2013 Accenture All rights reserved. 47
Deprecated and desupported features
Copyright © 2013 Accenture All rights reserved. 48
Deprecated and desupported features
Copyright © 2013 Accenture All rights reserved. 49
• The deinstallation standalone utility is replaced with a deinstall option
using Oracle Universal Installer (OUI)
• Block file storage on raw devices is not supported
• The maximum size of the VARCHAR2, NVARCHAR2, and RAW
datatypes has been increased to 32767 bytes when the COMPATIBLE
is set to 12.0 and the MAX_STRING_SIZE is set to EXTENDED
• Stored outlines are deprecated in Oracle Database 12c: use plan
baselines instead
Deprecated and desupported features
Copyright © 2013 Accenture All rights reserved. 50
• Oracle Change Data Capture is not included in Oracle Database 12c
and has been replaced with Oracle GoldenGate
• Oracle Database Advanced Replication is deprecated in Oracle
Database 12c
• Use Oracle GoldenGate to replace all features of Advanced
Replication, including multimaster replication, updatable materialized
views, hierarchical materialized views, and deployment templates
• The XML_CLOBS option of the Oracle Data Pump Export
DATA_OPTIONS parameter is deprecated
Deprecated and desupported features
Copyright © 2013 Accenture All rights reserved. 51
• With the introduction of Oracle Database Migration Assistant for
Unicode (DMU), Oracle is proceeding with the desupport of the legacy
database tools, CSSCAN and CSALTER
• DMU provides a complete end-to-end Unicode migration solution for
database administrators
• Starting with Oracle Database 12c, DMU is included with Oracle
Database, and the CSSCAN and CSALTER tools are no longer
included nor supported
Deprecated and desupported features
Copyright © 2013 Accenture All rights reserved. 52
• The Oracle Net Listener password feature is no longer supported
• XMLType stored as a CLOB is deprecated in this release
• XMLType can still be stored object-relationally or as BINARY XML
• Deprecated Views:
– ALL_SCHEDULER_CREDENTIALS and USER_NETWORK_ACL_PRIVILEGES
– DBA_NETWORK_ACL_PRIVILEGES and DBA_NETWORK_ACLS
– DBA_SCHEDULER_CREDENTIALS and
– V$OBJECT_USAGE: use the USER_OBJECT_USAGE view instead
Deprecated and desupported features
Copyright © 2013 Accenture All rights reserved. 53
Deprecated parameters active_instance_count
background_dump_dest
buffer_pool_keep
buffer_pool_recycle
commit_write
cursor_space_for_time
fast_start_io_target
global_context_pool_size
instance_groups
lock_name_space
log_archive_local_first
log_archive_start
max_enabled_roles
parallel_automatic_tuning
parallel_io_cap_enabled
parallel_server
parallel_server_instances
plsql_debug
plsql_v2_compatibility
remote_os_authent
resource_manager_cpu_allocation
sec_case_sensitive_logon
serial_reuse
sql_trace
standby_archive_dest
user_dump_dest
Copyright © 2013 Accenture All rights reserved. 54
• Update access control lists and network utility packages
• Evaluate dependencies and add acls for network utility packages
• Check database links with passwords from earlier oracle database
releases
• Check oracle database warnings for TIMESTAMP WITH TIME ZONE
data type
• Decrease oracle database downtime by gathering optimizer statistics
• Identify invalid objects in oracle database with the utluiobj script
Most common warnings and issues
Copyright © 2013 Accenture All rights reserved. 55
• Verify that materialized view refreshes have completed before
upgrading
• Ensure that no files need media recovery before upgrading
• Ensure that no files are in backup mode before upgrading
• Resolve outstanding distributed transactions before upgrading
• Purge the database recycle bin before upgrading
• Synchronize the standby database with the primary database when
upgrading
Most common warnings and issues
Copyright © 2013 Accenture All rights reserved. 56
• In Oracle Database 12c, new, underlying net services parameters
enable data compression, which reduces the size of the session data
unit to be transmitted over a SQL TCP connection
• The following new parameters for the sqlnet.ora file specify
compression, and the preferred compression scheme:
– SQLNET.COMPRESSION
– SQLNET.COMPRESSION_LEVELS
– SQLNET.COMPRESSION_THRESHOLD
• These new parameters are not supported in earlier releases and are
only available in Oracle Database 12c
Considerations for Oracle Net Services
Copyright © 2013 Accenture All rights reserved. 57
Considerations for the Oracle Upgrade
Copyright © 2013 Accenture All rights reserved. 58
Migrate and Consolidate Your Databases with
Oracle Data Pump, Julian Dontcheff, Accenture