Data360 Analyze

 View Only
  • 1.  D360 Log Files - Find SQL on server

    Posted 04-26-2023 18:52
    Edited by Toby Harkin 04-26-2023 22:10

    I am trying to find which user or dataflow on my server is running a particular SQL script.

    Is there a way to search through the .LNA files or log's on scale to search for snippets of code etc?

    I basically want this functionality but at a server level.



    ------------------------------
    Toby Harkin
    Telstra Corporation Limited
    Sydney NSW
    ------------------------------



  • 2.  RE: D360 Log Files - Find SQL on server

    Employee
    Posted 04-27-2023 06:50
    Edited by Adrian Williams 04-27-2023 06:58

    I don't know of any method of performing a bulk search operation via the Analyze UI.

    However, you can use the AnalyzeCli command line tool to perform a search of parameter values for a given string.

    The details for AnalyzeCli can be found at https://doc.infogixsaas.com/analyzecli/Default.htm

    The information on searching imported dataflows is here:

    https://doc.infogixsaas.com/analyzecli/Default.htm#c-getting-started/further-commands.htm

    and the documentation suggests you review the search options in the AnalyzeCli tool.  The appropriate example is using search -t paramValue '<string_to_find>'

    This will return a list of the data flows that contain the searched for string in their nodes' properties.

    Note that if you are running AnalyzeCli on a Windows machine you would need to replace the single quote characters with double quotes, e.g. using search -t paramValue "<string_to_find>"

    So the basic process on a Windows machine (assuming you have Data360 Analyze Desktop and AnalyzeCli installed on your local machine) would be:

    Open a Cmd window

    Set the JAVA_HOME environment variable by running laeEnv.bat on Windows (or sourcing the .profile.lavastorm on linux)
    "<Analyze_Install_Dir>\bin\laeEnv.bat"
    e.g.
    "C:\Program Files\Data3SixtyAnalyze\bin\laeEnv.bat"

    Change directory to the location of the /bin folder within the directory where the tool was unpacked, e.g.
    cd C:\AnalyzeCli\analyzeCli-3.10.1\bin

    Login to the remote Analyze Server
    analyzeCli --host analyze.example.com --port 443 --protocol https --password <Secret> login

    Search for the required string in the property values:
    analyzeCli --host analyze.example.com --port 443 --protocol https search -t paramValue "jdbc:db2"

    ...

    Finally log out of the Analyze Server:
    analyzeCli --host analyze.example.com --port 443 --protocol https logout



    ------------------------------
    Adrian Williams
    Precisely Software Inc.
    ------------------------------



  • 3.  RE: D360 Log Files - Find SQL on server

    Posted 05-08-2023 02:47

    Thanks for that Adrian, do you happen to know when they plan on updating the tool?

    Currently getting this message.



    ------------------------------
    Toby Harkin
    Telstra Corporation Limited
    Sydney NSW
    ------------------------------



  • 4.  RE: D360 Log Files - Find SQL on server

    Employee
    Posted 05-09-2023 03:51

    There is no specific timescale for the next release of AnalyzeCli the .639 build you are running is the latest available release.
    The warning message is potentially a bit strongly worded and it is really just an indication that the server version does not match that of the client. 



    ------------------------------
    Adrian Williams
    Precisely Software Inc.
    ------------------------------



  • 5.  RE: D360 Log Files - Find SQL on server

    Posted 11-22-2023 19:20

    Thanks Adrian, I know this is going back a bit, but I have all the above set up on our linux server now and the tool is working. The only question i have is the accuracy of searching as I have found a number of scenario's where the results are not what I would expect. How would I find out more details on how the search is actually implemented?

    I ran a test where I was unable to find a dataflow that only had one node with one word in it. There must be something that this tool is missing or something about the command that does not do what is expected.



    ------------------------------
    Toby Harkin
    Telstra Corporation Limited
    Sydney NSW
    ------------------------------



  • 6.  RE: D360 Log Files - Find SQL on server

    Employee
    Posted 11-23-2023 06:07

    Hi Toby,

    I don't think there is any detail available on the implementation of the search.

    From my usage it appears that the paramValue search is case-insensitive and that it appears to be using a 'contains' type search method for the search text. 

    The search will not return matches where the text is included in standard library nodes - it only considers text that overrides the default property values (or node names).

    The data flow also needs to have been saved so it will not return matches for changes included in an unsaved edit session.

    If you have some specific examples that the team can review then I can ask them to look into them.

    Regards,

    Adrian



    ------------------------------
    Adrian Williams
    Precisely Software Inc.
    ------------------------------



  • 7.  RE: D360 Log Files - Find SQL on server

    Posted 11-23-2023 18:35
    Edited by Toby Harkin 11-27-2023 01:02

    Thanks for the quick response, Adrian. Here is my example.

    I have the below node in a saved dataflow called "contact sql search test" This is stored in my personal folder.

    When I run the following command....

    ('/opt/infogix/analyzeCli/bin/analyzeCli --host d360-cprd-ds01.com --port 8443 --protocol https --username admin --password {{^Password^}} search -t paramValue "{{^Search^}}"') 

    note that I am doing this through a dataflow and the search parameter value is the following. I do receive the same result when run in the terminal however, so I don't believe this is a method issue.

    and then this is all I get back.

    I ran this as a test as I would expect this search to return a far larger number of dataflows than the above.



    ------------------------------
    Toby Harkin
    Telstra Corporation Limited
    Sydney NSW
    ------------------------------



  • 8.  RE: D360 Log Files - Find SQL on server

    Employee
    Posted 12-12-2023 05:41

    Hi Toby,

    The team made the following comments on the Search capability:

    1) Is the property value set on the node in the data flow itself as opposed to being set in a library node?
    The search functionality will only search for "locally' set values so will not find stuff from parent lib nodes

    2) The search indexes are not done immediately so there can be some delay in entering a new value and the search results returning the correct information

    3) The search results are only guaranteed to be correct after a compilation operation, so either a page refresh / reopen the data flow / navigating into and out of a composite / connecting a node / running a node or actions like this may be required after setting the property value. While the data flow is open, searching in the search panel will contain results which correspond to property updates which have not yet been saved , I don't believe this is true when searching through data flows through the CLI. The edit-sessions are in the user's temporary directory and would not be found via searching through the data flows themselves.



    ------------------------------
    Adrian Williams
    Precisely Software Inc.
    ------------------------------