Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««123»»

SSIS & WMI Data Reader Task Query Expand / Collapse
Author
Message
Posted Monday, February 22, 2010 3:53 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Friday, November 9, 2012 3:07 AM
Points: 469, Visits: 342
Hi,

I am unable to procced further with the WMI_Conn properties. I receive the below error while setting the connection string for WMI_Conn.

-----------------------------------
The variable "user::ServerConnString" was not found in the Variables collection. The variable might not exist in the correct scope.

Attempt to parse the expression ""servername=\\\\" +@[user::ServerConnString] +
";Namespace=\\root\\simv2;UserNtAuth=True;username=;"" failed and returned error code 0xC00470A6. The expression cannot be parsed. It might contain invalid elements or it might not be well-formed. There may also be an out-of-memory error.

-------------------------------------

I am stuck at this step.

Thanks in advance
Post #870203
Posted Monday, February 22, 2010 12:27 PM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 2:57 AM
Points: 405, Visits: 1,137
Hi

Looking at your error, I say it's either your variable is defined or your server connection string blank - possibly as a result of the variable not being mapped to the right index.

Couple of initial things to check,

1. have you defined the User::ServerConnString in the variables pane?

2. Have you defined the scoped the variable to Package level.

3. If your source table where your getting your server address from has more than 1 column, then make sure you map the variable User::ServerConnString to the correct column (i.e. table column 1 is index 0, table column 2 is index 1 etc etc.

Also, I'm not sure if you've looked at the pdf download, or just the main forumn article, but my pdf is probably a little clearer as I used screen shots etc. Here's the download http://www.sqlservercentral.com/Files/WMI%20QUERY%20Article.pdf/3897.pdf

Let me know how you get on.



_____________________________________________________________________________
MCITP: Business Intelligence Developer (2005)
Post #870631
Posted Wednesday, February 24, 2010 2:57 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Friday, November 9, 2012 3:07 AM
Points: 469, Visits: 342
Thanks a lot.. thanks for the detailed PDF with screenshots.

Could you please guide me on how to run this query against an specific server through SSRS. Ie., I need to select the Servername (datasouce) on SSRS and pass that value to this SSIS package and then the package should collect the data for that particular server and store the data to a table. From there the data should be displayed in a Report format.

Please guide me on the above approach or if anyother way to get it done.

Thanks in advance.
Post #871800
Posted Wednesday, February 24, 2010 5:05 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Friday, November 9, 2012 3:07 AM
Points: 469, Visits: 342
Hi Dave,

I followed all the steps as mentioned in the PDF, but everytime, it returns the local system disk space details to data table, and not the remote servers listed in the Servers table. Pls advice.

Thanks
Post #871836
Posted Monday, March 1, 2010 2:06 AM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 2:57 AM
Points: 405, Visits: 1,137
that sounds like it's not picking up your passed servername variable or it can't find the server

First off, if you haven't already done it, create another package with a WMI task with the same query, but manually define one of the servers you want to connect to, to make you it connects ok.

Are you storing the server name in a database table, prior to calling the package?

Could you send me note on how you have setup your SSRS report to pass the servername variable to the package, and call the package. I'll try and set something up here to do the same and see if I can find the problem.

(Ps sorry i'm only just replying I've been on holiday for a week )


_____________________________________________________________________________
MCITP: Business Intelligence Developer (2005)
Post #874339
Posted Sunday, April 11, 2010 12:13 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, September 18, 2014 7:40 AM
Points: 8, Visits: 392
Hi Dave,

I know this is a very old post but this is exactly what I want and I have also created my package almost similar to the one you have explained in your posts and your SSIS & WMI Data Reader
Task Query article. The difference is that I am assigning the Connection String dynamically with the credentials.

My connection string looks exactly like you have explained
ServerName=\\123.12.123.12;Namespace=\root\cimv2;UseNtAuth=False;UserName=user_name;PassWord=pwd;. And I pass the @User::StringConnString variable to the ConnectionString property of the WMI connection.

I get an "Access Denied" message for every server except my local machine when I try to use the WMI Data Reader Task in an FELC.

I tested out the package without the FELC trying each server at a time to make sure my connection string is of the correct format. I get the statistics for 2 of the servers and my local machine, but an "Access Denied" message for all other servers and a machine in the same network as mine where I was given administrative access.

I really do not understand where the error really is and what settings I need to check for on all the other servers where I get the error. I see in your package that you mention of a bug in SSIS and a solution if we try to use a dynamic connection string. I do not know if I understand it correctly. If my Server Computer Name is "SQLDBSERVER" and the network is domain.network.org, should my ConnectionString property now look like this "\\\\SQLDBSERVER.domain.network.org" + @[User::ServerConnString]?

Your article was of great help to solve many issues I had with the FELC. Hope to hear from you soon. Thanks in advance.

Vinesh
Post #901267
Posted Thursday, April 15, 2010 9:13 AM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 2:57 AM
Points: 405, Visits: 1,137
Hi Vinesh,

I have test the connection for connections that do not use Windows Authentication and found 2 things:

1. Despite that fact that you are specifying the servername in the connection string, when you define the user name, you need to put in the machine name prior to the user name.

2. If fail to add in ";" after the password - then BIDS will fail to evalute the expression.

so as an example you connection string expression should look something like this if your server was called SQLDBSERVER.domain.network.org:

"ServerName=\\\\"  + @[User::ServerConnString] + ";Namespace=\\root\\cimv2;UseNtAuth=False;UserName=SQLDBSERVER\\MyUserName;Password=MyPassword;"

so the connection string used would be

ServerName=\\SQLDBSERVER.domain.network.org;Namespace=\root\cimv2;UseNtAuth=False;UserName=SQLDBSERVER\MyUserName;PassWord=MyPassword;


If you are using local accounts for each machine, then perhaps you may want to think about storing the user name and passwords in SQL server (in the server list table), and pulling those in as extra variables..........

Personally, I would recommend going down the Windows Authentication route, and using a domain priviledged credential to run the job in sql server, rather than storing username & passwords with admin rights in sql server tables.

Let me know how you get on


_____________________________________________________________________________
MCITP: Business Intelligence Developer (2005)
Post #904123
Posted Monday, July 19, 2010 5:53 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, October 21, 2014 1:07 PM
Points: 347, Visits: 419
Hi all,

I have just created this package, and all works well when doing it locally; however as soon as I try and use the IP/name of one of our servers it fails with:

Error: 0xC002F304 at WMI_DRT Server Disk Usage, WMI Data Reader Task: An error occurred with the following error message: "Value does not fall within the expected range.".

My table on my local instance has both localhost and a servers ip address; the whole thing loops through fine recording the details of the localhost, but then it fails with the server.

What sort of things would raise this type of message? I have done a google, but am now swimming around in excess information and need to get some clarity - hopefully the wise people here can assist

The server that I am connecting to is on a different subnet. Firewall is not enabled on the OS, but there is a physical firewall that could be blocking ports if there are specific ports required for this.
For testing purposes I am using the username/password of the local machine, as these servers do not talk to our AD environment.

Any ideas? Thanks in advance

Cheers
Troy
Post #955224
Posted Friday, May 27, 2011 7:53 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, October 11, 2011 4:26 AM
Points: 1, Visits: 33
dave-dj (8/31/2009)
Comments posted to this topic are about the item <A HREF="/articles/Integration+Services+(SSIS)/67428/">SSIS & WMI Data Reader Task Query</A>


This article is really helpful. I need to retrieve Hardware and software information form my domain pcs and store it into sql server I have initially try your functionality but the package is throwing error of Bulk copy insert error. Kindly please suggest what should i do to overcome these error. and how can i get all my details of Hardware and Software information.
Post #1116253
Posted Friday, May 27, 2011 8:10 AM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 2:57 AM
Points: 405, Visits: 1,137
Does it tell you what conponent is failing?

You need to create a select query for what ever hardware / software values you want. like

SELECT FreeSpace, DeviceId, Size, SystemName, Description FROM in32_LogicalDiskwhere DriveType= 3

(DriveType = 3 filters the query to only the machines physical drives and excludes mapped network drives)


It means that you may need to use more than one query, which of course will complicate your package, but the general process should be the same, create your variables and assign your values to the variables in the parameter mappings


_____________________________________________________________________________
MCITP: Business Intelligence Developer (2005)
Post #1116268
« Prev Topic | Next Topic »

Add to briefcase ««123»»

Permissions Expand / Collapse