Friday, June 13, 2014

Sybase Database users commands

Users and logins in Sybase 

 sp_iqaddlogin
  

Add users and define their password, number of concurrent connections, and password expiration

sp_iqdroplogin
  

Drop users

sp_iqlistexpiredpasswords
  

List users whose passwords have expired

sp_iqlistlockedusers
  

List users who are locked out of the database

sp_iqlistpasswordexpirations
  

List password expiration information for all users

sp_iqlocklogin
  

Lock a user account so that the user cannot connect to the database

sp_iqmodifyadmin
  

Enable Sybase IQ User Administration, or set database defaults for active user or database connections or password expirations

sp_iqmodifylogin
  

Modify the number of concurrent connections or password expiration for one or all users

sp_iqpassword
    


Modify a user’s password. Users can modify their own password. DBAs can modify any password.

 

Logins:

How to add login in Sybase database?

>sp_addlogin login_name,password,db_name

How to drop login from Sybase database?

>sp_droplogin login_name

Note: Need to drop user before dropping login.

How to find authentication mechanism of login in Sybase database?

>sp_showauthmech login_name
 
Users:
How to find user exists in Sybase database?

>sp_helpuser user_name

How to add user to Sybase database?

>sp_adduser loginame [, user_name [, groupname]]

How to drop user in Sybase database?

>sp_dropuser  user_name

How to add alias to the user in Sybase database?

>sp_addalias user_name,dbo

Note: drop the old user_name from db and add new alias to user 

Imp Note: System Database owner permission is required to run above system procedures.

No comments:

Post a Comment