Solved

users who have DML privileges in SQL 2000

Posted on 2010-08-20
4
366 Views
Last Modified: 2012-05-10
How can you script out the users who have DML privileges in SQL 2000?

thanks
0
Comment
Question by:anushahanna
  • 2
  • 2
4 Comments
 
LVL 59

Accepted Solution

by:
Kevin Cross earned 500 total points
ID: 33491825
anushahanna:Let's test my memory...give these a try:-- this table will map for you userid (uid) to sid to username|rolename-- using the is??? flags you can figure out if user, role, etc. select *from sys.sysusers;-- matches user to things like sysadmin, serveradmin, etc.-- uses sid, so will need to match to sysusers using sidselect *from sys.syslogins;-- has explicitly assigned rights-- has a grantor and grantee field that matches to sysusers uid-- e.g., grantee_principal_id = uidselect * from sys.database_permissions;With the combination, you can try to find out what you are looking for via T-SQL.Regards,Kevin
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33500717
Thanks Kevin;

I am able to get the first 2 in SQL 2000 with
select * from dbo.sysusers
select * from master.dbo.syslogins

what would be the equivalent of sys.database_permissions?
0
 
LVL 59

Assisted Solution

by:Kevin Cross
Kevin Cross earned 500 total points
ID: 33502808
http://msdn.microsoft.com/en-us/library/aa260604(SQL.80).aspx
try syspermissions or see if the data is in syslogins ... has been too long since I actually looked at a SQL 2000 server instance. Have database in SQL 2000 compatibility mode where the above works as typed, but that is due to the underlying engine being SQL 2008 most likely.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33503375
Thanks for the direction, Kevin.
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

775 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question