3 Replies Latest reply on Feb 8, 2013 8:43 AM by eric223

    anyone use DEVICE VARIABLES in 9.0?

    Specialist

      I have some computers that have DEVICE VARIABLES established for them; that is to say that if I am looking at a machine in the console view I can right click on it and select MANAGE VARIABLES.  The dialog box that comes up shows what variables are established for that specific machine.

       

      I need to write a query to find machines in my inventory that have a specific variable established for them; my problem right now is that it appears that the inventory does not contain any of the device variables.  Anyone know if this is true or not?

       

      Anyone know how to locate these without manually hunting for them?

       

      thanks

        • 1. Re: anyone use DEVICE VARIABLES in 9.0?
          Catalysttgj Expert

          I found them in the DB itself

           

          Try this SQL query to get the list of everything there. Then you'll need to make sense of it, but this will get you started:

           

           

          select * from PROV_VARIABLE_DEF

           

          Hope this helps ya!

          • 2. Re: anyone use DEVICE VARIABLES in 9.0?
            Specialist

            thanks Catalysttgj,

             

             

            am I correct in understanding that I will need to perform this query on the database server directly rather than from with the LDMS console?

            • 3. Re: anyone use DEVICE VARIABLES in 9.0?
              SupportEmployee

              Yes. That will need to be done from sql.

               

              In the prov_variable_def table you have multiple variable types. Not just device variables. The variables are assigned an entry type as follows:

               

              ENTRY_TYPE

              1 = Template Variable

              2 = Action Variable

              3 = Device Variable

              5 = Public Variable

               

              The colum Transform_type defines the type of variable as follows:

              1 - String

              2 - Database Value

              3 - Sensitive Data

               

              The entry_idn in the prov_variable_def table links to the computer_idn in the computer table.

               

              If you run the following in SQL it will return all devices with assigned variables:

              select *

              from PROV_VARIABLE_DEF

              join Computer on ENTRY_IDN = Computer_Idn

              where ENTRY_TYPE = 3

               

              You can also replace the * with the fields you would like to return.