akardapolov / ASH-Viewer

ASH Viewer provides a graphical view of active session history data within the Oracle and PostgreSQL DB
GNU General Public License v3.0
167 stars 73 forks source link

incomplete SQL text #3

Open maiklos opened 9 years ago

maiklos commented 9 years ago

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

SQL command is not complete

akardapolov commented 9 years ago

Hi!

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

Thanks, Alex.

maiklos commented 9 years ago

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.

Staric1982 commented 8 years ago

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

akardapolov commented 8 years ago

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.