Deployment Solution

 View Only
Expand all | Collapse all

How do I export a list of names from a filter I created in DS 6.9

  • 1.  How do I export a list of names from a filter I created in DS 6.9

    Posted Sep 05, 2012 07:05 AM

    Hi folks,

    I wonder could you help me please!

    We are in the process of replacing all our old Windows XP PCs with Windows 7 PCs so I have put a filter on the All Computer group to show only Windows XP PCs and it is showing me a total of 335 out of 1500 are XP PCs so I wonder could anyone tell me how can I export the names of the PCs and the group they belong to just from the results of the XP filter?

    I see there is an option under File and Import/Export to export but it gives me all sorts of XML stuff and it isn’t really what I want.

    So your help would be appreciated in assisting me being able to export the data I need from the filter I have created.

    Thanks,

    Tony



  • 2.  RE: How do I export a list of names from a filter I created in DS 6.9

    Posted Sep 05, 2012 01:05 PM

    I think you'd need to write the query in SQL on the eXpress database and use the output of that.



  • 3.  RE: How do I export a list of names from a filter I created in DS 6.9

    Posted Sep 06, 2012 04:37 AM

    Hi Andy,

    Thanks for your reply - that sounds away over my head re SQL - would you have any idea what the syntax would be to generate my required output from the specified filter of just Windows XP PCs.

    Any help greatly appreciated.

    Regards,

    Tony



  • 4.  RE: How do I export a list of names from a filter I created in DS 6.9

    Posted Sep 06, 2012 10:23 AM

    Try this:

    Use eXpress
    SELECT name
    FROM dbo.computer
    WHERE (os LIKE 'windows xp%')

     



  • 5.  RE: How do I export a list of names from a filter I created in DS 6.9

    Trusted Advisor
    Posted Sep 06, 2012 11:40 AM

    Andy is right -unfortunately DS6 doesn't have a stored procedure to return a list of machines as specified by a filter. Building your own T-SQL is the only way I know.

     

     



  • 6.  RE: How do I export a list of names from a filter I created in DS 6.9

    Posted Sep 06, 2012 12:11 PM

    Hi folks,

    Again, thanks for your input!!

    I've been trying and trying SQL queries all afternoon and I just cannot get anything outputting.

    Andy, I've tried all sorts of variations of your syntax and nothing is working for me so if you or anyone else out there is familiar with writing SQL queries for DS 6.9 that would allow me to extract the info I require I'd be most grateful.

    Kind regards,

    Tony

     



  • 7.  RE: How do I export a list of names from a filter I created in DS 6.9

    Trusted Advisor
    Posted Sep 06, 2012 12:26 PM

    Andy's syntax is fine. Can you confirm in SQL Server Management Studio that your deployment database called express?

    Also try this query below -it should grab all your machines and output their name and OS.

    USE express
    SELECT name,os from computer

    The "USE express" T-SQL line forces the query to use the express database directly. This often helps as the query windows in SQL Server Management Studio are often by default in the 'master' database. You can click on the express database to change this context though.



  • 8.  RE: How do I export a list of names from a filter I created in DS 6.9

    Posted Sep 13, 2012 06:58 AM

    Hi folks,

    Sorry I am just getting back to this now – I have been off sick!

    So I’ve been trying all sorts of SQL queries and all I can seem to get is 222 records from using your SQL statements for PCs with OS = XP.

    In management studio the DB is called express$ and as I say I can get some records pulled but when I apply the filter in Altiris it gives me 331 computers with Win XP installed but with the SQL statement it just gives me 222.

    The table I’m querying in SQL/express$ is dbo.computer, is that the central table where Altiris stored all computer records or are they spread out over different tables or am I using the completely wrong table altogether.

    Again thanks for all your help thus far and here’s hoping it is just something I am doing wrong.

    Cheers,

    Tony



  • 9.  RE: How do I export a list of names from a filter I created in DS 6.9

    Posted Sep 13, 2012 08:45 AM

    Hey Bud

    Well, what i would do is i would make the query to contain all the records, as ianatkin wrote, then i would look at the response it gave, the reason you get other records could be related to the os name is written in another way, (you can get that if you have installed other clients, dagent/aclient).

    If you take ian's post, you should get all your records. :)

    And to answer your question regarding dbo.computer, yes that is the main table, if your computer isn't in that table, it's not there. :)

    After you tried the above thing, you could try andy's post, in a slight edited way.

    Use eXpress
    SELECT name
    FROM dbo.computer
    WHERE (os LIKE '%XP%')

    Kind Regards
    Morten Leth



  • 10.  RE: How do I export a list of names from a filter I created in DS 6.9
    Best Answer

    Posted Sep 13, 2012 08:48 AM

    What i meant regarding the first is the following query.

    Use eXpress
    SELECT *
    FROM dbo.computer
    

    This should give you all that your express db contains of computer records, match this up with your result (you could actually simply copy paste this result into excel, and do what you want to do here instead of fiddling with sql query. :))

    /Leth



  • 11.  RE: How do I export a list of names from a filter I created in DS 6.9

    Posted Sep 13, 2012 01:16 PM

    Are you sure you are looking at the correct SQL Server and database? Check ODBC > System DSN on the deployment server to make sure.



  • 12.  RE: How do I export a list of names from a filter I created in DS 6.9

    Posted Sep 18, 2012 08:20 AM

    Hi everyone,

    Just a wee quick note to say thanks everyone for their contribution to this discussion!

    The way I achieved it was to use mortenleth’s suggestion and filter it in Excel.

    I think because the OS description was so detailed the query had bother extracting the info I required.

    So thanks everybody for your suggestions – I can honestly say I’ve learnt a bit of SQL stuff, plus got my required data exported, so a job well done!

    Thanks and kind regards,

    Tony