Tom Kyte

Subscribe to Tom Kyte feed Tom Kyte
These are the most recently asked questions on Ask Tom
Updated: 17 hours 57 min ago

Sql Execution Time v/s Elapsed time v/s CPU Time

Tue, 2018-06-12 10:06
Hello , I have been working on Database monitoring stuff where we are looking for long running queries in DB . From the inbuilt setup which i have received from DBA , its showing CPU_TIME and ELAPSED_TIME but none of them is matching with Oracle E...
Categories: DBA Blogs

what is read consistency

Mon, 2018-06-11 15:46
<i></i>Could you explain in your words what is Read consistence in Oracle 4.0 <i></i>
Categories: DBA Blogs

SESSION parameter shows different value

Mon, 2018-06-11 15:46
hi there As you guys suggested, last day i was trying to change process and session parameter values as follows, Everything gone perfectly. But after starting up the database, for the SESSION PARAMETER it shows me a value that i wasn't ex...
Categories: DBA Blogs

Listagg returning multiple values

Mon, 2018-06-11 15:46
hello, I am new to writing this kind of SQL and I am almost there with this statement but not quite. I'm trying to write a query using listagg and I am getting repeating values in the requirement column when I have 2 passengers. This is because...
Categories: DBA Blogs

Difference between Procedure and function(at least 5, if there are)

Mon, 2018-06-11 15:46
Difference between Procedure and function(at least 5, if there are) Seems like a basic question but its a very tricky question.. Some of the differences which I encountered on the internet seems incorrect later, I will list some of them below...
Categories: DBA Blogs

How to use conditional case with aggregate function

Mon, 2018-06-11 15:46
I have a query like the one below: SELECT CH.BLNG_NATIONAL_PRVDR_IDNTFR CASE WHEN CH.TCN_DATE BETWEEN TO_DATE('01-JAN-2016','DD/MM/YYYY') AND TO_DATE('30-JUN-2016','DD/MM/YYYY') THEN ROUND(SUM(CH.PAID_AMOUNT)/COUNT(DISTINCT CH.MBR_IDENT...
Categories: DBA Blogs

Conversion of Date format

Mon, 2018-06-11 15:46
I am having Column value as 'YYYYDDMM' and need to convert into 'DD/MM/YYYY' and store the data.
Categories: DBA Blogs

extract only two digit after fraction

Mon, 2018-06-11 15:46
For example, My query is following input data is in number format :- 123.456 and I want to see 123.45. Not need round off.
Categories: DBA Blogs

alter database noarchivelog versus flashback

Mon, 2018-06-11 15:46
SQL> alter database noarchivelog; alter database noarchivelog * ERROR at line 1: ORA-38774: cannot disable media recovery - flashback database is enabled
Categories: DBA Blogs

Can you Override USER built-in function ?

Mon, 2018-06-11 15:46
Hi Tom, Good Morning. My question may be naive, I'm not an Oracle expert. Can the USER built-in function be overridden ? Context: My current team has used Oracle for decades ( along with power-builder). We are now transitioning to a n...
Categories: DBA Blogs

SYSDATE and the At sign

Thu, 2018-06-07 01:46
Hello. I've seen this code <code>"sysdate@!"</code> used in a program, and i became curios, as I couldn't find any documentation of it. From what I saw, both give the same result: <code>select sysdate@!, sysdate from dual;</code> So my qu...
Categories: DBA Blogs

Is there a way to bulk collect into associate array in 10G?

Thu, 2018-06-07 01:46
Hi Tom. First of all, I just want to say thank you for creating such a forum. I have just started using Oracle and have learnt a lot from you here. Now, my question is as follows: Let's say I have a table with 3 columns: create table T (col1 n...
Categories: DBA Blogs

Declare a variable of type DATE using var

Thu, 2018-06-07 01:46
Tom, How do I declare a variable of type DATE in SQL*Plus? All I see is CHAR/NCHAR, VARCHAR2/NVARCHAR2, CLOB/NCLOB, REFCURSOR, NUMBER, BINARY_FLOAT and BINARY_DOUBLE. Thanks...
Categories: DBA Blogs

interpret trace file

Wed, 2018-06-06 07:26
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Windows NT Version V6.2 CPU : 12 - type 8664, 6 Physical Cores Process Af...
Categories: DBA Blogs

SQL statements inside AWR views

Wed, 2018-06-06 07:26
Hi Tom, I'm trying to find the history of executions for a given sql statement by using AWR views like DBA_HIST_ACTIVE_SESS_HISTORY, DBA_HIST_SQLSTAT, DBA_HIST_SQLTEXT, DBA_HIST_SQL_PLAN etc. I find the SQL_IDs for SQL by querying DBA_HIST_SQLT...
Categories: DBA Blogs

Display master child data as a set - from 2 different tables

Wed, 2018-06-06 07:26
Hi , I will be glad if you could help me in this. I have a Parent Table ( ORDER_HEADER ) and a Child table ( ORDER_LINE ). They are linked by order_id. ORDER_HEADER holds order details for customers and ORDER_LINE holds the child lines for ea...
Categories: DBA Blogs

Parsing a CLOB field with CSV data and put the contents into it proper fields

Wed, 2018-06-06 07:26
My Question is a variation of the one originally posted on 11/9/2015. parsing a CLOB field which contains CSV data. My delimited data that is loaded into a clob field contains output in the form attribute=data~ The clob field can contain up to 6...
Categories: DBA Blogs

process limit and sessions

Wed, 2018-06-06 07:26
Hi there, For the past few days,during the peak hours i am getting the following error in a frequent way " Listener refused the connection with the following error: ORA-12519, TNS:no appropriate service handler found " I googled it first,...
Categories: DBA Blogs

Which is default if session is interrupted - COMMIT or ROLLBACK?

Wed, 2018-06-06 07:26
Hi Tom, I use Oracle SQL Developer. I do not use autocommit and in normal situation I always use after some block of SQL commands (INSERT, DELETE etc.) COMMIT, or ROLLBACK. But what does happen if I do not finish this block of SQL command in...
Categories: DBA Blogs

Composite Range-Hash interval partitioning with LOB

Tue, 2018-06-05 13:06
Hi, I would like to partition a table with a LOB column using Range-Hash interval partitioning scheme. But I not sure how the exact partition gets distributed in this scenario and also I noticed following differences based on how I specify my p...
Categories: DBA Blogs

Pages