Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - SQL Usage » Data import and export » Data export

 

Exporting tables (command line)

You can export a table by running the Unload utility (dbunload) on the command line.

Prerequisites

For an unload without reload, you must have the SELECT ANY TABLE system privilege. For an unload with reload, you must have the SELECT ANY TABLE and SERVER OPERATOR system privileges.

Context and remarks

You can unload more than one table by separating the table names with a comma (,) delimiter.

 Task
  • Run the following command:

    dbunload -c "DBN=demo;UID=DBA;PWD=sql" -t Employees C:\ServerTemp\DataFiles

    In this command, -c specifies the database connection parameters and -t specifies the name of the table or tables you want to export. This dbunload command unloads the data from the SQL Anywhere sample database (assumed to be running on the default database server) into a set of files in the C:\ServerTemp\DataFiles directory on the server computer. A SQL script file to rebuild the tables from the data files is created with the default name reload.sql in the client's current directory.

Results

The data is exported to the specified location.

 See also