![](https://csdnimg.cn/release/download_crawler_static/4343973/bga.jpg)
1.1.3 数据备份与恢复
1.1.3.1 Dbexport 与 Dbimport
dbexport
dbexport <database> [-X] [-c] [-q] [-d] [-ss]
[{ -o <dir> | -t <tapedev> -b <blksz> -s <tapesz> [-f
<sql-command-file>] }]
e.g.:
dbexport loan –o “d:/databak”
dbimport
dbimport <database> [-X] [-c] [-q] [-d <dbspace>]
[-l [{ buffered | <log-file> }] [-ansi]]
[{ -i <dir> | -t <tapedev> [ -b <blksz> -s <tapesz> ] [-f
<script-file>] }]
NOTE: <log-file> must be a complete path
arguments to dbimport are order independent
e.g.:
dbimport loan –d 表空间名
1.1.3.2 LOAD 与 UNLOAD
Load
LOAD FROM “file-name” INSERT INTO table_name [(column_name[,…])]
将文本数据栽入表中。
例:load from “aa.txt” delimiter '|' insert into user;
Unload
UNLOAD TO “pathname”
将表中数据卸为文本。
例:unload to “aa.txt” delimiter '|' select * from user;
1.1.3.3 修改表空间
新增表空间
onspaces -c –d Credit -p "路径\Credit.001" -o 0 -s 100000
增加表空间的数据块(chunk)
首先在建立文件 Credit.001
onspaces -a Credit -p "路径\Credit.001" -o 0 -s 100000
删除表空间
onspaces –d 表空间名