I have an Oracle database which I have to dumb to an ASCII file of a defined format. For that I need to read the whole database, including table names, column names and descriptions, format the data and write the file.
So, how do I :
- Find out all the table names
- Find out column names in a certain table
I'm programming this with Delphi and I think I'll be able to do rest of the data processing, I just need to extract all the data. Is it possible to do all this using a database user or do I have to log on as system user?
I got the table names and column names queries working in SQL*Plus, but now I need to do this with a database user and from an external program.
Thanks for the help!
to find out all the tables in the databse you will have to have select priveleiges on the following views
dba_tables for all tables
dba_tab_columns for all columns
Hmm, I tried to query those tables, but Oracle responded with a null string. Apparently I don't have the select privileges. How do I get them?
Sys has to grant your user select on those tables. Make sure they are granted directly to a user and not a role because when you are using procedures or functions the role privledges won't work.