Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to check I am locked out 1

Status
Not open for further replies.

babeo

Technical User
Mar 30, 2000
398
CA
Hi,

when a superuser, SA, locks out all users (can be exceptional for users in SA group ?) to do maintenance on a db or etc. related to the db, how can I check out (myself belong to SA group) to be locked out or not.

I have this "difficult to express" the question above because I am able to make connection to the db in DBArtisan, but I am NOT able to make any connection using on line "isql" command. So, I want to check what is the set up and what is the command to limit or block users from log in the database. Or the connection issue is another problem not related to nor nothing is done on the database?

Thanks
 
babeo,

Easy mate. On individual accounts say you lock a user

Code:
1> sp_locklogin vickpa,'lock'
2> go
Account locked.
--check the status
1> sp_displaylogin vickpa
2> go
Suid: 18
Loginame: vickpa
Fullname:
Default Database: its_ged_prod
Default Language:
Auto Login Script:
Configured Authorization:
Locked: YES  <=========
Date of Last Password Change: Feb 22 1999  1:05PM
Password expiration interval: 0
Password expired: NO
Minimum password length: 6
Maximum failed logins: 0
Current failed login attempts: 0
(return status = 0)

If you want to get a list of all locked accounts do

Code:
1> select name from syslogins where status = 2
2> go
 name
 ------------------------------
 vickpa
 berrtfeed
 willst
 ged_icon
 ged_risk_batch
 mailbr
 firkja
 sybase

-- note that status = 1 means unlocked/OK and 2 means locked
hope this helps and do not forget the big star I deserve.
 
Thanks
This is the command I am looking for a long time ! it really helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top