Wrox Programmer Forums
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 7th, 2004, 02:15 AM
Authorized User
Join Date: Nov 2003
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default User/Role Privileges


I need to read and subsequently modify the privileges (rights) of a certain SQL Server user / role from within a Visual Basic Program.

Modifying seems to be easy using standard statements like GRANT/REVOKE. But what about reading all the rights a user has ?

I have researched SQL-DMO, but didn't find what I'm looking for.

Any idea ?


Old July 7th, 2004, 03:07 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik

SELECT sysusers.Name ,syspermissions.*
FROM   syspermissions INNER JOIN sysusers ON Grantee = UId

Hovik Melkomian.

Similar Threads
Thread Thread Starter Forum Replies Last Post
users & privileges lompy1 Oracle 1 November 8th, 2006 04:50 PM
Using ADAM/AzMan adding user to role errors hdoug08 ASP.NET 2.0 Professional 0 August 2nd, 2006 09:03 AM
How can I retreive user role from sql server 2005? MAKO C# 0 July 7th, 2006 08:13 AM
User versus Application Role aousterhout SQL Server 2000 0 April 20th, 2004 05:20 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.