Hi!
I have small testing sqldmo.vbs script to check sqldmo connectivity:
Dim srv
Set srv = CreateObject("SQLDMO.SQLServer")
srv.LoginSecure = True
srv.Connect "(local)" ' Here is error when trying to connect to Express
Edition
MsgBox srv.VersionString
Under Windows 2000 with SQL Server 2000 it works fine.
But under Windows XP with SQL Server 2005 Express Edition my test fails
with message:
Windows Script Host
--
Script: C:\sqldmo.vbs
Line: 4
Char: 1
Error: Unspecified error
Code: 80004005
Source: (null)
--
I checked version of sqldmo.dll under Windows XP. It is 2000.85.1054.0.
File with the same version is included in Microsoft SQL Server 2005
Backward Compatibility Components. So i believe my test should work with
2005 Express Edition.
What am i doing wrong?Well for one make sure your instance of Express is set to allow remote
connections and that TCPIP is enabled. But in any case I don't think DMO is
upwards compatible with any 2005 editions. While some things may work it
certainly does not know about any of the new features. I believe what the
backwards compatibility part meant was that DMO in the 2005 install can talk
to 2000 machines. For 2005 you should use SMO.
Andrew J. Kelly SQL MVP
"Igor Solodovnikov" <IgorSolodovnikov@.discussions.microsoft.com> wrote in
message news:op.s253k8mfn8ihmu@.iw2k.helpmicro.local...
> Hi!
> I have small testing sqldmo.vbs script to check sqldmo connectivity:
> Dim srv
> Set srv = CreateObject("SQLDMO.SQLServer")
> srv.LoginSecure = True
> srv.Connect "(local)" ' Here is error when trying to connect to Express
> Edition
> MsgBox srv.VersionString
> Under Windows 2000 with SQL Server 2000 it works fine.
> But under Windows XP with SQL Server 2005 Express Edition my test fails
> with message:
> --
> Windows Script Host
> --
> Script: C:\sqldmo.vbs
> Line: 4
> Char: 1
> Error: Unspecified error
> Code: 80004005
> Source: (null)
> --
>
> --
> I checked version of sqldmo.dll under Windows XP. It is 2000.85.1054.0.
> File with the same version is included in Microsoft SQL Server 2005
> Backward Compatibility Components. So i believe my test should work with
> 2005 Express Edition.
> What am i doing wrong?|||Thank you for answer. Actually now i dont need any new features of 2005
editions. I need only old features accessible through old DMO.
Actually my test already working but it started to work only after full
system reboot. Restarting services does not helped me. So now i need some
investigation to figure out which particular configuration options affect
SQLDMO connectivity.
On Tue, 10 Jan 2006 18:26:52 +0200, Andrew J. Kelly
<sqlmvpnooospam@.shadhawk.com> wrote:
> Well for one make sure your instance of Express is set to allow remote
> connections and that TCPIP is enabled. But in any case I don't think
> DMO is
> upwards compatible with any 2005 editions. While some things may work it
> certainly does not know about any of the new features. I believe what the
> backwards compatibility part meant was that DMO in the 2005 install can
> talk
> to 2000 machines. For 2005 you should use SMO.
>|||hmm, try using ".\sqlexpress" in your connect statement.|||Thank you for your hint. ".\sqlexpress" really work. But now i have system
where ".\sqlexpress" works but "(local)" does not. Why? I need "(local)"
because my application has no clue to what version of SQL Server it
connects...
On Tue, 10 Jan 2006 19:34:34 +0200, jonel.rienton@.gmail.com
<jonel.rienton@.gmail.com> wrote:
> hmm, try using ".\sqlexpress" in your connect statement.
>|||(local) is your default sql server installation, .\sqlexpress is a
named instance; as you probably know, one can have multiple instance of
sql server installation in one box.|||If you really need (local) to work for some reason, your only option is to
uninstall SQL Express and reinstall it as the default instance in the
Advanced Options section of setup.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
<jonel.rienton@.gmail.com> wrote in message
news:1137097362.319395.67730@.g14g2000cwa.googlegroups.com...
> (local) is your default sql server installation, .\sqlexpress is a
> named instance; as you probably know, one can have multiple instance of
> sql server installation in one box.
>