Unable To Find SQL Statement Of Blocker?

Jan 31, 2013

Oracle 10g. I want to find which sql statement was blocking others.

I know the sid of the blocker but I am unable to find the sql statement of the blocker.Also, when I check enterprise manager top activity only shows the waiter.

I tried to run the queries from below link, but it only shows the information about the waiting session.

[URL]

How can I find the sql statement of the particular sid from history ?

View 3 Replies


ADVERTISEMENT

Real Application Clusters :: Stored Procedure Killed Root Blocker In 10g?

Jan 30, 2013

I need the procedure that killed root blocker in RAC environmental 10g, I found the stored procedure for 11g which simple but 10g required some expertise because I want to just exec [procedure] it will kill root blocker either locally and remote node

View 5 Replies View Related

Unable To Find A Table?

Mar 22, 2011

why am i getting this?

SQL> SELECT TABLE_NAME,owner from dba_TABLES where TABLE_NAME in ('BSNL_ACCOUNT_DATA','BSNL_SERVICE_DATA','BSNL_PKG_DETAILS');

TABLE_NAME OWNER
------------------------------ ------------------------------
BSNL_ACCOUNT_DATA BPREAD
BSNL_SERVICE_DATA BPREAD

but the table exists

SQL> select count(*) from BPREAD.BSNL_PKG_DETAILS;

COUNT(*)
----------
3704

SQL> select TABLE_NAME,owner from dba_TABLES where TABLE_NAME='BSNL_PKG_DETAILS';

no rows selected

why is it showing no rows even if the table exists

View 3 Replies View Related

Find DDL Statement Executed On A Table?

May 19, 2011

I want to know the DDL statements executed on a table. Example:

i have a table test1 with structure as below: test1 (aa number, bb varchar2(10))

After some period of time, one DDL statement to alter the column is issued.

alter table test1 modify (bb varchar2(30));

so new table structure is: test1(aa number, bb varchar2(30))

Basically i would like to find these 2 DDL statements executed on this table - test1, so that i compare which column get modified and what modification done.

Is this information stored in any data dictionary table?

note - audit, flashback option not enabled in this database.

View 3 Replies View Related

Unable To Find Redo Log Files Specified?

Jul 15, 2011

I am creating database instance from template. I have specified the location of redo log files. When I run the dbca utility it does creates the redo log files in specified directory. But the installation fails . When I checked the trace file. it says unable to locate the specified file(redo.log). But when i check in directory they are created.

I am using windows 32 bit oracle 11g

View 1 Replies View Related

Performance Tuning :: How To Find Literal SQL Statement

Jan 30, 2012

Is there is any view/query from where I can find how many sql using literals.

View 4 Replies View Related

Windows :: Unable To Find DLL Library File

Nov 21, 2012

We are getting below error....Our one package called orawpcom.dll library file.

ERROR at line 1:
ORA-06520: PL/SQL: Error loading external library
ORA-06522: Unable to find library
'/oracle9i/app/product/11.1.0.7.0inorawpcom.dll'.
ORA-06512: at "GFSAM.OAINVOKEDOUBLE", line 1
ORA-06512: at "GFSAM.ORDCOM", line 229
ORA-06512: at "GFSAM.ORDEXCELSB", line 450
ORA-06512: at line 43
ORA-06520: PL/SQL: Error loading external library
ORA-06522: Unable to find library

Attach this orawpcom.dll file?

View 1 Replies View Related

Server Administration :: Cannot Find SQL Plan For Insert Statement

Dec 27, 2011

I can not find the sql plan for insert statement,why?

Select sql_text From v$sql a
Where a.SQL_ID = '0yungrk19a277';
-------------------------------
INSERT INTO OS_USERBILL_ACTV_READ_MON_DT
(MONTHNO, MAILCODE, OPERTYPE, PROVCODE, AREACODE, DAY_TOTALCOUNT, TOTALCOUNT,
CREATETIME, MODIFYTIME, SENDER_TYPE, SENDER_DOMAIN)
VALUES
(:B9 , :B1 , :B2 , :B3 , :B4 , :B5 , :B6 , SYSDATE, SYSDATE, :B7 , :B8 )
[code]....

View 4 Replies View Related

SQL & PL/SQL :: Merge Statement - Unable To Get Stable Set Of Rows In Source Tables

Sep 15, 2013

When I am executing merge statement I am getting the below error.

ORA-30926: unable to get a stable set of rows in the source tables

MERGE INTO TAN_LIST t
USING (SELECT * FROM (SELECT row_number () over (partition by TANNO order by null) rn,
dno,
TANNO,
SOL,

[Code]....

The query is fectching below data.

SELECT dno,TANNO,SOL,DESC,class,ct_dt,tcost
FROM MAT_LIST;
DNOTANNOSOLDESC CLASS CT_DT TCOST
63007565ADclass A A12345 08/28/131

[Code]...

Intially thers is no records in the TAN_LIST table. When I run the merge statemnt I am able to insert all 15 records into that table.

When I run the same merge statemment second time I am getting the below error.

ORA-30926: unable to get a stable set of rows in the source tables

So that I have used partition by cluase in the slect statement and I am able to resolve the error.

But it's inserting only 14 records not all 15. How to process all 15 records without the error..

View 16 Replies View Related

Server Administration :: ORA-01555 / Unable To Find Sql_id

Jan 25, 2012

I am getting below ORA-01555 error in alert log everyday.

ORA-01555 caused by SQL statement below (SCN: 0x09ad.86a4562a):
Sat Jan 21 08:39:45 2012
SELECT (NVL(MAX(BLOCK_ID + BLOCKS ),0) * :b1 ) / 1024
FROM DBA_EXTENTS WHERE TABLESPACE_NAME = :b2 AND FILE_ID = :b3

I cannot able to find the sql_id here. So how can I find from which process or session this query is firing? before increasing the undo size, I need to analyze as why it is occuring?

undo_management string MANUAL
undo_retention integer 900
undo_suppress_errors boolean FALSE
undo_tablespace string

View 9 Replies View Related

Find Data From Select Statement - Oracle 11g After Changing Connection?

Apr 3, 2013

Yesterday only I have Installed Oracle 11G & created DataBase - JafferDB And from Oracle SQL Developer, I have created a connection called - JafferCon and SID also given..and the role is - SYSDBA And I excute the below statement

insert into MyTable1 Values ('AAA1', 'BBB1', 'CCC1')
insert into MyTable1 Values ('AAA2', 'BBB2', 'CCC2')

Then I checked by Select statement, it has shown the values....No Problem.... But, as a test, I deleted the connection and created a new connection tio the same DataBase with different name and when I checked by Select Statement....., it has not shown the values....?

View 2 Replies View Related

Application Express :: Bug Report 4.2 (.1) - Unable To Find Item ID For P3500

Feb 28, 2013

1. On the Home Page, click the "Settings" wheel in the header of the Team Development region on the right side.
2. On the Home Page Preferences popup set "Show" to something else as "All" and click [Apply Changes]
3. Back on the Home Page, in the Team Development region on the right side, click the number next to "Bugs"
4. ERR-1002 Unable to find item ID for item "P3500_RELEASE" in application "4800".

View 0 Replies View Related

Server Administration :: Unable To Find Server Process In Oracle Database For Specific Application / Client

Feb 13, 2013

I am trying to find the unix process for one of my application in the database but I am unable to view the same. To simulate, I did the following.

1. My database runs on different server.
2. I invoked "sqlplus" from another unix box to login to the database.
3. I found that the process id (ps -ef |grep sqlplus).
4. When I execute the below mentioned query it does not display the process id that I am looking for. But the osuser, username, program and machine details are correct. How can I know the process details from the database?

SELECT SYS.GV_$SESSION.OSUSER, SYS.GV_$SESSION.USERNAME, SYS.GV_$PROCESS.SPID,
SYS.GV_$SESSION.MACHINE, SYS.GV_$SESSION.PROGRAM,
SYS.GV_$PROCESS.PROGRAM ,SYS.GV_$SESSION.SQL_ID
FROM
SYS.GV_$PROCESS, SYS.GV_$SESSION
WHERE
SYS.GV_$PROCESS.ADDR=SYS.GV_$SESSION.PADDR and SYS.GV_$SESSION.USERNAME='TEST'
and SYS.GV_$SESSION.MACHINE like '%hostname%'

View 3 Replies View Related

Variable Usage In Type Of Table Declaration Statement And Execute Immediate Statement

Aug 10, 2011

HOW to use variable P_TMPLID in following statement

TYPE typ_unrecon IS TABLE OF REC_' || P_TMPLID ||'_UNRECON%ROWTYPE index by binary_integer;

because its throwing error while compiling

and also in statement
FORALL i IN unrecondata.FIRST .. unrecondata.LAST SAVE
EXCEPTIONS
--STRSQL := '';
--STRSQL := ' INSERT INTO REC_' || P_TMPLID ||'_UNRECON VALUES ' || unrecondata(i);
-- EXECUTE IMMEDIATE STRSQL;
INSERT INTO REC_' || P_TMPLID ||'_UNRECON VALUES unrecondata(i);---throwing error on this statement
commit;
--dbms_output.put_line(unrecondata(2).TRANSID);
EXCEPTION

View 2 Replies View Related

SQL & PL/SQL :: Select Statement From Schemas In MERGE Statement In USING Clause

Sep 13, 2013

In the following merge statement in the USINg clause...I am using a select stament of one schema WEDB.But that same select statement should take data from 30 schemeas and then check the condition below condition

ON(source.DNO = target.DNO
AND source.BNO=target.BNO);

I thought that using UNIONALL for select statement of the schemas as below.

SELECT
DNO,
BNO,
c2,
c3,
c4,
c5,
c6,
c7
[code]....

View 5 Replies View Related

SQL & PL/SQL :: Select Statement Is Blocking A Delete Statement

Jan 11, 2012

I am using JDBC to run a few queries from my Java program (multi-threaded one).I am facing an issue where a select statement is blocking a delete statement. From the java code point of view, there are 2 different threads accessing the same tables (whith different DB connection objects).

When the block occurs (which i was able to find out from the java thread dump that there is a lock on oracle), the below is the output:

SQL> SELECT TO_CHAR(sysdate, 'DD-MON-YYYY HH24:MI:SS')
2 || ' User '||s1.username || '@' || s1.machine
3 || ' ( SID= ' || s1.sid || ' ) with the statement: ' || sqlt2.sql_text
||' is blocking the SQL statement on '|| s2.username || '@'
4 5 || s2.machine || ' ( SID=' || s2.sid || ' ) blocked SQL -> '
6 ||sqlt1.sql_text AS blocking_status FROM v$lock l1, v$session s1, v$lock l2 ,
7 v$session s2,v$sql sqlt1, v$sql sqlt2
8 WHERE s1.sid =l1.sid
9 AND s2.sid =l2.sid AND sqlt1.sql_id= s2.sql_id
AND sqlt2.sql_id= s1.prev_sql_id AND l1.BLOCK =1
10 AND l2.request > 0 AND l1.id1 = l2.id1 AND l2.id2 = l2.id2;
[code]...

From the above it can be seen that a select statement is blocking a delete. Unless the select is select for Update, it should not block other statements is not it ?

View 10 Replies View Related

SQL & PL/SQL :: Insert Into Statement Doesn't Insert All Rows Return By Select Statement?

Jan 12, 2011

If i inserted the values in table it gets inserting very few rows only.I dont know y it is?

View 15 Replies View Related

If Statement In Select?

Mar 22, 2013

simply select and works great:

select 'CARAT Issue Open' issue_comment, i.issue_id, i.issue_status, i.issue_title, i.ISSUE_summary ,i.issue_description, i.severity,gcrs.Area_name, gcrs.sector_name,

substr(gcrs.stream_name,1,case when instr(gcrs.stream_name,' (')=0 then 100 else instr(gcrs.stream_name,' (')-1 end) ISSUE_DIVISION,

case when gcrs.STREAM_NAME like 'NON-GT%' THEN 'NON-GT' ELSE gcrs.STREAM_NAME END as ISSUE_DIVISION_2

from table(f_carat_issues_as_of('31/MAR/2013')) i inner join v_gcrs_with_stream gcrs on i.segment_id = gcrs.segment_id

where UPPER(ISSUE_STATUS) like '%OPEN%'

Now I want to callte two columns:ISSUE_DIVISION and ISSUE_DIVISION_2

if they are equal in new columns should be value 1 if are not equal should be 0,how can I do it ?

View 4 Replies View Related

SQL & PL/SQL :: How To Get Statement That Causes Exception

Jul 17, 2011

I am using Exception when others then body end;

inside the body i can get SQLCODE and SQLERRM but I also need to get the SQL statement that caused the error and I dont know how.

View 39 Replies View Related

How To Use The NVL() Function In Statement

Mar 24, 2009

I have the following query.

sql

Original

- sql Code

SELECT class, COUNT (class)
FROM nv_table
WHERE l_id IN (
SELECT l_id
FROM n_table
WHERE id IN (1234)
GROUP BY class
ORDER BY class

SELECT class, COUNT (class) 
FROM nv_table 
WHERE l_id IN (          SELECT l_id            FROM n_table           WHERE id IN (1234)   
GROUP BY class   
ORDER BY class

It returns two columns: class and the total number of values in that class.

In some cases, there might not be any values under a certain class, so the query won't return anything.

In such a case I want the query to return 0. So what I want to see is:

class:A, COUNT(class):0

I'm trying to use the NVL function here, but either it doesn't work in this context, or it's not the correct syntax the way I'm writing it.

sql

Original

- sql Code

SELECT class, NVL(COUNT (class), 0)
FROM nv_table
WHERE l_id IN (
SELECT l_id
FROM n_table
WHERE id IN (1234)

[Code]....

View 3 Replies View Related

SQL & PL/SQL :: Group By Statement

Oct 27, 2011

SELECT COUNT(c.country_id)
FROM countries c,
employees e,
locations l,
departments d

[Code]....

I really dont know when and where to use the group by statement from the query above when I added C.country name before the word from I'm always getting this error "ORA-00979: not a GROUP BY expression"

View 12 Replies View Related

SQL & PL/SQL :: Not In Condition In IF Statement?

Sep 19, 2011

I need to check somewhere in the code as " Check the variable with in 20 varaiables , if not excute somes statements"

Example

a1=20,a2=30,a3=40......a20=200; (Like this way i have 20 varaibles with values)
v1=150;
if( v1<>a1 AND V1<> a2 AND V1 <> a3...... AND V1<>20)
execute some insert block;
End if;

But it's writting very diffcult as i need to compare with 20 varaiables.Was there any alternative sloution like taking some VARRAY and checking in IF condition like v1 NOT IN(Va) (Where 'Va' is like VARRAY)

View 13 Replies View Related

SQL & PL/SQL :: DML Statement For Oracle

May 20, 2010

I have a table which has 4 varchar columns( col1, col2,col3, col4). There is data in the table for col1,col2,col3 and col4 is a newly added column. I want to concatenate values from col1,col2 and col3( comma separated) and put it in col4( as col1,col2,col3). Note that col1 or col2 or col3 can have null values and the concatenation should ignore null.

Is it possible to do it in a single SQL statement or should I use a procedure to do this?

View 6 Replies View Related

SQL & PL/SQL :: Insert Statement?

May 13, 2011

I have one query i have create one table T1 in this table i have this three colm (EMPNO,ENAME,HIREDATE) and i have to insert raw from this two table T2 and T3 in T2 table colms are (EMPNO,SAL) and T3 table colm are (EMPNO,MGRID) so which query i have to run

View 4 Replies View Related

PL/SQL :: Creating (If-Else) Statement?

May 2, 2013

We make a 'SELECT' and then create a file with the results and send it by email... what we want to do is , if there are no results from that select , not sending the email neither creating the file..

View 5 Replies View Related

SQL & PL/SQL :: Update Statement (lag)

Aug 10, 2011

I have a table zTest with several products:

create table zTEST
( PRODUCT number,
ID number,
Flag number,
FLAG_L1 number );

[Code]...

The field FLAG_L1 is the field FLAG with a Lag 1 (order by ID, partition by PRODUCT). I want to write the field FLAG_L1 in an update statement, how can I do this?

View 7 Replies View Related

PL/SQL :: NVL Statement For All Datatypes

May 2, 2013

On DB 11.2. I am dynamically building a DB after update trigger that compares old/new column values. I wanted to include a nvl statement in my if conditions as some field values may be blank.

Since I have many different datatypes (varchar,date,number,blob,clob), is there a single nvl comparison I can use that will work against all of these? I was hoping not to have to check the datatype and change my nvl comparison depending on what type it is. i.e.

nvl(x,'1') or nvl(mydate,sysdate)

View 21 Replies View Related

Flow Of Statement Processing?

Apr 18, 2013

SQL Statement Processing Steps:
1. Create a cursor.
2. Parse the statement.

parsing (syntax check, semantic check, privilege check, allocate private sql area, shared pool check (library cache check shared sql area. Here is hard or soft parse)SQL queries submitted to the system first run through the parser, which checks syntax and analyzes semantics. The result of this phase is called a parsed representation of the statement.

This parsed representation is then sent to the optimizer, which handles three main functionality:Transformation, estimation, and execution plan generation.

3. Describe query results.
4. Define query output.
5. Bind variables.
6. Parallelize the statement.
7. Execute the statement.
8. Fetch rows of a query.
9. Close the cursor.

- What stages from the above are included in the 'Query Optimizer Stage'
- Is the parse tree created after doing both syntax check and systematic check as I found notes where they mention it was done before symantic check
- What stages are skipped when doing soft parse vs hard parse
-when mentioned parsed representation, is that the same as parse tree.

I am just trying to understand more the flow of the query processing.

View 1 Replies View Related

SQL Statement To Remove Extension

Oct 15, 2008

I have a file name field in my database that stores each file name with the extension .TXT and almost each file name is different.I would like to remove this extension from all of the file names without using the different file name each time I update. Is there any SQL statement that will allow me to do this? I am using Oracle.

View 1 Replies View Related

Creating A Trigger Within If-else Statement

May 25, 2012

I would like to create a trigger on a table, but only if the table exists.

This is what i've got so far:

create or replace function tableExists (tablename in varchar2) return boolean
is
c int; 
begin    

[Code].....

This would give me the error:

PLS-00103: Encountered the symbol "CREATE" when expecting one of the following: ( begin case declare exit for goto if loop mod null pragma raise return select update

View 1 Replies View Related







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