Saturday, 20 June 2015

Adding login to SAP ASE

There are multiple ways to add login to SAP ASE.

Method 1:

sp_addlogin 'login_name','login_pwd', <db_name>


sp_addlogin 'pankaj','pathak',sony

1) Here 'pankaj' is the login name, 'pathak' is the password and 'sony' is the default database for the login 'pankaj'. 
2) Means that there is default database can be specified for different logins. 
3) if you will not provide the db_name in above procedure, it will consider it as master by default.

now you can view the details for login 'pankaj'

sp_displaylogin 'pankaj' 

Suid: 4
Loginame: pankaj
Default Database: sony
Default Language:
Auto Login Script:
Configured Authorization:
Locked: NO
Date of Last Password Change: Jun 20 2015 1:58PM
Password expiration interval: 0
Password expired: NO
Minimum password length: 6
Maximum failed logins: 0
Current failed login attempts:
Authenticate with: AUTH_DEFAULT
Login Password Encryption: SHA-256
Last login date: Jun 20 2015 2:20PM
Exempt inactive lock: 0
Execution time: 0.041 seconds

Method 2:

create login <login_name> with password <login_password>


create login 'pankaj' with password 'pathak'

Your password should satisfy the no. of characters provided in the Run Value

sp_configure "minimum password length"

Also, you can change it to server wide or for a specific login.


Keep updating me with your suggestions and queries in the comments below...everything will be appreciated..Thanks...!!

No comments:

Post a Comment