ASA SQL User's Guide
Importing and Exporting Data
Rebuilding databases
To export table data or table schema (Command line)
At a command prompt, enter the dbunload command and specify connection parameters using the -c
option.
Specify the table(s) you want to export data or schema for, using the -t
option.
For example, to export part of the employee table, enter
dbunload -c "dbn=asademo;uid=DBA;pwd=SQL" -t employee c:\temp
You can unload more than one table by separating the table names with a comma delimiter.
If you want to export data only, add the -d
option.
For example, if you want to export data only, your final command would look like this:
dbunload -c "dbn=asademo;uid=DBA;pwd=SQL" -d -t employee c:\temp
If you want to export schema only, add the -n
option instead.
For example, if you want to export schema only, your final command would look like this:
dbunload -c "dbn=asademo;uid=DBA;pwd=SQL" -n -t employee c:\temp
Press Enter to execute the command.
The dbunload commands in these examples unload the data or schema from the sample database table (assumed to be running on the default database server with the default database name) into a file in the c:\temp directory. A command file to rebuild the database from the data files is created with the default name reload.SQL in the current directory.