Release Automation

 View Only
Expand all | Collapse all

Detailed SQL Script execution Logs

  • 1.  Detailed SQL Script execution Logs

    Posted Aug 23, 2016 04:19 PM

    Hi,

     

    When execute the SQL Script on Oracle as well as MS SQL server, we just single line logs if any error occurred during execution. How can get the Detailed logs withing action execution summary for any type of errors occured during SQL script executon through Action.

     

    Please find below Sample logs which we got and need some more detailed logs to identify where it was failed.

     

     

    Fail to run script [\\gladevcontrol.dev.att.com\E$\inetpub\ReleaseDocs\20160820\HLRD\2016-08-19-HLRD-prod.sql]: Invalid column name 'Feed_Result_Code'.

     

    From here We are not able to find out the table name for which this is a column is part.


  • 2.  Re: Detailed SQL Script execution Logs

    Broadcom Employee
    Posted Aug 23, 2016 05:47 PM

    Dadabhau,

     

    Can you post the sample SQL file here? I need to see what you are trying to do. Is this for Oracle? What version of RA do you have?

     

    Thanks

     

    -Walter



  • 3.  Re: Detailed SQL Script execution Logs

    Posted Aug 25, 2016 05:54 PM

    We a re using MS SQL Server Database to execute t he scripts. The RA Version is 5.5.2.



  • 4.  Re: Detailed SQL Script execution Logs

    Broadcom Employee
    Posted Aug 31, 2016 12:00 PM

    By any chance, are you including the following delimiters? Usually the scripts only include the "GO" delimiter, so just change the value as pointed by the red arrow to just include the "GO" delimiter and your script will execute.

     

     

    Thanks

     

    -Walter



  • 5.  Re: Detailed SQL Script execution Logs

    Posted Aug 31, 2016 03:56 PM

    Hi Walter,

     

    Actually we are using only GO Deliminator that is not an issues for script execution. My Question is If sql script execution is failed because other issues like - Primary Key conflict, Column not found etc. In this case Tool is not providing the table name in which that column is present or primary key is present. it just says that Failed to run the script.

     

    Here is one example of the error :

     

    Fail to run script [\\gladevcontrol.dev.att.com\E$\inetpub\ReleaseDocs\20160820\HLRD\2016-08-19-HLRD-prod.sql]: Invalid column name 'Feed_Result_Code'.

     

    From Above error how could i get to know the table name in which this particular coulnm is exists.

     

     



  • 6.  Re: Detailed SQL Script execution Logs

    Broadcom Employee
    Posted Aug 31, 2016 04:04 PM

    I'm assuming you have access to the .sql file mentioned in your update. I would check there to see what table it is trying to be created in. If you do not have access to that .sql then you can try looking in the <agentInstallDir>\logs\nolio_all.log or nolio_action_exe.log to see if it has more information. If it isn't in the error message that you see reported back to/in the manager then it is, usually, not hidden elsewhere in the manager so you're next step is viewing the source (.sql) and agent logs.

     

    Regards,

    Gregg



  • 7.  Re: Detailed SQL Script execution Logs

    Broadcom Employee
    Posted Aug 31, 2016 04:06 PM

    Was your RA action delimiter setup like this?

     

     

    Please keep in mind that the RA Execute SQL script for MS SQL is not design to develop/debug a SQL script. If you are looking for the output of the action, you should had gotten it once the action has executed and also in the RA agent, please look at the nolio_all.log file.

     

    Thanks

     

    -Walter



  • 8.  Re: Detailed SQL Script execution Logs

    Broadcom Employee
    Posted Aug 30, 2016 11:26 PM

    Hi,

    I assume the same .sql script works successfully when executing it with a native MSSQL tool (osql, sql management studio, etc..)? If so then it is possible that the action is translating the sql script differently than those native tools and providing the script here, or via a technical support issue, is recommended. A starting point I would use to try and isolate the problematic behavior is to break down the script (into single statements if necessary) to isolate the problematic statement/syntax and then report the bug and/or adjust the statements.

     

    Kind regards,

    Gregg 



  • 9.  Re: Detailed SQL Script execution Logs

    Posted Aug 31, 2016 03:59 PM

    Hi Gregg,

     

    The scripts are made up of hundreds of line. its not possible to break down the script into single statement. My only concern is that if scripts failed we should get the detailed for that error.  However I got detailed logs on Agent server where it saves detailed logs for action execution. but its not good practice to see the logs every time in agent logs for detailed explanation.



  • 10.  Re: Detailed SQL Script execution Logs

    Broadcom Employee
    Posted Aug 31, 2016 04:13 PM

    Is this a discussion to help you fix a specific problem or for ways to identify/troubleshoot and remedy problem when they happen? If the agent logs have the detail that you need for a specific type of problem then I would create an idea for that additional information to be included in the error returned to the manager. 



  • 11.  Re: Detailed SQL Script execution Logs
    Best Answer

    Broadcom Employee
    Posted Sep 05, 2016 03:04 AM

    Hi  ,

     

    I don;t think there is currently a option to do this, please submit a idea for this as Gregg suggested .

    Did this answer your question? If it did please mark it as answered.

     

    Regards

    Dirk