ASH-Viewer icon indicating copy to clipboard operation
ASH-Viewer copied to clipboard

incomplete SQL text

Open maiklos opened this issue 9 years ago • 4 comments

when I select top activity -> top sql & sessions -> SQL text:

SQL command is not complete

maiklos avatar Nov 05 '15 14:11 maiklos

Hi!

Could you post text of sql query and screenshot of the error?

Thanks, Alex.

akardapolov avatar Nov 09 '15 07:11 akardapolov

Hello Alex, I don't have oracle at hand right now, but I think it is caused by getting only first fragment from v$sql

documentation is saying that v$sql_text is just a piece or SQL and therefore you should collect all pieces and concatenate them. https://docs.oracle.com/cd/B13789_01/server.101/b10755/dynviews_2113.htm

Also for version 10+ there v$full_text available which contains whole SQL.

Michal.

maiklos avatar Nov 19 '15 19:11 maiklos

I have the same.

SELECT * FROM ( SELECT document.ID AS entityId ,document.ID AS documentId ,document.DEPARTMENT_ID AS departmentId ,document.DOC_NUMBER AS documentNumber ,document.STATE_CODE AS stateCode ,document.STATE_DESCRIPTION AS stateDescription ,document.SYSTEM_NAME AS systemName ,document.COMMISSION AS commission ,document.COMMISSION_CURRENCY AS commissionCurrency ,document.ARCHIVE AS archive ,document.CREATION_TYPE AS creationType ,document.CLIENT_OPERATION_TYPE AS clientOperationChannel ,document.REFUSING_REASON AS refusingReason ,document.CREATION_DATE AS dateCreated ,document.OPERATION_DATE AS operationDate ,document.ADMISSION_DATE AS admissionDate ,document.EXECUTION_DATE AS executionDate ,document.DOCUMENT_DATE AS documentDate ,document.STATE_MACHINE_NAME AS stateMachineName ,document.TEMPLATE_ID AS templateId ,document.CREATION_SOURCE_TYPE AS creationSourceType ,document.CONFIRM_STRATEGY_TYPE AS confirmStrategyType ,document.OPERATION_UID AS operationU

2

Staric1982 avatar Dec 10 '15 17:12 Staric1982

Yes, maiklos you right. I think we need to get data from SQL_FULLTEXT column of V$SQL view.

Staric1982, ASH Viewer gets data from V$SQL.SQL_TEXT VARCHAR2(1000). https://docs.oracle.com/cd/B19306_01/server.102/b14237/dynviews_2113.htm#REFRN30246

Thanks, Alex.

akardapolov avatar Dec 22 '15 07:12 akardapolov