Start a new topic

Network Password Encryption enabled in Sybase DB

[This topic is migrated from our old forums. The original author name has been removed]

Hi, I'm a developer. I'm using DbVisualizer, details are : Product: DbVisualizer Free 5.1.1 Build: #1162 (2006/10/16 14:11) Java VM: Java HotSpot(TM) Client VM Java Version: 1.5.0_09-b01 Java Vendor: Sun Microsystems Inc. OS Name: Windows XP OS Arch: x86 OS Version: 5.1 I'm facing problem in DbVisualizer that I'm unable to login into Sybase DB, because Network Password Encryption has been enabled in Syabase DB side. When I try to login into Sybase I'm getting the below error: Can someone explain why am I getting this error: An error occured while establishing the connection. Type: javax.naming.CommunicationException Message: Cannot connect to ORB Thanks in advance. Bheeshmaraja

[This reply is migrated from our old forums.]

Re: Network Password Encryption enabled in Sybase DB
Marimuthu, What version of Sybase ASE and the JDBC driver are you using? What steps in the forum post have you tried (it is 5 years old so those steps may not apply to the versions of Sybase and jConnect available today). Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: Network Password Encryption enabled in Sybase DB
Hi Roger, I followed the steps you mentioned. But no luck. Getting same error. An error occurred while establishing the connection: Type: java.sql.SQLException Error Code: 1640 SQL State: S1000 Message: Adaptive Server requires encryption of the login password on the network. Thanks Marimuthu D
[This reply is migrated from our old forums.]

Re: Network Password Encryption enabled in Sybase DB
Nagarajan, First I must make you aware that we have no experience with password encryption using the J/Connect JDBC driver, so if the following fail you need to do further investigation on your own. The following page explain how to setup RSA encryption with Sybase: http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc20155.1500/html/newfesd/newfesd95.htm Based on the article, download the "Bouncy Castle Crypto APIs for Java". Which is the following file: http://www.bouncycastle.org/download/bcprov-jdk16-146.jar Now open DbVisualizer and the Tools->Driver Manager and do as follows: 1) Select the Sybase JDBC driver 2) In the right pane, make sure "User Specified" tab is selected 3) Click the open file button to the right in the tab 4) Locate the bcprov-jdk16-146.jar you just downloaded and open it in the file chooser 5) Now the list of files will list both the driver jar file and the newly loaded bcprov-jdk16-146.jar 6) Close the driver manager window Back in the main window do as follows: 7) In the main window select the database connection for Sybase 8) Click the bottom "Properties" tab 9) Select the "Driver Properties" category in the list 10) Click the green plus icon 11) Enter property name "JCE_PROVIDER_CLASS" 12) Enter the property value "org.bouncycastle.jce.provider.BouncyCastleProvider" 13) Make also sure that the "ENCRYPT_PASSWORD" setting is set to "true" 14) Press Apply Try re-connect. Note that I haven't tested this at all. Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: Network Password Encryption enabled in Sybase DB
Sorry I forgot to provide the details of encryption details in my previous reply itself. RSA Encryption is used in Network encryption. Will this DbVisualizer supports RSA encryption?
[This reply is migrated from our old forums.]

Re: Network Password Encryption enabled in Sybase DB
Hi, The error "Login failed" may mean many things. The following explain some situations and possible actions how to resolve the problem. http://manuals.sybase.com/onlinebooks/group-as/asg1250e/svrtsg/@Generic__BookTextView/39367;pt=39281/* In your case it seems as if the same error is produced also when failing to authenticate with encryption enabled. What type of encryption is used on the server? Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]
[Attachment has been removed.]

Re: Network Password Encryption enabled in Sybase DB
I have added ENCRYPT_PASSWORD in Driver Properties and set its value as 'true'. But still I'm facing issue in login. Error message : Product: DbVisualizer Free 7.1.5 Build: #1590 (2011/02/24 17:23) Java VM: Java HotSpot(TM) Client VM Java Version: 1.6.0_18 Java Vendor: Sun Microsystems Inc. OS Name: Windows XP OS Arch: x86 OS Version: 5.1 An error occurred while establishing the connection: Long Message: Login failed Details:    Type: java.sql.SQLException    Error Code: 4002    SQL State: S1000 1) Nested Exception: Long Message: Login failed. Details:    Type: java.sql.SQLException    Error Code: 4002    SQL State: S1000 Please guide me what else I have to do to get this resolved. Please find the attached .doc file which has config details with error message.
[This reply is migrated from our old forums.]

Re: Network Password Encryption enabled in Sybase DB
Hi, Try do the following: - In the Connection tab, click the lower "Properties" tab. - Click the "Driver Properties" category in the list. - Locate "ENCRYPT_PASSWORD" and change the value from "false" to "true". - Press Apply and re-connect. If it still don't work, please let me know what type of encryption is being setup in the DB server and I will look if there is a solution. Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]
[Attachment has been removed.]

Re: Network Password Encryption enabled in Sybase DB
As suggested by you, I have installed the latest version of DbVisualizer in my desktop. Now I'm getting the following error message : Product: DbVisualizer Free 7.1.5 Build: #1590 (2011/02/24 17:23) Java VM: Java HotSpot(TM) Client VM Java Version: 1.6.0_18 Java Vendor: Sun Microsystems Inc. OS Name: Windows XP OS Arch: x86 OS Version: 5.1 An error occurred while establishing the connection: Long Message: Adaptive Server requires encryption of the login password on the network. Details:    Type: java.sql.SQLException    Error Code: 1640    SQL State: S1000 1) Nested Exception: Long Message: Login failed Details:    Type: java.sql.SQLException    Error Code: 4002    SQL State: S1000 2) Nested Exception: Long Message: Login failed. Details:    Type: java.sql.SQLException    Error Code: 4002    SQL State: S1000 Please do let me know the below : Will this version support Network Encryption of password while connecting to the Sybase DB? If it supports what needs to be modified in my settings? If it does not support what can I do to login into Sybase DB? Please find the attached msword file which has the driver details as well as the error details.
[This reply is migrated from our old forums.]

Re: Network Password Encryption enabled in Sybase DB
Bheeshmaraja, Open the DbVisualizer driver manager, Tools->Driver Manager and select the Driver in the left list you are using. Now take a screenshot of that window and post it here or email to us. I see also that you are using DbVisualizer 5.1.1. That is a really old version and I suggest that you upgrade to the latest 7.1.5 version. Regards Roger support@dbvis.com