Performance Tuning :: How To Trace Different Session From Current With LEVEL 4

Jun 13, 2012

I've been searching the web for examples of how to run a trace.It's needed for a session different then current in trace LEVEL 4 (I need the bind variables values in the trace).

Unfortunately, I couldn't trace with DBMS_SUPPORT.START_TRACE_IN_SESSION, I understand that this is because it was only introduced in Oracle 11g.

how can i trace a session in level 4 on Oracle 10g for another session?

View 8 Replies


ADVERTISEMENT

Performance Tuning :: SQL ID And Text - No Record Being Found At Session Level

Feb 22, 2012

At my prod instance one sql query ran for about 9 hours.Now the sql query completed with success.Suddenly our ops team want to know the which sql query was running for 9 hours.As the query got success no record is being found at session level.

I know the SID.How Do I get the SQL query ?

View 4 Replies View Related

Performance Tuning :: New Trace File

Aug 11, 2011

I need to take the database trace of each page of my web application. I am giving the following commands.

BEGIN
dbms_monitor.session_trace_enable(session_id=>122, serial_num=>NULL, waits=>true, binds=>true);
END;

Accessing the web application. Once it renders completely, I am executing the following command.

BEGIN
dbms_monitor.session_trace_disable(session_id=>122);
END;

In the user_dump_dest folder, I am expecting to see a new trace whenever I execute these commands. But the same trace file is getting updated. How do I make oracle to create a new trace for each iteration. I am using Oracle 11g Release on CentOS 5.x

View 3 Replies View Related

Performance Tuning :: Regarding Trace File And TKprof?

Apr 10, 2013

i want to know about trace file and TKPROF. any example.

View 1 Replies View Related

Performance Tuning :: Elapsed Time In Trace File Output

Nov 16, 2011

I executed a query which executed quickly (1.7 seconds) but since its output took time in displaying on the console the time shown by 'set timing on was 39.5 seconds

also I took trace (tkprof) for the same.My query is why the timings under 'Total Waited' (43.19 and 1.69) are not added to the elapsed time 1.83 seconds

call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.06 0 10 0 0
Fetch 758 0.03 1.77 0 0 0 11345
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 760 0.03 1.83 0 10 0 11345
[code]....

View 1 Replies View Related

Performance Tuning :: Script To Load Trace Files Errors To A Table?

Jul 13, 2013

I need to create a script which can fetch the error related details from Trace files regularly (may be twice a day ) to a custom table in DB.

View 3 Replies View Related

Performance Tuning :: Real Time Speed Improvements And Auto-trace Results

Feb 4, 2011

I've got a query running a select count (*) over a table. The default plan takes in the order of 15 minutes to return, a hinted plan to use a different index takes 3 minutes to return.

Unfortunately I cant get at the index stats and a few other areas which I suspect may be key here.When running autotrace against the two queries I see fairly different values as one would expect.

Query

select count (*) from fulfilmentitem bfi where created >= sysdate-30 AND bfi.status = 'FA' AND bfi.fulfilmentmethod = 'D'
Slow run
PLAN_TABLE_OUTPUT
-----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
----------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 15 | 33119 (1)|
| 1 | SORT AGGREGATE | | 1 | 15 | |
|* 2 | TABLE ACCESS BY INDEX ROWID| FULFILMENTITEM | 12525 | 183K| 33119 (1)|
|* 3 | INDEX RANGE SCAN | IDX_FULFIL_METHODSTATUS | 250K| | 1786 (1)|
----------------------------------------------------------------------------------------------
[code]....

IDX_FULFIL_METHODSTATUS is across FULFILMENTMETHOD & STATUS in that order.
IDX_BFI_CREATED is on CREATED and is approx 70% of the size of the other index

The row counts estimated in the explain plan are out, the count(*) comes in at 32.8k rows.As you will have seen, the fast run shows a pretty significant consistent get increase compared to the slow run and a decent though not dramatic physical read drop.

My uncertainty is around if these changes in consistent get/phys read values would typically be enough to suggest the real time improvements I'm observing or if other (albeit perhaps temporary) factors are involved. It is a prod OLTP environment so the data will be rapidly changing and that may be a factor.

I know it can never be an exact science without intimately knowing the hardware/current loads etc but I also know that there's enough experience on these boards to have a loose handle on if the time shifts between queries are likely (or not) to be reflective of the stat changes or if those differences alone shouldn't (or typically wouldn't account) for it.

I'm thinking about instructing the query to ignore its original plan but am hesitant to do so without being a little more confident that it's not just a timing thing or something other than the change of index approach which may be causing the improvement. the autotrace stat changes observed I couldn't put my hand on heart say "yup - that change is good, ignore the default index all the time for this job".

View 11 Replies View Related

Performance Tuning :: Looking For More Than Last 16 Operations For Session

May 25, 2010

Doing some data conversion at the moment and using V$SESSION_LONGOPS to predict when the current task will be finished so I can run the next one.

V$SESSION_LONGOPS seems to have only the last 16 long operations for the session. Older operations are automatically purged. My bigger tables have 32 partitions, so after the first 16 are processed, I cannot tell which partition I am up to.

Googling "old longops" and "longops history" didn't work, nor did the same searches on this site. The Oracle Reference manual section on V$SESSION_LONGOPS did not mention that older entries are purged.

View 3 Replies View Related

Performance Tuning :: SID Column In V$SESSION?

Dec 12, 2010

Even though the users are not logged in why the V$SESSOIN shows the SID and why many times?

View 2 Replies View Related

Performance Tuning :: Compare Current Row Values With Previous One Until Mismatch

Nov 2, 2011

We have employee salary table which will have salary of an employee on daily basis (only working days). Below is the table structure:

emp_salary
----------
emp_id NUMBER(15) NOT NULL
effective_date DATE NOT NULL
salary NUMBER(15) NOT NULL
Primary key - emp_id, effective_date
This table is yearly partitioned

I have to find out how long the salary is not changed for an employee from given date, and last salary. I am using below query to do this:

WITH salary_tab AS
(SELECT effective_date, salary,
(CASE
WHEN (LAG (salary) OVER (PARTITION BY emp_id ORDER BY effective_date ASC) =
salary
)
THEN 0
ELSE 1
END
) changed_ind
FROM emp_salary
WHERE emp_id = 12345
[code]....

The cost of this query is 1677 and it is taking around 60 msec to complete. When I run this query for around 2000 employees in a loop it is taking around 3 minutes to complete.

The main bottleneck of this query is in the with clause where I am processing the entire history instead of stopping after first change.

View 7 Replies View Related

Performance Tuning :: TKPROF Output For Session

Jun 9, 2010

understanding the TKPROF output for the session that was executing an insert statement(inserting 70 lakh data) on which a row level trigger get fired and select from following table.The trace was run for 1 hour.

Table name - > GS_MAP_RCC_CCIT

This table is having 37 rows as in on single block and having primary key index on RCC_NUM that is also contained on single block.We are getting maximum wait events on db_file_sequential_read.

As per my understanding this is due to the contention for the same block because for each row these queries get fired.

View 14 Replies View Related

Performance Tuning :: Session Doing FTS Not Appearing In Longops?

Apr 4, 2012

dbo is a table with 1M records and structure similar to dba_objects

The following queries which does FTS, access same number of blocks as observed in v$session_longops

select * from dbo;
and
select * from dbo where object_type='VIEW';

Ex.
select * from dbo where object_type='VIEW';

select * from table(dbms_xplan.display_CURSOR(null,null,'ALLSTATS LAST'));

PLAN_TABLE_OUTPUT
-------------------------------------------------------------------------------------------
------------------------------------------------------------------------------
SQL_ID 5mh418w9stax2, child number 0
-------------------------------------
select * from dbo where object_type in('VIEW')

Plan hash value: 2675347415

-------------------------------------------
| Id | Operation | Name | E-Rows |
-------------------------------------------
|* 1 | TABLE ACCESS FULL| DBO | 77611 |
-------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

1 - filter("OBJECT_TYPE"='VIEW')

I understand that because the query is accessing large number of blocks which exceeds 6 seconds threshold, the session appears in v$session_longops And this has nothing to do with the time spent in displaying the records on the screen

Now, why the following query does not appear in v$session_longops?

select /*+ full(dbo) */ count(*) from dbo;

select /*+ full(dbo) */ count(*) from dbo;

COUNT(*)
----------
1006525

Elapsed: 00:00:01.36
dv3_erie-dev_08 >select * from table(dbms_xplan.display_CURSOR(null,null,'ALLSTATS LAST'));

PLAN_TABLE_OUTPUT
-------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------
SQL_ID 4mgjwp3tv70db, child number 0
-------------------------------------
select /*+ full(dbo) */ count(*) from dbo

Plan hash value: 1423969929

--------------------------------------------
| Id | Operation | Name | E-Rows |
--------------------------------------------
| 1 | SORT AGGREGATE | | 1 |
| 2 | TABLE ACCESS FULL| DBO | 1007K|
--------------------------------------------

The table has all nullable columns and thus I assume the index on ID can't be used for this COUNT Thus ideally it shall be accessing same number of blocks and thus shall appear in v$session_longops

View 6 Replies View Related

Application Express :: Kill Current Session When Another Session With Same User Starts

Nov 19, 2012

I have an urgent requirement to kill an existing session if a new session starts for the same user. I have been reading lot of blogs and posts on the above topic, but could clearly tell me how to do it.

I thought of putting a process in 101 page when login button is pressed to catch this and kill the old session.

View 7 Replies View Related

Performance Tuning :: How To Set Commit_write Parameter To (BATCH) In Another Session

May 16, 2013

How to set commit_write parameter to 'BATCH' in another session.

View 3 Replies View Related

Performance Tuning :: Session Tracing For Shared Servers

Jan 12, 2011

How to enable tracing for sessions connected using shared servers ?

View 1 Replies View Related

Performance Tuning :: How To Find Out Session Consuming High Resource In Past

Mar 28, 2013

How can I find out the particular oracle session which was consuming high memory in the past?

I can't get the data in v$sessstat
Unable to get the information in AWR

dba_hist_active_session_history do not have field which indicate memory related information
Shall I concetrate on EVENT in dba_hist_active_session_history which continuosly had sort, direct path read
Or
Locate sql_id from dba_hist_sqlstat with high SORTS_DELTA for snapshots belonging to problematic time period and then using the sql_id query dba_hist_active_session_history

which approach I shall take to find out the session which consumed most memory in the past?

View 8 Replies View Related

Sql Trace Session

Aug 28, 2012

i read some articals of how to trace oracle sessions and i have some question

i use database 10g

trace vs event ??? different between them ????

how to trace individual statement i hope to give me this point in ex: due to i can't get the sql_id ,how to know the sql_is of specify statement??

View 6 Replies View Related

Networking And Gateways :: TRACE LEVEL SERVER Off?

Apr 6, 2012

I am having 11.2.0.1.0 database with windows2k3 OS. For ORA-609 error i have started server side tracing by adding TRACE_LEVEL_SERVER=16,TRACE_LEVEL_DIRECOTRY=D:TRACE,and DIAG_ADR_ENABLED=off in sqlnet.ora file and i reload the listener.

Now i want to stop tracing so i have tried TRACE_LEVEL_SERVER=off but it wouldnot work. After that i remove TRACE_LEVEL_SERVER=16,TRACE_LEVEL_DIRECOTRY=D:TRACE from sqlnet.ora file and reload the listener but trace file generation is going on D:TRACE. stop server side tracing.

View 2 Replies View Related

Trace All The Session Generated From Schema?

Jan 25, 2013

Customer is running a Job from a Schema which is generating multiple sessions . I want the all the sessions to be traced from that particular Schema .

View 4 Replies View Related

Forms :: Make A Field As Mandatory At Current Record Level

May 27, 2010

I have one requirement i.e i want to make a particular item as mandatory for the current record in the tabular form.

so i have written code as below:

DECLARE
lv_item item;
BEGIN
lv_item := FIND_ITEM ('XXMZ_DETAIL.QTY_ACT');
SET_ITEM_INSTANCE_PROPERTY (lv_item,
current_record,
required,
property_true);
END;

This code is not effecting qty field. If i write set_item_property built-in that item becomes mandatory.But it's not effecting at current record level.It's effecting block level.

So how can i make a field as mandatory at current record level?

View 7 Replies View Related

Disable Archiving In Session Level Oracle 11g Rel 2?

Jul 30, 2013

I  just want to write some data  in a particular table,But  I  dont  want it  to be  archivedSo is  it possible to disable archiving in session level Oracle 11g Rel 2

View 3 Replies View Related

Forms :: 6i - Expiration Of Session-level Database Of Profiles

May 5, 2010

I have an application in Form 6i and I have implemented expiration of Session-level database of profiles, the problem I have is that I do not know in which time expired the session because it shows me no message and the application is open, try to do something and begin to get errors .

View 2 Replies View Related

Server Administration :: Displaying Session Level Parameters

Aug 9, 2013

A way to show session parameters? Such as

CONSTRAINTS
USE_STORED_OUTLINES
ROW ARCHIVE VISIBILITY
CURRENT_SCHEMA

I can detect the CURRENT_SCHEMA with a query against the user env context, but I can't find any of the others there. Could there be an issue with these values being stored in PGA, and therefore not visible though any regular views? I did find an article that showed a query against an x$ data structure which showed something for different settings of CONSTRAINTS, but I can't find it again.

View 4 Replies View Related

Dynamically Define Database Link To Use (at Session Level)?

Sep 1, 2010

Three databases: A, R1, R2. Database A is local and the other two databases are remote. Database A has one db link to each remote database (dblinkR1 and dblinkR2).

In some of my queries I need to get data from the remote databases, but the remote database to use depends on the application user, so, I would like to dynamically use one of the database links.

Something like this:

1 � user logs into the application;
2 � based on the user credentials the application defines the db link to use;
3 � query data using the defined db link.

(for example)

SELECT a.col1, a.col2 FROM table_A@dyndblink a ORDER BY a.col1;

@dyndblink would be a "pointer" to dblinkR1 or dblinkR1.

Is there a way to dynamically define the database link to use (at a session level)?

View 2 Replies View Related

Server Administration :: Find SID From Current Session As It Make Connection With DB

Dec 27, 2011

How to find the sid from v$session of my current session.

I want to ask:

Let say I have open 10 TOAD session and only in one toad session i have fired a sql query ( the rest 9 session are just blank), then the rest 9 status are in active status. Now, how i can figure out which sid ( from v$session ) belongs to which session as all the 9 session having nothing to run.

Quote: My main intention is to find out the current session sid as soon as it make connection with DB.

View 7 Replies View Related

Performance Tuning :: Tools For Database Tuning And Instance Tuning

Jul 12, 2010

Looking to understand the difference between instance tuning and database tuning.

What is the difference between these two tuning exercises? I understand that an instance is memory based structures (logical) where as database consists of physical structures.

However, how does one tune a database the physical structure? Does it have to do with file placements/block sizes etc. Would you agree that a lot of that is taken care by ASM now in 11g? What tools are required/available (third party as well as oracle supplied) for these types of tuning scenarios?

View 1 Replies View Related

Performance Tuning :: Merge Statement Tuning For 100M Records In Table?

Oct 31, 2011

I have two tables with 113M records in DWH_BILL_DET & 103M in prd_rerate_chg_que and Im running following merge query, which is running for 13 hrs to update records, which is quiet longer time.

SQL> explain plan for MERGE /*+ parallel (rq, 16) */
INTO DWH_BILL_DET rq
USING (SELECT rated_que_rowid,
detail_rerate_flag_code,
rerate_sel_key,

[code].....

View 39 Replies View Related

Performance Tuning :: How Length Of Column Width Effects Index Performance

Sep 30, 2010

How the length of column width effects index performance?

For example if i had IOT table emp_iot with columns:
(id number,
job varchar2(20),
time date,
plan number)

Table key consist of(id, job, time)

Column JOB has fixed list of distinct values ('ANALYST', 'NIGHT_WORKED', etc...).

What performance increase i could expect if in column "job" i would store not names but concrete numbers identifying job names.
For e.g. i would store "1" instead 'ANALYST' and "2" instead 'NIGHT_WORKED'.

View 24 Replies View Related

Performance Tuning :: Fragmentation Can Reduce Performance In Query Times

Jun 16, 2010

I have a question about database fragmentation.I know that fragmentation can reduce performance in query times. The blocks are distributed in many extents and scans process takes a long time. Oracle engine have to locate the address of the next extent..

I want to know if there is any system view in which you can check if your table or index has high fragmentation. If it's needed I will have to re-create, move or rebulid the table or index, but before I want to know if the degree of fragmentation is high.

Any useful script or query to do this, any interesting oracle system view?

View 2 Replies View Related

Performance Tuning :: Method Of Tuning Database - Row Reduction?

Oct 20, 2010

There is a simple way to increase the performance of a query by reducing the row-size of the table it hits. I used it in the past by dividing the table into smaller parts and querying respective smaller table in each query.

what is this method called ? just forgot the method and can't recall it. what this type of row-reduction optimization is called ?

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved