Solved

users who have DML privileges in SQL 2000

Posted on 2010-08-20
4
361 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks for the direction, Kevin.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

744 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

20 Experts available now in Live!

Get 1:1 Help Now