Getting information about login accounts  Finding user names and IDs

Chapter 14: Managing Adaptive Server Logins, Database Users, and Client Connections

Getting information about database users

Use sp_helpuser to report information about authorized users of the current database, where name_in_db is the user’s name in the current database:

sp_helpuser [name_in_db]

If you give a user’s name, sp_helpuser reports information about that user. If you do not give a name, it reports information about all users.

The following example shows the results of executing sp_helpuser without a parameter in the database pubs2:

sp_helpuser
Users_name  ID_in_db  Group_name Login_name
----------  --------  ---------- ----------
dbo         1         public     sa
marcy       4         public     marcy
sandy       3         public     sandy
judy        5         public     judy
linda       6         public     linda
anne        2         public     anne
jim         7         senioreng  jim





Copyright © 2005. Sybase Inc. All rights reserved. Finding user names and IDs

View this book as PDF