Solved

Retrieving Table Names and Column data from Oracle database

Posted on 2008-10-29
4
1,525 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

705 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

11 Experts available now in Live!

Get 1:1 Help Now