4 Replies Latest reply on Sep 2, 2016 7:46 AM by Mshuaib

    Task to Targeted LDAP query - SQL LDMS TABLE

    Rookie

      Hello.

       

      Does someone know from which Table in SQL table we find the Task mapped to targeted LDAP queries , attached is the screenshot.

       

      I am unable to find the table name in LDMS 9.6 SQL DB.

       

      Ex:- TASKNAME  + LDAP Group name

      THanksTask to Ldap mapping.JPG

        • 1. Re: Task to Targeted LDAP query - SQL LDMS TABLE
          phoffmann SupportEmployee

          So there's a bunch of tables around this. That part is relatively easy to explain.

           

          What exactly are you trying to do - are you looking for a report on "task X has Y queries targeted", or are you trying to add LDAP queries automatically to tasks, or ...?

           

          Just trying to understand a bit better the "why" of your question, so I can give better context (and warnings, where needed) here.

          • 2. Re: Task to Targeted LDAP query - SQL LDMS TABLE
            Rookie

            are you looking for a report on "task X has Y queries targeted  -- Yes this is what I am looking :-)   I can see the queries from queries table , tasks from task table but unable to linkup or dono which table has common field to pull the data I require.

            • 3. Re: Task to Targeted LDAP query - SQL LDMS TABLE
              phoffmann SupportEmployee

              The following "crash course" should help you along I think. Let me know if you get lost / need any clarification any where.

               

              -- Basic / "Parent" table for all AD queries.
              select * from APM_POLICY_QUERY
              
              -- Basic / "Parent" table for all scheduled tasks
              select * from LD_TASK
              
              -- Table linking LD_TASK_IDN's to COMPUTER_IDN's (once the queries are resolved!)
              select * from LD_TASK_MACHINE
              
              -- Table of "resolved queries"- has COMPUTER_IDN's and LD_TASK_IDN's!
              select * from LD_LDAP_TARGETS
              
              -- In case you need to resolve the LDAP server (if you have multiple), this will help...
              select * from APM_LDAP_SERVER
              
              -- THIS table links LD_TASK_IDN's against targeted QUERIES (LDAP and Otherwise).
              -- Note the QUERY_TYPE column (to separate out "LD queries"from "LDAP queries"
              -- Chances are, your LDAP queries will be "QUERY_TYPE = 2
              select * from ScheduledQueries
              

               

              Little tip - if you have a lab with full SQL Server, do this to reverse engineer stuff like this:

              • Stop all of the MP_xxx and LANDesk services (console runs happily without them) to cut down on the SQL chatter to the DB.
              • Start up SQL Profiler ...
              • ... do what you want to do / find out
              • ... study the Profiler trace & find out what tables were INSERT-ed / UPDATE-d into usually.

               

              That should help you along .

              • 4. Re: Task to Targeted LDAP query - SQL LDMS TABLE
                Rookie

                thanks a lot for the tables list, I had all tables tried except select * from ScheduledQueries which gave me the solution !! BIngo