Replicate SAS xpt Data to Multiple Databases



Replicate SAS xpt data to disparate databases with a single configuration.

Always-on applications rely on automatic failover capabilities and real-time access to data. CData Sync for SAS xpt integrates live SAS xpt data into your mirrored databases, always-on cloud databases, and other databases such as your reporting server: Automatically synchronize with remote SAS xpt data from Windows or any machine running Java.

You can use Sync's command-line interface (CLI) to easily control almost all aspects of the replication. You can use the CLI to replicate SAS xpt data to one or many databases without any need to change your configuration.

Connect to SAS xpt Data

You can save connection strings and other settings like email notifications in XML configuration files.

The following example shows how to replicate to SQLite.

Windows

<?xml version="1.0" encoding="UTF-8" ?> <CDataSync><DatabaseType>SQLite</DatabaseType> <DatabaseProvider>System.Data.SQLite</DatabaseProvider> <ConnectionString>URI=C:/folder;</ConnectionString> <ReplicateAll>False</ReplicateAll> <NotificationUserName></NotificationUserName> <DatabaseConnectionString>Data Source=C:\my.db</DatabaseConnectionString> <TaskSchedulerStartTime>09:51</TaskSchedulerStartTime> <TaskSchedulerInterval>Never</TaskSchedulerInterval> </CDataSync>

Java

<?xml version="1.0" encoding="UTF-8" ?> <CDataSync><DatabaseType>SQLite</DatabaseType><DatabaseProvider>org.sqlite.JDBC</DatabaseProvider> <ConnectionString>URI=C:/folder;</ConnectionString> <ReplicateAll>False</ReplicateAll> <NotificationUserName></NotificationUserName> <DatabaseConnectionString>Data Source=C:\my.db</DatabaseConnectionString> </CDataSync>

Connecting to Local SASXpt Files

You can connect to local SASXpt file by setting the URI to a folder containing SASXpt files.

Connecting to S3 data source

You can connect to Amazon S3 source to read SASXpt files. Set the following properties to connect:

  • URI: Set this to the folder within your bucket that you would like to connect to.
  • AWSAccessKey: Set this to your AWS account access key.
  • AWSSecretKey: Set this to your AWS account secret key.
  • TemporaryLocalFolder: Set this to the path, or URI, to the folder that is used to temporarily download SASXpt file(s).

Connecting to Azure Data Lake Storage Gen2

You can connect to ADLS Gen2 to read SASXpt files. Set the following properties to connect:

  • URI: Set this to the name of the file system and the name of the folder which contacts your SASXpt files.
  • AzureAccount: Set this to the name of the Azure Data Lake storage account.
  • AzureAccessKey: Set this to our Azure DataLakeStore Gen 2 storage account access key.
  • TemporaryLocalFolder: Set this to the path, or URI, to the folder that is used to temporarily download SASXpt file(s).

Configure Replication Queries

Sync enables you to control replication with standard SQL. The REPLICATE statement is a high-level command that caches and maintains a table in your database. You can define any SELECT query supported by the SAS xpt API. The statement below caches and incrementally updates a table of SAS xpt data:

REPLICATE SampleTable_1;

You can specify a file containing the replication queries. This enables you to use the same replication queries to replicate to several databases.

Run Sync

After you have configured the connection strings and replication queries, you can run Sync with the following command-line options:

Windows

SASXptSync.exe -g MySQLiteConfig.xml -f SASXptSync.sql

Java

java -Xbootclasspath/p:c:\sqlitejdbc.jar -jar SASXptSync.jar -g MySQLiteConfig.xml -f SASXptSync.sql

Ready to get started?

Learn more or sign up for a free trial:

CData Sync