How to find if instance is cluster or non-cluster

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Virendra

    How to find if instance is cluster or non-cluster

    I need to figure out programmaticall y if an instance is a cluster or
    non-cluster. Also, if it is a cluster what are nodes and associated
    cluster directories in the instance. All I know is the instance name.

    I am looking for this information for MSSQL, Oracle, DB2 and Sybase
    databases.

    Thanks in advance for any help.
  • DA Morgan

    #2
    Re: How to find if instance is cluster or non-cluster

    Virendra wrote:
    I need to figure out programmaticall y if an instance is a cluster or
    non-cluster. Also, if it is a cluster what are nodes and associated
    cluster directories in the instance. All I know is the instance name.
    >
    I am looking for this information for MSSQL, Oracle, DB2 and Sybase
    databases.
    >
    Thanks in advance for any help.
    I'm not sure why you would ask about Oracle here but as you have, in
    SQL*Plus:

    set serveroutput on

    DECLARE
    inst_tab dbms_utility.in stance_table;
    inst_cnt NUMBER;
    BEGIN
    IF dbms_utility.is _cluster_databa se THEN
    dbms_utility.ac tive_instances( inst_tab, inst_cnt);
    dbms_output.put _line('-' || inst_tab.FIRST) ;
    dbms_output.put _line(TO_CHAR(i nst_cnt));
    ELSE
    dbms_output.put _line('Not A Clustered Database');
    END IF;
    END;
    /
    --
    Daniel A. Morgan
    Oracle Ace Director & Instructor
    University of Washington
    damorgan@x.wash ington.edu (replace x with u to respond)
    Puget Sound Oracle Users Group
    Oracle PL/SQL examples, syntax, DBMS packages, string, timestamp, substring, PHP code, and Javascript Code Reference Library (formerly known as Morgan's Library)

    Comment

    • Dan Guzman

      #3
      Re: How to find if instance is cluster or non-cluster

      I am looking for this information for MSSQL, Oracle, DB2 and Sybase
      databases.
      The result of the following query will be non-empty if the Microsoft SQL
      Server instance is clustered.

      SELECT * FROM sys.dm_os_clust er_nodes;

      --
      Hope this helps.

      Dan Guzman
      SQL Server MVP


      "Virendra" <virenbeena@hot mail.comwrote in message
      news:e54bc49c-8521-4ada-8a03-26deb08582ff@t5 4g2000hsg.googl egroups.com...
      >I need to figure out programmaticall y if an instance is a cluster or
      non-cluster. Also, if it is a cluster what are nodes and associated
      cluster directories in the instance. All I know is the instance name.
      >
      I am looking for this information for MSSQL, Oracle, DB2 and Sybase
      databases.
      >
      Thanks in advance for any help.

      Comment

      • Virendra

        #4
        Re: How to find if instance is cluster or non-cluster

        On Jun 7, 10:50 am, "Dan Guzman" <guzma...@nospa m-
        online.sbcgloba l.netwrote:
        I am looking for this information for MSSQL, Oracle, DB2 and Sybase
        databases.
        >
        The result of the following query will be non-empty if the Microsoft SQL
        Server instance is clustered.
        >
        SELECT * FROM sys.dm_os_clust er_nodes;
        >
        --
        Hope this helps.
        >
        Dan Guzman
        SQL Server MVPhttp://weblogs.sqlteam .com/dang/
        >
        "Virendra" <virenbe...@hot mail.comwrote in message
        >
        news:e54bc49c-8521-4ada-8a03-26deb08582ff@t5 4g2000hsg.googl egroups.com...
        >
        >
        >
        I need to figure out programmaticall y if an instance is a cluster or
        non-cluster. Also, if it is a cluster what are nodes and associated
        cluster directories in the instance. All I know is the instance name.
        >
        I am looking for this information for MSSQL, Oracle, DB2 and Sybase
        databases.
        >
        Thanks in advance for any help.- Hide quoted text -
        >
        - Show quoted text -
        Thanks both of you.

        I noticed that sys.dm_os_clust er_nodes table/view does not exist for
        SQL 2000. I believe SQL2000 has clustering support.

        Thanks again.

        Comment

        • Dan Guzman

          #5
          Re: How to find if instance is cluster or non-cluster

          I noticed that sys.dm_os_clust er_nodes table/view does not exist for
          SQL 2000. I believe SQL2000 has clustering support.
          Yes SQL 2000 has clustering support. Another method to detect clustering is
          with SERVERPROPERTY:

          SELECT SERVERPROPERTY( 'IsClustered')

          This will return 1 if clustered (otherwise 0) and can be used with SQL 2000
          and later versions.

          --
          Hope this helps.

          Dan Guzman
          SQL Server MVP


          "Virendra" <virenbeena@hot mail.comwrote in message
          news:937281a9-5e8f-44ea-b9cb-a3a952239652@x4 1g2000hsb.googl egroups.com...
          On Jun 7, 10:50 am, "Dan Guzman" <guzma...@nospa m-
          online.sbcgloba l.netwrote:
          I am looking for this information for MSSQL, Oracle, DB2 and Sybase
          databases.
          >
          The result of the following query will be non-empty if the Microsoft SQL
          Server instance is clustered.
          >
          SELECT * FROM sys.dm_os_clust er_nodes;
          >
          --
          Hope this helps.
          >
          Dan Guzman
          SQL Server MVPhttp://weblogs.sqlteam .com/dang/
          >
          "Virendra" <virenbe...@hot mail.comwrote in message
          >
          news:e54bc49c-8521-4ada-8a03-26deb08582ff@t5 4g2000hsg.googl egroups.com...
          >
          >
          >
          I need to figure out programmaticall y if an instance is a cluster or
          non-cluster. Also, if it is a cluster what are nodes and associated
          cluster directories in the instance. All I know is the instance name.
          >
          I am looking for this information for MSSQL, Oracle, DB2 and Sybase
          databases.
          >
          Thanks in advance for any help.- Hide quoted text -
          >
          - Show quoted text -
          Thanks both of you.

          I noticed that sys.dm_os_clust er_nodes table/view does not exist for
          SQL 2000. I believe SQL2000 has clustering support.

          Thanks again.

          Comment

          • Plamen Ratchev

            #6
            Re: How to find if instance is cluster or non-cluster

            In addition to Dan's comments, it is possible to enumerate SQL Server
            instances and get information if the instance is clustered via using
            ADO.NET:


            HTH,

            Plamen Ratchev


            Comment

            Working...