Tom Kyte

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

Compile_Error when refreshing a Materialized View from a procedure

Fri, 2016-09-23 04:46
We have Materialized Views which reference tables in other schemas. We can refresh/compile the Materialized Views from the command line however when we refresh/compile the Materialized View from within a procedure the job immediately aborts with...
Categories: DBA Blogs

Practise question

Fri, 2016-09-23 04:46
Hi, I was practicing some question on sql challenge about dml operation using multiple tables and got some doubt. CREATE TABLE plch_departments ( department_id INTEGER PRIMARY KEY, department_name VARCHAR2(30) ) / CREATE TABLE p...
Categories: DBA Blogs

Optimiser Trace

Fri, 2016-09-23 04:46
Hi Tom, A tricky question, recently we upgraded our systems to 11.2.0.4 and started to observe some queries taking much longer (from mins to 10+ hours). On analysing the taces / explain we found the access path had changed from the previous one, so...
Categories: DBA Blogs

Converting an EE DB 12.1.0.2.0 to SE DB 12.1.0.1.0 - Version - empty table

Fri, 2016-09-23 04:46
Hi, Im trying to convert EE 12.1.0.2.0 to SE 12.1.0.1.0 with expdp/impdp. I've found example of converting EE 11.2.0.1 to SE 11.2.0.4 where it is stated: "During import to standard edition we must use keyword VERSION=11.1 to be able to import e...
Categories: DBA Blogs

use of application error

Thu, 2016-09-22 10:26
Hi , I wanted to know is pragma exception init and raise_application_error does the same thing? I wanted to know what is the difference? Also, I wanted to know what is the use , if I place my exception declaration in the package specificat...
Categories: DBA Blogs

Intermittant ORA-08103: object no longer exists

Thu, 2016-09-22 10:26
In a batch job (in java), I am getting the below error details while reading the data (in a batch job). And this error is intermittant with one table on first run and in later runs the table keeps on changing. Before every job run, i will truncate th...
Categories: DBA Blogs

2 level subqueyries and problem select function result

Thu, 2016-09-22 10:26
Hello everybody, I've 2 problems with on 2 queries : 1) The following query <code>with pres as ( select t1.IDPROD AS spe1 , t2.IDPROD AS spe2 ,t1.INDICELIGNEPRESCRIPTION as id_ligne_1,t2.INDICELIGNEPRESCRIPTION as id_ligne_2, ...
Categories: DBA Blogs

SQL Query

Thu, 2016-09-22 10:26
Hi Tom, I have a table like this create table temp1 (f_name varchar2(100), f_date date, f_amount integer ); Records in this table will be like this: Ajay 15-JUL-02 500 Bhavani 15-JUL-02 700 Chakri ...
Categories: DBA Blogs

DBMS_ADVANCED_REWRITE

Thu, 2016-09-22 10:26
Tom, I was trying to tune one of the sql written in Ansi syntax without toughing using dbms_advanced_rewrite API. but ended up with the below error, Can you help me what i am missing here? <code> rajesh@ORA10G> declare 2 l_src long; ...
Categories: DBA Blogs

DB Time

Tue, 2016-09-20 21:46
Hi Tom, I have been reading your questions/answers thread and like it. Want to ask you one simple question. Database Time= CPU Time +Non-Idle Wait; I see in my database, CPU Time is more all the time and Non-Idle Wait is less. say for exampl...
Categories: DBA Blogs

Materialized View

Tue, 2016-09-20 21:46
Hello Tom, What are the best practices with MV - <1> a) generate MV on the DB that owns base tables - and refresh MV and populate over the DB links to other DB's or b) Pull data from the source DB over the DB link and populate the MV from...
Categories: DBA Blogs

dynamic pl/sql - ora-00922

Tue, 2016-09-20 21:46
Hi Tom, I need to use dynammic sql in a stored procedure. I created an anonymous block to test it. The code fails at execute immediate with ORA-00922. But, when I run the code generated by the block, it works. Why doesn't it work in an anonymous bl...
Categories: DBA Blogs

Importing data from file to oracle databse via command prompt

Tue, 2016-09-20 21:46
Hi Experts, I am trying to load data from file into oracle database via command prompt throwing error like IMP-00038: Could not convert to environment character set's handle IMP-00000: Import terminated unsuccessfully I installed oracle 11g...
Categories: DBA Blogs

Listener Error Related on Web Server

Tue, 2016-09-20 21:46
Hello Chris, Conner and Tom, I am building two Apache/jBoss servers. These servers are connected to an Oracle database server version 12.1.0.1.0 on Windows 2012. 1. Web server one: The website is up and connected to the database. However, the ...
Categories: DBA Blogs

Is ROWNUM=1 on queries makes them faster all the time ?

Tue, 2016-09-20 21:46
Hi Chris/Connar, I have been checking on lot of contents in the Internet to find a "Simple Answer" for this and my final resort is AskTom. For tuning of the our PLSQL programs for our various application we have been using "ROWNUM=1" co...
Categories: DBA Blogs

Oracle EXISTS clause

Tue, 2016-09-20 21:46
Hi Tom, I have recently joined a new organization. Here I am facing performance issue for one of my stored procedure. The problematic sql in my procedure is, <i>SELECT iCustomerGroupSeqNo FROM Col_Cur_AgreementAlloc CCAA,V_Tmp_Allocationsumm...
Categories: DBA Blogs

how to install SQLCL on windows machine 86bit

Tue, 2016-09-20 21:46
hello Connor, I wanted to know if can guide me in right direction where by i may be able to download and install(Step By Step) Sqlcl. i heard about it thats its awesome tool and i really wanted to dig into it. I am using windows machine 86bit ...
Categories: DBA Blogs

Direct path reads of a FTS on a table slow - what could be the reason

Tue, 2016-09-20 21:46
We have two Oracle database instances X & Y with the same parameter / configuration. There is a table "bigtable" which has around 2 Million rows in both the databases. In a query, if the "bigtable" table is full scanned, we observe the below: 1) ...
Categories: DBA Blogs

Sorting By Nearest Future date

Tue, 2016-09-20 21:46
Hi Tom, I need to get the record of nearest future date as first record from the data set and rest by Ascending order For example: <b>Before Sorting : </b> Order Quantity Schedule Date 1 0 Jan-15-2016 2 0 NOV-20-2016 3 1 ...
Categories: DBA Blogs

Comparison of schema in controlled environment

Tue, 2016-09-20 03:26
I learnt that some of the production objects were missing. At that point I decided to change the password of the schema in production so that the comparison can be done with the Stage environment and the extent of damage to the production system can ...
Categories: DBA Blogs

Pages