SA

SA

Post by Dean Jone » Tue, 16 Nov 1999 04:00:00



Hello All;

    How can you find out if the user who is logged in to MS-SQL 6.5 has SA
rights?  I would like to give my client application the ability of creating
logins for users but only the SA can do that, so I need to find out first if
the currently logged in person is a SA and then if that is true, open up a
dialog box for user/password information.

Any help would be appreciated;
Dean Jones
Personal Tech Software

 
 
 

SA

Post by Brad » Tue, 16 Nov 1999 04:00:00


Dean Jones said...

Quote:> Hello All;

>     How can you find out if the user who is logged in to MS-SQL 6.5 has SA
> rights?  I would like to give my client application the ability of creating
> logins for users but only the SA can do that, so I need to find out first if
> the currently logged in person is a SA and then if that is true, open up a
> dialog box for user/password information.

I don't know the exact place to look, but the sysusers table has role
information for each user.

 
 
 

SA

Post by BPMargoli » Tue, 16 Nov 1999 04:00:00


Dean,

Check out the code for sp_password in the master database. The code, if I
remember correctly, has a test to determine whether the user is sa.


Quote:> Hello All;

>     How can you find out if the user who is logged in to MS-SQL 6.5 has SA
> rights?  I would like to give my client application the ability of
creating
> logins for users but only the SA can do that, so I need to find out first
if
> the currently logged in person is a SA and then if that is true, open up a
> dialog box for user/password information.

> Any help would be appreciated;
> Dean Jones
> Personal Tech Software

 
 
 

SA

Post by Gleb Zabezhinski » Wed, 17 Nov 1999 04:00:00


select suser_id()
returns 1 for sa

>Hello All;

>    How can you find out if the user who is logged in to MS-SQL 6.5 has SA
>rights?  I would like to give my client application the ability of creating
>logins for users but only the SA can do that, so I need to find out first
if
>the currently logged in person is a SA and then if that is true, open up a
>dialog box for user/password information.

>Any help would be appreciated;
>Dean Jones
>Personal Tech Software

 
 
 

1. Seeking query to display all users with sa privilege or sa equivalence

This should be a simple task.   I have not located the system table or
combination of tables that I can select from or join to determine all users
with sa privilege.

I am seeking a Transact-SQL query to list all users with sa privilege or sa
equivalence.   Certainly this should be simple and it must be possible.
This particular business situation is against a 6.5 instance.

BTW, I've seen the SQL Security Manager GUI interface.  This GUI tool lets
you expand a listing of sa accounts.  This is terrific but not what we need.

We are not looking for "select * from syslogins"

Thank you.

2. SQLServer Contract-Long Term-NY

3. sa without sa privileges???

4. What Is Best? Keyword Searching

5. non sa owner viewing sa owned jobs

6. Changing Curser Direction

7. SA account and SA role

8. ORDER BY getting erratic results

9. SA privilegia to non-sa user

10. Announce: granting SA-commands to non-SA users

11. SQL Server Agent job failes(Owner as sa) and when 'sa' password changed

12. SA access via a NON-SA login. It is possible!

13. Lost SA password, or SA not in security group?