Sybase ASE¶
To use the API of Sybase ASE to perform bulk data loads, first you need to follow these steps:
Have the Sybase/SAP ASE Client or Server Installation: The bcp utility is not a standalone tool. It’s included as part of the Sybase/SAP ASE client software (Open Client) or the full database server installation. You must have at least the client components installed on the machine where you intend to run bcp
- Environment Variables:
SYBASE: This environment variable must be set to point to the root directory of your Sybase/SAP ASE installation.
SYBASE_OCS: This variable should point to the Open Client/Server directory located within the root directory of your Sybase/SAP ASE installation(e.g., OCS-16_0).
Interfaces or sql.ini File: Ensure that the interfaces file (on Unix/Linux) or sql.ini file (on Windows) is correctly configured to point to your Sybase ASE server. This file contains the connection details for your database server and must include the complete hostname (not just a short name), and it must match exactly the hostname used in the Datasource URI connection.
Note
Newer versions of bcp may not require the interfaces or sql.ini file, as they support direct connections using host and port information. If you are using a newer version and wish to connect using this method, execute the following:
SET 'com.denodo.vdb.util.tablemanagement.sql.insertion.sybase.SybaseASEBcpInsertWorker.bcpServerPortSyntax' = 'true';
Edit the JDBC data source and click the tab Read & Write. Then, select Use bulk data load APIs and in the Bcp executable location box, enter the path to the file
bcp.On Windows: enter
c:\<SYBASE>\<SYBASE_OCS>\bin\bcp.exe.On Linux: enter
/<SYBASE>/<SYBASE_OCS>/bin/bcp.
Note
Make sure the file path you enter exists.
Note
When using Sybase database as cache database by enabling bulk load API with bcp, empty strings will be converted to NULL values. If you want to keep empty strings, execute this:
SET 'com.denodo.vdb.util.tablemanagement.sql.insertion.sybase.SybaseASEBcpInsertWorker.keepEmptyStrings' = 'true';
You do not need to restart.
