Mahtab Alam wrote:and because of the DBA_ prefix, you know it contains information about tables and columns
that exist anywhere in the database, regardless of owner or privileges granted.
Right. And because of the DBA prefix you know that the table is supposed to be accessible to database administrators only too. Which is the default setting and really shouldn't be changed unless absolutely necessary. (Or unless you're just learning about it, of course.)
But when I login to Oracle xe with a user abc that I have created and have given all privileges to abc ,
There's
a lot of privileges and roles. Show us what privileges exactly you have granted. I really doubt you've granted them all. Ideally show the grant statements themselves.
now I try to query dba_tab_columns it says "Table or view does not exist"
Can anybody tell whats the reason
The "Table or view does not exist" message is displayed when the table being queried doesn't exist, or when it does exist, but the current user doesn't have privileges to select from it, which is your case. This is for security reasons, so that some user cannot try to guess the names of existing tables and have their existence confirmed by error messages indicating lack of privileges over an existing table.
DBA_TAB_COLUMNS is actually a public synonym for a view in the SYS schema, so the privilege needs to be granted to the underlying table, not to the public synonym.
You might want to read about
Data Dictionary views and something about
privileges and roles.