Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


TRUNCATE


TRUNCATE

Author
Message
Paul White
Paul White
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10338 Visits: 11350
vk-kirov (2/10/2010)
In the example above, we will see request_mode = Sch-M (schema modification). This is specific to DDL events.

Not true. From Books Online - Lock Modes:

Some data manipulation language (DML) operations, such as table truncation, use Sch-M locks to prevent access to affected tables by concurrent operations.


So, table truncation is explicitly defined as a DML operation.



Paul White
SQLPerformance.com
SQLblog.com
@SQL_Kiwi
Peter Trast
Peter Trast
SSChasing Mays
SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)

Group: General Forum Members
Points: 642 Visits: 655
Paul White NZ (3/30/2010)
vk-kirov (3/3/2010)
So, db_ddladmin can run any DDL command; db_ddladmin can run TRUNCATE TABLE. This means TRUNCATE is a DDL command, I believe :-)

Crows are birds.
All crows are black.
Therefore, all birds are black.

Oh dear.

Laugh

Impeccable logic Paul ;-)

Peter Trast
Microsoft Certified ...(insert many literal strings here)
Microsoft Design Architect with Alexander Open Systems
Paul White
Paul White
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10338 Visits: 11350
Peter Trast (3/30/2010)
Impeccable logic Paul ;-)

Given the bird theme, I suppose it should be im-peck-able logic really :-D

(sorry)



Paul White
SQLPerformance.com
SQLblog.com
@SQL_Kiwi
Peter Trast
Peter Trast
SSChasing Mays
SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)

Group: General Forum Members
Points: 642 Visits: 655
Paul White NZ (3/30/2010)
Peter Trast (3/30/2010)
Impeccable logic Paul ;-)

Given the bird theme, I suppose it should be im-peck-able logic really :-D

(sorry)


Booooo.... lol...

Peter Trast
Microsoft Certified ...(insert many literal strings here)
Microsoft Design Architect with Alexander Open Systems
vk-kirov
vk-kirov
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3494 Visits: 4408
Paul White NZ (3/30/2010)
Some data manipulation language (DML) operations, such as table truncation, use Sch-M locks to prevent access to affected tables by concurrent operations.


So, table truncation is explicitly defined as a DML operation.

Nice find, thank you.

So, if it barks like a dog, it behaves like a dog, what is it?..
...it may be a duck in SQL Server :-D
Paul White
Paul White
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10338 Visits: 11350
vk-kirov (3/31/2010)

Nice find, thank you. So, if it barks like a dog, it behaves like a dog, what is it?...

It is a duck, with some arguably dog-like features :-P



Paul White
SQLPerformance.com
SQLblog.com
@SQL_Kiwi
Peter Trast
Peter Trast
SSChasing Mays
SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)

Group: General Forum Members
Points: 642 Visits: 655
Paul White NZ (3/31/2010)
vk-kirov (3/31/2010)

Nice find, thank you. So, if it barks like a dog, it behaves like a dog, what is it?...

It is a duck, with some arguably dog-like features :-P


Interesting de-duck-tion....

Peter Trast
Microsoft Certified ...(insert many literal strings here)
Microsoft Design Architect with Alexander Open Systems
Paul White
Paul White
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10338 Visits: 11350
Peter Trast (3/31/2010)
Paul White NZ (3/31/2010)
vk-kirov (3/31/2010)

Nice find, thank you. So, if it barks like a dog, it behaves like a dog, what is it?...

It is a duck, with some arguably dog-like features :-P

Interesting de-duck-tion....

Boooooo! :-P



Paul White
SQLPerformance.com
SQLblog.com
@SQL_Kiwi
Peter Trast
Peter Trast
SSChasing Mays
SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)SSChasing Mays (642 reputation)

Group: General Forum Members
Points: 642 Visits: 655
Paul White NZ (3/31/2010)
Peter Trast (3/31/2010)
Paul White NZ (3/31/2010)
vk-kirov (3/31/2010)

Nice find, thank you. So, if it barks like a dog, it behaves like a dog, what is it?...

It is a duck, with some arguably dog-like features :-P

Interesting de-duck-tion....

Boooooo! :-P


Hey, people from middle earth can't boo! :-D

Peter Trast
Microsoft Certified ...(insert many literal strings here)
Microsoft Design Architect with Alexander Open Systems
Paul White
Paul White
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10338 Visits: 11350
Peter Trast (3/31/2010)
Hey, people from middle earth can't boo! :-D

Middle Earth, if you please :-P



Paul White
SQLPerformance.com
SQLblog.com
@SQL_Kiwi
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search