# Ability to change the query used to get session details in the Session Browser

**URL:** <https://forums.toadworld.com/t/ability-to-change-the-query-used-to-get-session-details-in-the-session-browser/19338>\
**Category:** Toad for Oracle - Beta\
**Created:** [July 1, 2013, 5:59am UTC](https://forums.toadworld.com/t/ability-to-change-the-query-used-to-get-session-details-in-the-session-browser/19338 "2013-07-01T05:59:33Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Boneist](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/boneist/32/145_2.png) [@Boneist](https://forums.toadworld.com/u/Boneist)\
**Post date:** [July 1, 2013, 5:59am UTC](https://forums.toadworld.com/t/ability-to-change-the-query-used-to-get-session-details-in-the-session-browser/19338/1 "2013-07-01T05:59:33Z")

</div>

Hi,

We’ve just migrated to an 11g database, and all of a sudden I’m seeing an “ORA-29275: partial multibyte character” error when I try to view the session browser - it’s due to some bug or other that’s causing the OSUSER to be passed in with a funny/truncated character on the end.

By playing around with the query in the editor, I’ve worked out that I can use the convert function to convert it the OSUSER a single-byte character set and Toad no longer throws the error. I accept that this is not a Toad problem, it’s whatever is passing in the dodgy data. However, I’ve come to rely heavily on the session browser, so having to go back to manual select statements is a major step backwards!

I’ve tried removing that column from the list of visible columns, but that didn’t help. I can also see that I have the ability to create filters on the data, but it does that by doing “select \* from v$session where (…)”, and I can’t see a way to amend the columns being selected.

Is it possible to change the columns being selected by the main query in the session browser (similar to how you can amend the query in the schema browser data tab)? If not, is it possible to get that added for the next beta? If it is available, how do I go about doing it?

Thanks,  
Dawn

---

<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:** [July 1, 2013, 6:46am UTC](https://forums.toadworld.com/t/ability-to-change-the-query-used-to-get-session-details-in-the-session-browser/19338/2 "2013-07-01T06:46:04Z")

</div>

Sorry, there is no way to get Toad to not select the column. I could possibly put a change in for beta to not select a column unless it is visible. I will  
take a look at that later soon.

**From:** Boneist [[mailto:bounce-Boneist@toadworld.com](mailto:bounce-Boneist@toadworld.com)]

**Sent:** Monday, July 01, 2013 8:00 AM

**To:** [toadoraclebeta@toadworld.com](mailto:toadoraclebeta@toadworld.com)

**Subject:** [Toad for Oracle - Beta Discussion Forum] Ability to change the query used to get session details in the Session Browser

**[ Ability to change the query used  
to get session details in the Session Browser](http://gyk.r.mailjet.com/redirect/f1hmtoyynpl3v4qf6vl4go/www.toadworld.com/products/toad-for-oracle/toad_for_oracle_beta_program/f/86/t/14882.aspx)**

Thread created by Boneist

Hi,

We’ve just migrated to an 11g database, and all of a sudden I’m seeing an “ORA-29275: partial multibyte character” error when I try to view the session browser - it’s due to some bug or other  
that’s causing the OSUSER to be passed in with a funny/truncated character on the end.

By playing around with the query in the editor, I’ve worked out that I can use the convert function to convert it the OSUSER a single-byte character set and Toad no longer throws the error.  
I accept that this is not a Toad problem, it’s whatever is passing in the dodgy data. However, I’ve come to rely heavily on the session browser, so having to go back to manual select statements is a major step backwards!

I’ve tried removing that column from the list of visible columns, but that didn’t help. I can also see that I have the ability to create filters on the data, but it does that by doing "select

- from v$session where (…)", and I can’t see a way to amend the columns being selected.

Is it possible to change the columns being selected by the main query in the session browser (similar to how you can amend the query in the schema browser data tab)? If not, is it possible to  
get that added for the next beta? If it is available, how do I go about doing it?

Thanks,

Dawn

To reply, please reply-all to this email.

[Stop receiving emails](http://gyk.r.mailjet.com/redirect/yg90h2zxpxztrbd5ss81np/www.toadworld.com/products/toad-for-oracle/toad_for_oracle_beta_program/f/86/t/14882.aspx?subscribe=false) on this subject.

Or [  
Unsubscribe from Toad for Oracle - Beta](http://gyk.r.mailjet.com/redirect/f5hjh2ftgvbdkskvtc7xoj/www.toadworld.com/products/toad-for-oracle/toad_for_oracle_beta_program/f/86.aspx?subscribe=false) notifications altogether.

Toad for Oracle - Beta Discussion Forum

[Flag](http://gyk.r.mailjet.com/redirect/h5gchcb665xwqp3x1xk348/www.toadworld.com/products/toad-for-oracle/toad_for_oracle_beta_program/f/86/t/14882.aspx?AbuseContentId=1b3496c1-9680-4e65-947d-e4aada399483&AbuseContentTypeId=46448885-d0e6-4133-bbfb-f0cd7b0fd6f7&AbuseFlag=true)  
this post as spam/abuse.

![](http://gyk.r.mailjet.com/785aa4af/3UJA08.gif)

---

<div class="post-metadata">

**Author:** ![Boneist](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/boneist/32/145_2.png) [@Boneist](https://forums.toadworld.com/u/Boneist)\
**Post date:** [July 1, 2013, 8:20am UTC](https://forums.toadworld.com/t/ability-to-change-the-query-used-to-get-session-details-in-the-session-browser/19338/3 "2013-07-01T08:20:26Z")

</div>

That’s a shame \*{☹ It’s frustrating to see the query in the filter section, and know that you can only change the where clause. Ah well!

---

<div class="post-metadata">

**Author:** ![scott\_89773](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@scott\_89773](https://forums.toadworld.com/u/scott_89773)\
**Post date:** [June 28, 2017, 9:32am UTC](https://forums.toadworld.com/t/ability-to-change-the-query-used-to-get-session-details-in-the-session-browser/19338/4 "2017-06-28T09:32:53Z")

</div>

Hello,

Has this been fixed at all? I am getting the same problem in version 12.10.0.30.

thanks,

Scott

---

<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:** [June 28, 2017, 9:46am UTC](https://forums.toadworld.com/t/ability-to-change-the-query-used-to-get-session-details-in-the-session-browser/19338/5 "2017-06-28T09:46:15Z")

</div>

I’m not sure if “fixed” is the right word here, since the error is coming from one of Oracle’s views.

I did investigate the possibility of only selecting the visible columns, but ran into some problems with it, then got pulled into another problem, and honestly, I forgot to come back to this.

Is it caused by the OSUSER column for you too? (you can check by running he same query in the editor). And can you fix it, as Dawn could, with select to\_single\_byte(osuser) from v$session?

If so, that would be a lot easier than only selecting visible columns, as we use a lot of the non-visible ones internally.

---

<div class="post-metadata">

**Author:** ![scott\_89773](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@scott\_89773](https://forums.toadworld.com/u/scott_89773)\
**Post date:** [June 28, 2017, 9:55am UTC](https://forums.toadworld.com/t/ability-to-change-the-query-used-to-get-session-details-in-the-session-browser/19338/6 "2017-06-28T09:55:09Z")

</div>

The only issue with that is doing things manually as opposed to searching out sessions using the session browser. I don’t have this issue in sqlplus or SQL Developer. It seems to only happen in Toad.

thanks,

Scott

---

<div class="post-metadata">

**Author:** ![scott\_89773](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@scott\_89773](https://forums.toadworld.com/u/scott_89773)\
**Post date:** [June 28, 2017, 9:56am UTC](https://forums.toadworld.com/t/ability-to-change-the-query-used-to-get-session-details-in-the-session-browser/19338/7 "2017-06-28T09:56:08Z")

</div>

Oh, and sorry, forgot to respond to your question. Yes, it is in the OSUSER column.

Thanks,

Scott

---

<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:** [June 28, 2017, 10:00am UTC](https://forums.toadworld.com/t/ability-to-change-the-query-used-to-get-session-details-in-the-session-browser/19338/8 "2017-06-28T10:00:45Z")

</div>

Sorry for the misunderstanding.

I’m not asking you to work around it manually by just running a query in the editor. I can’t reproduce this problem, so I am wondering if it is the exact same problem as Dawn’s - OSUSER is the only problem column and it can be fixed with the TO\_SINGLE\_BYTE function. At that point, it’s a simple fix on my side and I can have it done for the next beta.

SQL\*Plus uses the OCI in a different way that Toad, and SQL Developer uses JDBC. So they both get data out of the DB in a different way than Toad, so that is likely why you only see the error in Toad.

Thanks.

---

<div class="post-metadata">

**Author:** ![scott\_89773](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@scott\_89773](https://forums.toadworld.com/u/scott_89773)\
**Post date:** [June 28, 2017, 10:06am UTC](https://forums.toadworld.com/t/ability-to-change-the-query-used-to-get-session-details-in-the-session-browser/19338/9 "2017-06-28T10:06:05Z")

</div>

Gotcha. Yes it is the same problem. The OSUSER is the only column causing the problem.

Thanks,

Scott

---

<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:** [June 28, 2017, 10:59am UTC](https://forums.toadworld.com/t/ability-to-change-the-query-used-to-get-session-details-in-the-session-browser/19338/10 "2017-06-28T10:59:13Z")

</div>

Hi Scott.

OK, next beta, whenever I query OSUSER in the Session Browser, I’ll query it this way: to\_single\_byte(osuser) as OSUSER.

That should take care of it.

Depending on your settings, this column can also appear in WHERE clauses, but I don’t think the conversion is needed there. Please double-check it for me with this query:

select to\_single\_byte(osuser) as OSUSER  
from v$session s  
where (NVL(s.osuser,‘x’) \<\> ‘SYSTEM’);

if it’s needed in the where clause, I’ll add it there too.

---

<div class="post-metadata">

**Author:** ![scott\_89773](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@scott\_89773](https://forums.toadworld.com/u/scott_89773)\
**Post date:** [June 28, 2017, 11:52am UTC](https://forums.toadworld.com/t/ability-to-change-the-query-used-to-get-session-details-in-the-session-browser/19338/11 "2017-06-28T11:52:19Z")

</div>

Awesome. Thanks.

There’s no issue with the where clause.

---

<div class="post-metadata">

**Author:** ![Ron\_64](https://avatars.discourse-cdn.com/v4/letter/r/f07891/32.png) [@Ron\_64](https://forums.toadworld.com/u/Ron_64)\
**Post date:** [July 28, 2017, 12:08am UTC](https://forums.toadworld.com/t/ability-to-change-the-query-used-to-get-session-details-in-the-session-browser/19338/12 "2017-07-28T00:08:19Z")

</div>

Hi John,

We ran into the same problem but now related to the ACTION column in (g)v$session.

Would it be possible to also query it using the TO\_SINGLE\_BYTE() function?

Much appreciated!

Ron

---

<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:** [July 28, 2017, 5:10am UTC](https://forums.toadworld.com/t/ability-to-change-the-query-used-to-get-session-details-in-the-session-browser/19338/13 "2017-07-28T05:10:04Z")

</div>

So, I guess someone stuck some values in there that your character set didn’t like? Can you try to reproduce the problem with MODULE also? You probably know this, but a session can use DBMS\_APPLICATION\_INFO.SET\_MODULE to put some values into those columns.
