Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    16

    Unanswered: how to obtain all instances information in RAC env

    I have installed RAC with instances rac1 and rac2. How can I get the instance_namber list of those instances (in my case, 1 and 2) when I connect to either rac1 or rac2?

    I tried to query gv$instance view. If both instances are online, I got 2 records. Fine.
    But if rac2 is down, I got only 1 record for rac1.

    Is there anyone know a easy solution for that? Thanks ahead.

    -Xun Zhang

  2. #2
    Join Date
    Sep 2003
    Location
    Virginia, USA
    Posts
    246
    Instance numbers can be dynamic, and therefore not something you can query unless every instance is up.

    The V$ objects such as V$INSTANCE are dynamic and only contain data when the underlying table(s) are populated. When you start a RAC instance, it updates the data in the underlying tables and you see the results in views like V$INSTANCE. When you shutdown the instance, the instance is de-registered: the local V$ views are cleared, and the gobal GV$ views are updated to remove the old instance.

    You can set init.ora parameter INSTANCE_NUMBER to hard code the instance numbers, and then use a C program to scan the init.ora files on each and every server, but that might not be a practical solution.
    MarkRem
    Author, Oracle Database 10g: From Nuts to Soup
    http://www.remidata.com/book_nuts2soup.htm

  3. #3
    Join Date
    Jul 2003
    Posts
    2,296
    hi, what about issueing "crs_stat" from the command line?
    - The_Duck
    you can lead someone to something but they will never learn anything ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •