startStandby.txt 09-08-2001 Bikle ------------------- This file demonstrates a few simple commands used to start the BBIKLE standby database. $ $ BBIKLE.csh sf49er.bikle.com 1 % sqi SQL*Plus: Release 8.1.7.0.0 - Production on Sat Sep 8 22:17:28 2001 (c) Copyright 2000 Oracle Corporation. All rights reserved. Connected to an idle instance. 22:17:28 SQL> startup nomount ORACLE instance started. Total System Global Area 186908832 bytes Fixed Size 73888 bytes Variable Size 75399168 bytes Database Buffers 100933632 bytes Redo Buffers 10502144 bytes 22:22:38 SQL> ALTER DATABASE MOUNT STANDBY DATABASE; ALTER DATABASE MOUNT STANDBY DATABASE * ERROR at line 1: ORA-01990: error opening password file '/u2/oracle/BBIKLE/dbs/orapw' 22:23:00 SQL> !orapwd file=/u2/oracle/BBIKLE/dbs/orapwBBIKLE password=boracle entries=11 22:25:26 SQL> shutdown abort ORACLE instance shut down. 22:25:36 SQL> startup nomount ORACLE instance started. Total System Global Area 186908832 bytes Fixed Size 73888 bytes Variable Size 75399168 bytes Database Buffers 100933632 bytes Redo Buffers 10502144 bytes 22:25:44 SQL> ALTER DATABASE MOUNT STANDBY DATABASE; Database altered. 22:26:06 SQL> Notice that in the above screen dump, I was forced to create an Oracle password file. I did not find mention of this in any of the Oracle documents. Fortunately I had bumped into a similar situation during my attempts to install Oracle from an ORACLE_HOME tar ball. So now, whenever I see the error: "ORA-01990: error opening password file", my natural response is to create an Oracle password file. As we can see, my judgement was on target. So that is the main point of this file. We needed to do three things to mount the standby database: -STARTUP NOMOUNT -orapwd file=/u2/oracle/BBIKLE/dbs/orapwBBIKLE password=boracle entries=11 -ALTER DATABASE MOUNT STANDBY DATABASE If the reader is curious about how we solved a strange problem related to the third step, he/she is urged to read further. Speaking of errors, now is a good time to mention a problem I solved after a bit of experimentation. A copy of the error message is displayed below: 17:02:03 SQL> ALTER DATABASE MOUNT STANDBY DATABASE; ALTER DATABASE MOUNT STANDBY DATABASE * ERROR at line 1: ORA-01102: cannot mount database in EXCLUSIVE mode I had bumped into the above error during my first attempt to run: ALTER DATABASE MOUNT STANDBY DATABASE; I then used the oerr utility to dig deeper into the problem: sf49er.bikle.com 2 % oerr ora 1102 01102, 00000, "cannot mount database in EXCLUSIVE mode" // *Cause: Some other instance has the database mounted exclusive or shared. // *Action: Shutdown other instance or mount in a compatible mode. sf49er.bikle.com 3 % My impulse at this point was to change the DB_NAME parameter in initBBIKLE.ora. I made this change (along with the assumption that the Oracle documentation contained an error): DB_NAME=ABIKLE -> DB_NAME=BBIKLE Here is how Oracle responded: 17:14:39 SQL> ALTER DATABASE MOUNT STANDBY DATABASE; ALTER DATABASE MOUNT STANDBY DATABASE * ERROR at line 1: ORA-01103: database name 'ABIKLE' in controlfile is not 'BBIKLE' So, it looks like the Oracle documentation was correct on this point. I asked, "Why does this BBIKLE instance of Oracle think this database is being used by the ABIKLE instance?" Possible reason: "An instance will place a lock file in $ORACLE_HOME/dbs to prevent other instances from mounting the currently mounted database." The above reason may apply to me because both ABIKLE and BBIKLE are using the same tree of oracle software: /u2/oracle/817 We may have lock-file contention in the directory: /u2/oracle/817/dbs/ I took this approach to test my theory: -rm the softlink /u2/oracle/BBIKLE->/u2/oracle/817 -mkdir /u2/oracle/BBIKLE -copy all the software from /u2/oracle/817 into /u2/oracle/BBIKLE cd /u2/oracle/817 tar cf - .|(cd /u2/oracle/BBIKLE;tar xf -) chmod 6751 /u2/oracle/BBIKLE/bin/oracle -Remove all files which contain the name ABIKLE in the file name: /bin/find /u2/oracle/BBIKLE -type f -name '*ABIKLE*' -print|xargs /bin/rm -Edit all files which contain the string ABIKLE and change the string to BBIKLE /bin/find /u2/oracle/BBIKLE -type f -print|xargs grep -l ABIKLE|xargs perl -e 's/ABIKLE/BBIKLE/g' -p -i.bak Simply said, I created a separate tree of software for the BBIKLE database. Once I did this, my problems with the the ORA-01103 error went away and I validated that my theory about lock-file contention in $ORACLE_HOME/dbs.