hi
There are over 10 databases on my SQL server. I would like to have a report
that shows the user's permission on each database including tables, views an
d
stored procedures. At this stage, I want to know which user can run or not
stored procedures on each database. Is it possible to find permission using
system stored procedures? I read the online book of SQL server for 3 days.
But I still don't find the system stored procedures.
If this stored produres doesn't exist, I have to write a stored proceduce to
display these user's permission. Could you tell which system tables need to
be used?
Waiting for you
Million thanks in adv
Wen OUYou can use sp_helprotect, it is ran as follows:
use db1
sp_helprotect @.username = 'Username'
use db2
sp_helprotect @.username = 'Username'|||thank you for your reply
if there are more than 1 database, i have to use a cursor to access each
database and read the info.
do you have another idea?
waiting for you
thanks in adv
Wen OU
"Fany Vargas" wrote:
> You can use sp_helprotect, it is ran as follows:
> use db1
> sp_helprotect @.username = 'Username'
> use db2
> sp_helprotect @.username = 'Username'
>|||If you need to get this info for each database then you will indeed need to
loop through each database. So using a cursor to loop through each database
is a good option.
Fany Vargas
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
Microsoft highly recommends that users with Internet access update their
Microsoft software to better protect against viruses and security
vulnerabilities. The easiest way to do this is to visit the following
websites:
http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx|||thank you
I have another question. If a domain user belongs to a domain user group, is
it possible to find if this user get permissions to execute a stored
procedure? At the moment, the stored procedure i wrote only shows the
permisssion of user groups or independent users. what system stored
procedure can I use?
million thanks in adv
wen ou
"Fany Vargas [MSFT]" wrote:
> If you need to get this info for each database then you will indeed need t
o
> loop through each database. So using a cursor to loop through each databas
e
> is a good option.
> Fany Vargas
> Microsoft Corporation
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> Are you secure? For information about the Strategic Technology Protection
> Program and to order your FREE Security Tool Kit, please visit
> http://www.microsoft.com/security.
> Microsoft highly recommends that users with Internet access update their
> Microsoft software to better protect against viruses and security
> vulnerabilities. The easiest way to do this is to visit the following
> websites:
> http://www.microsoft.com/protect
> http://www.microsoft.com/security/guidance/default.mspx
>|||Look into the PERMISSIONS function. It returns a value containing a bitmap
that indicates the statement, object, or column permissions for the current
user. So you can run something like:
SELECT PERMISSIONS(OBJECT_ID('nameofobject'))
For details on how to decipher the bitmap you will need to reference BOL
article: "PERMISSIONS"
(mk:@.MSITStore:C:\Program%20Files\Micros
oft%20SQL%20Server\80\Tools\Books\ts
qlref.chm::/ts_pa-pz_6f78.htm) - in BOL, select Go->Url...
Fany Vargas
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
Microsoft highly recommends that users with Internet access update their
Microsoft software to better protect against viruses and security
vulnerabilities. The easiest way to do this is to visit the following
websites:
http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx|||Also look at the BOL topic: SETUSER
Fany Vargas
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
Microsoft highly recommends that users with Internet access update their
Microsoft software to better protect against viruses and security
vulnerabilities. The easiest way to do this is to visit the following
websites:
http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx|||thank you for your help
it's very useful for me
"Fany Vargas [MSFT]" wrote:
> Also look at the BOL topic: SETUSER
> Fany Vargas
> Microsoft Corporation
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> Are you secure? For information about the Strategic Technology Protection
> Program and to order your FREE Security Tool Kit, please visit
> http://www.microsoft.com/security.
> Microsoft highly recommends that users with Internet access update their
> Microsoft software to better protect against viruses and security
> vulnerabilities. The easiest way to do this is to visit the following
> websites:
> http://www.microsoft.com/protect
> http://www.microsoft.com/security/guidance/default.mspx
>sql
No comments:
Post a Comment