Showing posts with label dmo. Show all posts
Showing posts with label dmo. 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 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