Download Oracle 9i to Oracle 10g Upgrade Guide

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Entity–attribute–value model wikipedia , lookup

IMDb wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

SQL wikipedia , lookup

Microsoft SQL Server wikipedia , lookup

Ingres (database) wikipedia , lookup

Concurrency control wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Relational model wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Database wikipedia , lookup

Database model wikipedia , lookup

Clusterpoint wikipedia , lookup

PL/SQL wikipedia , lookup

Oracle Database wikipedia , lookup

Transcript
Blackboard Learning System™
Oracle 9i to Oracle 10g Upgrade Guide
Application Pack 1 for Blackboard Learning System — CE Enterprise License
(Release 6), Service Pack 1
Application Pack 1 for Blackboard Learning System — Vista Enterprise License
(Release 4), Service Pack 1
Document version 4.1.1.0
© 2006 Blackboard Inc. All rights reserved.
Blackboard, the Blackboard logo, and Blackboard Portfolio are either registered trademarks or trademarks of Blackboard Inc. in the
United States and/or other countries.
BEA WebLogic and BEA WebLogic Server are either registered trademarks or trademarks of BEA Systems Inc. in the United States
and/or other countries.
Intel and Xeon are either registered trademarks or trademarks of Intel Corporation and its subsidiaries in the United States and/or
other countries.
Java and Solaris are trademarks of Sun Microsystems Inc. in the United States and/or other countries.
Linux is a trademark of Linus Torvalds in the United States and/or other countries.
Microsoft, Microsoft Windows Server, Microsoft SQL Server, and Internet Explorer are either registered trademarks or trademarks of
Microsoft Corporation in the United States and/or other countries.
Mozilla and Firefox are registered trademarks of Mozilla in the United States and/or other countries.
Oracle, SQL*Plus, Oracle 9i, and Oracle 10g are trademarks or registered trademarks of Oracle Corporation in the United States
and/or other countries.
Red Hat is a registered trademark of Red Hat, Inc. in the United States and/or other countries.
Other product and company names mentioned herein may be the trademarks of their respective owners.
U.S. Patent No. 6,988,138. Patents pending.
Contents
INTRODUCTION ........................................................................................ 1
About this Guide ............................................................................................................... 1
Audience ........................................................................................................................... 1
Conventions ...................................................................................................................... 1
UPGRADING ORACLE 9I SOFTWARE TO ORACLE 10G ............................... 3
Prerequisites ...................................................................................................................... 3
Pre-Steps ........................................................................................................................... 3
Gathering Schema Statistics ......................................................................................... 4
Editing User Privileges ................................................................................................. 4
Upgrading to Oracle Database 10g ................................................................................... 5
Installing Oracle Database 10g Software ...................................................................... 6
Upgrading the Database ................................................................................................ 6
Applying Oracle Patch 5005469 ................................................................................... 7
Updating Initialization Parameters ............................................................................... 7
Introduction
INTRODUCTION
ABOUT THIS GUIDE
This guide explains how to upgrade your Oracle 9i database software and your CE or Vista database to
Oracle 10g.
AUDIENCE
This guide is intended for Oracle database administrators. Prior experience with Oracle software is not
required but is highly recommended. If you do not have an Oracle database administrator available to
upgrade your database, you can outsource these tasks to Professional Services. Contact your
representative for details.
CONVENTIONS
The following conventions are used in this guide:
<angle_brackets>
<angle_brackets> can indicate a placeholder or variable that should be
replaced with an actual value as indicated by the text between them.
EXAMPLE:
<webct_install_dir> should be replaced with the actual
directory where WebCT is installed.
<angle_brackets> are also used to indicate XML or HTML elements.
EXAMPLE:
bold
Elements that users click in a graphical user interface, such as buttons, icons,
and tabs, are in bold.
EXAMPLE:
code
The <person> object contains....
Click OK.
Code appears in a shaded box.
long personID = session.getSubject().getPersonID();
CalendarEntryVO[] entries = cal.getEntriesForUser(session, personID);
1
Introduction
Courier font
E-mail addresses, file names, code within a sentence, and text in the console
are in Courier font.
EXAMPLE:
A confirmation message appears: >Do you want to
overwrite (y/n)?
EXAMPLE:
italic
$ORACLE_HOME
Text in a graphical user interface, such as a screen name or column label, is in
italic.
EXAMPLE:
The Welcome screen appears.
References to WebCT documents are in italic.
EXAMPLE:
KEYSTROKE
Keystrokes are in UPPER
EXAMPLE:
[square_brackets]
For more information, see the appropriate version of the
WebCT Administrator's Guide.
CASE.
Type your name and press ENTER.
In commands, optional parameters are in [square_brackets].
EXAMPLE:
[--glcId=identifier for the institution this
command applies to]
2
Upgrading Oracle 9i Software to Oracle 10g
UPGRADING ORACLE 9I SOFTWARE TO
ORACLE 10G
IMPORTANT: It is strongly recommended that you clone your database and perform a test upgrade on the
clone database first. This allows you to become familiar with the process without risking
loss or corruption of data if problems occur during the test upgrade.
PREREQUISITES
Your database server and application server(s) must meet the system requirements described in the
appropriate version of the Installation Guide.
PRE-STEPS
Before you begin the upgrade, do the following:
•
Perform a full back up of the WebCT database.
•
Perform a system backup of the database server, including the directory that contains the Oracle
software.
•
On Solaris and Linux, you should also back up /etc/oratab and /etc/oraInst.loc.
•
On Windows, you should also back up the Windows Registry.
•
Make sure that you have installed Application Pack 1 for Vista 4 or Campus Edition 6 as described in
either the release notes (for an upgrade) or the Installation Guide (for a new installation).
•
If Oracle is running on Linux, make sure /etc/sysctl.conf contains the following lines:
kernel.sem = 250 32000 100 128
kernel.shmmax = 4294967295
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
IMPORTANT: The kernel.shmmax parameter specifies the maximum shared memory segment size.
The value given here (4294967295, approximately 4 GB) assumes that your database
server machine has 4 GB of physical memory. If you have more than 4 GB, this value
should be adjusted so that it is greater than or equal to half the server's physical
memory. Otherwise, the Oracle installer will issue a warning.
3
Upgrading Oracle 9i Software to Oracle 10g
After making these changes, you must either reboot or execute /sbin/sysctl -p as root.
•
If Oracle is running on Solaris, make sure /etc/system contains the following line:
set noexec_user_stack=1
After making this change, you must reboot.
•
Check for invalid objects in the database and recompile them if necessary.
•
Gather schema statistics.
•
Edit privileges for the wctsupport and connection pool users.
Gathering Schema Statistics
Before you perform the upgrade, it is strongly recommended that you collect optimizer statistics for the
standard schemas. Start SQL*Plus and execute the following:
connect / as sysdba
spool gdict
grant analyze any to sys;
exec dbms_stats.gather_schema_stats('WMSYS',options=>'GATHER',
estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE,
method_opt => 'FOR ALL COLUMNS SIZE AUTO', cascade => TRUE);
exec dbms_stats.gather_schema_stats('CTXSYS',options=>'GATHER',
estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE,
method_opt => 'FOR ALL COLUMNS SIZE AUTO', cascade => TRUE);
exec dbms_stats.gather_schema_stats('XDB',options=>'GATHER',
estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE,
method_opt => 'FOR ALL COLUMNS SIZE AUTO', cascade => TRUE);
exec dbms_stats.gather_schema_stats('OUTLN',options=>'GATHER',
estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE,
method_opt => 'FOR ALL COLUMNS SIZE AUTO', cascade => TRUE);
exec dbms_stats.gather_schema_stats('DBSNMP',options=>'GATHER',
estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE,
method_opt => 'FOR ALL COLUMNS SIZE AUTO', cascade => TRUE);
exec dbms_stats.gather_schema_stats('SYSTEM',options=>'GATHER',
estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE,
method_opt => 'FOR ALL COLUMNS SIZE AUTO', cascade => TRUE);
exec dbms_stats.gather_schema_stats('SYS',options=>'GATHER',
estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE,
method_opt => 'FOR ALL COLUMNS SIZE AUTO', cascade => TRUE);
spool off
Editing User Privileges
Oracle 10g includes changes to the privileges for the CONNECT and RESOURCE roles. As a result, it is
4
Upgrading Oracle 9i Software to Oracle 10g
necessary to modify the permissions for the connection pool users and wctsupport.
1. Start SQL*Plus and execute the following:
connect / as sysdba
revoke connect from <connection_pool_user>
/
revoke resource from <connection_pool_user>
/
grant create session, alter session to <connection_pool_user>
/
grant create sequence, create synonym, create table, create view,
create procedure, create trigger, create type to <connection_pool_user>
/
grant create cluster, create database link, create operator,
create indextype to <connection_pool_user>
/
grant query rewrite, unlimited tablespace to <connection_pool_user>
/
revoke connect from wctsupport
/
revoke resource from wctsupport
/
grant create session, alter session to wctsupport
/
grant create sequence, create synonym, create table, create view,
create procedure, create trigger, create type to wctsupport
/
grant create cluster, create database link, create operator,
create indextype to wctsupport
/
where <connection_pool_user> is the name of the database connection pool user.
NOTE:
You may see errors after the revoke statements are executed. They can be ignored.
2. Execute the following:
connect ctxsys/<ctxsys_password>
grant execute on ctxsys.webct_clob_search to <connection_pool_user>$PF
/
grant execute on ctxsys.webct_blob_search to <connection_pool_user>$PF
/
where <ctxsys_password> is the password of the ctxsys database user and
<connection_pool_user> is the name of the database connection pool user.
UPGRADING TO ORACLE DATABASE 10G
The general steps to upgrade Oracle 9i to Oracle 10g are:
1. Install the Oracle Database 10g software and all required patches.
2. Upgrade the database using the Database Upgrade Assistant.
3. Apply Oracle patch 5005469.
4. Update the initialization parameters.
5
Upgrading Oracle 9i Software to Oracle 10g
Installing Oracle Database 10g Software
For detailed information on installing the Oracle 10g software and required patches, see the appropriate
version of the Vista or CE Installation Guide.
Upgrading the Database
1. Make sure the WebCT application has been shut down.
2. Log in the database server machine.
NOTE:
On Windows, log in under an account that has administrator privileges on the
machine. On Linux and Solaris, log in as oracle.
3. Make sure that the WebCT database is running.
4. Change the ORACLE_HOME environment variable to point to the Oracle home directory that was
created during the Oracle 10g database software installation.
5. Launch the Oracle Database Upgrade Assistant (dbua).
Linux/Solaris
From a terminal window, execute $ORACLE_HOME/bin/dbua
NOTE:
Windows
Make sure that $ORACLE_HOME points to the new Oracle 10g
home directory.
From the Windows Start menu, choose Programs->Oracle ORACLE_HOME_NAME->Configuration and Migration Tools->Database
Upgrade Assistant
6. From the Welcome screen, click Next.
7. From the Databases screen, select the WebCT database you want to upgrade and click Next.
8. The dbua performs various checks on the database to ensure that it can be upgraded. During the
course of these checks, you may see warning messages. Follow the on-screen instructions and
perform any necessary steps to correct problems if required.
NOTE:
You may see warnings that the default privileges for the CONNECT role have changed
and that the optimizer statistics are stale. Click Yes to ignore the warnings and
continue the upgrade.
9. From the Creating the SYSAUX Tablespace screen, click Next.
6
Upgrading Oracle 9i Software to Oracle 10g
NOTE:
The new SYSAUX tablespace will be used to store Oracle product-specific data that was
previously stored in separate tablespaces, including statspack statistics. For more
information, see the Oracle Database Administrator's Guide for Oracle 10g (available
from Oracle).
10. From the Recompile Invalid Objects screen, make sure Recompile invalid objects at the end of
upgrade and Turn off Archiving, for the duration of upgrade are both selected. Make sure Degrees of
Parallelism is set to 1. Then click Next.
11. From the Backup screen, make sure I have already backed up my database is selected and click Next.
12. From the Management Options screen, make sure Configure the database with Enterprise Manager is
not selected and click Next.
13. In the Summary screen, review the summary information. If you need to make any changes, click
Back to return to the appropriate screen. Otherwise, click Finish. The upgrade begins.
NOTE:
During the upgrade, you may see a warning about a unique key constraint violation on
CTXSYS.DRC$OAT_KEY. This error can be ignored.
14. When the upgrade is complete, the Upgrade Results screen appears. Review the upgrade results. Then
click Close.
Applying Oracle Patch 5005469
IMPORTANT: Currently, the OPatch utility cannot be used to apply this patch. You must apply it
manually as described in this section.
To apply patch 5005469, do the following:
1. Extract the patch to a temporary directory.
2. Open a console window and change to the temporary directory.
3. Execute the following:
Windows
sqlplus "/ as sysdba" @.\5005469\files\ctx\sample\script\drkorean.sql
Linux/Solaris
sqlplus "/ as sysdba" @./5005469/files/ctx/sample/script/drkorean.sql
Updating Initialization Parameters
7
Upgrading Oracle 9i Software to Oracle 10g
1. Create the following directory:
Windows
%ORACLE_BASE%\admin\<oracle_sid>\adump
Linux/Solaris
$ORACLE_BASE/admin/<oracle_sid>/adump
where <oracle_sid> is the Oracle SID of the upgraded database.
2. Start SQL*Plus and execute the following:
Windows
Linux/Solaris
connect / as sysdba
create pfile='c:\pfile.ora' from spfile;
connect / as sysdba
create pfile='/tmp/pfile.ora' from spfile;
This creates the pfile.ora text file, which contains all the database's initialization parameter
settings.
3. Open pfile.ora in a text editor. Then search for and remove the following initialization
parameters:
•
*.sessions=<value>
•
*.log_buffer=<value>
•
*.log_archive_dest_state_2=<value>
4. Add the following lines:
*.audit_file_dest='<oracle_base>/admin/<oracle_sid>/adump
*.db_recovery_file_dest='<oracle_base>/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.recyclebin='OFF'
where <oracle_base> is the new Oracle base directory and <oracle_sid> is the Oracle SID of
the upgraded database.
5. Make the following changes:
*.compatible='9.2.0.0.0' -> *.compatible='10.2.0.1.0'
*.log_archive_format='%t_%s.log' to *.log_archive_format='%t_%s_%r.log'
6. In SQL*Plus, execute the following:
Windows
shutdown immediate
connect / as sysdba
create spfile from pfile='c:\pfile.ora';
startup
8
Upgrading Oracle 9i Software to Oracle 10g
Linux/Solaris
shutdown immediate
connect / as sysdba
create spfile from pfile='/tmp/pfile.ora';
startup
This updates the database with the changes made to pfile.ora.
9