Does a LOAD lock access to the table space or table? 
Author Message
 Does a LOAD lock access to the table space or table?
Hi All,

Kinda new to the DB2 arena and need some clarification on the
differences between IMPORT and LOAD.

From my understanding, a LOAD locks the table being loaded. An import
on the other hand does not lock the table being imported to. I am
using DB2 UDB ver 6. Am I right? Or does the LOAD lock the entire
tablespace? I appreciate your input!

Ben



Mon, 16 Aug 2004 07:10:55 GMT
 Does a LOAD lock access to the table space or table?

Hi Ben,

Load locks the tablespace that the table belongs to, but is much faster than import.

Paul Yip



Mon, 16 Aug 2004 10:23:24 GMT
 Does a LOAD lock access to the table space or table?

Quote:

> Hi All,

> Kinda new to the DB2 arena and need some clarification on the
> differences between IMPORT and LOAD.

> From my understanding, a LOAD locks the table being loaded. An import
> on the other hand does not lock the table being imported to. I am
> using DB2 UDB ver 6. Am I right? Or does the LOAD lock the entire
> tablespace? I appreciate your input!

> Ben

Hi Ben,

LOAD will lock the tablespace that the table belongs to. Import does
not, but LOAD is much faster than Import.

Some key differences:

IMPORT is a utility that does very fast INSERT commands (grouped
commits can be used), so triggers will get activated if you have any
defined, for example.

LOAD is much faster because it can be highly parallelized, and
bypasses the SQL layer of DB2 althogether. LOAD will check for unique
key violations, but check constraints and foreign key relationships
that might be defined on the target table are verified with a separate
SET CONSTRAINTS command after load completes.

Paul Yip



Mon, 16 Aug 2004 10:30:56 GMT
 Does a LOAD lock access to the table space or table?

Quote:

> Hi All,

> Kinda new to the DB2 arena and need some clarification on the
> differences between IMPORT and LOAD.

> From my understanding, a LOAD locks the table being loaded. An import
> on the other hand does not lock the table being imported to. I am
> using DB2 UDB ver 6. Am I right? Or does the LOAD lock the entire
> tablespace? I appreciate your input!

> Ben

Hi Ben,

LOAD will lock the tablespace that the table belongs to. Import does
not, but LOAD is much faster than Import.

Some key differences:

IMPORT is a utility that does very fast INSERT commands (grouped
commits can be used), so triggers will get activated if you have any
defined, for example.

LOAD is much faster because it can be highly parallelized, and
bypasses the SQL layer of DB2 althogether. LOAD will check for unique
key violations, but check constraints and foreign key relationships
that might be defined on the target table are verified with a separate
SET CONSTRAINTS command after load completes.

Paul Yip



Mon, 16 Aug 2004 10:31:43 GMT
 Does a LOAD lock access to the table space or table?

Quote:

> Hi All,

> Kinda new to the DB2 arena and need some clarification on the
> differences between IMPORT and LOAD.

> From my understanding, a LOAD locks the table being loaded. An import
> on the other hand does not lock the table being imported to. I am
> using DB2 UDB ver 6. Am I right? Or does the LOAD lock the entire
> tablespace? I appreciate your input!

> Ben

Hi Ben,

LOAD will lock the tablespace that the table belongs to. Import does
not, but LOAD is much faster than Import.

Some key differences:

IMPORT is a utility that does very fast INSERT commands (grouped
commits can be used), so triggers will get activated if you have any
defined, for example.

LOAD is much faster because it can be highly parallelized, and
bypasses the SQL layer of DB2 althogether. LOAD will check for unique
key violations, but check constraints and foreign key relationships
that might be defined on the target table are verified with a separate
SET CONSTRAINTS command after load completes.

Paul Yip



Mon, 16 Aug 2004 10:31:55 GMT
 Does a LOAD lock access to the table space or table?
Are the locked tables available for reading for
other processes i.e., is it a write lock or both
read-write lock?
Anyone know?

THanks,
Narsi

Quote:


> > Hi All,

> > Kinda new to the DB2 arena and need some clarification on the
> > differences between IMPORT and LOAD.

> > From my understanding, a LOAD locks the table being loaded. An import
> > on the other hand does not lock the table being imported to. I am
> > using DB2 UDB ver 6. Am I right? Or does the LOAD lock the entire
> > tablespace? I appreciate your input!

> > Ben

> Hi Ben,

> LOAD will lock the tablespace that the table belongs to. Import does
> not, but LOAD is much faster than Import.

> Some key differences:

> IMPORT is a utility that does very fast INSERT commands (grouped
> commits can be used), so triggers will get activated if you have any
> defined, for example.

> LOAD is much faster because it can be highly parallelized, and
> bypasses the SQL layer of DB2 althogether. LOAD will check for unique
> key violations, but check constraints and foreign key relationships
> that might be defined on the target table are verified with a separate
> SET CONSTRAINTS command after load completes.

> Paul Yip



Tue, 17 Aug 2004 07:49:16 GMT
 Does a LOAD lock access to the table space or table?
DB2 LOAD will issue a Super Exclusive Lock on the table.  This means
that nothing can access it, not even an appl. that has a UR (Uncommitted
Read) isolation level.
It also means that nobody, not even SYSADMIN, ONLY the id that has the
exclusive lock can access that table and this only with the load command.
HTH,  Pierre.
Quote:

> Are the locked tables available for reading for
> other processes i.e., is it a write lock or both
> read-write lock?
> Anyone know?

> THanks,
> Narsi



>>>Hi All,

>>>Kinda new to the DB2 arena and need some clarification on the
>>>differences between IMPORT and LOAD.

>>>From my understanding, a LOAD locks the table being loaded. An import
>>>on the other hand does not lock the table being imported to. I am
>>>using DB2 UDB ver 6. Am I right? Or does the LOAD lock the entire
>>>tablespace? I appreciate your input!

>>>Ben

>>Hi Ben,

>>LOAD will lock the tablespace that the table belongs to. Import does
>>not, but LOAD is much faster than Import.

>>Some key differences:

>>IMPORT is a utility that does very fast INSERT commands (grouped
>>commits can be used), so triggers will get activated if you have any
>>defined, for example.

>>LOAD is much faster because it can be highly parallelized, and
>>bypasses the SQL layer of DB2 althogether. LOAD will check for unique
>>key violations, but check constraints and foreign key relationships
>>that might be defined on the target table are verified with a separate
>>SET CONSTRAINTS command after load completes.

>>Paul Yip



Wed, 18 Aug 2004 04:35:37 GMT
 
 [ 7 post ] 

 Relevant Pages 

1. Table space access is not allowed DB2 error during LOAD

2. open Access table = locked Access table??

3. Table locking when Accessing Btrive Tables from Access 97

4. Lock Access table prior to ALTER TABLE

5. Locking table when deletion is doing

6. Locking tables on a network before doing a series of queries

7. How to execute a Create table or alter table table everytime before a data load

8. Table is locked, workstation coughs, table stays locked.

9. Access 97/SqlServer 7: Appending Access Tables into Sql Server tables doesnt work for big tables

10. Fast Load and Table Locks

11. Locking Table Excelusively for Loading purposes

12. lock table for concurrent user-access with RDO and Access-Database


 
Powered by phpBB® Forum Software