# Toad 12.5 Session Browser, Current Statement: Sql  is truncated

**URL:** <https://forums.toadworld.com/t/toad-12-5-session-browser-current-statement-sql-is-truncated/33345>\
**Category:** Toad for Oracle & DevOps Toolkit\
**Created:** [May 21, 2015, 8:54am UTC](https://forums.toadworld.com/t/toad-12-5-session-browser-current-statement-sql-is-truncated/33345 "2015-05-21T08:54:56Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![peter.littlefield](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@peter.littlefield](https://forums.toadworld.com/u/peter.littlefield)\
**Post date:** [May 21, 2015, 8:54am UTC](https://forums.toadworld.com/t/toad-12-5-session-browser-current-statement-sql-is-truncated/33345/1 "2015-05-21T08:54:56Z")

</div>

Toad 12.5 Session Browser, Current Statement: Sql is truncated.

I only see the first part of the statement?

Is there some setting I need?

Is this a reported problem?

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [May 21, 2015, 8:59am UTC](https://forums.toadworld.com/t/toad-12-5-session-browser-current-statement-sql-is-truncated/33345/2 "2015-05-21T08:59:52Z")

</div>

What version of Oracle are you using?

---

<div class="post-metadata">

**Author:** ![peter.littlefield](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@peter.littlefield](https://forums.toadworld.com/u/peter.littlefield)\
**Post date:** [May 21, 2015, 9:18am UTC](https://forums.toadworld.com/t/toad-12-5-session-browser-current-statement-sql-is-truncated/33345/3 "2015-05-21T09:18:34Z")

</div>

11.2

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [May 21, 2015, 9:38am UTC](https://forums.toadworld.com/t/toad-12-5-session-browser-current-statement-sql-is-truncated/33345/4 "2015-05-21T09:38:52Z")

</div>

I just tried a statement slightly longer than 5000 characters and the whole thing showed up under “current statement”.

If you turn on spool sql (from the main menu: Database -\> Spool SQL -\> Spool to screen) then you can see what queries Toad is running. For the current statement, we run one that looks like this:

Select \*

from v$sql

where 1=1

and sql\_id = :sqlid

(and spool sql will also show you the value we’re using in the bind variable)

and then we get the sql test from the SQL\_FULLTEXT column. If you run this query in the editor, you can double-click the SQL\_FULLTEXT column to see its contents. Is it truncated there too?

---

<div class="post-metadata">

**Author:** ![peter.littlefield](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@peter.littlefield](https://forums.toadworld.com/u/peter.littlefield)\
**Post date:** [May 21, 2015, 12:02pm UTC](https://forums.toadworld.com/t/toad-12-5-session-browser-current-statement-sql-is-truncated/33345/5 "2015-05-21T12:02:00Z")

</div>

Too late the statement has come and gone . The truncate seems to be only on DDL. And maybe certain DDL like “ALTER TABLE BFI\_BASE.”

Next time I see it I will see if it’s in v$sql.sql\_fulltext.

I like this continuous Spooling.

---

<div class="post-metadata">

**Author:** ![peter.littlefield](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@peter.littlefield](https://forums.toadworld.com/u/peter.littlefield)\
**Post date:** [May 27, 2015, 6:42am UTC](https://forums.toadworld.com/t/toad-12-5-session-browser-current-statement-sql-is-truncated/33345/6 "2015-05-27T06:42:11Z")

</div>

John, sorry I just got back to this thread.

I was able to capture the Select \* from gv$sql and yes, the sql\_txt is truncated BUT the sql\_fultext(clob) is not.

So does that mean that Toad 12.5.1.1 running aganst Oracle 11.2.0.4 is selecting from sql\_txt and not sql\_fulltext ?

Seems so.

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [May 27, 2015, 9:43am UTC](https://forums.toadworld.com/t/toad-12-5-session-browser-current-statement-sql-is-truncated/33345/7 "2015-05-27T09:43:18Z")

</div>

I should be using SQL\_FULLTEXT, but if it can’t find it there, we’ll look in V$SQLTEXT. Will you give me the spool SQL output of refreshing the Session browser and having the truncated text appear in the current statement box?

---

<div class="post-metadata">

**Author:** ![peter.littlefield](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@peter.littlefield](https://forums.toadworld.com/u/peter.littlefield)\
**Post date:** [May 27, 2015, 10:04am UTC](https://forums.toadworld.com/t/toad-12-5-session-browser-current-statement-sql-is-truncated/33345/8 "2015-05-27T10:04:49Z")

</div>

Attached is a screen shot. It shows 3 things. The sql DDL statement, the Toad Session browser with the ddl statement truncated, and your SQL Spool to screen.

Note: I see this truncation primarliy with DDL.

Anything I can do further, please let me know.

 ![Capture.jpeg](https://global.discourse-cdn.com/quest/original/2X/9/9a289f387a7e20dbaa7c91b2cf644f119a98d8b1.jpeg)

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [May 27, 2015, 11:14am UTC](https://forums.toadworld.com/t/toad-12-5-session-browser-current-statement-sql-is-truncated/33345/9 "2015-05-27T11:14:42Z")

</div>

I tried to reproduce the problem with a similar statement, and for me, the ‘alter table drop column’ statements aren’t appearing in GV$SQL at all. So you are one step ahead of me!

The only thing we do with the statement before displaying it is we put it through the formatter. So I thought maybe the formatter was having a problem with the statement, but when I format it in the editor, it works fine there.

That’s really all that’s going on here, so I’m not sure what the problem is. It’s interesting that the SQL\_TEXT column is truncating such a short statement. I always thought that the only reason that Oracle introduced the SQL\_FULLTEXT column was for statements that wouldn’t fit into the VARCHAR2 SQL\_TEXT column.

---

<div class="post-metadata">

**Author:** ![peter.littlefield](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@peter.littlefield](https://forums.toadworld.com/u/peter.littlefield)\
**Post date:** [May 27, 2015, 11:55am UTC](https://forums.toadworld.com/t/toad-12-5-session-browser-current-statement-sql-is-truncated/33345/10 "2015-05-27T11:55:29Z")

</div>

Interesting. I’m not to busy so I googled around and found this in Ask Tom.

[https://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11\_QUESTION\_ID:13948258923206](https://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:13948258923206)

jun 2004

1. they truncate ddl like that to hide passwords. think “alter user foobar identified by barfoo”

and so on. You get a flavor of the statement but not the entire thing.

That’s it for me. You can CLose this if you want.
