views:

572

answers:

3

I just installed the Oracle Instant Client for Mac OSX with the SQLPlus extension and have the following problem. I can connect to a database instance and schema and I can do queries but when I try the "describe command" it just hangs. For example:

SQL> SELECT COUNT(*) FROM APPROVABLETAB;

  COUNT(*)
----------
  8

SQL> desc APPROVABLETAB;

   // hangs indefinitely

Anyone have any ideas?

A: 

Are there invalid objects in the sys schema? Try:

SELECT owner, object_name, object_type, status 
  FROM dba_objects 
 WHERE status <> 'VALID';

You might need to rebuild the catalog if this reports invalid objects belonging to SYS.

Also, is your DB on Snow Leopard as well, or is it somewhere else? Is there another database you can connect to and attempt a describe command?

This command yields much of the same output as the describe command, does it work?

SELECT column_name, data_type, data_length, nullable
  FROM user_tab_cols
 WHERE table_name = 'APPROVABLETAB'
 ORDER BY column_id;
DCookie
A: 

Perhaps the oracle client you are using doesn't match the server? Do any other clients perform the desc command properly?

Adam Hawkes
Yes the describe command works fine on my windows machine and connecting to the same DB instance. It only fails on my Mac. For Mac I'm using sqlplus version 10.2.0.4.0 and for Windows I'm using 11.1.0.6.0. I cannot find a newer version of sqlplus for the Mac on Oracle's website.
Mike Hopper
Which version is the database server? The client should always be "newer".
IronGoofy
+1  A: 

Well the describe command is working today. I've been having some network connection problems at work using the WIFI and a VPN connection. Now I am using a wired connection and it's working. Strange that the other day it was failing for describe command but working for queries. Anyway, I'm moving on.

Mike Hopper
Maybe you should accept your own answer here.
Adam Hawkes