Re: Detecting Controlfile Type

  • From: Ahbaid Gaffoor <ahbaid@xxxxxxx>
  • To: jkstill@xxxxxxxxx
  • Date: Mon, 09 Feb 2009 19:37:47 -0800

Hi Jared

thanks for the feedback, what I'm trying to do is write a controlling script for all of my dbs, and I was wondering how would I get the standbys started?

On a primary I usually do a "STARTUP" but on a standby I do:

STARTUP NOMOUNT;
ALTER DATABASE MOUNT STANDBY DATABASE;

... then start the managed recovery processes, etc.

the problem here is that I'd like to know the controlfile type to figure out which set of mount commands to use....

since both the primary and standby can go to "STARTUP NOMOUNT", I figured if there's a way from that point (NOMOUNT) to detect the type of database, I can then apply the appropriate commands to bring up a primary or standby database.

I looked at the view definition for GV$DATABASE and it joins x$kccdi and x$kccdi2 , but neither of these are available in a NOMOUNT state, come to think of it, you can start a database in NOMOUNT state without the controlfile even existing.

Now that I think about it, maybe I don't need to look at the control file, maybe something else?

I'd still like to know out of curiosity if detecting the control file type in a shutdown database is possible.

thanks

Ahbaid


Jared Still wrote:
On Sun, Feb 8, 2009 at 11:21 AM, Ahbaid Gaffoor <ahbaid@xxxxxxx <mailto:ahbaid@xxxxxxx>> wrote:

    Is there a way to figure what type of control file is in place
    without mounting a db?

    That is, without using the internal db views, via. some sort of
    file operation on the controlfile itself.

    thanks


If you know the current checkpoint number of the database, you may be
able to do this by querying the x$ views that the gv$%controlfile% views
are based on.

Take a look at v$backup_controlfile_details and v$backup_controlfile_summary.

The relevant info from the x$ tables that are queried by these views may be
available in the unmounted state.

Just checked to see if x$kccbf is available in the unmounted state, and it is not.

Maybe there's a view that will answer this question directly, but I personally don't
know of one.  Maybe someone will chime in with that info.

What is it you are trying to do?


Jared


--
//www.freelists.org/webpage/oracle-l


Other related posts: