Quantcast
Channel: SCN: Message List - SAP Adaptive Server Enterprise (SAP ASE) for Custom Applications
Viewing all articles
Browse latest Browse all 3587

Re: database dump, update stats, reorg, dbcc blocks

$
0
0

Expanding a little on Mark's answer


Dump commands do block other dump commands on the same database.  This is done to ensure that the resulting files can be loaded in sequence.

 

There is a very short phase in a full database dump where processes that

are doing unlogged updates get put to sleep until the phase completes, which

is kind of like blocking, though it isn't obvious.

 

The QUIESCE DATABASE command will block processes that try to write to the device, but readers are not blocked, at least not until the cache fills completely with dirty buffers modified by other processes (a dirty buffer has to be written out before new data can be read into the buffer).

 

Until recently, REORG REBUILD always took an exclusive table lock and held it until the command completed.  The other REORG options would lock a handful of pages at a time, so there was blocking, but it was short lived.  The new online option greatly improve the concurrency of REBUILD.

 

In general, you can use traceflag 1212 (see ASE Traceflag 1212 - Enterprise Information Management - SCN Wiki) on a quiet test system to trace what locks are aquired and released by individual commands.  The type of locks and duration they are held determine what it will block.  Note that there can be surprising amounts of output, which is why I recommend only using it on a system where there is no other activity.  

 

 

-bret


Viewing all articles
Browse latest Browse all 3587

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>