SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Roles and User Permissions Script for SQLSERVER 20
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Suryahai
Starting Member

1 Posts

Posted - 06/04/2012 :  10:30:51  Show Profile  Reply with Quote
hi anyone please post query for all sql permissions and role permissions of all users in a database for SQLSERVER 2000.
I did lot of research in the internet but i didn't find any script to resolve my issue...!

i badly required it asap.
Please ........!

m.esteghamat
Starting Member

17 Posts

Posted - 06/05/2012 :  03:50:19  Show Profile  Reply with Quote
hi
you want to know security statusof your server OR want to set some security for every users?
Go to Top of Page

m.esteghamat
Starting Member

17 Posts

Posted - 06/05/2012 :  04:47:36  Show Profile  Reply with Quote
hi again
for get current status :

use Database
Select User_Name(SP.Uid), ' On '+Sj.Name ,
(Case Xtype
When 'C' Then 'CHECK constraint'
When 'D' Then 'Default or DEFAULT constraint'
When 'F' Then 'FOREIGN KEY constraint'
When 'L' Then 'Log'
When 'FN' Then 'Scalar function'
When 'IF' Then 'Inlined table-function'
When 'P' Then 'Stored procedure'
When 'PK' Then 'PRIMARY KEY constraint (type is K)'
When 'RF' Then 'Replication filter stored procedure '
When 'S' Then 'System table'
When 'TF' Then 'Table function'
When 'TR' Then 'Trigger'
When 'U' Then 'User table'
When 'UQ' Then 'UNIQUE constraint (type is K)'
When 'V' Then 'View'
When 'X' Then 'Extended stored procedure' End) As ObjectType ,
(Case Action
When 26 Then 'REFERENCES'
When 178 Then 'CREATE FUNCTION'
When 193 Then 'SELECT'
When 195 Then 'INSERT'
When 196 Then 'DELETE'
When 197 Then 'UPDATE'
When 198 Then 'CREATE TABLE'
When 203 Then 'CREATE DATABASE'
When 207 Then 'CREATE VIEW'
When 222 Then 'CREATE PROCEDURE'
When 224 Then 'EXECUTE'
When 228 Then 'BACKUP DATABASE'
When 233 Then 'CREATE DEFAULT'
When 235 Then 'BACKUP LOG'
When 236 Then 'CREATE RULE' End) As ActionType ,
(Case ProtectType
When 204 Then 'GRANT_W_GRANT'
When 205 Then 'GRANT'
When 206 Then 'REVOKE' End) As ProtectType , Columns
from dbo.sysprotects SP Inner Join dbo.sysobjects SJ
On Sp.id=SJ.id
where sp.uid <>0
Go to Top of Page

wendyss
Starting Member

China
4 Posts

Posted - 06/11/2012 :  22:17:08  Show Profile  Reply with Quote
----------------------------------------------------------------------------------------------------------------------------------------
[url=http://www.rchelicopterus.com/]Rc Helicopter Parts[/url]|[url=http://minirchelicopter-reviews.com/]Mini Rc Helicopter[/url]|[url=http://rc-helicopters-reviews.com/]Rc Helicopters Reviews[/url]|[url=http://www.rchobbyforsale.com/]Rc Hobby[/url]

liuli wendys
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000