Re: Logging in irrespective of the database access settings
From: Aaron [SQL Server MVP] (ten.xoc_at_dnartreb.noraa)
Date: 07/16/04
- Next message: Andrew Baker: "Re: problem with migrating DTS package from file to server"
- Previous message: Mark: "Enforce (MTS) & Performance"
- In reply to: Astra: "Logging in irrespective of the database access settings"
- Next in thread: Astra: "Re: Logging in irrespective of the database access settings"
- Reply: Astra: "Re: Logging in irrespective of the database access settings"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 16 Jul 2004 08:58:37 -0400
> As our client-side app controls the permissions, we need each user to have
> grant all access to all tables and sprocs and ticking these manually is a
> no-no.
Why do you have to do this manually for each object? Here is a quick way to
generate GRANT scripts for a specific user to all tables/procs, then you
take the results and execute them.
SELECT 'GRANT EXEC ON '+SPECIFIC_SCHEMA+'.'+ROUTINE_NAME+' TO [someuser]'
FROM INFORMATION_SCHEMA.ROUTINES
SELECT 'GRANT ALL ON '+TABLE_SCHEMA+'.'+TABLE_NAME+' TO [someuser]'
FROM INFORMATION_SCHEMA.TABLES
You can also do this in a cursor and execute the GRANT statement using
dynamic SQL, if you can't do the above manually.
> What's the point in having the Database Access section if the System Admin
> under Server Roles allows you to get into anything?.
The same reason you can lock your front door, but leave the key hanging in
the doorknob. I don't understand why users of an app would ever have to be
sysadmin.
-- http://www.aspfaq.com/ (Reverse address to reply.)
- Next message: Andrew Baker: "Re: problem with migrating DTS package from file to server"
- Previous message: Mark: "Enforce (MTS) & Performance"
- In reply to: Astra: "Logging in irrespective of the database access settings"
- Next in thread: Astra: "Re: Logging in irrespective of the database access settings"
- Reply: Astra: "Re: Logging in irrespective of the database access settings"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|