Question : password for isql

Hi all,
I am new on sybase, I forgot isql sa password,
how can I connect isql ?
any way to change unknown password? any files? any
methods?

is there any equivalent of svrmgrl Oracle for Sybase?
thanks all.
hakan  

Answer : password for isql

I must say this is a pretty costly mistake you made and you should try to avoid forgetting sa password in future. However, I hope that you must be having some other logins/users also assigned to the 'System Administrator' role(if you don't have this now, you might think of doing this the next time so as to avoid problems like this in future) and if you have one, then you can solve this problem.

    The passwords for different logins are stored in encrypted form in the "syslogins" table of the 'master' database. You can write a simple SQL statement to update the password for the "sa" login to null.

Syntax :
use master
go
update syslogins set password as null where name = "sa"
go

However, to run this SQL statement, you need to be a member of the 'sa' role.
 Once this password is set to null, you can use the 'sp_password'stored procedure to change the password. Attaching the syntax and reference for SP 'sp_password'.

 Since this is a very secure information, I don't think it will be stored in any file without some level of encryption. Also, I am not aware of any tool like svrmgrl for Sybase Administration.

In case, the above methods don't work, I guess you ought to reinstall. I don't think you can avoid that..

 Hope this info helps.


#############################################

sp_password

Function
Adds or changes a password for an Adaptive Server login account.

Syntax
sp_password caller_passwd, new_passwd [, loginame]

Parameters

caller_passwd - is your password. When you are changing your own password, this is your old password. When a System Security Officer is using sp_password to change another user's password, caller_passwd is the System Security Officer's password.
new_passwd - is the new password for the user, or for loginame. It must be at least 6 bytes long. Enclose passwords that include characters besides A-Z, a-z, or 0-9 in quotation marks. Also enclose passwords that begin with 0-9 in quotes.
loginame - the login name of the user whose account password is being changed by the System Security Officer.

Examples

1.sp_password "3blindmice", "2mediumhot"
Changes your password from password from "3blindmice" to "2mediumhot." (Enclose the passwords in quotes because they begin with numerals.)
2.sp_password "2tomato", sesame1, victoria
A System Security Officer whose password is "2tomato" has changed Victoria's password to "sesame1."
3.sp_password null, "16tons"
Changes your password from NULL to "16tons." Notice that NULL is not enclosed in quotes. (NULL is not a permissible new password.)
4.PRODUCTION...sp_password figaro, lilacs
Changes your password on the PRODUCTION server from "figaro" to "lilacs."

Comments
·Any user can change his or her password with sp_password.
·New passwords must be at least 6 characters long. They cannot be NULL.
·The encrypted text of caller_passwd must match the existing encrypted password of the caller. If it does not, sp_password returns an error message and fails. master.dbo.syslogins lists passwords in encrypted form.
·If a client program requires users to have the same password on remote servers as on the local server, users must change their passwords on all the remote servers before changing their local passwords. Execute sp_password as a remote procedure call on each remote server. See example 4.
·You can set the systemwide password expiration configuration parameter to establish a password expiration interval that forces all Adaptive Server login accounts to change passwords on a regular basis. For more information, see the System Administration Guide.

Permissions
Only a System Security Officer can execute sp_password to change another user's password. Any user can execute sp_password to change his or her own password.

Tables Used
master.dbo.syslogins, sysobjects

Random Solutions  
 
programming4us programming4us