SunQuest
           Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old July 18th, 2003, 01:43 AM
anilkumarsh anilkumarsh is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 3 anilkumarsh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
  #2  
Old July 18th, 2003, 07:53 PM
victorpendleton victorpendleton is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2003
Location: No es importante
Posts: 2,065 victorpendleton User rank is Private First Class (20 - 50 Reputation Level)victorpendleton User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 31 m 56 sec
Reputation Power: 8
That will depend on the database and what privileges you have. Which database are you attempting to do this on?

Reply With Quote
  #3  
Old July 20th, 2003, 11:08 PM
anilkumarsh anilkumarsh is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 3 anilkumarsh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I am using Oracle, MSSQL and Sybase database
thanks
anil

Reply With Quote
  #4  
Old July 21st, 2003, 08:34 AM
victorpendleton victorpendleton is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2003
Location: No es importante
Posts: 2,065 victorpendleton User rank is Private First Class (20 - 50 Reputation Level)victorpendleton User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 31 m 56 sec
Reputation Power: 8
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.

Reply With Quote
  #5  
Old July 23rd, 2003, 12:04 AM
anilkumarsh anilkumarsh is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 3 anilkumarsh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #6  
Old July 25th, 2003, 12:52 PM
victorpendleton victorpendleton is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2003
Location: No es importante
Posts: 2,065 victorpendleton User rank is Private First Class (20 - 50 Reputation Level)victorpendleton User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 31 m 56 sec
Reputation Power: 8
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > help on user permissions


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway