SQL & PL/SQL :: Monitoring Database For Resource Intensive Queries

May 31, 2012

I am database developer and suddenly i have been given a DBA work. I have to monitor database for resource intensive queries , whether i/o is more , process memory and many other stuffs.

Provide me some sql queries or scripts which shows that process are over loaded and memory needs to be allocated, queries are taking long time , i/o operation are more instead of memory.

View 1 Replies


ADVERTISEMENT

Using DBMS_sqltune Package To Tune Some Resource Intensive Queries

Dec 8, 2010

I am using dbms_sqltune package to tune some resource intensive queries. In this I am looking to know how Sql profile works

I created task for one sql using dbms_sqltune, then in Report it was recommended to accept its sql profile (which will potentially benefits 65%)
then accepted that sql profile with

exec dbms_sqltune.accept_sql_profile(task_name => 'pc1_61d2dhmdwzc8d', replace => TRUE);

and re-executed same query but NO difference in time. Then, what that mentioned potentially benefit 65% is about.

1) Originally query is taking 10 sec to execute, with this 65% i thought that it will execute within 3-4 sec. Is it right?
2)Also, the query for which i have created tuning task has some hardcoded input values, what if i change input values next time, will that profile works with new input values?

FINDINGS SECTION (1 finding)
-------------------------------------------------------------------------------
1- SQL Profile Finding (see explain plans section below)
--------------------------------------------------------
A potentially better execution plan was found for this statement.

Recommendation (estimated benefit: 65.17%)
------------------------------------------
- Consider accepting the recommended SQL profile.
execute dbms_sqltune.accept_sql_profile(task_name => 'pc1_61d2dhmdwzc8d',
replace => TRUE);

View 2 Replies View Related

How To Know Database Shutdown Without Monitoring

Nov 23, 2010

The Database is Shutdown, no user is complaining about it and also you are not monitoring it through alert log file, then how will you, as a DBA, come to know about it?

View 2 Replies View Related

Monitoring Oracle Database

Aug 20, 2010

Whats is the best Tool for monitoring ORACLE DBs ?

I've heard about Toad, Spotlight, and of course The EM from Oracle..but i know there some other tools that i maybe don't know.

View 1 Replies View Related

Database Monitoring And Report

Aug 31, 2012

I'd like to start monitoring the customer's database. I need a tool to monitor database's performances and I also need to run day by day a series of queries that produce control reports.

I'd like the tool alerts me by email if something goes wrong.

View 4 Replies View Related

Performance Tuning :: Call From Specified Machine Not Assigned To Database Resource Consumer

Sep 6, 2013

I am using Release 11.2.0.3.0 - 64bit Production version of oracle. Now we are having 3-tier architecture, (firewal/web/app/DB).Now i saw , some of the 'sql' queries, running till ~10hrs in my database and those are part of application(module JDBC THIN CLIENT). After had a talk java guys, they ask to kill the sessions specific to those queries. They are part of search TO, in which user put some large values for the date range and went to other TAB, but these queries gets running infinitely in the database, and user is not interested in the result set.

So how to avoid these things, as because in past, our database has suffered resource contention leading to application slowness. So i was planing to set different timeouts using 'database resource consumer group' for online user request and batch request depending on the app server(that is by machine names) request.

So i have done below set up in my local to test one scenario, in which i will try give a database call from difference machine, and it should get timeout after the specified duration. But its not working , as expected. The calls from the specified machine are not getting assigned to the created 'Consumer group'.

Begin
-- create the pending area
dbms_resource_manager.create_pending_area();
END;
/
BEGIN
-- Create the consumer group

[code]....

After this when i am verifying calls from machine, 'LR9XY7T8' they are belongs to the consumer group 'OTHER_GROUPS' and sql query not getting timed out within 60 seconds as mentioned.

View 9 Replies View Related

Script For Monitoring Database Buffer Cache

Mar 26, 2012

give a script to find how much my db buffe cache and redo log buffer cache is used and how much is free.

View 1 Replies View Related

Monitoring Of Prod Database Using EMCA Control

Apr 23, 2013

11.2.0.1

I am monitoring out PROD database using EMCA database control.

Under "Performance" tab I check the AVERAGE ACTIVE SESSION and I see spikes of "CPU concurrency". (figure emca1)

figure: emca1>

[URL].......

I want to investigate what causes this "spike" in cpu so I drill it down further:

figure: emca2>

[URL]........

Then figure drill down further:

figure: emca3>

[URL].......

But I can not understand what causes the spike thing.

View 2 Replies View Related

Performance Tuning :: Tools For Monitoring Load Of Database?

Dec 3, 2010

which tools are available for monitoring load of the database?

View 4 Replies View Related

Enterprise Manager :: Monitoring Standby Database Using Grid Control

Mar 3, 2008

I'm monitoring and all my databases using grid control. Recently I added a dataguard configuration but the standby database shows me a lot of error simple because it's in MOUNT state. how I should configure grid control or the standby database so the errors disappear?

View 7 Replies View Related

Enterprise Manager :: Unable To Apply Monitoring Template On Database Instance

Sep 13, 2011

I have to apply monitoring template on my databases. Databases are already added and configured into OEM. They are visible under Databases tab and also under Groups where I have added them.

But when I try applying monitoring template and look for database in search window, it doesn't appear there.

View 1 Replies View Related

Converting MySQL Queries To Oracle Compatible Queries

Jan 23, 2007

our system has always been running on mysql database and recently we have switched to oracle. As the current system is coded using mysql query syntax, when i run this program using oracle database, i got a error. The language that I'm using is JSP.

this is the error message:

The following query could not run on oracle. To convert these mysql queries to oracle compatible queries.

SELECT productID,productName FROM products order by productName;

select newsID,newsDate,newsHeadLine1 from news order by newsDate Desc limit 3

SELECT fuji_products.productID, productName_Display FROM products,products_availability where products_availability.productID=products.productID and (product_status='enabled' or product_status='all') AND category='12'

SELECT catID, catSub1 from category where catSub = '"+ prodCat +"' AND catSub1 is not null group by catSub1 order by catSub1

View 6 Replies View Related

Security :: Queries Run By Database Auditors?

Sep 10, 2012

what sort of queries IT auditors run against the database? assist me wit these so that I can run them before hand in order to sort out any security vulnerabilities which we might potentially have prior to this being picked up by external auditors?

View 2 Replies View Related

How To Embed PL/SQL Queries In HTML In Database App Development VM

Nov 20, 2012

I'm reading "Learning Oracle PL/SQL" and this book tells me that if I can install apache httpd and modplsql I can embed queries in HTML. How do I do this in Database App Development VM? Do I already have apache httpd installed? Is it already started? If not, how do I start it?

What am I getting when I point my firefox browser to

[URL].......

I'm getting a nice web page that is prompting for username and password. What username and password do I use? oracle/oracle did not work! What does this web site do? Administer the database server?

I already tried to use "yum install emacs" as I mentioned in Re: How to Install emacs, openssh and start oracle database and get a connect? and it appears that the repository for "yum" is not correct.

"yum install httpd" does not work either.

When I tried "sudo yum install httpd" it says

"Sorry, user oracle is not allowed to execute '/usr/bin/yum install httpd' as root on localhost.localdomain."

I get the same message for "sudo yum isntall emacs".

View 2 Replies View Related

Data Guard :: How To Tune SQL Queries For A Standby database

Nov 19, 2012

We know and perform lots of tuning stuff on our databases, mainly on primary side.

but the set of queries running on standby databases (like to use for reporting purpose) are totally different from one running at primary.

so How can we tune out our Standby DB to perform well ?

View 6 Replies View Related

PL/SQL :: Lag Function Cost Almost All Of CPU Resource

May 24, 2013

select *from v$version where rownum=1;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

prepare data:
CREATE TABLE a AS SELECT LEVEL ID ,decode(mod(LEVEL,10),1,'CODE'||LEVEL) CODE from dual CONNECT BY LEVEL<20001;

sql1:
CREATE TABLE TEST AS
SELECT ID,
NVL(CODE,LAG(CODE ignore nulls) OVER(ORDER BY ID )) CODE
FROM a;

the sql is slow,most of the waits on session is resmgr:cpu quantum and almost all of the cpu resource is occupied

sql2:
CREATE TABLE TEST AS
SELECT ID,
NVL(CODE,last_value(CODE ignore nulls) OVER(ORDER BY ID ROWS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING)) CODE
FROM a;

this sql is fast

How lag function is implemented if the offset is not deterministic?

View 10 Replies View Related

Server Administration :: CPU Use With Resource Manager

Sep 21, 2011

I have a question:

With this plan active
PLAN GROUP_OR_SUBPLAN TYPE CPU_P1 CPU_P2 CPU_P3
x_PLAN x_APP_GROUP CONSUMER_GROUP 75 0 0
x_PLAN x_BO_HIGH_GROUP CONSUMER_GROUP 10 0 0
x_PLAN x_BO_LOW_GROUP CONSUMER_GROUP 5 0 0
x_PLAN OTHER_GROUPS CONSUMER_GROUP 10 0 0

if there is only an user of X_APP_GROUP that is working in a specified moment, he will use the 100% of CPU or il will be limited at 75% as specified in the plan?

View 1 Replies View Related

Security :: Resource Access Descriptor And SSO

Sep 22, 2010

I am trying to get to where I can add a RAD (Resource Access Descriptor) to allow connection to an oracle database. Right now I have "No Configuration Privilege" when logging onto Oracle Identity Management.

How to I get to the configuration tab? What privilege do I need?

View 1 Replies View Related

SQL & PL/SQL :: Truncate Partition - Resource Busy?

Sep 1, 2010

i have one procedure that run at same time for two different partition.In the begin of the processes i do the truncate partition and after that the insert of data in the partition.Since i have two processes running at the same time, i will fill up data in two different partition.

But it occurred one error :
"ORA-00054: resource busy and acquire with NOWAIT specified"

The problem is caused by the truncate partition. I'm doing two simultaneous execution of the same process, but when one process is doing the truncate other is insert data.How can i do the truncate of this two partition, or insert in to, without get any error. I think the two simultaneous insert is not a problem.

So how can i lock the table in the first truncate and after that release the table for the next truncate?

View 5 Replies View Related

RAC & Failsafe :: CRS-0215 / Could Not Start Resource

Oct 31, 2008

I want to change the processes parameter in RAC system.I am using spfile.I have ASM environment and two instances.

I followed the below steps from first server but i m getting error.

1) connected as sys user
2) alter system set cluster_database=false scope=spfile sid='<firstinstanceid>';
3) exited from oracle
4) stoped second instance from linux.
$ srvctl stop instance -d <DBname> -i <secondinstanceid>
5) Again i connected as sys user.
6) create spfile from pfile;
7) shutting down the db and started.

[code]....

But second instance is not starting and it is giving error.

PRKP-1001 : Error starting instance <sencondinstanceid> on node st-habam-db2

CRS-0215: Could not start resource 'ora.<DBname>.<secondInstanceid>.inst'.

View 5 Replies View Related

SQL & PL/SQL :: Resource Busy While Creating Constraint

Apr 6, 2012

i am working in scott's schema and i want to create foreign key on new table that is "test" table ,structure is----

create table test(id number, name varchar2(20),dno number,pno number);

and now create a foreign key on id column of "test" table reffering the empno of "emp" table which has pk already. but it shows an error-------"ora-ORA-00054-resource busy and acquire with NOWAIT specified or timeout expired"

while i have create the "test" table just 1 min ago.

View 3 Replies View Related

SQL & PL/SQL :: Loading Java Resource In 11gr2?

Jun 5, 2013

am trying to load java resource in oracle llgr2 using load java. It shows resource loaded but I am not able find it in database dictionary. I configured JVM also on database and gave all the neccessary grants. whenever I am trying to encrpt it give me

SQL> HOST loadjava -u scott/scott1234@mock -v -resolve /data1/Encrypt/javasp/KeyAccess.class
arguments: '-u' 'scott/***@cmsmock' '-v' '-resolve' '/data1/Encrypt/javasp/KeyAccess.class'
creating : class javasp/KeyAccess
loading : class javasp/KeyAccess

[code]...

below are the db version details

SQL> select banner from v$version
2 ;
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for IBM/AIX RISC System/6000: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production

View 2 Replies View Related

Oracle Resource Busy - ORA-0054 Error

Jul 21, 2010

A batch job was running for a long time which executes a stored procedure that was doing physical deletes on an oracle table. This job ran for about 3 hrs and is still executing. Meanwhile another job(which was making indexes unusable in another table) has cancelled saying "resource busy and acquire with NOWAIT specified", i think it was ORA-0054! So i killed the first job and reran the second thinking the first one was taking up resources which resulted in the cancel of the second job. Now the second job ran successfully. Both these tables are not related to each other whatsoever...but why was there a cancel?

View 6 Replies View Related

PL/SQL :: Resource Planning And Jobs Grouping In Oracle

Mar 20, 2013

I have a requirement where I need to group sessions which takes time as given below when ran individually .There are a total of 32 sesions.I want to divide them into 7 groups.I want to submit each one of the 7 groups in a job.So there will be seven jobs on the whole.Execution flow will be group 1 completes ,then group 2 starts like that.Actually I don't want to bombard the database at a time with 32 jobs ,hence the idea of grouping 32 jobs among 7 groups.grouping the sessions so that on the whole ,resources are equally allocated among sessions in a group and which in turn makes the process complete faster. I want to achieve parallelism but at the same time database should not be loaded too much.I just want to know is there any good practice from oracle side while doing this type of grouping. I am planning to group the most time taking one with least time taking jobs.

S.NO     Session_Name     DURATION(HH:MM:SEC)
1     Session_1     00:11:56.202368
1     Session_2     00:00:00.058542
1     Session_3     00:00:00.055205
1     Session_4     00:00:00.043454
1     Session_5     00:00:00.039994
2     Session_6     00:08:05.786031
2     Session_7     00:00:00.579035
2     Session_8     00:00:00.537957
[code]...

View 0 Replies View Related

Getting ORA-00060 - Deadlock Detected While Waiting For Resource While Deleting Datafile?

Nov 18, 2010

I am getting "ORA-00060: deadlock detected while waiting for resource" while deleting a datafile.

when i checked in dba_data_files and V$datafile the ONLINE_STATUS/STATUS is in RECOVER mode.

I do not need this datafile so i tried to drop using the following command ..

ALTER TABLESPACE DATAP_LARGE DROP DATAFILE 'D:\ORACLE\ORADATA\DATAP\DATAP_LARGE_12.DBF';

I checked the Trace file geenrated for the deadlock, the Session which is in question is the session where i ran the command (SQLPLUS).

View 8 Replies View Related

Getting Deadlock Detected While Waiting For Resource Error For Select Query

Nov 4, 2013

i am getting a below error whenever executing the below select query. some times it will show dead lock detected while waiting for resource and terminated...some times it executes and gives result..but all the time it writes an alert to alert log 

Env: Linux / Oracle 11.2.0.3.3..Error from alert log:Errors in file /u01/oracle/oracle/diag/rdbms/bdrdb/bdrdb/trace/bdrdb_p017_6076.trc:ORA-00060: deadlock detected while waiting for resourceORA-10387: parallel query server interrupt (normal)  Trace file info... bdrdb_p017_6076.trc:Trace file /u01/oracle/oracle/diag/rdbms/bdrdb/bdrdb/trace/bdrdb_p017_6076.trcOracle Database 11g Enterprise Edition Release 11.2.0.3.0 - ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsORACLE_HOME = /u01/oracle/oracle/product/11.2.0/dbhome_1System.
[code]....

View 11 Replies View Related

Performance Tuning :: Why There Is No Row Resource Operation Information In Tkprof Output

May 13, 2011

why there is no "Row Source Operation" information when I trace a long and complicated SQL query (It takes at least 25 minutes ro run)?

However, I can get the "Row Source Operation" information for a simple SQL Query.

Here are the tkprof output for a simple query and complicated query:

tkprof Output for a simple query
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 13 0.00 0.00 0 16 0 173
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 15 0.00 0.00 0 16 0 173

Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 3139

Rows Row Source Operation
------- ---------------------------------------------------
173 TABLE ACCESS FULL MY_TABLE (cr=16 pr=0 pw=0 time=0 us)

Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 13 0.00 0.00
SQL*Net more data to client 24 0.00 0.00
SQL*Net message from client 13 5.33 5.47

Tkprof output for a complex query
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.38 0.40 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 0 0.00 0.00 0 0 0 0
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 2 0.38 0.40 0 0 0 0

Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 3139

No Row Source Operation information here Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 1 0.00 0.00
db file sequential read 73062 0.25 692.23
db file scattered read 16099 0.18 76.65
latch: shared pool 4 0.02 0.03
latch: cache buffers chains 3 0.04 0.04
latch free 16 0.00 0.00

View 1 Replies View Related

Alert Log Monitoring?

Jul 23, 2012

I'm using this logic to avoid specific error.Does not seem to be working fine. Any other method to exclude perticular error from monitoring.

if [ -n "$line_no1" -o -n "$line_no3" ] ; then
cat $script_loc/alrt_chk.log | grep -i "ORA-" > $script_loc/ora_alert_only.log
#----
echo "Entering in while Loop"

[code]...

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

Intermediate State / Check Cluster Resources By Srvctl Status Resource

Oct 17, 2013

We are in 11gR2 in windows 2008. Our database is 2 nodes rac. I got alert message below.

Host=xxxx.xxxx.xxxx.xx.xxTarget type=Cluster Target name=ora-scan Message=ora.registry.acfs has 1 instances in INTERMEDIATE State Severity=Warning Event reported time=Oct 17, 2013 6:40:45 AM EDT Operating System=Windows Platform=x64 Associated Incident Id=xxxx Associated Incident Status= New Associated Incident Owner=SYSMAN Associated Incident Acknowledged By Owner=No Associated Incident Priority=Low Associated Incident Escalation Level=0 Event Type=Metric Alert Event name=resource_status:crs_event_composite_status Metric Group=Resource StateMetric= State ChangeMetric value=PARTIALLY_INTERMEDIATEKey Value=resource_ora.registry.acfs.type_ora.registry.acfsKey Column 1=KeyRule Name=EDC - Metric Alert,Warning Rule Owner=SYSMAN Update Details:ora.registry.acfs has 1 instances in INTERMEDIATE State Incident created by rule (Name = EDC - Metric Alert, Warning; Owner = SYSMAN).

I did check the cluster resources by srvctl status resource -t and all of resources are in online and none of them i saw in intermediate state. Is there any other command and option to investigate this error?

View 6 Replies View Related







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