473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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 7891
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: michaeljohnsmith | last post by:
I am running Win XP SP2 and MSDE 2000 SP3a. The user is logging on as a POWERUSER. When the user logs on the MSSQLSERVER service starts but the SQL Server Service Manager, that runs in the system...
0
by: Stefan Behnel | last post by:
Hi! I just stumbled over this: ..>>> class test(object): .... def t(): pass .... t.testval = 1 .... ..>>> test.t
2
by: PC | last post by:
Hi, I have used the DLast("!","")function to find and display the last entry in a table. How would I go about displaying the last record in a table that is not Null? Thanks in advance ...pc
10
by: A.M | last post by:
Hi, Can Global object have non-static methods? If answer is yes, then How can I access them in pages? I have following property in Global.asax.cs, but when I try to use it in pages, I receive...
11
by: tshad | last post by:
I am setting up some of my functions in a class called MyFunctions. I am not clear as to the best time to set a function as Shared and when not to. For example, I have the following bit...
7
by: Chris Thunell | last post by:
I'm looking to find in a long string an instance of 4 numbers in a row, and pull out those numbers. For instance: string = "0104 PBR", i'd like to get the 0104. string="PBR XT 0105 TD", i'd like...
3
by: csharpula csharp | last post by:
Non-static method requires a target appeares when I am trying to activte nunit (test). Any clue? Thank you! *** Sent via Developersdex http://www.developersdex.com ***
0
by: sk.rasheedfarhan | last post by:
Hi all, I set the configuration for Merge replication for Subscription on one database and I have created the Merge replication for publication on another machine. And I updated columns of...
1
by: D2 | last post by:
Hi, I need to find all the non-ui controls like errorproviders that have been dropped in the form. Unlike form.controls property, I dont see any collection that maintains all the non-ui controls...
0
by: mayank1 | last post by:
Hi, I am writing code in windows form application C++, i need function similar to GetFirstDocTemplatePosition(),......but i could not find it for non-MFC. is there anyone who had alreday done...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.