Links
Home
Oracle DBA Forum
Frequent Oracle Errors
TNS:could not resolve the connect identifier specified
Backtrace message unwound by exceptions
invalid identifier
PL/SQL compilation error
internal error
missing expression
table or view does not exist
end-of-file on communication channel
TNS:listener unknown in connect descriptor
insufficient privileges
PL/SQL: numeric or value error string
TNS:protocol adapter error
ORACLE not available
target host or object does not exist
invalid number
unable to allocate string bytes of shared memory
resource busy and acquire with NOWAIT specified
error occurred at recursive SQL level string
ORACLE initialization or shutdown in progress
archiver error. Connect internal only, until freed
snapshot too old
unable to extend temp segment by string in tablespace
Credential retrieval failed
missing or invalid option
invalid username/password; logon denied
unable to create INITIAL extent for segment
out of process memory when trying to allocate string bytes
shared memory realm does not exist
cannot insert NULL
TNS:unable to connect to destination
remote database not found'>ora-02019
exception encountered: core dump
inconsistent datatypes
no data found
TNS:operation timed out
PL/SQL: could not find program
existing state of packages has been discarded
maximum number of processes exceeded
error signaled in parallel query server
ORACLE instance terminated. Disconnection forced
TNS:packet writer failure
see ORA-12699
missing right parenthesis
name is already used by an existing object
cannot identify/lock data file
invalid file operation
quoted string not properly terminated
Select from dual return 3 rows !

Select from dual return 3 rows !

2005-11-08       - By Jared Still

Reply:     <<     11     12     13     14     15     16     17     18     19  

I just did a little experiment on 10gR1.

as SYS

insert into sys.dual values('A');
insert into sys.dual values('B');
commit;

18:04:00 SQL>select * from dual;

D
-
X

1 row selected.


Login as myself:

18:04:50 SQL>create table my_dual as select * from dual;

Table created.

18:04:59 SQL>select * from dual;

D
-
X

1 row selected.

18:05:05 SQL>select * from my_dual;

D
-
X
A
B

3 rows selected.


So Oracle (the optimizer?) is filtering out the extra
rows when doing a 'select * from dual';.

Use it in CTAS though, and all the row appear in the new table.

Interesting, no?

I found this out first by doing block dumps (yuck!), then discovered
this other method of determining what is happening.

Now it is time to go delete those rows.

--
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist


On 11/8/05, Jared Still <jkstill@(protected)> wrote:
>
> That is version dependent.
>
> At least as far back as 8.1.7.4 <http://8.1.7.4>, there can
> be only one row in sys.dual.
>
> Try it.
>
>
>

I just did a little experiment on 10gR1.<br>
<br>
as SYS<br>
<br>
insert into sys.dual values('A');<br>
insert into sys.dual values('B');<br>
commit;<br>
<br>
18:04:00 SQL&gt;select * from dual;<br>
<br>
D<br>
-<br>
X<br>
<br>
1 row selected.<br>
<br>
<br>
Login as myself:<br>
<br>
18:04:50 SQL&gt;create table my_dual as select * from dual;<br>
<br>
Table created.<br>
<br>
18:04:59 SQL&gt;select * from dual;<br>
<br>
D<br>
-<br>
X<br>
<br>
1 row selected.<br>
<br>
18:05:05 SQL&gt;select * from my_dual;<br>
<br>
D<br>
-<br>
X<br>
A<br>
B<br>
<br>
3 rows selected.<br>
<br>
<br>
So Oracle (the optimizer?) is filtering out the extra<br>
rows when doing a 'select * from dual';.<br>
<br>
Use it in CTAS though, and all the row appear in the new table.<br>
<br>
Interesting, no?<br>
<br>
I found this out first by doing block dumps (yuck!), then discovered<br>
this other method of determining what is happening.<br>
<br>
Now it is time to go delete those rows.<br>
<br>
-- <br>
Jared Still<br>
Certifiable Oracle DBA and Part Time Perl Evangelist<br>
<br><br><div><span class="gmail_quote">On 11/8/05, <b class="gmail_sendername"
>Jared Still</b> &lt;<a href="mailto:jkstill@(protected)">jkstill@(protected)</a>&gt
; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb
(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<span class="q"></span>That is version dependent.<br>
<br>
At least as far back as <a href="http://8.1.7.4" target="_blank" onclick=
"return top.js.OpenExtLink(window,event,this)">8.1.7.4</a>, there can<br>
be only one row in sys.dual.<br>
<br>
Try it.<br><span class="sg"><br clear="all"><br></span></blockquote></div><br>
<br>