|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
help on user permissions
hi every body
can any body tell how to find out for all the tables in a database with select permissions for particular user(like oracle,MSSQL,Sybase) , how can we find out the permissions of a particular user for all the tables, my requirement is, I want all the list of tables which have permissions of a particular user to select how can be this achieved? |
|
#2
|
|||
|
|||
|
That will depend on the database and what privileges you have. Which database are you attempting to do this on?
|
|
#3
|
|||
|
|||
|
I am using Oracle, MSSQL and Sybase database
thanks anil |
|
#4
|
|||
|
|||
|
All three DBMS supply views into their respective grant tables. In Oracle you will need to query the ALL_TAB_PRIVS view. In MSSQL each database will have its own set of privileges and these will be kept as system tables. If the privilege was granted server wide you can query the sys database. Since MSSQL is very closely related to Sysbase, the description and locations are similar. If you need any more assistance please let us know.
|
|
#5
|
|||
|
|||
|
Hi victor thank you for your reply
I would like to give you clear picture about my requirement Basically i am developing a query builder for the Oracle,Sybase and MsSQL and query builder only support select queries, we have wizard based system , where in user enters all the required database info like db type, dbname,port user and password , On getting this info we try to load the tables from the database specified following are queries used to load tables for differenet databases 1) Oracle : select tname from tab; 2) Sybase select table_name from syscolumns where creator ='logged used'; 3) exec sp_tables; on user selecting any particular table we execute following queries to get the columns 1)Oracle select column_name from dba_tab_columns where table_name='selected table'; 2) sybase select cname from syscolumsn where tname='selected table'; 3) exec sp_columns @table_name='selected table'; The problem with the above approach is that it will load only tables whose creator is the looged in user, But i want to load all the tables where in the user as the select privilege on the tables. thanks in advance anil |
|
#6
|
|||
|
|||
|
You will first need to query the system tables learning what tables the user has access to, storing those in an array and access those values to generate the needed DDL.
|
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > help on user permissions |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|