Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re:Standby -> ORA-01031: insufficient privileges -> Solved
Hello Carel-Jan,
I am always reading with a great pleasure your postings ;). I have tried to keep the configuration as symmetric as possible. "stby" ist the name of the connectString for the standby database:
vi "tnsnames.ora"
# stby database
STBY =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = host2.example.com)(PORT = 1522))
)
(CONNECT_DATA =
(SID = orcl)
(SERVER = DEDICATED)
)
)
# primary database
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = host1.example.com)(PORT = 1522))
)
(CONNECT_DATA =
(SID = orcl )
(SERVER = DEDICATED)
)
)
The only place where I have "stby" as string is DB parameter "db_unique_name".
SQL> show parameter name
NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_file_name_convert string db_name string orcl db_unique_name string STBY <!!!!! global_names boolean FALSE instance_name string orcl lock_name_space string log_file_name_convert string service_names string orcl.example.com sp_name string orcl
In the meantime I have solved the problem. The problem was that in the definition of the listener (in listener.ora file) I have had the following entry:
SID_LIST_LISTENER_ORCL =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl.example.com)
(ORACLE_HOME = /u01/app/oracle/product/10.1.0/db_1)
(SID_NAME = ORCL) <!! note this line
)
)
Lesson learned: oracle instance name(ORACLE_SID) is case sensitive in (almost)ALL configuration files:
3)
SQL> show parameter db_name
NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_name string orcl <!!! Lower case 4) [host2:orcl:/u01/app/oracle/product/10.1.0/db_1/dbs] ->ls -l orapworcl -rwSr----- 1 oracle oinstall 1536 May 23 16:46 orapworcl <!!!Lower case
But in "tnsnames.ora" it doesn't matter:
STBY =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = host2.example.com)(PORT = 1522))
)
(CONNECT_DATA =
(SID = orcl) <!!!!! Here is ORACLE_SID not case sensitive ?!
(SERVER = DEDICATED)
)
)
Regards. Milen
-----Original Message-----
Wrom:
UFPEGAUTFJMVRESKPNKMBIPBARHDMNNSKVFVWRKJVZCMHVIBGDADRZFSQHYUCDDJBLVLMHAALPTCXLYRWTQTIPWIGYOKSTTZR
Sent: Tuesday, May 24, 2005 11:13 PM
To: makulev_at_gmx.net
Cc: oracle-l_at_freelists.org
Subject: Re: Standby -> ORA-01031: insufficient privileges
Hi Milen,
The 'orcl' part of the password filename is the instance name. So, in your
case, it should be stby.
I'm very grateful that you're proving my statement, that in a High Available configuration both ends should be as symmetric as possible.
The name stby seems to be a logical choice, on first sight. However, when the standby takes over the tasks of the primary, after that failed for some reason, all of a sudden you end up with a very confusing sonfiguration, where the database named 'stby' has the primary role. When the primary gets rebuild, it will have the orcl name.
Furthermore, until the primary is rebuild, your system is more vulnerable, due to the fact that there is only one database (supposed you have just one standby). Meanwhile, it is more likely you make a mistake in this confusing situation with a stby acting as primary.
Bottom line: in your situation, I'd name the standby database 'orcl' as well. In that case, you don't have to recreate the passwordfile, but just the database ;-).
Best regards,
Carel-Jan Engel
===
If you think education is expensive, try ignorance. (Derek Bok) ===
On Tue, 2005-05-24 at 22:40, Milen Kulev wrote:
> Hello listers, > > I am trying to build a standby database (for learning purposes) with > RMAN. > > The problem is, when I try to connect to the standy instance (which is > in NOMOUNT status), I am always getting the following error (executed > on primary host(host1)): > > [host1:orcl:~] ->rman target sys/oracle_at_orcl auxiliary > sys/oracle_at_stby Recovery Manager: Release 10.1.0.4.0 - Production > Copyright (c) 1995, 2004, Oracle. All rights reserved. > > connected to target database: ORCL (DBID=1086744555) > RMAN-00571: > =========================================================== > RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== > RMAN-00571: =========================================================== > RMAN-00554: initialization of internal recovery manager package failed > RMAN-04006: error from auxiliary database: ORA-01031: insufficientprivileges
> > orcl is my primary database > stby is my standby database > > Even on the standby machine(host2), when I execute the following > statement, I am getting the same error: > > [host2:orcl:/u01/app/oracle/product/10.1.0/db_1/dbs] ->sqlplus > 'sys/oracle_at_stby as sysdba' ; > SQL*Plus: Release 10.1.0.4.0 - Production on Mon May 23 16:34:43 2005 > Copyright (c) 1982, 2005, Oracle. All rights reserved. > > ERROR: > ORA-01031: insufficient privileges > > Standby Database (TNS name = stby) is NOMOUNT status. > > Configration of both databases : > *.remote_login_passwordfile = EXCLUSIVE > > There is a password file (orapworcl) on the standby machine : > host2:orcl:/u01/app/oracle/product/10.1.0/db_1] ->ls -l > $ORACLE_HOME/dbs total 44 > -rw-rw---- 1 oracle oinstall 1544 May 22 12:25 hc_orcl.dat > -rw-r--r-- 1 oracle oinstall 12920 May 8 08:43 initdw.ora > -rw-r--r-- 1 oracle oinstall 8385 May 8 08:43 init.ora > -rw-rw---- 1 oracle oinstall 24 May 23 13:56 lkSTBY > -rwSr----- 1 oracle oinstall 1536 May 23 13:56 orapworcl > -rw-r----- 1 oracle oinstall 3584 May 23 13:35 spfileorcl.ora > [host2:orcl:/u01/app/oracle/product/10.1.0/db_1] -> > > > OS User "oracle" ist a member of OS "dba" group: > [host2:orcl:/u01/app/oracle/product/10.1.0/db_1/dbs] ->id > uid=700(oracle) gid=701(oinstall) groups=701(oinstall),700(dba) > > The password file (orapworcl) was created with the command: > [host2:orcl:/u01/app/oracle/product/10.1.0/db_1/dbs] ->orapwd > file=orapworcl password=oracle force=Y > > Whatever I do, I am still getting "ORA-01031: insufficient privileges" > error message. > > OS version: [host2:orcl:/u01/app/oracle/product/10.1.0/db_1/dbs] > ->uname -a Linux host2.example.com 2.4.21-27.EL #1 Wed Dec 1 22:08:15 > EST 2004 i686 i686 i386 GNU/Linux > [host2:orcl:/u01/app/oracle/product/10.1.0/db_1/dbs] ->cat < > /etc/redhat-release Red Hat Enterprise Linux AS release 3 (Taroon > Update 4) > > Oracle Software (primary + standby): > SQL> select * from V$version; > > BANNER > ---------------------------------------------------------------- > Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - Prod > PL/SQL Release 10.1.0.4.0 - Production > CORE 10.1.0.4.0 Production > TNS for Linux: Version 10.1.0.4.0 - Production > NLSRTL Version 10.1.0.4.0 - Production > > > > What I am missing here? > > > MILEN > > -- > http://www.freelists.org/webpage/oracle-l
-- http://www.freelists.org/webpage/oracle-l -- 5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail +++ GMX - die erste Adresse für Mail, Message, More +++ -- http://www.freelists.org/webpage/oracle-lReceived on Fri May 27 2005 - 11:08:53 CDT
![]() |
![]() |