Гость
Форумы / IBM DB2, WebSphere, IMS, U2 [игнор отключен] [закрыт для гостей] / alter table ... activate not logged initially / 7 сообщений из 7, страница 1 из 1
03.06.2004, 10:26
    #32545968
alter table ... activate not logged initially
db2 "alter table qqq activate not logged initially"
db2 "delete from qqq"
db2 "insert into qqq select * from table(qqq_external()) as t"

в qqq изначально 700 метров данных. сначала убиваю их, потом вставляю
данные с помощью OLE функции с другого сервера с другой БД. Почему-то
на этапе удаления данных журнал транзакций используется.
Где собака порылась?

С уважением, Миронов Никита
http://ok.novgorod.net/nickita

p.s. Платформа Windows 2000, DB2 8.1
...
Рейтинг: 0 / 0
03.06.2004, 11:52
    #32546230
Victor Metelitsa
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
alter table ... activate not logged initially
По дефолту у командного процессора включен автокоммит, а после коммита not logged initially выключается.
...
Рейтинг: 0 / 0
03.06.2004, 12:03
    #32546264
alter table ... activate not logged initially
как отключить autocommit?

С уважением, Миронов Никита
http://ok.novgorod.net/nickita

p.s. Платформа Windows 2000, DB2 8.1
...
Рейтинг: 0 / 0
03.06.2004, 12:27
    #32546346
Victor Metelitsa
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
alter table ... activate not logged initially
RTFM про Command Line Processor Options.

Ладно, на первый раз:

Auto-commit Option (-c):
This option specifies whether each command or statement is to be treated independently. If set ON (-c), each command or statement is automatically committed or rolled back. If the command or statement is successful, it and all successful commands and statements that were issued before it with autocommit OFF (+c or -c-) are committed. If, however, the command or statement fails, it and all successful commands and statements that were issued before it with autocommit OFF are rolled back. If set OFF (+c or -c-), COMMIT or ROLLBACK must be issued explicitly, or one of these actions will occur when the next command with autocommit ON (-c) is issued.
The default setting for this command option is ON.

The auto-commit option does not affect any other command line processor option.

Example: Consider the following scenario:

db2 create database test
db2 connect to test
db2 +c "create table a (c1 int)"
db2 select c2 from a
The SQL statement in step 4 fails because there is no column named C2 in table A. Since that statement was issued with auto-commit ON (default), it rolls back not only the statement in step 4, but also the one in step 3, because the latter was issued with auto-commit OFF. The command:

db2 list tables

then returns an empty lis
...
Рейтинг: 0 / 0
03.06.2004, 17:43
    #32547342
Andrew Tyapuhin
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
alter table ... activate not logged initially
а можно еще убрать check в опциях command center...
...
Рейтинг: 0 / 0
03.06.2004, 22:46
    #32547626
Aion
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
alter table ... activate not logged initially
2 Никита Миронов

А если попробывать вот так:
Код: plaintext
alter table qqq activate not logged initially with empty table
...
Рейтинг: 0 / 0
04.06.2004, 10:07
    #32547907
alter table ... activate not logged initially
"db2 +c" действительно помогло очень сильно. про "with empty table" буду смотреть.

спасибо огромное!

С уважением, Миронов Никита
http://ok.novgorod.net/nickita

p.s. Платформа Windows 2000, DB2 8.1
...
Рейтинг: 0 / 0
Форумы / IBM DB2, WebSphere, IMS, U2 [игнор отключен] [закрыт для гостей] / alter table ... activate not logged initially / 7 сообщений из 7, страница 1 из 1
Целевая тема:
Создать новую тему:
Автор:
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]