Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: RMAN connection problems (Solaris/Oracle8i)

Re: RMAN connection problems (Solaris/Oracle8i)

From: D. Joseph Creighton <djc_at_cc.umanitoba.ca>
Date: 13 May 2002 21:18:54 GMT
Message-ID: <abpaju$3um$1@canopus.cc.umanitoba.ca>


In the last exciting episode, Anton Buijs <aammbuijs_at_xs4all.nl> wrote:
}The only thing that looks consistent to me from all your trials is that the
}service name "demo" found in tnsnames.ora resolves to a database with
}database name "oratst" (in lower case) with probably a SID "demo".

The only occurance of "demo" in tnsnames.ora is as follows:

DEMO.YYY.ZZ =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = xxx.yyy.zz)(PORT = ###))     )
    (CONNECT_DATA =
      (SERVICE_NAME = demo.yyy.zz)
    )
  )

The entry for "oratest" is nearly identical (including case sensitivity) but it does not have any domain-level qualifiers for the SERVICE_NAME; it merely has "oratest".

There doesn't seem to be any contradiction in these two entries as you describe.

}To verify this connect with sys/xxx_at_demo and run the queries:
}SELECT * FROM v$database; (gives database name)
}SELECT * FROM v$thread; (gives the SID in column instance)
}Then connect with sys/xxx when ORACLE_SID=ORATST and run same queries again.

This works as expected: all result sets point to the proper database names and instance names whether using @demo or allowing $ORACLE_SID to define it.

}Be aware of the fact that when you specify a service name (the @demo part in
}the connect) the value of ORACLE_SID is of no relevance anymore. The service
}name will be resolved via the Net8 configuration.

But it appears that ORACLE_SID becomes an issue with RMAN in another case I discovered today involving the starting of a database (connects made by the same methods and shutdowns prior made using the same command):

<oracle_at_skat:486>$ echo $ORACLE_SID
demo
RMAN> startup mount;

RMAN-06193: connected to target database (not started)
RMAN-06196: Oracle instance started
RMAN-06199: database mounted

...versus...

<oracle_at_skat:464>$ echo $ORACLE_SID
oratest
RMAN> startup mount;

RMAN-06193: connected to target database (not started)
RMAN-06196: Oracle instance started
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-06003: ORACLE error from target database: ORA-01102: cannot mount
database in EXCLUSIVE mode
RMAN-06097: text of failing SQL statement: alter database mount RMAN-06099: error occurred in source file: krmk.pc, line: 4192

I'm beginning to suspect that RMAN is calling scripts somewhere that rely on $ORACLE_SID being set to the instance you want to be working with. In writing some local scripts we've found this to be an issue as well.

}Also verify that variable $TWO_TASK is not set which is a default value...

Not set, for the sake of completeness.

-- 
# Insert a quip:  this line will be replaced and will never appear in the .sig
D. Joseph Creighton [ESTP] | Systems Analyst, Database Technologies, IST
Joe_Creighton_at_UManitoba.CA | University of Manitoba  Winnipeg, MB, Canada, eh?
Received on Mon May 13 2002 - 16:18:54 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US