cancel
Showing results for 
Search instead for 
Did you mean: 

SYBASE : ISQL login error

anand_sampath2
Participant
0 Kudos

Hi Experts,

I am not able to login isql in command prompt . and I'm getting the following error,Can anybody help me in fixing this issue. Is there any default password for it .

I logged in as syb[sid] and exeuted below command and end up with below error :

E:\sybase\EGS\OCS-15_0\bin>isql -S EGS -U sa

Password:

Msg 4002, Level 14, State 1:

Server 'EGS':

Login failed.

CT-LIBRARY error:

        ct_connect(): protocol specific layer: external error: The attempt to co

nnect to the server failed.

E:\sybase\EGS\ASE-15_0\bin>isql -S SOLMAN -U sybegs

Password:

CT-LIBRARY error:

        ct_connect(): directory service layer: internal directory control layer

error: Requested server name not found.

Thanks In Advance,

Satheesh E

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Hanad,

try this

isql -U sapsa -P password_sa_user -S SID -X

Regards

Domenico

Answers (2)

Answers (2)

ryan_hansen
Employee
Employee
0 Kudos


Hi Satheesh E,

In older versions the sa username was defaulted to a blank password when you built the ASE.

Around ASE 15.7.x the password was created when creating the server.

If you need to reset the sa password you need to:

1) Edit the RUN_SERVERNAME file in your $SYBASE/install
directory.

2) On last line add the command: -psa

If sa user is locked then add traceflag -T4044

3) Save RUN_SERVERNAME

4) Restart server

5) As server boots up you will notice a very long password
generated for the sa login. Write this password down!

This password will not be displayed in the ASE log and must be written down from the cmd prompt output.

6) Using sp_password change the sa password to the password
desired.

7) Edit RUN_SERVERNAME file and remove the -psa from line to
prevent new sa password from being generated with the next
startup of the server.

If everything works as expected, please run exec
sp_locklogin sa, unlock.

These are what the errors mean.

Error:

E:\sybase\EGS\OCS-15_0\bin>isql -S EGS -U sa

Password:

Msg 4002, Level 14, State 1:

Server 'EGS':

Login failed.

CT-LIBRARY error:

        ct_connect(): protocol specific layer: external error: The attempt to co

nnect to the server failed.

Cause:

The username and password are not correct in the ASE.

This could mean that the user is not created or uername and password do not match.

Resolution:

Login with a vaild login and add the username and password or reset the password.

You can also check to make sure the account is not locked.

sp_displaylogin <login name>

Example-

sp_displaylogin sa

Error:

E:\sybase\EGS\ASE-15_0\bin>isql -S SOLMAN -U sybegs

Password:

CT-LIBRARY error:

        ct_connect(): directory service layer: internal directory control layer

error: Requested server name not found.

Cause:

-S is not correctly setup

SOLMAN was not found in the sql.ini or interfaces file.

Resolution:

I would suggest not using spaces after the parameters (-U -P -S, etc).

Check the $SYBASE/interfaces or %SYBASE%\ini\sql.ini files to make sure this entry exists.

If you are using a newer version of isql (15.5 and up) you can use the host and port to check the connections.

-S<host>:<port>

Example-

-Sredhead:4748

Regards,

Ryan

SybDBA
Participant
0 Kudos

Hi Ryan,

As your description I am trying but not succeeded....

what I have done earlier,

sp_configure 'allow updates to system tables',0

update syslogins set password =null where name = 'sa'

after this I'm not able to connect the server.

getting error like :

Password for login name 'sa' is corrupt. Please reset the password.

when I tried your solution I'm not getting new password in log file.

Please help me out.

---

Regards

former_member188958
Active Contributor
0 Kudos

The new password is not recorded in the servers errorlog file - it is only output to the console window.

-bret


SybDBA
Participant
0 Kudos

Hi Bret,

I'm running on Win7 OS box. so I used to start service from services.

so how its found on output console??

OR

How I should start the server??

---

Regards

ryan_hansen
Employee
Employee
0 Kudos

Bret is correct. The password will only show up on the console window.

Been a while since I've done this on windows.

Open a cmd prompt.

Go to %SYBASE%

Make sure all your environment variables are set from SYBASE.bat

Believe you can just type SYBASE.bat to run this for the cmd prompt window.

Go to %SYBASE_ASE%\install

Make sure you have added the traceflag to the RUN_<asename> file.

Once done start the server:
startsrv -f RUN_<asename>

This should output all the information to the cmd prompt window.

Also, what I've heard is, once you change the password from null, you have to have a password with characters.

Regards,

Ryan

SybDBA
Participant
0 Kudos

Hi Ryan,

sorry........but Its like this

C:\Sybase\ASE-15_0\install>startsrv -f RUN_ASE157

Cannot execute file RUN_ASE157

C:\Sybase\ASE-15_0\install>

C:\Sybase\ASE-15_0\install>

what i m doing wrong not getting...??

I have applied all the steps you mentioned earlier.

---

Regards

former_member188958
Active Contributor
0 Kudos

Are you opening the cmdshell window with the "Run as Administrator" option?

(right click on the cmdshell icon to select this option).

-bret

Amarnath
Participant
0 Kudos

Hi Dwayne,

As Bret said please try with Run as Administrator mode. Make sure to increase the CMD properties i.e., buffer size to max like 9999. As the password will be only displayed on CMD screen.

Regards,

Amarnath

victoria_normand
Contributor
0 Kudos

Hi Dwayne,

I would expect that you are working with SAP application running on ASE ?
In general it is not recommended to manipulate manually any ASE system table.

The initial issue mentioned on this thread is due to the missing "-X" flag when trying to open an isql session. The '-X' flag indicates that we will start a connection to the ASE with client-side password encryption. That is recommended for SAP applications environment, we have the ASE configuration paramater "net password encryption reqd" enabled ( >0 recommended = 1) to use either RSA or SAP propietary encryption algoritms to encrypt login password. If you have that parameter enabled and you try to connect to the server with an isql session without the -X flag, the "Login failed" message error will be returned.

The "sa" user is normally locked on SAP applications environment running on ASE, and it uses to be unlocked only during upgrades or for a very specific situation. The corruption message is due to the update on syslogins. To reset the "sa" password you might follow instructions from Note 1706410 - SYB: Security - Changing passwords for database users

Please take into account that you'll have to update the Secure Storage as well.
If there is any other issue I would suggest to open a new discussion as the answer for this one was already provided.

Thanks,

Regards,
Victoria.

SybDBA
Participant
0 Kudos

Hi Experts,

Here all the steps I have followed as you suggested. And I am getting the same error.

What I should do now.

----

Regards

Former Member
0 Kudos

Hi Anand -

This is the ADS (Advantage Database Server) Community.  I think you meant to ask this question in the ASE community. Please repost in the ASE community.

Thanks,

Mike