Exporting tables (command line)

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

Prerequisites

The database server -gl option controls the permissions required to unload data from the database.

Context and remarks

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

 Export a table (command line)
  • Run the following command:

    dbunload -c "DBN=demo;UID=DBA;PWD=sql" 
    -t Employees c:\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 with the default database name) into a set of files in the c:\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 local current directory.

Results

The data is exported to the specified location.

Next

None.

 See also