SQL Server database ledger tables from Linux
SQL Azure and SQL Server 2022 include a database security feature called ledger tables. As the Easysoft SQL Server ODBC driver supports Azure and SQL Server 2022, our customers will be able to take advantage of this feature.
Read this Microsoft tutorial for instructions on how to create and populate some ledger tables:
Easysoft's SQL Server ODBC driver provides the connectivity layer between the application and SQL Server or SQL Azure. The driver enables you to update and query data held in ledger tables from applications running on non-Windows platforms such as Linux.
Install and license the SQL Server ODBC driver. For instructions on how to do this, refer to the SQL Server ODBC driver documentation. If your application is 64-bit, download the 64-bit version of the ODBC driver. Otherwise, use the 32-bit version of the driver, regardless of the architecture of the operating system.
An ODBC data source contains the connection string information that enables the SQL Server ODBC driver to connect to the target SQL Server instance. On our machine, ODBC data sources are stored in /etc/odbc.ini
. This data source extract shows the relevant settings for a connection to a ledger-enabled database on Azure:
[AzureLedgerTables] Driver=Easysoft ODBC-SQL Server SSL Server=mysqlserverABCD54321.database.windows.net User=azureuser@mysqlserverABCD54321 Password=p455w0rd Database=demo Encrypt=Yes TrustServerCertificate=Yes
Note If your connection fails with the error "SSL connection failed in syscall," your system lacks a "randomness device." Refer to the Entropy
attribute in the SQL Server ODBC driver manual for information about what to do about this.
Here's an example of a Linux application working with ledger tables:
$ /usr/local/easysoft/unixODBC/bin/isql.sh -v AzureLedgerTables SQL> SELECT * FROM Account.Balance_Ledger ORDER BY ledger_transaction_id