Question

I am extracting some data from Sybase logs with the following command :

grep "12345" SybaseIQ.sql | grep "REQUEST" | grep "STMT_EXECUTE_ANY_IMM" | grep "07/09" > my_sql_res.txt

In the above command , 12345 is the connection_id and REQUEST and STMT grep statements are required to filter only sql requests to server. 07/09 has been applied for date filtering.

The grep runs fine except for few cases where it returns [large string unavailable]

Line 8: 07/09 02:00:31.242 ** REQUEST conn: 12345 STMT_EXECUTE_ANY_IMM [large string unavailable]

These large string could represent some queries that run in begin end block. Can you please help me resolve this so those strings are listed in result of my grep command?

Was it helpful?

Solution

If "large string unavailable" appears in the request log output, it's not lying to you - the string is not available. It means that the SQL string was broken up into multiple pieces when being sent to the server, and the request logging code does not handle this case.

Disclaimer: I work for SAP/Sybase in SQL Anywhere engineering. SAP Sybase IQ is based on the SQL Anywhere engine.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top