469,626 Members | 883 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,626 developers. It's quick & easy.

How to find if instance is cluster or non-cluster

I need to figure out programmatically 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.
Jun 27 '08 #1
5 7670
Virendra wrote:
I need to figure out programmatically 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.instance_table;
inst_cnt NUMBER;
BEGIN
IF dbms_utility.is_cluster_database THEN
dbms_utility.active_instances(inst_tab, inst_cnt);
dbms_output.put_line('-' || inst_tab.FIRST);
dbms_output.put_line(TO_CHAR(inst_cnt));
ELSE
dbms_output.put_line('Not A Clustered Database');
END IF;
END;
/
--
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
da******@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Jun 27 '08 #2
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_cluster_nodes;

--
Hope this helps.

Dan Guzman
SQL Server MVP
http://weblogs.sqlteam.com/dang/

"Virendra" <vi********@hotmail.comwrote in message
news:e5**********************************@t54g2000 hsg.googlegroups.com...
>I need to figure out programmatically 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.
Jun 27 '08 #3
On Jun 7, 10:50*am, "Dan Guzman" <guzma...@nospam-
online.sbcglobal.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_cluster_nodes;

--
Hope this helps.

Dan Guzman
SQL Server MVPhttp://weblogs.sqlteam.com/dang/

"Virendra" <virenbe...@hotmail.comwrote in message

news:e5**********************************@t54g2000 hsg.googlegroups.com...
I need to figure out programmatically 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_cluster_nodes table/view does not exist for
SQL 2000. I believe SQL2000 has clustering support.

Thanks again.
Jun 27 '08 #4
I noticed that sys.dm_os_cluster_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
http://weblogs.sqlteam.com/dang/

"Virendra" <vi********@hotmail.comwrote in message
news:93**********************************@x41g2000 hsb.googlegroups.com...
On Jun 7, 10:50 am, "Dan Guzman" <guzma...@nospam-
online.sbcglobal.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_cluster_nodes;

--
Hope this helps.

Dan Guzman
SQL Server MVPhttp://weblogs.sqlteam.com/dang/

"Virendra" <virenbe...@hotmail.comwrote in message

news:e5**********************************@t54g2000 hsg.googlegroups.com...
I need to figure out programmatically 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_cluster_nodes table/view does not exist for
SQL 2000. I believe SQL2000 has clustering support.

Thanks again.

Jun 27 '08 #5
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:
http://msdn.microsoft.com/en-us/library/a6t1z9x2.aspx

HTH,

Plamen Ratchev
http://www.SQLStudio.com

Jun 27 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Stefan Behnel | last post: by
10 posts views Thread by A.M | last post: by
11 posts views Thread by tshad | last post: by
7 posts views Thread by Chris Thunell | last post: by
3 posts views Thread by csharpula csharp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.