Endpoint Protection

 View Only
  • 1.  Need SQL Query

    Posted Mar 16, 2015 02:49 AM

    Can someone help me with a sql query to find the total number of clients that are running with 11.x and 12.x ?

    And how I can sort them?



  • 2.  RE: Need SQL Query
    Best Answer

    Posted Mar 16, 2015 02:52 AM

    see SebastianZ articles

    https://www-secure.symantec.com/connect/articles/compilation-sql-queries-sepm-database

    SEP Client Information Query. Query result shows:
    ♦ SEP Computer name
    ♦ Installed SEP Version
    ♦ AV definition revision with the timestamp of the last update
    ♦ Assignement to SEPM Group
    ♦ Operating System
    ♦ Logged-on User
    ♦ MAC address
    ♦ IP address

    select i.COMPUTER_NAME
    , AGENT_VERSION
    , pat.version as AV_REVISION
    , dateadd(s,convert(bigint,LAST_UPDATE_TIME)/1000,'01-01-1970 00:00:00') LASTUPDATETIME
    , g.name as GROUP_NAME
    , i.OPERATION_SYSTEM
    , i.CURRENT_LOGIN_USER
    , i.MAC_addr1 "MAC Address"
    , IP_ADDR1_TEXT "IP Address"
    , i.DELETED "Marked for deletion"
    from sem_agent as sa with (nolock) left outer join pattern pat on sa.pattern_idx=pat.pattern_idx
    inner join v_sem_computer i on i.computer_id=sa.computer_id
    inner join identity_map g on g.id=sa.group_id
    inner join identity_map p on p.id=sa.last_server_id
    inner join identity_map s on s.id=sa.domain_id
    inner join identity_map q on q.id=sa.last_site_id
    where
    (sa.agent_type='105' or sa.agent_type='151') and sa.deleted='0' and I.DELETED = 0
    order by group_name, operation_system, i.COMPUTER_name


  • 3.  RE: Need SQL Query

    Posted Mar 16, 2015 03:36 AM

    If you use a SQL backend server you can run the following script in SQL Server Manager to query the number of clients you have. 

    use sem5
    select name as Countries, count(*) as Clients
    from sem5.sem_client
    left outer join sem5.identity_map on sem_client.domain_id=identity_map.id
    group by name
    order by Clients

    Or

    If you have embedded database

    you can still use the query by opening dbisqlc.exe under "C:\Program Files\Symantec\Symantec Endpoint Protection Manager\ASA\win32" , enter the dba username and password and copy that query to execute.



  • 4.  RE: Need SQL Query

    Posted Mar 16, 2015 05:33 AM

    You can run the normal report

    Monitor - logs- computer status, export it and sort the version column



  • 5.  RE: Need SQL Query

    Posted Mar 16, 2015 07:43 AM

    Im looking for all the client. By default, the filter is set to 24 hours. I can change this to past date. But I prefer running it on sql.



  • 6.  RE: Need SQL Query

    Posted Mar 16, 2015 07:59 AM

    report.pngclick on advanced the blue hyperlink, here you can set the date



  • 7.  RE: Need SQL Query
    Best Answer

    Posted Mar 16, 2015 08:48 AM

    Here is sql query you can run to get you those numbers...

     

    SELECT 
       sa.AGENT_VERSION as [SEP Version]
       ,COUNT(*) Count
    FROM V_SEM_COMPUTER c
    left join SEM_AGENT sa on sa.COMPUTER_ID = c.COMPUTER_ID
    group by sa.AGENT_VERSION
    order by sa.AGENT_VERSION