The Unload utility has options that allow you to unload only table data or the table schema.
The dbunload commands in these examples unload the data or schema from the SQL Anywhere sample database table (assumed to be running on the default database server with the default database name) into a file in the c:\DataFiles directory on the server computer. The statements required to recreate the schema and reload the specified tables are written to reload.sql in the local current directory.
To export table data (Command line)
Run the dbunload command, specifying: connection parameters using the -c option, table(s) you want to export data for using the -t option, and whether you want to unload only data by specifying the -d option.
For example, to export the data from the Employees table, run the following command:
dbunload -c "DBN=demo;UID=DBA;PWD=sql" -d -t Employees c:\DataFiles |
You can unload more than one table by separating the table names with a comma delimiter.
To export table schema (Command line)
Run the dbunload command, specifying: connection parameters using the -c option, the table(s) you want to export data for using the -t option, and whether you want to unload only the schema by specifying the -n option.
For example, to export the schema for the Employees table, execute the following command:
dbunload -c "DBN=demo;UID=DBA;PWD=sql" -n -t Employees |
You can unload more than one table by separating the table names with a comma delimiter.
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |