Click to See Complete Forum and Search --> : changing all permissions to all DB tables at once


pelegk1
11-20-2005, 11:09 AM
i succeded only to change the permissions on 1 table at same time!


grant all SELECT
on register_detailes to user_test


is there a way to make it so in 1 line of code for the same user it will let me change the permissions on all tables of the same DB ?.

thnaks in advance
peleg

russell_g_1
12-10-2005, 08:42 AM
you can probably find a table containing all the table names somewhere in your database. i've forgotten what its called in Oracle but in sql server its sysobjects. from there you should be able to create a whole bunch of grant statements that you can excute.

something like this for sql server

select 'grant select on ' + name + ' to someuser'
from sysobjects where type = 'u'