cancel
Showing results for 
Search instead for 
Did you mean: 

sp_locklogin

jmtorres
Active Participant
0 Kudos

Hello,

Is there away to lock a login that has been inactive for n days, i.e

sp_locklogin NULL, ‘lock’, NULL, 90

I got just a message , "account locked"

Thank you

Jose

Accepted Solutions (2)

Accepted Solutions (2)

former_member188958
Active Contributor

Hi Jose,

That command,

sp_locklogin NULL, ‘lock’, NULL, 90
should be exactly what you need.
If you run just "sp_locklogin" with no parameters, it will output a list of locked logins - are you saying that none are locked even though you received the output "account locked"?

-bret

jmtorres
Active Participant
0 Kudos

Thank you Bret,

Actually I'm looking for a way to lock ASE logins after a certain amount of time inactive, for example 2 hours , 2 days, 2 months, etc. This is possible within sp_locklogin?

Regards

Jose

former_member188958
Active Contributor

Hi Jose,

sp_locklogin will do it once, at the time you call it. Are you looking to make this something that happens automatically? You could create an ASE Job Scheduler job configured to execute once a day that called sp_locklogin.

-bret

jmtorres
Active Participant
0 Kudos

Thanks a lot Bret

javier_barthe
Participant

Jose, take a look at this: https://blogs.sap.com/2015/11/12/locking-inactive-logins-ase-157-sp-134/ here I locked all accounts with 90 days or more innactive.

jmtorres
Active Participant
0 Kudos

Thank you Javier.

It helps a lot

Jose

Answers (0)