亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 6842 | 回復: 6
打印 上一主題 下一主題

怎樣Import時候不記錄日志 [復制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2007-11-30 09:19 |只看該作者 |倒序瀏覽
需要向一個表中Import幾百萬條記錄,按照以前論壇上說得的方法,
alter table ab activate not logged initially
import from ..... insert into ....
但是依然報事務日志已滿的錯誤,好像依然記錄日志。請問各位如何解決?
不想在import時候用commitcount參數(shù)

論壇徽章:
0
2 [報告]
發(fā)表于 2007-11-30 10:58 |只看該作者
你對這個理解有誤,下面的內(nèi)容是從inforcenter里面節(jié)選出來的。
ACTIVATE NOT LOGGED INITIALLY

1. Any changes made to the table by an INSERT, DELETE, UPDATE, CREATE INDEX, DROP INDEX, or ALTER TABLE in the same unit of work after the table is altered by this statement are not logged. 特別注意,in the same unit of work。

2. Any changes made to the system catalog by the ALTER statement in which the NOT LOGGED INITIALLY attribute is activated are logged.

3. Any subsequent changes made in the same unit of work to the system catalog information are logged.

4. At the completion of the current unit of work, the NOT LOGGED INITIALLY attribute is deactivated and all operations that are done on the table in subsequent units of work are logged.  特別注意這一點,結(jié)合第一點,就是你依然碰到日志滿的原因了。

論壇徽章:
0
3 [報告]
發(fā)表于 2007-11-30 15:02 |只看該作者
問一下: in the same unit of work 是啥意思?

論壇徽章:
0
4 [報告]
發(fā)表于 2007-12-02 12:18 |只看該作者
下面是官方準確的解釋。
http://publib.boulder.ibm.com/in ... oc/doc/c0005018.htm


Units of work

A transaction is commonly referred to in DB2 Database for Linux, UNIX, and Windows as a unit of work. A unit of work is a recoverable sequence of operations within an application process. It is used by the database manager to ensure that a database is in a consistent state. Any reading from or writing to the database is done within a unit of work.

For example, a bank transaction might involve the transfer of funds from a savings account to a checking account. After the application subtracts an amount from the savings account, the two accounts are inconsistent, and remain so until the amount is added to the checking account. When both steps are completed, a point of consistency is reached. The changes can be committed and made available to other applications.

A unit of work is started implicitly when the first SQL statement is issued against the database. All subsequent reads and writes by the same application are considered part of the same unit of work. The application must end the unit of work by issuing either a COMMIT or a ROLLBACK statement. The COMMIT statement makes permanent all changes made within a unit of work. The ROLLBACK statement removes these changes from the database. If the application ends normally without either of these statements being explicitly issued, the unit of work is automatically committed. If it ends abnormally in the middle of a unit of work, the unit of work is automatically rolled back. Once issued, a COMMIT or a ROLLBACK cannot be stopped. With some multi-threaded applications, or some operating systems (such as Windows(R)), if the application ends normally without either of these statements being explicitly issued, the unit of work is automatically rolled back. It is recommended that your applications always explicitly commit or roll back complete units of work. If part of a unit of work does not complete successfully, the updates are rolled back, leaving the participating tables as they were before the transaction began. This ensures that requests are neither lost nor duplicated.

There is no physical representation of a unit of work because it is a series of instructions (SQL statements).

[ 本帖最后由 huyuhui001 于 2007-12-2 12:19 編輯 ]

論壇徽章:
0
5 [報告]
發(fā)表于 2007-12-02 19:33 |只看該作者
LOAD 是不寫日志的

論壇徽章:
0
6 [報告]
發(fā)表于 2007-12-03 15:58 |只看該作者

執(zhí)行的時候使用+c

把你的那兩條語句放一個腳本里面,執(zhí)行時用db2 +c -tvf a.db2

論壇徽章:
0
7 [報告]
發(fā)表于 2007-12-07 14:40 |只看該作者
用load吧。
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP