Problem solve Get help with specific problems with your technologies, process and projects.

Getting end of communication error when submitting a query

1) When I submit the query below, it takes time, and then I get an end of communication error. Can you tell me why it happens?

 select a.empno,b.empno from
 (select rownum arow, empno from emp) a
 full outer join 
 (select rownum brow, empno from emp) b
 on a.arow = b.brow;
2) And also for the below query, I am getting a cartesian product, and I want to know why it happens.
 select a.empno,b.empno from
 (select '1' arow, empno from emp) a
 full outer join 
 (select '1' brow, empno from emp) b
 on a.arow = b.brow;

1) The dreaded ORA-3113 errors are never easy to track down. This means that your network connection to the database is being severed. I'm assuming that you are able to duplicate the the problem no matter when you issue the above query. If this is the case, then there is something going on in your session which is terminating your database connection. You'll have to turn client tracing on in your SQLNET.ORA file and send the trace files to Oracle Support for review.

2) You are not getting a "cartesian product", but a full outer join. This is exactly what you asked for. But you specified that the 'arow' and 'brow' columns contains the exact same number, the number '1', for EVERY ROW in each subquery! So every row from 'a' matches every row from 'b'.

Since every row in each subquery matches, the result set of your full outer join will be no different than a cartesian product, which matches every row in 'a' to every row in 'b'. In essence, you have forced a cartesian product.

For More Information

Dig Deeper on Oracle database design and architecture

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.