During the upgrading of an Oracle database from
10g to 10.2.0.4 under Solaris I ran into a number of problems. So this is a log
of what went wrong and how to get around the problems. This log refers to a
single instance non-Rac database environment. All tasks should be performed under
the oracle user except where otherwise stated.
1). You first need to download and unzip the p6810189_10204_Solaris-64.zip to
/tmp for example.
2). Shutdown the database instance and check that all oracle processes have
terminated.
3). Now start the runInstaller in the unzipped tmp directory in Disk1 ie.
/tmp/oracle/Disk1
4). When prompted run the root.sh script as
root.
5). Startup the database with sqlplus as
sys in upgrade mode "startup upgrade".
6). Execute the upgrade assistant "dbua"
and follow the instructions.
Possible problems are:
1). You can get an ORA-01507 during the
dbua execution. Under solaris that resulted from a discrepancy between the ORACLE_HOME
and the oratab entry. Correcting that was tricky for two reasons. Firstly you
need root rights to change the oratab and secondly I found two versions of
oratab in /etc and /var/opt/oracle.
2). Because the ORACLE_HOME was not setup
correctly I needed to alter the root.sh script. Also the rdbms/install/rootadd.sh
and the oraInst.loc in ORACLE_HOME had an incorrect path. Although the paths
actually mapped to the same physical directories they used alternate linked
paths and where as such not identical this caused the dbua to throw an ORA-01507
saying that the "'Dbua thinks this is a Rerun operation" and the database is
not mounted - which was actually all rubbish.
Oracle's Flashback functionality is a really
great feature and it comes in all shapes and sizes except "schema". If you are writing a test
suite and want exactly the same data conditions per test, it would be fantastic
to build the schema and fill it with initial data then run 100 different tests,
which always reset to the initial data to the original timestamp. That would be
"Flashback Schema", which
neither 10g nor 11g have on offer. But hey folks, let's do-it-ourselves!
The following code is a simple implementation of Flashback Schema with some
restrictions regarding the kind of objects, which can be flashed:
CREATE OR
REPLACE procedure Flashback_Schema( p_flashback2date in DATE ) AS
--
-- Author:
Paul Lewin / 20th March 2009
-- Version 1.1 / 25th March 2009
--
Description: Flashback an Oracle schema to a past point-in-time
-- Field of
use: Not for production but for testing and simulation (QA)
--
-- Setup the
instance:
-- Set
the retention period for the instance before use (in seconds) 86400 = 24 Hrs
-- Make sure the UNDO-Tablespace is large enough to handle all changes for 24 Hrs
--
ALTER SYSTEM SET UNDO_RETENTION = 86400;
--
ALTER TABLESPACE UNDOTBS1 RETENTION GUARANTEE;
--
-- Setup the
user (as System):
--
Grant execute on DBMS_FLASHBACK to username;
--
Grant FLASHBACK ANY TABLE to username;
--
Grant execute any procedure to username;
--
Grant SELECT ANY TRANSACTION to username;
--
-- Calling:
-- Use
the following call in each schema to reset the data to a specific point-in-time
When using Oracle 10g features around the flashback technology it's important to know the differences between the individual options and their respective restrictions. The Flashback Table, Flashback Query, Flashback Transaction Query and Flashback Version Query are all based on undo (or rollback) data option, which primarily provides read consistency and rolling back transactions in Oracle 10g. However, Flashback Database is based on before images in the flashback logs and Flashback Drop is based on another 10g feature called the Recycle Bin, which is there to manage dropped database objects until their space is required to store new data.
Oracle Metalink has some very useful documents relating to these features:
Note 249319.1 - Configure flashback database
Note 270060.1 - Use Flashback Table Feature and Resolve errors
Note 270535.1 - Restrictions on Flashback Table Feature
Finally with Oracle Release 11g we get case sensitive passwords on user accounts. What sounds so simple and normal has taken decades to arrive in the functionality list of Oracles RDBMS. For those who never expected Oracle to jump that gap, there is a compatibility mode, which allows you to use password naming conventions compatible with previous versions ie. non-case-sensitive. As usual major changes don't have to be adopted immediately.
Note: Even if a major change is more of a major impact than anything else. ;-)
If you are trying to track down a problem that only occurs on one system, say between a production system and am integration system, you want to be sure your systems can behave identically before you get into any application analysis work. You can check the basic system configuration with the host operating system diagnosis tools but what about the databases?
Oracle Enterprise Manager has a neat facility for helping with the database comparison. Using the "Deployments" register simple perform a "Compare Database Configuration" specifying the database instances you want to verify. Take a look at the Oracle 10.2 online documentation for details.
Back in September Oracle released the 10.2.0.4 version of Oracle Warehouse Builder for Windows and other platforms. If you go looking for the client download, don't look for a Windows XP client just head directly for the patch on metalink (https://metalink.oracle.com/). The patch-id is 7005587 and you will need the 32 bit client for windows.
If you already have a 10g database setup and running without the JVM (Java Virtual Machine) installed and later descide you want to add say OWB (Oracle Warehouse Builder) to you instance then you need to get JVM working first. It's not that complicated realy but follow these steps laid out in Metalink (Doc-ID:276554.1) if you want to get it right first time.
A friend pointed me at this interesting blog (The Go-Faster Oracle Blog), which has some useful links to performance tools. Analyzing an Oracle database without having the Enterprise Manager either installed or maybe not available to you can be a nightmare. He has developed some Excel sheets, which access the AWR data and output graphics and more right down to individual session analysis. Very useful tool-set, so take a look.
If you are trying to setup an Oracle instance for running OWB then you will need to set the remote_login_passwordfile to EXCLUSIVE in order for that to work. Using SQLPLUS connect to the instance and change the setting like this:
> sqlplus /nolog
SQL> connect / as sysdba
SQL> alter system set remote_login_passwordfile=EXCLUSIVE scope=spfile;
that should do the trick although you will need to bounce the instance before it will take effect.
You may also need to re-generate the sys password file like this:
Christian
Antognini has made a number of presentations on the topic of Oracle's 11g Optimizer. He has posted his presentation and demo, which he last held at the DOAG Conference in Nürnberg, Germany. He also has a whole load of useful other publications available for viewing.
Recent Comments