onunload and onload

The onunload functionality of the application is a database or table written to tape, the program in binary form to the disk page as a unit to remove the data, the data unloaded in this way the efficiency of higher than dbexport.
Read to use onload applications created by onunload tape. The machine receiving data and create a tape machine must have the same page size.
Only users with database DBA privileges to remove the database. Only the owner of the table or the table where the database user with DBA privileges can remove the table.
Remove the table, only the data and index pages associated with the table is removed. Defined for the table access permissions and synonyms related to the table or view is not unloaded onto the tape.
Remove the operation during onunload exclusive way to block new database or table.

onunload 应用程序的功能是将数据库或表写到磁带上,该程序以二进制形式,以磁盘页为单位卸下数据,这种方式卸下的数据其效率高于dbexport。
读由onunload创建的磁带使用onload应用程序。接收数据的机器和创建磁带的机器必须具有相同的页面大小。
只有具有数据库DBA特权的用户才能卸下该数据库。只有表的属主或具有该表所在数据库的拥有DBA特权的用户才可以卸下该表。
卸下表时,只有与该表有关的数据页和索引页被卸下。为该表定义的存取权限和与表有关的同义词或视图未被卸到磁带上。
在卸下操作期间,onunload以排他方式封锁新数据库或表。

onunload [-l] [-t <tape device>;] [-b <block size>;] [-s <tape size>;] <database>; [: [<owner>;.] <table>;]
onload [-l] [-t <tape device>;] [-b <block size>;] [-s <tape size>;]
[-D <DBspace>;] <database>; [: [<owner>;.] <table>;]
[{-I <old index name>; <new index name>;}]
[{-Fd old-DBspace-name new-DBspace-name}]
[{-Fi index-name old-DBspace-name new-DBspace-name}]
[{-C <old constraint name>; <new constraint name>;}]

Example 1: hanner teacher in the database table from one dbspace moved to another dbspace

1> to uninstall unin teacher table offloaded to the disk, OnUnload requires data that pertains to the file exists, the first step is to create an empty file

# Touch teacher.onunload

If unloaded directly to tape, this step can be skipped

2> uninstall

# Onunload-t teacher.onunload hanner: teacher

3> SQL and dbaceess to remove the teacher table

# dbaccess hanner << EOF

> Drop table teacher

> EOF

4> Teacher table reloaded into the new dbspace in

# Onload-t teacher.onunload-d dbs01 hanner: teacher

发表评论