- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
[SAS ACCESS]
CS_SEC_ENCRYPTION= CS_TRUE
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:
[DEFAULT]
CS_SEC_ENCRYPTION = CS_TRUE
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Sorry I don't use Sybase but this link may help guide you:
http://www.connectionstrings.com/sybase-adaptive/
You seem to be on the right track based on this link.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Please post your code giving the error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
proc sql;
connect to sybase
(noprompt = "Data Source=xx.xx.xx.xx;Port=5000;Database=xxxx;Uid=xxx;
Pwd=xxx;");
create table xxx as
select * from connection to sybase (select xxx from xxx);
run;
results in following error:
ERROR: Invalid option name noprompt.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;";
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
[SAS ACCESS]
CS_SEC_ENCRYPTION= CS_TRUE
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:
[DEFAULT]
CS_SEC_ENCRYPTION = CS_TRUE