What is login script?
Login script is stored procedure to run automatically when user logs in.
How to add login script in Sybase:
We can add login script using stored procedure sp_modifylogin.
1. Before adding login script.
Suid: 3 Loginame: k2admin Fullname: k2admin Default Database: master Default Language: Auto Login Script: Configured Authorization: test_role (default ON) Locked: NO Date of Last Password Change: Sep 14 2016 12:42AM Password expiration interval: 0 Password expired: NO Minimum password length: 6 Maximum failed logins: 3 Current failed login attempts: 0 Authenticate with: AUTH_DEFAULT Login Password Encryption: SHA-256 Last login date: Sep 14 2017 1:01AM Exempt inactive lock: 0 (return status = 0)
2. To add login script.
sp_modifylogin k2_admin, 'login script',sp_grants go
3. After login script added
Loginame: k2admin Fullname: k2admin Default Database: master Default Language: Auto Login Script: sp_grants Configured Authorization: test_role (default ON) Locked: NO Date of Last Password Change: Sep 14 2016 12:52AM Password expiration interval: 0 Password expired: NO Minimum password length: 6 Maximum failed logins: 3 Current failed login attempts: 0 Authenticate with: AUTH_DEFAULT Login Password Encryption: SHA-256 Last login date: Sep 14 2017 1:01AM Exempt inactive lock: 0 (return status = 0)