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


ADVERTISEMENT

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 View Related

Performance Tuning :: Snap IDs Not Found For Awr Reports Generation

Oct 24, 2011

When I want to generate AWR report for database, I dont see any Snap IDs. What was disabled?

Is it possible to generate awr reports for unseen snap IDs?

Here below is the log:
Current Instance
~~~~~~~~~~~~~~~~
DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
49472052 WPSDBSTG 1 wpsdbstg

Specify the Report Type
~~~~~~~~~~~~~~~~~~~~~~~
Would you like an HTML report, or a plain text report?
Enter 'html' for an HTML report, or 'text' for plain text
Defaults to 'html'
Enter value for report_type: html

Type Specified: html

Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
* 49472052 1 WPSDBSTG wpsdbstg rcolnx88700

Using 49472052 for database Id
Using 1 for instance number

Specify the number of days of snapshots to choose from
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Entering the number of days (n) will result in the most recent
(n) days of snapshots being listed. Pressing <return> without
specifying a number lists all completed snapshots.

Enter value for num_days: 1

Listing the last day's Completed Snapshots

Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap:

View 15 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 :: 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

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

Performance Tuning :: Index Creation On Text Column?

Oct 10, 2013

We have a table called address and having the address fields and city ,state etc. The table will store huge amount of data .We need to query on the table. I would like to know how can we fasten the query and improve the performance of the query by creating index on these columns...Query is given below . note that the nullable columns can have data

SELECT *
FROM address
WHERE address1 = 'a'

[Code]....

View 9 Replies View Related

Performance Tuning :: How To Control Concurrent Inserts Of Record By Parallel Sessions

Aug 7, 2012

There is a detail table

There is a summary table

During batch process record is entered in detail table as well as summary table.

The process first checks if record exists in summary table for same group_no and if 'yes' then "updates" the record with the newly added amount (sums it) else inserts a new record
Whereas in the detail table it inserts the record directly

detail table :
group_no doc_no amount
101 doc1 100
101 doc2 200
102 doc3 300
102 doc4 400

summary table :
group_no amount
101 300
102 700

Now if the batch process runs in parallel, (out of many) two different sessions insert same group_no; This is because while sesond session inserts a record, first session inserting the same record (group_no) has not yet committed ; So second session Not knowing that already there is same Group_no (101) inserted, again inserts another record with same group_no rather than summing it.

Can it be solved without using temp table, select for update?

View 4 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

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

How To Get Session / SQL Text Details Causing Excessive Archives Log

May 29, 2013

In my case , the archives are getting generating in excess count, how to get sql text/sid information.

View 2 Replies View Related

Connect By Level Using Field From Record Instead Of Constant?

May 20, 2011

I am generating a start date, stop date, count and frequency from data in one of my tables.

The result is as follows:

Id,RecType,RecCode,PeriodCode,StartDate,StopDate,Cnt,Freq

10S1M6/1/200711/30/20081812
10S2M11/30/20089/30/20091012
10S2Q11/30/20108/18/201134
10L8A6/1/20079/30/200931
10L8A11/30/20108/18/201111

From this data, I need a record for each individual month,quarter,etc.:

select y.*,MonthNo,Add_Months(StartDate,MonthNo*Frequency) from (
... Code to generate data ...
) y,(select rownum MonthNo from dual connect by level <= Cnt)

This returns ORA-00904: "CNT": Invalid Identifier. I don't get an error if I use a constant:

select y.*,MonthNo,Add_Months(StartDate,MonthNo*Frequency) from (
... Code to generate data ...
) y,(select rownum MonthNo from dual connect by level <= 3)

How can I get this to work using the "CNT" value instead of a constant?

View 7 Replies View Related

Forms :: Print Record At Block Level

May 1, 2013

I have problem i want to to display in message all the values of block in for example when i create the fourth record the three already records are show in message..actually first i want to in message than i would populate pl/sql table. the code is at block leve when-new-reocord-instance

************************************************************
declare
v_record number :=1 ;
v_cur_record number;
begin
v_cur_record :=:system.cursor_record;
[code]......

actually in block there are three record and this message should be display for the three time but the loop is executed more time.

View 25 Replies View Related

Server Utilities :: Sql-524 / Partial Record Found At End Of Datafile

Aug 1, 2010

I have an excel table whose data i have to transfer in oracle.

I did the following steps:

1) converted excel data in CSV format.

2) Created a control file test.ctl

LOAD DATA
INFILE 'C:IDB Price List.csv'
BADFILE 'C:IDB Price List.bad'
DISCARDFILE 'C:IDB Price List.dsc'
INSERT INTO TABLE idb_price_list
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
(group_no,type,description,amt,flag)

3) when i run the sql loader utility, i get an error "sql-524: partial record found at end of datafile"

View 5 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

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

Performance Tuning :: Performance Standard Edition Without Partitioning?

Jun 16, 2011

How many records could I have in a single table without performance degradation with Standard Edition without partitioning with cutting-edge server (8 or 12 cores, 72 GB RAM, FC 4 Gbit, etc...) and good storage?

300 Millions in only one table with 500K transactions / day is too much?

Simple database with simple schema.

How many records begin to be too many?

View 2 Replies View Related

Performance Tuning :: Procedure Performance On New Database Import?

Nov 15, 2010

Testing our 9i to 11g upgrade, we've imported the entire DB into the new machine.We've found that certain procedures are really suffering performance problems. BUT, we've also found, that if we check out a production copy of the procedure from our source code control, and reinstall it, the performance issue goes away. Just alter the procedure and recompiling does NOT work.

The new machine where the 11g database exists is slightly different than the source, but it's not like we have this problem with every procedure. It's only a couple.

any possible reason that we'd have to re-install a procedure to correct a performance problem?

View 13 Replies View Related

Performance Tuning :: Checking Delete Performance In Package

Apr 12, 2013

I need to check the package performance and need to improve the package performance.

1. how to check the package performance(each and every statement in the package)?
2. In the package using the delete statement to delete all records and observed that delete is taking long time to delete all the records in the table(Table records 7000000). This table is like staging table.Daily need to clean the data before inserting the data into it. what can I use instead of Delete.

View 13 Replies View Related

Performance Tuning :: Query Performance Gain Using Statistics?

Aug 9, 2010

Somewhere I read that we should not use hints in Oracle production environments, but we can use hints in the development environment and on achieving the desired execution plan we can adjust the 'statistics' to follow that plan without hints.

Q1. If it is true what statistics do we adjust for influencing the execution plan and how?

For example, I have the following simple query:

select e.empid, e.ename, d.dname
from emp e, dept d
where e.deptno=d.deptno;

emp.empid, emp.deptno and dep.deptno columns have indexes and the tables have the standard structure as found in the basic oracle examples.

If I look at the execution plan of the above query then I see that the driving table is empand the driven table is dept.Also the type of join that is taking place is 'Nested Loop'.

Questions: With respect to the above query,
Q 2. If I want to make dept the driving table and emp the driven table then how can I adjust the statistics to achieve that?
Q 3. If I want to use hash join instead of a nested loop join then then how can I adjust the statistics to achieve that?

I can put the ordered and the use_hash hint to effect this but again I have heard that altering statistics is a more robust way to control an execution plan as compared to hints.

View 6 Replies View Related







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