Solved

Retrieving Table Names and Column data from Oracle database

Posted on 2008-10-29
4
1,530 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 143

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
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 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.

724 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