Showing posts with label sqldmo. Show all posts
Showing posts with label sqldmo. Show all posts

Wednesday, March 21, 2012

ListCompatibilityLevels (DMO) Problem in Yukon

Hello,
The ListCompatibilityLevels ( Property of SQLDMO.SQLServer2 Object) does not
work properly for YUKON.
It does not report the 'Database compatibilty level 90'.
Please Help.
TIA
Regards
Vaibhav Tole.That's probably because it has no clue about any of Yukon's features or even
a compatibility level above 80. If you want to ensure full compliance with
2005 you need to use SMO not DMO.
Andrew J. Kelly SQL MVP
"Vaibhav" <vaibhavtole@.yahoo.com> wrote in message
news:eoXWSMWOGHA.2816@.TK2MSFTNGP15.phx.gbl...
> Hello,
> The ListCompatibilityLevels ( Property of SQLDMO.SQLServer2 Object) does
> not work properly for YUKON.
> It does not report the 'Database compatibilty level 90'.
> Please Help.
> TIA
>
> Regards
> Vaibhav Tole.
>|||Hello ,
Thx for that Info.
Do you know about how to "List compatibilty levels " by SMO ?
The DMO to SMO map ( msdn
:http://msdn2.microsoft.com/en-us/library/ms162159.aspx
)
tells us that the funtionality has been moved to "server" object.
T I A
Vaibhav
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:eSmaO4WOGHA.3944@.tk2msftngp13.phx.gbl...
> That's probably because it has no clue about any of Yukon's features or
> even a compatibility level above 80. If you want to ensure full
> compliance with 2005 you need to use SMO not DMO.
> --
> Andrew J. Kelly SQL MVP
>
> "Vaibhav" <vaibhavtole@.yahoo.com> wrote in message
> news:eoXWSMWOGHA.2816@.TK2MSFTNGP15.phx.gbl...
>|||These should get you started:
http://msdn2.microsoft.com/en-us/li...ilitylevel.aspx
http://msdn2.microsoft.com/en-us/library(d=robot)/ms162557.aspx
http://www.sqldbatips.com/showarticle.asp?ID=34
Andrew J. Kelly SQL MVP
"Vaibhav" <vaibhavtole@.yahoo.com> wrote in message
news:OAiI5Q1OGHA.3272@.tk2msftngp13.phx.gbl...
> Hello ,
> Thx for that Info.
> Do you know about how to "List compatibilty levels " by SMO ?
> The DMO to SMO map ( msdn
> :http://msdn2.microsoft.com/en-us/library/ms162159.aspx
> )
> tells us that the funtionality has been moved to "server" object.
>
> T I A
> Vaibhav
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:eSmaO4WOGHA.3944@.tk2msftngp13.phx.gbl...
>

Monday, March 19, 2012

listavailablesqlservers returns only default instances - please help!

Hiya,
I'm trying to write an application in which I call listavailablesqlservers()
(using
SQLDMO). My intention is to get a list of all available sql server instances
available on the network (including the machine on which the app is
running). However, listavailablesqlservers() seems to return only the
default instances and ignores all other instances.
Anyone else encounter this problem or have a work around?
I'm developing using VB.NET on a Windows XP Professional machine running
both SQL Server Developer edition (my default instance) and an MSDE named
instance.
Any help would be greatly appreciated as I've unsuccessfully trawled the
Internet looking for an answer.
Thanks in advance.
Kas.Kas,
Does this help?
http://msdn.microsoft.com/library/default.asp
?url=/library/en-us/sqldmo/dmoref_p_i_95gp.asp
Russell Fields
"rearwindow" <summerof_89@.hotmail.com> wrote in message
news:bsarm9$as3$1$8302bc10@.news.demon.co.uk...
> Hiya,
> I'm trying to write an application in which I call
listavailablesqlservers()
> (using
> SQLDMO). My intention is to get a list of all available sql server
instances
> available on the network (including the machine on which the app is
> running). However, listavailablesqlservers() seems to return only the
> default instances and ignores all other instances.
> Anyone else encounter this problem or have a work around?
> I'm developing using VB.NET on a Windows XP Professional machine running
> both SQL Server Developer edition (my default instance) and an MSDE named
> instance.
> Any help would be greatly appreciated as I've unsuccessfully trawled the
> Internet looking for an answer.
> Thanks in advance.
> Kas.
>

ListAvailableSQLServers Problem

I have been using SQLDMO listavailableSQLServers . It displays all the
servers but it doesnt list the local machine in which SQL Server too is
running. Am i missin something?What is the local machine?

If it's xp with sp2 then see
http://support.microsoft.com/default.aspx?kbid=841249

Nigel Rivett
www.nigelrivett.net

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||What is the local machine?

If it's xp with sp2 then see
http://support.microsoft.com/default.aspx?kbid=841249

Nigel Rivett
www.nigelrivett.net

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||What is the local machine?

If it's xp with sp2 then see
http://support.microsoft.com/default.aspx?kbid=841249

Nigel Rivett
www.nigelrivett.net

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||What is the local machine?

If it's xp with sp2 then see
http://support.microsoft.com/default.aspx?kbid=841249

Nigel Rivett
www.nigelrivett.net

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||What is the local machine?

If it's xp with sp2 then see
http://support.microsoft.com/default.aspx?kbid=841249

Nigel Rivett
www.nigelrivett.net

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||What is the local machine?

If it's xp with sp2 then see
http://support.microsoft.com/default.aspx?kbid=841249

Nigel Rivett
www.nigelrivett.net

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||What is the local machine?

If it's xp with sp2 then see
http://support.microsoft.com/default.aspx?kbid=841249

Nigel Rivett
www.nigelrivett.net

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||What is the local machine?

If it's xp with sp2 then see
http://support.microsoft.com/default.aspx?kbid=841249

Nigel Rivett
www.nigelrivett.net

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||What is the local machine?

If it's xp with sp2 then see
http://support.microsoft.com/default.aspx?kbid=841249

Nigel Rivett
www.nigelrivett.net

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||no its not XP.. its 2000.
I have installed SQL server in 3 machines in network includin the one
where i am running the application. now with listavailableservers it
shows the other 2 machines but not the one on where i am working on.|||Is your local database available over the network? Have you enabled a
network protocal using svrnetcn.exe? I noticed the other day that the
documentation says that ListAvailableSQLServers lists 'network-visible
instances' of SQL Server...

I have been suffering a similar (but different) problem. On XP it
appears to decide that if you are not connected to a network then the
server is not 'network-visible' and therefore the (local) server is not
listed. Hmm...

Any suggestions on how to detect if SQLServer is running on the local
machine when it's not connected to a network?

Neil

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

ListAvailableSQLServers not refreshing (VB-Sql server 2000)

i have 3 Sql server2000 servers running on a network
by using SQLDMO (ListAvailableSQLServers ) from another pc where
only Sql client is installed
and the list of all servers are avilable.
but when one of the server is down or shut down , the list is not
refreshed and giving error
how to the refresh the server list with out restarting . ping is
another option , but a connection object is
necessary for that.ListAvailableSQLServers consults the local domain browser or master domain
brower for a list of SQL Servers which are registered with it. It may or may
not be current, and it doesn't track active (or running) SQL Servers. You
would need something like ODBC ping for that. ping does not require a
connection object, but if you are trying to make a connection with SQL
Server, you will need a connection object (the connect method of
SQLDMO.SQLServer)
--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
<areejan2000@.yahoo.com> wrote in message
news:1159790536.490769.143470@.m7g2000cwm.googlegroups.com...
>i have 3 Sql server2000 servers running on a network
> by using SQLDMO (ListAvailableSQLServers ) from another pc where
> only Sql client is installed
>
> and the list of all servers are avilable.
> but when one of the server is down or shut down , the list is not
> refreshed and giving error
> how to the refresh the server list with out restarting . ping is
> another option , but a connection object is
> necessary for that.
>

ListAvailableSQLServers not refreshing (VB-Sql server 2000)

i have 3 Sql server2000 servers running on a network
by using SQLDMO (ListAvailableSQLServers ) from another pc where
only Sql client is installed
and the list of all servers are avilable.
but when one of the server is down or shut down , the list is not
refreshed and giving error
how to the refresh the server list with out restarting . ping is
another option , but a connection object is
necessary for that.
ListAvailableSQLServers consults the local domain browser or master domain
brower for a list of SQL Servers which are registered with it. It may or may
not be current, and it doesn't track active (or running) SQL Servers. You
would need something like ODBC ping for that. ping does not require a
connection object, but if you are trying to make a connection with SQL
Server, you will need a connection object (the connect method of
SQLDMO.SQLServer)
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
<areejan2000@.yahoo.com> wrote in message
news:1159790536.490769.143470@.m7g2000cwm.googlegro ups.com...
>i have 3 Sql server2000 servers running on a network
> by using SQLDMO (ListAvailableSQLServers ) from another pc where
> only Sql client is installed
>
> and the list of all servers are avilable.
> but when one of the server is down or shut down , the list is not
> refreshed and giving error
> how to the refresh the server list with out restarting . ping is
> another option , but a connection object is
> necessary for that.
>

ListAvailableSQLServers not refreshing (VB-Sql server 2000)

i have 3 Sql server2000 servers running on a network
by using SQLDMO (ListAvailableSQLServers ) from another pc where
only Sql client is installed
and the list of all servers are avilable.
but when one of the server is down or shut down , the list is not
refreshed and giving error
how to the refresh the server list with out restarting . ping is
another option , but a connection object is
necessary for that.ListAvailableSQLServers consults the local domain browser or master domain
brower for a list of SQL Servers which are registered with it. It may or may
not be current, and it doesn't track active (or running) SQL Servers. You
would need something like ODBC ping for that. ping does not require a
connection object, but if you are trying to make a connection with SQL
Server, you will need a connection object (the connect method of
SQLDMO.SQLServer)
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
<areejan2000@.yahoo.com> wrote in message
news:1159790536.490769.143470@.m7g2000cwm.googlegroups.com...
>i have 3 Sql server2000 servers running on a network
> by using SQLDMO (ListAvailableSQLServers ) from another pc where
> only Sql client is installed
>
> and the list of all servers are avilable.
> but when one of the server is down or shut down , the list is not
> refreshed and giving error
> how to the refresh the server list with out restarting . ping is
> another option , but a connection object is
> necessary for that.
>

ListAvailableSQLServers (SQLDMO) not up to date

Hi NG,
MSSQL2k+SP3a+MDAC2.8
If I use ListAvailableSQLServers (SQLDMO)
I get after 2 or 3 seconds a Serverlist.
But the serverlist is not up to date.
Thats means a server which shut down 20 seconds before
apperas in the serverlist. A server which started 20 seconds before
dont show in the list.
Thanks ThomasHi
As far as I can tell, the list is cached for a short time to help with
network performance. You will have to experiment to find the exact
timeframe.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Thomas Hase" <tohas@.freenet.de> wrote in message
news:42302c73.366146156@.news.t-online.de...
> Hi NG,
> MSSQL2k+SP3a+MDAC2.8
> If I use ListAvailableSQLServers (SQLDMO)
> I get after 2 or 3 seconds a Serverlist.
> But the serverlist is not up to date.
> Thats means a server which shut down 20 seconds before
> apperas in the serverlist. A server which started 20 seconds before
> dont show in the list.
> Thanks Thomas

list sql servers on network

I'm trying to get list of all sql servers in my local network with SQL-DMO:
Dim i As Integer
Dim oNames As SQLDMO.NameList
Dim oSQLApp As SQLDMO.Application
oSQLApp = New SQLDMO.Application
oNames = oSQLApp.ListAvailableSQLServers()
For i = 1 To oNames.Count
brojServera += 1
Next i
On one computer I have SQL Server 2000, and on the other MSDE2000. SQL-DMO
works fine when these two computers are connected in network, but when I try
to get that list on the computer with MSDE2000 it doesn't work. SQL-DMO
cannot find my MSDE2000 server.
Can anybody help?
Thanks!
Check your server network properties, see if the hide server option has
been checked.
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

list sql servers on network

I'm trying to get list of all sql servers in my local network with SQL-DMO:
Dim i As Integer
Dim oNames As SQLDMO.NameList
Dim oSQLApp As SQLDMO.Application
oSQLApp = New SQLDMO.Application
oNames = oSQLApp.ListAvailableSQLServers()
For i = 1 To oNames.Count
brojServera += 1
Next i
On one computer I have SQL Server 2000, and on the other MSDE2000. SQL-DMO
works fine when these two computers are connected in network, but when I try
to get that list on the computer with MSDE2000 it doesn't work. SQL-DMO
cannot find my MSDE2000 server.
Can anybody help'
Thanks!Check your server network properties, see if the hide server option has
been checked.
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

list sql servers on network

I'm trying to get list of all sql servers in my local network with SQL-DMO:
Dim i As Integer
Dim oNames As SQLDMO.NameList
Dim oSQLApp As SQLDMO.Application
oSQLApp = New SQLDMO.Application
oNames = oSQLApp.ListAvailableSQLServers()
For i = 1 To oNames.Count
brojServera += 1
Next i
On one computer I have SQL Server 2000, and on the other MSDE2000. SQL-DMO
works fine when these two computers are connected in network, but when I try
to get that list on the computer with MSDE2000 it doesn't work. SQL-DMO
cannot find my MSDE2000 server.
Can anybody help'
Thanks!Check your server network properties, see if the hide server option has
been checked.
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

Friday, February 24, 2012

List both SQL2000&2005 instance using SQLDMO

I have C++ application which can list all registered SQL Server in your local machine. The problem is this app can't list SQL server 2005 instance.

How can I list both SQL2000 and 2005 server instance using SQLDMO?

Thanks

Have you installed the SQL 2005 workstation components? There is an updated version of SQLDMO which supports SQL Server 2005. The DMO dll's that came with SQL Server 2000 won't be able to read SQL 2005 server information, but the 2005 DMO dll's should solve your problem.

List available SQL servers in VB.Net

Hi,
I want to list all available SQL servers in the LAN in my VB.Net application
.
Therefore I use SQLDMO and the following code:
Private SQLServerDMOApp As New SQLDMO.Application
Sub SomeSub
SQLServerDMOApp = New SQLDMO.Application
....
' get available servers
Dim nl As SQLDMO.NameList
nl = SQLServerDMOApp.ListAvailableSQLServers
Dim i As Integer
For i = 1 To nl.Count
MsgForm.ComboBox_Servername.Items.Add(nl.Item(i))
Next
...
End Sub
The problem is, that the SQL server name list contains only (local) and not
the other available server names (which are available as can be verified in
Enterprise Manager).
Can anybody give me a hint! Thanks in advance.
Best regards
HenryHere's a very quick way to do it in C#, you can translate it...
Create a new console application, and add this reference:
Project | Add Reference | COM | Microsoft SQLDMO Object Library
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
SQLDMO.Application sqlDmoApplication = new SQLDMO.Application();
SQLDMO.NameList serverList;
serverList = sqlDmoApplication.ListAvailableSQLServers();
foreach(string serverName in serverList)
{
Console.WriteLine(serverName);
}
}
}
}
That's it... now, as others might mention, this isn't 100% accurate, because
some servers in your network may be "hidden," and the service also has to be
started to be detected this way.
"Henry" <henryoneal@.nospam.nospam> wrote in message
news:2FFDB242-B974-4446-9B6B-414D3EC570CC@.microsoft.com...
> Hi,
> I want to list all available SQL servers in the LAN in my VB.Net
> application.
> Therefore I use SQLDMO and the following code:
> Private SQLServerDMOApp As New SQLDMO.Application
> Sub SomeSub
> SQLServerDMOApp = New SQLDMO.Application
> ....
> ' get available servers
> Dim nl As SQLDMO.NameList
> nl = SQLServerDMOApp.ListAvailableSQLServers
> Dim i As Integer
> For i = 1 To nl.Count
> MsgForm.ComboBox_Servername.Items.Add(nl.Item(i))
> Next
> ...
> End Sub
> The problem is, that the SQL server name list contains only (local) and
> not
> the other available server names (which are available as can be verified
> in
> Enterprise Manager).
> Can anybody give me a hint! Thanks in advance.
> Best regards
> Henry|||On Mon, 19 Sep 2005 03:48:04 -0700, "Henry" <henryoneal@.nospam.nospam> wrote
:
in <2FFDB242-B974-4446-9B6B-414D3EC570CC@.microsoft.com>

>Hi,
>I want to list all available SQL servers in the LAN in my VB.Net applicatio
n.
>Therefore I use SQLDMO and the following code:
>Private SQLServerDMOApp As New SQLDMO.Application
>Sub SomeSub
> SQLServerDMOApp = New SQLDMO.Application
>....
> ' get available servers
> Dim nl As SQLDMO.NameList
> nl = SQLServerDMOApp.ListAvailableSQLServers
> Dim i As Integer
> For i = 1 To nl.Count
> MsgForm.ComboBox_Servername.Items.Add(nl.Item(i))
> Next
>...
>End Sub
>The problem is, that the SQL server name list contains only (local) and not
>the other available server names (which are available as can be verified in
>Enterprise Manager).
>Can anybody give me a hint! Thanks in advance.
>Best regards
>Henry
If you have any type of firewall running that interferes with communications
even for a fraction of a second, you will see only local instances and named
instances will appear as the server name absent the instance name.
Stefan Berglund|||Hello Henry,
The following KB describs the similar method. However, it may have issues
with MSDE instances
287737 INF: How to Enumerate Available SQL Servers Using SQLDMO
http://support.microsoft.com/?id=287737
If so, you may want to work around this by using the NetAPI function
NetServerEnum, looking for a
server type of SV_TYPE_SQLSERVER.
Also, you could list servers by using "osql -L " command.
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.
| From: Stefan Berglund <keepit@.in.thegroups>
| Subject: Re: List available SQL servers in VB.Net
| Date: Mon, 19 Sep 2005 10:01:37 -0700
| Message-ID: <d8rti1tud8ndlvbne5gbkb8f6vml553peq@.4ax.com>
| References: <2FFDB242-B974-4446-9B6B-414D3EC570CC@.microsoft.com>
| X-Newsreader: Forte Agent 3.1/32.783
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| Newsgroups: microsoft.public.sqlserver.programming
| NNTP-Posting-Host: pool-71-108-242-232.lsanca.dsl-w.verizon.net
71.108.242.232
| Lines: 1
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.programming:119288
| X-Tomcat-NG: microsoft.public.sqlserver.programming
|
| On Mon, 19 Sep 2005 03:48:04 -0700, "Henry" <henryoneal@.nospam.nospam>
wrote:
| in <2FFDB242-B974-4446-9B6B-414D3EC570CC@.microsoft.com>
|
| >Hi,
| >
| >I want to list all available SQL servers in the LAN in my VB.Net
application.
| >
| >Therefore I use SQLDMO and the following code:
| >
| >Private SQLServerDMOApp As New SQLDMO.Application
| >
| >Sub SomeSub
| > SQLServerDMOApp = New SQLDMO.Application
| >....
| > ' get available servers
| > Dim nl As SQLDMO.NameList
| > nl = SQLServerDMOApp.ListAvailableSQLServers
| > Dim i As Integer
| > For i = 1 To nl.Count
| > MsgForm.ComboBox_Servername.Items.Add(nl.Item(i))
| > Next
| >...
| >End Sub
| >
| >The problem is, that the SQL server name list contains only (local) and
not
| >the other available server names (which are available as can be verified
in
| >Enterprise Manager).
| >
| >Can anybody give me a hint! Thanks in advance.
| >
| >Best regards
| >
| >Henry
|
| If you have any type of firewall running that interferes with
communications
| even for a fraction of a second, you will see only local instances and
named
| instances will appear as the server name absent the instance name.
|
| --
| Stefan Berglund
|