none
Get folder full path for variable. RRS feed

  • Question

  • Hi,

    In our SCO by mistake in Global Settings>variables folder duplicate folders were created and now we donot know if variables from those folders are also being used.

    How do I find the full path for a variable like below;

    Global Settings>Variables>DEV> (variable name)

    Thanks,

    Kishor

    Thursday, July 11, 2019 10:17 AM

Answers

  • Hi,

    with an SQL Statement you'll get with this:

    SELECT        FOLDERS_2.Name AS Folder2, FOLDERS_1.Name AS Folder1, FOLDERS.Name AS VarFolder, OBJECTS.Name, VARIABLES.Value
    FROM            FOLDERS INNER JOIN
                             OBJECTS ON FOLDERS.UniqueID = OBJECTS.ParentID INNER JOIN
                             VARIABLES ON OBJECTS.UniqueID = VARIABLES.UniqueID LEFT OUTER JOIN
                             FOLDERS AS FOLDERS_1 ON FOLDERS.ParentID = FOLDERS_1.UniqueID LEFT OUTER JOIN
                             FOLDERS AS FOLDERS_2 ON FOLDERS_1.ParentID = FOLDERS_2.UniqueID
     WHERE OBJECTS.Deleted = 0
    ORDER BY Folder2, Folder1, VarFolder, OBJECTS.Name

    Regards,

    Stefan


    More and news about System Center at stillcool.de and sc-orchestartor.eu .


    Thursday, July 11, 2019 5:49 PM
    Answerer
  • Hi Kishor,

    how are the things going?

    Did you manage to get the path with SQL query above?

    Regards,

    Stefan


    More and news about System Center at stillcool.de and sc-orchestartor.eu .

    Friday, August 2, 2019 7:49 PM
    Answerer

All replies

  • Easiest way is a SQL query on the Orchestrator database to get this information.

    OBJECTS table contains all SCORCH objects including the Variables and Folders

    As far as I remember the ParentID of the SCORCH Object is in the OBJECTS table to get the details "DEV/(variable name)"

    WHERE statement should be the ObjectTypeID of Variables.

    Hope this helps.


    Andreas Baumgarten

    Thursday, July 11, 2019 5:10 PM
  • Hi,

    with an SQL Statement you'll get with this:

    SELECT        FOLDERS_2.Name AS Folder2, FOLDERS_1.Name AS Folder1, FOLDERS.Name AS VarFolder, OBJECTS.Name, VARIABLES.Value
    FROM            FOLDERS INNER JOIN
                             OBJECTS ON FOLDERS.UniqueID = OBJECTS.ParentID INNER JOIN
                             VARIABLES ON OBJECTS.UniqueID = VARIABLES.UniqueID LEFT OUTER JOIN
                             FOLDERS AS FOLDERS_1 ON FOLDERS.ParentID = FOLDERS_1.UniqueID LEFT OUTER JOIN
                             FOLDERS AS FOLDERS_2 ON FOLDERS_1.ParentID = FOLDERS_2.UniqueID
     WHERE OBJECTS.Deleted = 0
    ORDER BY Folder2, Folder1, VarFolder, OBJECTS.Name

    Regards,

    Stefan


    More and news about System Center at stillcool.de and sc-orchestartor.eu .


    Thursday, July 11, 2019 5:49 PM
    Answerer
  • Hi Kishor,

    how are the things going?

    Did you manage to get the path with SQL query above?

    Regards,

    Stefan


    More and news about System Center at stillcool.de and sc-orchestartor.eu .

    Friday, August 2, 2019 7:49 PM
    Answerer
  • Hi Stefan,

    We will try the solution.

    Thanks,

    Kishor

    Friday, August 9, 2019 3:03 PM