Этот баннер — требование Роскомнадзора для исполнения 152 ФЗ.
«На сайте осуществляется обработка файлов cookie, необходимых для работы сайта, а также для анализа использования сайта и улучшения предоставляемых сервисов с использованием метрической программы Яндекс.Метрика. Продолжая использовать сайт, вы даёте согласие с использованием данных технологий».
Политика конфиденциальности
|
|
|
Проблема чистки больштх таблиц в db2v7
|
|||
|---|---|---|---|
|
#18+
При чистки больших таблиц в db2v7 система выдаёт сообщение SQL0964C The transaction log for the database is full. SQLSTATE=57011 57011 Virtual storage or database resource is not available. Какими настройками базы данных можно размер виртуальной памяти? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.11.2005, 15:00 |
|
||
|
Проблема чистки больштх таблиц в db2v7
|
|||
|---|---|---|---|
|
#18+
db2 update db cfg using LOGFILSZ 5000 db2 update db cfg logprimary 10 db2 update db cfg logprimary 10 Опять же можно почитать про опцию NOT LOGGED INITIALLY ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.11.2005, 15:17 |
|
||
|
Проблема чистки больштх таблиц в db2v7
|
|||
|---|---|---|---|
|
#18+
Мне не нужно удалять таблицу(ALTER TABLE), я её чищу (delete from TABLE). ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.11.2005, 15:47 |
|
||
|
Проблема чистки больштх таблиц в db2v7
|
|||
|---|---|---|---|
|
#18+
Сделайте "бесконечный" лог UPDATE DB CFG USING LOGSECOND -1 ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.11.2005, 15:51 |
|
||
|
Проблема чистки больштх таблиц в db2v7
|
|||
|---|---|---|---|
|
#18+
Мы документацию внимательно читать не хотим??? ACTIVATE NOT LOGGED INITIALLY Activates the NOT LOGGED INITIALLY attribute of the table for this current unit of work. 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. Any changes made to the system catalog by the ALTER statement in which the NOT LOGGED INITIALLY attribute is activated are logged. Any subsequent changes made in the same unit of work to the system catalog information are logged. 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. If using this feature to avoid locks on the catalog tables while inserting data, it is important that only this clause be specified on the ALTER TABLE statement. Use of any other clause in the ALTER TABLE statement will result in catalog locks. If no other clauses are specified for the ALTER TABLE statement, then only a SHARE lock will be acquired on the system catalog tables. This can greatly reduce the possibility of concurrency conflicts for the duration of time between when this statement is executed and when the unit of work in which it was executed is ended. If the table is a typed table, this option is only supported on the root table of the typed table hierarchy (SQLSTATE 428DR). For more information about the NOT LOGGED INITIALLY attribute, see the description of this attribute in "CREATE TABLE". Note: If non-logged activity occurs against a table that has the NOT LOGGED INITIALLY attribute activated, and if a statement fails (causing a rollback), or a ROLLBACK TO SAVEPOINT is executed, the entire unit of work is rolled back (SQL1476N). Furthermore, the table for which the NOT LOGGED INITIALLY attribute was activated is marked inaccessible after the rollback has occurred and can only be dropped. Therefore, the opportunity for errors within the unit of work in which the NOT LOGGED INITIALLY attribute is activated should be minimized. WITH EMPTY TABLE Causes all data currently in table to be removed. Once the data has been removed, it cannot be recovered except through use of the RESTORE facility. If the unit of work in which this Alter statement was issued is rolled back, the table data will NOT be returned to its original state. When this action is requested, no DELETE triggers defined on the affected table are fired. Any indexes that exist on the table are also emptied. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.11.2005, 19:48 |
|
||
|
Проблема чистки больштх таблиц в db2v7
|
|||
|---|---|---|---|
|
#18+
2 nkulikov Опасно делать NOT LOGGED. Если вдруг ошибка в процессе удаления - пересоздавать табличку. Типа - данные потеряны. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.11.2005, 20:03 |
|
||
|
Проблема чистки больштх таблиц в db2v7
|
|||
|---|---|---|---|
|
#18+
В некотором роде так. Но ничего бесплатного не бывает. Можно кстати воспользоваться если есть окно DB2 HPU -> LOAD Кстати ты будешь на IDUG в питере??? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.11.2005, 20:06 |
|
||
|
Проблема чистки больштх таблиц в db2v7
|
|||
|---|---|---|---|
|
#18+
дробить надобно транзакцию, если базюка грамотно зачата то бишь с внешними ключиками заточенными на каскадное удаление и проча, то это не проблема, что-то типа for (i = 1; i <= mod(count_total/portion_size);i++) { delete from ... where root_id between ... ; commit ; } delete from ... where root_id between ... ; -- чистим остаток commit ; у меня работает безотказно, count_total - всего объектов на удал, portion_size - размер пачки гарантировано удаляемой за одну транзакцию (транзакция ее удаления помещается в лог базы). Бесконечный лог это если у вас свободного места немеренно, я на базе с с контейнерами гигов на 50 на такое не решился. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 13.11.2005, 00:12 |
|
||
|
Проблема чистки больштх таблиц в db2v7
|
|||
|---|---|---|---|
|
#18+
nkulikovВ некотором роде так. Но ничего бесплатного не бывает. Можно кстати воспользоваться если есть окно DB2 HPU -> LOAD Кстати ты будешь на IDUG в питере??? Я вообще не знал что такое событие ожидается. это 16-го ноября? Спасибо что сказал. Конечно постораюсь быть. Щас зарегистрируюсь. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 14.11.2005, 11:23 |
|
||
|
|

start [/forum/topic.php?fid=43&fpage=141&tid=1605684]: |
0ms |
get settings: |
9ms |
get forum list: |
14ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
25ms |
get topic data: |
9ms |
get forum data: |
2ms |
get page messages: |
39ms |
get tp. blocked users: |
1ms |
| others: | 215ms |
| total: | 320ms |

| 0 / 0 |
