Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

RegExp "NOT IN"

2921435Nov 17 2008 — edited Nov 18 2008
Hello,

From the query given below, I need to do just get "this" [i.e, I need to just replace whatever is NOT "this" to NULL).

when I tried it like given below, it considers "t" "h" "i" and "s" as separate and replaces each and every one of them - can you please help ?


with q1 as
( select 'test_this_23stay_count' str from dual union
select 'say_thisandthat_s13et_count' from dual )
select str,
regexp_replace(str,'[^(this)]','') new_str
from q1

regards,

Raj

Comments

PrafullaNath
I think there is no such command to trace a session.when ever a user gets connected to DB a session with sid,serial# gets associated with the user.

select sid,serial# from v$session where username='USER_NAME';

after that use

execute dbms_system.set_sql_trace_in_session(sid,serial#,true);

execute dbms_monitor.session_trace_enable(sid,serial#,true);
Pavan Kumar
Hi,
Enabling the trace to the user level
User level - its self reflects to Sessionw which it gets connected to ORACLE in order to Access the data/information.
Check with EXECUTE dbms_support.start_trace_in_session (9,29); else enable the trace @DB level for particular time and disable with out restart.

HTH

- Pavan Kumar N
- ORACLE OCP - 9i/10g
https://www.oracleinternals.blogspot.com
Aman....
I would not recommend to use DBMS_SUPPORT package since its not documented and is only meant for support. If you are on 10g and above, you can use DBMS_MONITOR package for the same.

HTH
Aman....
Pavan Kumar
Hi Aman,

Agree on that.. Sir... !! :-)

- Pavan Kumar N
DBA
Hi..Gurus,

thanks for the updates. I have used all these options earlier ,which were posted by you all, but sill i am not able to get the trace for spawned(child ) processes automatically. Only options is that i need to monitor closely v$session, and i need to enable the trace for each new spawned process, but it is very tedious job reason being my program takes approximately 5 hours to complete the entire job,


regards
DBA.
PrafullaNath
then better trace the entire instance/database
Hemant K Chitale
The procedure actually creates new sessions ? How and why ? How does it supply the SQLs to be executed by the child sessions ?

You could modify the code so that the SQL code it passes to the child session includes the DBMS_SESSION.START_TRACE call !



OR write a database LOGON trigger that enables tracing, based on the username.


Hemant K Chitale
1 - 7
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 16 2008
Added on Nov 17 2008
7 comments
6,294 views