11-08-2015 10:58 PM
Is anyone familiar with configuring a SQL Pass-through connection in SAS to a Sybase database where password encryption is enabled?
We are using the sample connection:
connect to sybase as link (server="dbserver" database="dbname" schema="link" user="userid" password="password");
This is encountering the below error.
ERROR: Connection failed. Error Code: -1640 Adaptive Server requires encryption of the login password on the network.
Normally, we would pass (encryptPassword=2) on the connection string. But I'm not familiar with how to pass this value to SAS connection string.
Any help would be appreciated.
11-09-2015 01:35 PM - edited 11-09-2015 01:38 PM
A connection string can be defined in SAS like this:
connect to sybase (noprompt = "Put your Sybase connection details here");
Inside the quotes you can specify a user/password string in the form that Sybase would understand.
11-11-2015 04:02 AM
Can you be more specific? How do I define the connection string? I tried this way :
connect to sybase as link
(noprompt = "Data Source=ServerName;Port=14112;Database=dbname;Uid=userid;Pwd=password;EncryptPassword=2;");
That didn't seem to work. How do I define the connection string, like an ODBC connection ?
An example of the connection string would be useful.
11-11-2015 01:57 PM
Sorry I don't use Sybase but this link may help guide you:
You seem to be on the right track based on this link.
02-09-2016 12:47 PM
02-10-2016 01:47 PM
connect to sybase
(noprompt = "Data Source=xx.xx.xx.xx;Port=5000;Database=xxxx;Uid=xxx;
create table xxx as
select * from connection to sybase (select xxx from xxx);
results in following error:
ERROR: Invalid option name noprompt.
02-11-2016 02:54 AM
I did some research and I'm wondering if NOPROMPT is valid with Sybase as it is with ODBC, DB2, Oracle.
Try this anyway:
proc sql; connect to sybase noprompt = "Data Source=xx.xx.xx.xx;Port=5000;Database=xxxx;Uid=xxx; Pwd=xxx;";
02-11-2016 10:23 AM
I appreciate your research. I tried that and got these errors:
ERROR 22-322: Syntax error, expecting one of the following: ;, (, AS.
ERROR 202-322: The option or parameter is not recognized and will be ignored.
with Oracle, I've successfully entered connection string data with "path="; there must be an equivalent for Sybase...
02-11-2016 01:49 PM
Sorry yes I think PATH works for Oracle, NOPROMPT works with ODBC, SQL Server and DB2.
With Sybase I think you need to use an interface file as documented here with the INTERFACE option:
And here from Sybase:
I suggest you talk to your Sybase DBA as he/she will be much more familiar with this.
07-27-2016 12:03 PM
This issue is caused by PasswordEncryption option on the Sybase server is turned on. I am not sure if there is another option on the Sybase connection string in SAS. However, you can fix this from the Sybase driver level.
On your local (or SAS server), you should have Sybase driver installed. In the driver directory, find the OCS-<XX>..\ini subdir. Locate the ocs.cfg file in the directory and add the folloing line to enable password encryption from this machine.
If the ocs.cfg file does not exist, you can create this file. Additionally, you can add the default setting to turn on password encryption on the client side by adding this section in the ocs.cfg file:
CS_SEC_ENCRYPTION = CS_TRUE