Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Lock escalation and error 1204
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Árni Guðmundsson  
View profile  
 More options Dec 6 1999, 3:00 am
Newsgroups: microsoft.public.sqlserver.server
From: "Árni Guðmundsson" <a...@vks.is>
Date: 1999/12/06
Subject: Lock escalation and error 1204
Hi,

I'm doing this in SQL 6.5

  insert into NewTable
    select Col1, Col2, Col3, etc
      from OldTable

and I keep getting "SQL Server has run out of LOCKS".
Shouldn't the Extent locks on the new table escalate to a table lock.

If not, is there an otherway to copy the data to a new table?

Thanks,
Arni


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Crito  
View profile  
 More options Dec 6 1999, 3:00 am
Newsgroups: microsoft.public.sqlserver.server
From: "Crito" <cr...@nospam.net>
Date: 1999/12/06
Subject: Re: Lock escalation and error 1204
On 6.5 the table lock escalation threshold has to be configured manually.
See LE threshold maximum, LE threshold minimum, LE threshold percent. You
might also want to increase LOCKS, default 5000 isn't enough... just
remember it costs 32 bytes per. You could also do a single table backup and
restore (removed in 7.0), but that shouldn't really be necessary, in your
case.

Árni Guðmundsson <a...@vks.is> wrote in message

news:OjM31cCQ$GA.176@cppssbbsa05...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Árni Guðmundsson  
View profile  
 More options Dec 6 1999, 3:00 am
Newsgroups: microsoft.public.sqlserver.server
From: "Árni Guðmundsson" <a...@vks.is>
Date: 1999/12/06
Subject: Re: Lock escalation and error 1204
But if I have Locks set to 5000 and LE threshold maximum set to 200 ,
I thought the table lock escalation would happen before the number of locks
reached 5000.
Do you know why this isn't the case ?

The new table doesn't have any indexes.

Thanks,
Arni


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kalen Delaney  
View profile  
 More options Dec 6 1999, 3:00 am
Newsgroups: microsoft.public.sqlserver.server
From: "Kalen Delaney" <kalen_dela...@hotmail.com>
Date: 1999/12/06
Subject: Re: Lock escalation and error 1204
Extent locks do not escalate to a table lock. The escalation routines only
look at the number of page locks you have. What is locks set at? Can you
increase it?

You could also try forcing a table lock on the NewTable before you do the
insert... something like this:

begin tran
  select count(some_column_in_newtable_with_no_index)
     from newtable (tablockx)

   insert into NewTable ....

commit tran

HTH

--
Kalen Delaney
MCSE, SQL Server MCT, MVP
www.InsideSQLServer.com
Feed Someone for Free Today:
     www.TheHungerSite.com

Árni Guðmundsson <a...@vks.is> wrote in message

news:OjM31cCQ$GA.176@cppssbbsa05...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tony Rogerson  
View profile  
 More options Dec 6 1999, 3:00 am
Newsgroups: microsoft.public.sqlserver.server
From: "Tony Rogerson" <tonyroger...@compuserve.com>
Date: 1999/12/06
Subject: Re: Lock escalation and error 1204
The extent locks are probably new extents being allocated - since SQL Server
needs the new extent it needs to lock it so that some other process doing
inserts doesn't try and also write to it.

--
Tony Rogerson SQL Server MVP
Torver Computer Consultants Ltd.

www.sql-server.co.uk
(FAQ;code library;tutorials;UK User Group)

"Árni Guðmundsson" <a...@vks.is> wrote in message

news:OjM31cCQ$GA.176@cppssbbsa05...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Árni Guðmundsson  
View profile  
 More options Dec 7 1999, 3:00 am
Newsgroups: microsoft.public.sqlserver.server
From: "Árni Guðmundsson" <a...@vks.is>
Date: 1999/12/07
Subject: Re: Lock escalation and error 1204
Thanks,
everyone.

I did try what Kalen suggested but
I still run out of locks (5000).

So I'll just have to increase the number of locks or to do this via BCP.

Thanks again
Arni

Árni Guðmundsson <a...@vks.is> wrote in message

news:OjM31cCQ$GA.176@cppssbbsa05...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »