AskTom - Hot Questions

Syndicate content AskTom
These are the questions on Ask Tom that have the most comments
Updated: 50 weeks 6 days ago

Execute SQL Select statement stored in a table.

Tue, 2009-09-08 02:00
Hi Tom, I have done the following <code>create table sql_statement(sqlid integer, sqlstmt clob, isselect varchar2(1)) begin insert into sql_statement(sqlid, sqlstmt, isselect) values(1, 'insert into dept(deptno, dname) values(:1,:2)', 'N')...

SQL*Loader data from first record must be inserted in all rows

Tue, 2009-09-01 02:00
Hi. Some data in the first record of my text file (a date), has to be inserted in all rows of the table. How do I create a CTL file for this? The first row of the text-file goes e.g. HEAD20091001. The date (2009-10-01) relates to all the rest of t...

Rownum quey with sorting

Tue, 2009-09-01 02:00
Hi Tom, I have a query which return millions of record,(as a result of inner join). I am not sure whether the client application will be able to handle these many records at once. I want to partition the query result in a few sets, and re...

Code Reviews between Java Developers and DBA

Tue, 2009-09-01 02:00
Hi Tom, This is a somewhat 'mature' shop, but we are just now in the process of establishing policies, etc. regarding the DBA role in code reviews (and design reviews) with the Java Developers. It is a given that the DBA's should review all the...

embedding a variable in a string

Mon, 2009-08-31 02:00
After running a proc I wrote I get this error: ORA-01756: quoted string not properly terminated I am writing SQL as a string so that I can embed variables into the the string, like: v_sql := 'insert into... select... etc'; I then execute thi...

What is the meaning of SQL*Net message from client

Fri, 2009-08-07 02:00
Can you please help interpreting this output? OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS call count cpu elapsed disk query current rows ------- ------ -------- ---------- ---------- ---------- ---------...

internal logic of distinct clause

Thu, 2009-08-06 02:00
I have 2 questions for you TOM: 1. ) when a query has a distinct clause on a clomun and the same column is used in the order by clause, will oracle order the data first and eliminate the duplicate or will it eliminate the duplicate records and the...

PI and CR image of datablocks

Thu, 2009-08-06 02:00
Hi Tom, When does Oracle Instance create a Past Image of a datablock and when CR image of datablock in its buffer cache ? Would you please explain it with a small example? Thanks Sukhendu

Rolling count of difference

Thu, 2009-08-06 02:00
<code>I have a table: create table t ( b date, c varchar2(30) ); with this data in it: insert into t values ( to_date( '01-jan-2004'), 'XXX' ); insert into t values ( to_date( '01-jan-2004'), 'YYY' ); insert into t values ( to_date(...

Object relational impedance mismatch

Thu, 2009-08-06 02:00
What are your thoughts on the so called "object relational impedance mismatch"? http://en.wikipedia.org/wiki/Object-relational_impedance_mismatch This seems to fuel the mentality that for an object oriented application to work people need to...

Balancing Instances and schemas

Thu, 2009-08-06 02:00
Dear Tom, In your literature I have read "each box deserves its own database", meaning is better to have a single instance running in a box than more. Is it safe to generalize that if I have say 100 schemas, it is better to have a single instan...

Multiple production databases in a RAC cluster,

Wed, 2009-08-05 02:00
Hello, Our management is inclining towards sharing two production databases on a 3-node RAC cluster. Each node is very powerful in terms of capacity (like memory and CPU). The intention is to have RAC capabilities for both the databases. Each d...

Is there some sort of nesting limit for correlated subqueries?

Tue, 2009-08-04 02:00
<code> create table con ( content_id number); create table mat ( material_id number, content_id number, resolution number, file_location varchar2(50)); create table con_groups (content_group_id number, content_id number); insert into con values...

sending mail with external file attachment

Sun, 2009-07-26 02:00
Hey, i use 10.2.0.4 RAC on a Linux platform... and i need to send mail with an attachment file which located somewhere at the machine's storage.. (for example: /nfsvol/ziv). now i want to send it from within the database with a job.. what can i u...

DBMS_SPACE.CREATE_INDEX_COST

Sun, 2009-07-26 02:00
Hi, I am trying to use the DBMS_SPACE.CREATE_INDEX_COST subprog. Although, it completes, it only returns NULL and 0 (the table stats are up to date) ? Any idea ? Thx. Bernard

Result cache for subqueries in 10gr2 ?

Wed, 2009-07-15 02:00
In an 9.2.0.8 EE db recently upgraded to 10.2.0.4 the developers are reporting a strange behavior : in complex queries (with EXISTS sub-queries , or views on views) the first execution is relatively slow (say, 15 minutes), but the sub-sequente execut...

Learning process

Wed, 2009-07-15 02:00
What was your learning curve for Oracle ? How did you master most of the Oracle components ? As I read from your book , you have started in C , Sybase , Informix . I started my career in Clipper , PowerBuilder , Sybase in 1993 and transitio...

Is there any reason alter session set events '10046 trace name context forever, level 12' would not show bind variables.

Wed, 2009-07-15 02:00
alter system set events '10046 trace name context forever, level 12';

Role of QA in DBA Team

Wed, 2009-07-15 02:00
Hi Tom, I have a general question regarding role of QA team in DBA Group. Generally, i see QA teams for all other groups like projects,products, development needs. But i did not hear having a QA Team exclusively for a DBA Group, means a QA team w...

Running Total

Fri, 2009-06-26 02:00
Hello Sir, Could you give a simple example of running total on emp table FOr example, running total of sum (sal + comm) department wise? thanks