Showing posts with label local. Show all posts
Showing posts with label local. Show all posts

Monday, March 19, 2012

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 does not show local instances

Hi all

I am using SQL DMO method ListAvailableSQLServers to get the list of all the SQL server available to the local machine.

For some reason, I get all the servers except the instances installed in the local machine. - The are all started.

Any help?

thanks.

I have seen some issues with latency (some servers may not respond fast enough). Also the server instance may be marked hidden.

Start SQL Computer Manager, right click on the Protocols node of the instance and select Properties. Then see if HideInstance is set to No (if not switch to "No" and restart server).

Also try SQLCMD -L

If you see your local instance then it may be a bug in DMO.

|||Thanks Michiel.

I forgot to say that I am working with SQL 2000. I can't find the SQL Computer Manager. Also i try isql -L and I get only the default instance in my machine and nothing else, i.e., not the other instance and not any of the network SQL servers.

In the SQL Server Service Manager I can see all the available servers.
any help ?|||you can use the registry for search local instances

Example:



//Registry for local
RegistryKey rk = Registry.LocalMachine.OpenSubKey(@."SOFTWARE\Microsoft\Microsoft SQL Server");
String[] instances = (String[])rk.GetValue("InstalledInstances");
if (instances.Length > 0)
{
foreach (String element in instances)
{
String name = "";
//only add if it doesn't exist
if (element == "MSSQLSERVER")
name = System.Environment.MachineName;
else
name = System.Environment.MachineName + @."\" + element;

if (cmbServers.FindStringExact(name) == -1)
cmbServers.Items.Add(name);
}


the complete Code (smo) can you find at http://www.sqldbatips.com/showarticle.asp?ID=45

it works with dmo too

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, March 9, 2012

List of SQL Server 7.0/2000 instances running

How to get the list of instance of SQL Server 7.0/2000 running on the local machine inside my domain...
I need to prepare the list of all sql instances.. pls help if possible to find details using sql query.I'd start with:EXECUTE master.dbo.xp_cmdshell 'osql -L'You might have to refine it a bit, but it is a place to start.

-PatP

Wednesday, March 7, 2012

list of Databases

hello anybody now

i need to find how many Databases in my local SQL server (programatically).i know i have 8 databases is there but i need to print each and every database.

can anybody help me.

thanx

kiran.

try the command...

sp_databases

look into master > stored procedures > sp_databases
and customize it|||

Thanxs

its working rom-rom

|||kiran, glad i've been of help, thanks|||

The problem with sp_databases is that it displays the system databases, together with Northwind and Pubs. I use this to identify my databases:

USE master
GO
SELECT name FROM sysdatabases WHERE dbid>6

|||select * from information_schema.schemata is a polically correct version of the previous post

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.