Solved

users who have DML privileges in SQL 2000

Posted on 2010-08-20
4
364 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

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

919 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now