PC Review


Reply
Thread Tools Rating: Thread Rating: 3 votes, 4.67 average.

WMI for SQL on WIndows XP

 
 
BC
Guest
Posts: n/a
 
      21st Jul 2004
Hi,

I am trying to run some vbscripts on my computer, but I always get the
following failure.

Can anybody suggest a way out of this problem?
TIA
Bob

The Error popup contains

Script: small.vbs

Line: 4

Char: 1

Error: 0x80041002

Code: 80041002

Source: null

I am running SQL server 2000 with the WMI installed and service pack 3
applied on a Windows XP Pro machine with SP1 applied.

THe script is:

sComputer = "QEMS-02" '-- name of the computer where SQL Server is installed

sSQLServer = "QEMS-02" '-- name of the SQL server instance

wscript.echo "Before instance"

set oInstance = GetObject("winmgmts:{impersonationLevel=impersonate}//" & _

sComputer & "/root/MicrosoftSQLServer:MSSQL_SQLServer.Name=" & _

Chr(34) & sSQLServer & Chr(34))

wscript.echo "After instance"



 
Reply With Quote
 
 
 
 
Steve Thompson
Guest
Posts: n/a
 
      21st Jul 2004
You need to install the SQL Server WMI provider for this code to work. The
install code is located on the SQL Server 2000 CD: x86\other\wmi\setup.exe

It's described in detail here:
http://www.databasejournal.com/featu...le.php/1503181

Steve
"BC" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi,
>
> I am trying to run some vbscripts on my computer, but I always get the
> following failure.
>
> Can anybody suggest a way out of this problem?
> TIA
> Bob
>
> The Error popup contains
>
> Script: small.vbs
>
> Line: 4
>
> Char: 1
>
> Error: 0x80041002
>
> Code: 80041002
>
> Source: null
>
> I am running SQL server 2000 with the WMI installed and service pack 3
> applied on a Windows XP Pro machine with SP1 applied.
>
> THe script is:
>
> sComputer = "QEMS-02" '-- name of the computer where SQL Server is

installed
>
> sSQLServer = "QEMS-02" '-- name of the SQL server instance
>
> wscript.echo "Before instance"
>
> set oInstance = GetObject("winmgmts:{impersonationLevel=impersonate}//" &

_
>
> sComputer & "/root/MicrosoftSQLServer:MSSQL_SQLServer.Name=" & _
>
> Chr(34) & sSQLServer & Chr(34))
>
> wscript.echo "After instance"
>
>
>



 
Reply With Quote
 
Bob
Guest
Posts: n/a
 
      22nd Jul 2004
Thanks Steve,

But the error turned out to be that sSQLSERVER needs to be set to "(LOCAL)"

Bob
"Steve Thompson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> You need to install the SQL Server WMI provider for this code to work. The
> install code is located on the SQL Server 2000 CD: x86\other\wmi\setup.exe
>
> It's described in detail here:
> http://www.databasejournal.com/featu...le.php/1503181
>
> Steve
> "BC" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > Hi,
> >
> > I am trying to run some vbscripts on my computer, but I always get the
> > following failure.
> >
> > Can anybody suggest a way out of this problem?
> > TIA
> > Bob
> >
> > The Error popup contains
> >
> > Script: small.vbs
> >
> > Line: 4
> >
> > Char: 1
> >
> > Error: 0x80041002
> >
> > Code: 80041002
> >
> > Source: null
> >
> > I am running SQL server 2000 with the WMI installed and service pack 3
> > applied on a Windows XP Pro machine with SP1 applied.
> >
> > THe script is:
> >
> > sComputer = "QEMS-02" '-- name of the computer where SQL Server is

> installed
> >
> > sSQLServer = "QEMS-02" '-- name of the SQL server instance
> >
> > wscript.echo "Before instance"
> >
> > set oInstance = GetObject("winmgmts:{impersonationLevel=impersonate}//"

&
> _
> >
> > sComputer & "/root/MicrosoftSQLServer:MSSQL_SQLServer.Name=" & _
> >
> > Chr(34) & sSQLServer & Chr(34))
> >
> > wscript.echo "After instance"
> >
> >
> >

>
>



 
Reply With Quote
 
Gert E.R. Drapers
Guest
Posts: n/a
 
      28th Jul 2004
The error comes from WMI, saying that "The requested instance could not be
found."

Error Result : 0x80041002 ( -2147217406 )
ID Defined as : WBEM_E_NOT_FOUND
Error Type : OLE HRESULT Error
Facility : FACILITY_ITF 0x00000004 ( 4 )
Severity : SEVERITY_ERROR 0x00000001 ( 1 )
Code : 0x00001002 ( 4098 )
Source Error file : Errors from WBEMcli.h
Message Text : WBEM (Web Based Enterprise Management) SDK Error

(E-Mail Removed)

Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright ╘ SQLDev.Net 1991-2004 All rights reserved.

"VogelBsj" <(E-Mail Removed)> wrote in message
news:3C342D88-3808-48E0-BCDF-(E-Mail Removed)...
>
>
>
>
> These are some of the error messages I've found.
>
> S_OK (00000000)
> Returned when a method completes successfully.
>
> E_FILE_EXISTS (80041001)
> Returned when the module configuration file already exists in the
> specified location.
>
> E_NOT_CS_APPLICATION (80041002)
> Returned when the specified IIS Application is not a Commerce Server
> application.
>
> E_FILE_NOT_FOUND (80041003)
> Returned when the module configuration file cannot be found.
>
> E_APP_NOT_FOUND (80041004)
> Returned with the specified IIS Virtual Directory cannot be found.
>
> E_UNHANDLED (80041005)
> Returned when an unhandled error occurs.
>
> E_INVALID_MODULE (80041006)
> Returned when the specified module does not exist.
>
> E_INIT_MOD_INSTALL_FIRST (80041007)
> Returned if the IsBizDesk, AddModule, or RemoveModule methods are called
> before the Init method is called.
>
> E_INVALID_CATEGORY_FOR_MODULE (80041008)
> Returned when an invalid category is specified.
>
> E_IMPROPER_CS_APP (80041009)
> Returned when a configuration inconsistency is detected between Commerce
> Server and IIS. The object must be run locally on the same machine where
> the physical Business Desk files exist.
>
>
>
> "BC" wrote:
>
>> Hi,
>>
>> I am trying to run some vbscripts on my computer, but I always get the
>> following failure.
>>
>> Can anybody suggest a way out of this problem?
>> TIA
>> Bob
>>
>> The Error popup contains
>>
>> Script: small.vbs
>>
>> Line: 4
>>
>> Char: 1
>>
>> Error: 0x80041002
>>
>> Code: 80041002
>>
>> Source: null
>>
>> I am running SQL server 2000 with the WMI installed and service pack 3
>> applied on a Windows XP Pro machine with SP1 applied.
>>
>> THe script is:
>>
>> sComputer = "QEMS-02" '-- name of the computer where SQL Server is
>> installed
>>
>> sSQLServer = "QEMS-02" '-- name of the SQL server instance
>>
>> wscript.echo "Before instance"
>>
>> set oInstance = GetObject("winmgmts:{impersonationLevel=impersonate}//" &
>> _
>>
>> sComputer & "/root/MicrosoftSQLServer:MSSQL_SQLServer.Name=" & _
>>
>> Chr(34) & sSQLServer & Chr(34))
>>
>> wscript.echo "After instance"
>>
>>
>>
>>



 
Reply With Quote
 
Viatcheslav V. Vassiliev
Guest
Posts: n/a
 
      29th Jul 2004
Do you have WMI provider for MS SQL Server installed? It is not installed
with MS SQL Server and is located on CD, in CD:\x86\other\wmi directory.

//------------------------------------
Regards,
Vassiliev V. V.
http://www-sharp.com -
Scripting/HTA/.Net Framework IDE

"Gert E.R. Drapers" <(E-Mail Removed)> сообщил/сообщила в новостях
следующее: news:%(E-Mail Removed)...
> The error comes from WMI, saying that "The requested instance could not be
> found."
>
> Error Result : 0x80041002 ( -2147217406 )
> ID Defined as : WBEM_E_NOT_FOUND
> Error Type : OLE HRESULT Error
> Facility : FACILITY_ITF 0x00000004 ( 4 )
> Severity : SEVERITY_ERROR 0x00000001 ( 1 )
> Code : 0x00001002 ( 4098 )
> Source Error file : Errors from WBEMcli.h
> Message Text : WBEM (Web Based Enterprise Management) SDK Error
>
> (E-Mail Removed)
>
> Please reply only to the newsgroups.
> This posting is provided "AS IS" with no warranties, and confers no

rights.
> You assume all risk for your use.
> Copyright ╘ SQLDev.Net 1991-2004 All rights reserved.
>
> "VogelBsj" <(E-Mail Removed)> wrote in message
> news:3C342D88-3808-48E0-BCDF-(E-Mail Removed)...
> >
> >
> >
> >
> > These are some of the error messages I've found.
> >
> > S_OK (00000000)
> > Returned when a method completes successfully.
> >
> > E_FILE_EXISTS (80041001)
> > Returned when the module configuration file already exists in the
> > specified location.
> >
> > E_NOT_CS_APPLICATION (80041002)
> > Returned when the specified IIS Application is not a Commerce Server
> > application.
> >
> > E_FILE_NOT_FOUND (80041003)
> > Returned when the module configuration file cannot be found.
> >
> > E_APP_NOT_FOUND (80041004)
> > Returned with the specified IIS Virtual Directory cannot be found.
> >
> > E_UNHANDLED (80041005)
> > Returned when an unhandled error occurs.
> >
> > E_INVALID_MODULE (80041006)
> > Returned when the specified module does not exist.
> >
> > E_INIT_MOD_INSTALL_FIRST (80041007)
> > Returned if the IsBizDesk, AddModule, or RemoveModule methods are called
> > before the Init method is called.
> >
> > E_INVALID_CATEGORY_FOR_MODULE (80041008)
> > Returned when an invalid category is specified.
> >
> > E_IMPROPER_CS_APP (80041009)
> > Returned when a configuration inconsistency is detected between Commerce
> > Server and IIS. The object must be run locally on the same machine where
> > the physical Business Desk files exist.
> >
> >
> >
> > "BC" wrote:
> >
> >> Hi,
> >>
> >> I am trying to run some vbscripts on my computer, but I always get the
> >> following failure.
> >>
> >> Can anybody suggest a way out of this problem?
> >> TIA
> >> Bob
> >>
> >> The Error popup contains
> >>
> >> Script: small.vbs
> >>
> >> Line: 4
> >>
> >> Char: 1
> >>
> >> Error: 0x80041002
> >>
> >> Code: 80041002
> >>
> >> Source: null
> >>
> >> I am running SQL server 2000 with the WMI installed and service pack 3
> >> applied on a Windows XP Pro machine with SP1 applied.
> >>
> >> THe script is:
> >>
> >> sComputer = "QEMS-02" '-- name of the computer where SQL Server is
> >> installed
> >>
> >> sSQLServer = "QEMS-02" '-- name of the SQL server instance
> >>
> >> wscript.echo "Before instance"
> >>
> >> set oInstance = GetObject("winmgmts:{impersonationLevel=impersonate}//"

&
> >> _
> >>
> >> sComputer & "/root/MicrosoftSQLServer:MSSQL_SQLServer.Name=" & _
> >>
> >> Chr(34) & sSQLServer & Chr(34))
> >>
> >> wscript.echo "After instance"
> >>
> >>
> >>
> >>

>
>



 
Reply With Quote
 
Bob
Guest
Posts: n/a
 
      5th Aug 2004
The error turned out to be related to the install of SQL.
Because I am using developer edition, the instance is "(LOCAL)"
Once I found out that piece of information - the script worked

"Viatcheslav V. Vassiliev" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Do you have WMI provider for MS SQL Server installed? It is not installed
> with MS SQL Server and is located on CD, in CD:\x86\other\wmi directory.
>
> //------------------------------------
> Regards,
> Vassiliev V. V.
> http://www-sharp.com -
> Scripting/HTA/.Net Framework IDE
>
> "Gert E.R. Drapers" <(E-Mail Removed)> сообщил/сообщила в новостях
> следующее: news:%(E-Mail Removed)...
> > The error comes from WMI, saying that "The requested instance could not

be
> > found."
> >
> > Error Result : 0x80041002 ( -2147217406 )
> > ID Defined as : WBEM_E_NOT_FOUND
> > Error Type : OLE HRESULT Error
> > Facility : FACILITY_ITF 0x00000004 ( 4 )
> > Severity : SEVERITY_ERROR 0x00000001 ( 1 )
> > Code : 0x00001002 ( 4098 )
> > Source Error file : Errors from WBEMcli.h
> > Message Text : WBEM (Web Based Enterprise Management) SDK Error
> >
> > (E-Mail Removed)
> >
> > Please reply only to the newsgroups.
> > This posting is provided "AS IS" with no warranties, and confers no

> rights.
> > You assume all risk for your use.
> > Copyright ╘ SQLDev.Net 1991-2004 All rights reserved.
> >
> > "VogelBsj" <(E-Mail Removed)> wrote in message
> > news:3C342D88-3808-48E0-BCDF-(E-Mail Removed)...
> > >
> > >
> > >
> > >
> > > These are some of the error messages I've found.
> > >
> > > S_OK (00000000)
> > > Returned when a method completes successfully.
> > >
> > > E_FILE_EXISTS (80041001)
> > > Returned when the module configuration file already exists in the
> > > specified location.
> > >
> > > E_NOT_CS_APPLICATION (80041002)
> > > Returned when the specified IIS Application is not a Commerce Server
> > > application.
> > >
> > > E_FILE_NOT_FOUND (80041003)
> > > Returned when the module configuration file cannot be found.
> > >
> > > E_APP_NOT_FOUND (80041004)
> > > Returned with the specified IIS Virtual Directory cannot be found.
> > >
> > > E_UNHANDLED (80041005)
> > > Returned when an unhandled error occurs.
> > >
> > > E_INVALID_MODULE (80041006)
> > > Returned when the specified module does not exist.
> > >
> > > E_INIT_MOD_INSTALL_FIRST (80041007)
> > > Returned if the IsBizDesk, AddModule, or RemoveModule methods are

called
> > > before the Init method is called.
> > >
> > > E_INVALID_CATEGORY_FOR_MODULE (80041008)
> > > Returned when an invalid category is specified.
> > >
> > > E_IMPROPER_CS_APP (80041009)
> > > Returned when a configuration inconsistency is detected between

Commerce
> > > Server and IIS. The object must be run locally on the same machine

where
> > > the physical Business Desk files exist.
> > >
> > >
> > >
> > > "BC" wrote:
> > >
> > >> Hi,
> > >>
> > >> I am trying to run some vbscripts on my computer, but I always get

the
> > >> following failure.
> > >>
> > >> Can anybody suggest a way out of this problem?
> > >> TIA
> > >> Bob
> > >>
> > >> The Error popup contains
> > >>
> > >> Script: small.vbs
> > >>
> > >> Line: 4
> > >>
> > >> Char: 1
> > >>
> > >> Error: 0x80041002
> > >>
> > >> Code: 80041002
> > >>
> > >> Source: null
> > >>
> > >> I am running SQL server 2000 with the WMI installed and service pack

3
> > >> applied on a Windows XP Pro machine with SP1 applied.
> > >>
> > >> THe script is:
> > >>
> > >> sComputer = "QEMS-02" '-- name of the computer where SQL Server is
> > >> installed
> > >>
> > >> sSQLServer = "QEMS-02" '-- name of the SQL server instance
> > >>
> > >> wscript.echo "Before instance"
> > >>
> > >> set oInstance =

GetObject("winmgmts:{impersonationLevel=impersonate}//"
> &
> > >> _
> > >>
> > >> sComputer & "/root/MicrosoftSQLServer:MSSQL_SQLServer.Name=" & _
> > >>
> > >> Chr(34) & sSQLServer & Chr(34))
> > >>
> > >> wscript.echo "After instance"
> > >>
> > >>
> > >>
> > >>

> >
> >

>
>



 
Reply With Quote
 
Gert E.R. Drapers
Guest
Posts: n/a
 
      8th Aug 2004
This has nothing to do with the edition of SQL Server, this is simply a
default instance opposed to a named instance, on the same machine you can
access a default instance using (local) and a named instance using
(local)\instance name, you can also use the hostname or machine name.

(E-Mail Removed)

Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright ╘ SQLDev.Net 1991-2004 All rights reserved.

"Bob" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> The error turned out to be related to the install of SQL.
> Because I am using developer edition, the instance is "(LOCAL)"
> Once I found out that piece of information - the script worked
>
> "Viatcheslav V. Vassiliev" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> Do you have WMI provider for MS SQL Server installed? It is not installed
>> with MS SQL Server and is located on CD, in CD:\x86\other\wmi directory.
>>
>> //------------------------------------
>> Regards,
>> Vassiliev V. V.
>> http://www-sharp.com -
>> Scripting/HTA/.Net Framework IDE
>>
>> "Gert E.R. Drapers" <(E-Mail Removed)> сообщил/сообщила в новостях
>> следующее: news:%(E-Mail Removed)...
>> > The error comes from WMI, saying that "The requested instance could not

> be
>> > found."
>> >
>> > Error Result : 0x80041002 ( -2147217406 )
>> > ID Defined as : WBEM_E_NOT_FOUND
>> > Error Type : OLE HRESULT Error
>> > Facility : FACILITY_ITF 0x00000004 ( 4 )
>> > Severity : SEVERITY_ERROR 0x00000001 ( 1 )
>> > Code : 0x00001002 ( 4098 )
>> > Source Error file : Errors from WBEMcli.h
>> > Message Text : WBEM (Web Based Enterprise Management) SDK Error
>> >
>> > (E-Mail Removed)
>> >
>> > Please reply only to the newsgroups.
>> > This posting is provided "AS IS" with no warranties, and confers no

>> rights.
>> > You assume all risk for your use.
>> > Copyright ╘ SQLDev.Net 1991-2004 All rights reserved.
>> >
>> > "VogelBsj" <(E-Mail Removed)> wrote in message
>> > news:3C342D88-3808-48E0-BCDF-(E-Mail Removed)...
>> > >
>> > >
>> > >
>> > >
>> > > These are some of the error messages I've found.
>> > >
>> > > S_OK (00000000)
>> > > Returned when a method completes successfully.
>> > >
>> > > E_FILE_EXISTS (80041001)
>> > > Returned when the module configuration file already exists in the
>> > > specified location.
>> > >
>> > > E_NOT_CS_APPLICATION (80041002)
>> > > Returned when the specified IIS Application is not a Commerce Server
>> > > application.
>> > >
>> > > E_FILE_NOT_FOUND (80041003)
>> > > Returned when the module configuration file cannot be found.
>> > >
>> > > E_APP_NOT_FOUND (80041004)
>> > > Returned with the specified IIS Virtual Directory cannot be found.
>> > >
>> > > E_UNHANDLED (80041005)
>> > > Returned when an unhandled error occurs.
>> > >
>> > > E_INVALID_MODULE (80041006)
>> > > Returned when the specified module does not exist.
>> > >
>> > > E_INIT_MOD_INSTALL_FIRST (80041007)
>> > > Returned if the IsBizDesk, AddModule, or RemoveModule methods are

> called
>> > > before the Init method is called.
>> > >
>> > > E_INVALID_CATEGORY_FOR_MODULE (80041008)
>> > > Returned when an invalid category is specified.
>> > >
>> > > E_IMPROPER_CS_APP (80041009)
>> > > Returned when a configuration inconsistency is detected between

> Commerce
>> > > Server and IIS. The object must be run locally on the same machine

> where
>> > > the physical Business Desk files exist.
>> > >
>> > >
>> > >
>> > > "BC" wrote:
>> > >
>> > >> Hi,
>> > >>
>> > >> I am trying to run some vbscripts on my computer, but I always get

> the
>> > >> following failure.
>> > >>
>> > >> Can anybody suggest a way out of this problem?
>> > >> TIA
>> > >> Bob
>> > >>
>> > >> The Error popup contains
>> > >>
>> > >> Script: small.vbs
>> > >>
>> > >> Line: 4
>> > >>
>> > >> Char: 1
>> > >>
>> > >> Error: 0x80041002
>> > >>
>> > >> Code: 80041002
>> > >>
>> > >> Source: null
>> > >>
>> > >> I am running SQL server 2000 with the WMI installed and service pack

> 3
>> > >> applied on a Windows XP Pro machine with SP1 applied.
>> > >>
>> > >> THe script is:
>> > >>
>> > >> sComputer = "QEMS-02" '-- name of the computer where SQL Server is
>> > >> installed
>> > >>
>> > >> sSQLServer = "QEMS-02" '-- name of the SQL server instance
>> > >>
>> > >> wscript.echo "Before instance"
>> > >>
>> > >> set oInstance =

> GetObject("winmgmts:{impersonationLevel=impersonate}//"
>> &
>> > >> _
>> > >>
>> > >> sComputer & "/root/MicrosoftSQLServer:MSSQL_SQLServer.Name=" & _
>> > >>
>> > >> Chr(34) & sSQLServer & Chr(34))
>> > >>
>> > >> wscript.echo "After instance"
>> > >>
>> > >>
>> > >>
>> > >>
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
hi, i just have my windows updated, and i have a windows card space in my control panel now, i hope to know how can i remove that services fully from my windows system michaelangel Windows XP General 1 29th Jul 2007 06:51 PM
I want to load windows xp and windows 2000 onto my laptop.Maybe windows 98se also. how do I go about stting up my hard drive Stan Microsoft Windows 2000 Setup 1 19th May 2006 02:44 PM
Windows Update doesn't install new Windows components (Windows GenuineAdvantage Validation Tools) Bob McLeran Windows XP General 1 15th Oct 2005 01:20 AM
Windows XP Professinal Vs. Windows Server 2003 Premium. Upgrade from Windows 98SE ? Help ! Tedd Riggs Windows XP General 14 12th Feb 2004 01:57 PM
Windows Update for Flaw In Windows Media Player 9 for Windows 98 Will not instal Lil Microsoft Access Security 0 21st Nov 2003 06:49 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:14 PM.