I have 500 tables in my Db.In those some tables name starts with abc (abc_emp,abc_dept) and rest of the tables name start with xyz(xyz_emp,xyz_transactions).I wanted to give select,insert,update and delete permissions for an user on the tables which starts with abc.
How can i do that in a much easier and sophisticated way.
Thanks.What I would probably do is create a role and call it something like abc_tables. Then generate the commands to grant the permissions on those tables with a query like:
select 'grant select, update, insert, delete on ' + name + ' to abc_tables'
from sysobjects
where type = 'U'
and name like 'abc%'
Run the resulting grant statements, then add the user to the role. The beauty of this is, if you have to grant the same permissions to another user, then you have most of the work already done.
Showing posts with label starts. Show all posts
Showing posts with label starts. Show all posts
Thursday, March 29, 2012
Sunday, February 19, 2012
Global "User!UserID" as Parameter-Default
Hi all, I use the Global "User!UserID" as a Default-Value for a parameter!
But if a user starts the report, he alsway sees my ID (Domain\MyID) instead
of the User's ID (Domain\UserID). Is that a Bug or do I make something wrong?
Thanks, RolandAnother way of passing your UserID into your query is not to pass it as a
"Report Parameter" instead in Designer, go to your data tab, select the data
set and click on the elipses(...) to edit. Click on the Parameters tab and
enter your User!UserID. Make sure you take out the parameterID from the other
area(Reports Parameter). Hope this makes sense.
"Roland Müller" wrote:
> Hi all, I use the Global "User!UserID" as a Default-Value for a parameter!
> But if a user starts the report, he alsway sees my ID (Domain\MyID) instead
> of the User's ID (Domain\UserID). Is that a Bug or do I make something wrong?
> Thanks, Roland
But if a user starts the report, he alsway sees my ID (Domain\MyID) instead
of the User's ID (Domain\UserID). Is that a Bug or do I make something wrong?
Thanks, RolandAnother way of passing your UserID into your query is not to pass it as a
"Report Parameter" instead in Designer, go to your data tab, select the data
set and click on the elipses(...) to edit. Click on the Parameters tab and
enter your User!UserID. Make sure you take out the parameterID from the other
area(Reports Parameter). Hope this makes sense.
"Roland Müller" wrote:
> Hi all, I use the Global "User!UserID" as a Default-Value for a parameter!
> But if a user starts the report, he alsway sees my ID (Domain\MyID) instead
> of the User's ID (Domain\UserID). Is that a Bug or do I make something wrong?
> Thanks, Roland
Subscribe to:
Posts (Atom)