Solved

Retrieving Table Names and Column data from Oracle database

Posted on 2008-10-29
4
1,526 Views
Last Modified: 2012-05-05
Hi all,
I am wanting to find a way to programtically retrieve the table names, column names, column specifications (length, type etc.) from an Oracle database. So maybe using an OracelDataReader or something like that. Or maybe there is some SQL that will help me achieve this.

I would like the solution in Vb.Net or C#.
0
Comment
Question by:M3mph15
  • 2
4 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 22838453
you can query the view DBA_TAB_COLUMNS
www.ss64.com/orad/DBA_TAB_COLUMNS.html
0
 
LVL 6

Author Comment

by:M3mph15
ID: 22838521
hi, tried to retireve data in SQL Plus. SQL statement:
select column_name,data_type, nullable from dba_tab_columns where rownum < 50;
it says: table or view does not exist
0
 
LVL 27

Assisted Solution

by:sujith80
sujith80 earned 250 total points
ID: 22838593
Probably you dont have privileges to access dba_tab_columns.

You may try to use ALL_TAB_COLUMNS instead.
0
 
LVL 6

Author Comment

by:M3mph15
ID: 22838697
Hi,
Yes it was that i didn't have the right privileges. Thanks to the both of you
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now