Showing posts with label appear. Show all posts
Showing posts with label appear. Show all posts

Tuesday, March 27, 2012

deadlocks

It would appear that I am having a strange deadlock error. I have two
different stored procedures that are both inserting into the same table.
Other than that they have nothing in common. One of the procs has a locking
hint of (TABLOCK, HOLDLOCK) on the insert so that the table isn't modified
until after the tranaction is completed. I thought that deadlocking was the
locking of two tables by two processes that that the other wanted? I didn't
think that dead locks could happen with two processes and one table.Hi Wilbur
There are two major / common deadlock
scenarios. "Cyclical" deadlocking is where two connections
acquire locks on objects in reverse order, deadlocking
each other. "Conversion" deadlocking occurs when two
connections acquire shared locks on the same resource (eg
table) but then both want to convert the shared lock to
exclusive. Because they both already hold a shared lock on
that resource, who's to say either should let go first -
therefore they deadlock.
Your scenario sounds to me like a conversion deadlock
scenario. Your use of HOLDLOCK indicates you're acquiring
a shared lock (eg select). If you insert into that same
table, the connections will try to convert that shared
lock they're already holding to exclusive & deadlock each
other.
In short, what you might really want is UPDLOCK, which
acquires a lock that always be converted to exclusive
(almost like acquiring an exclusive in the first place) &
therefore avoids the conversion deadlock scenario.
HTH
Regards,
Greg Linwood
SQL Server MVP
>--Original Message--
>It would appear that I am having a strange deadlock
error. I have two
>different stored procedures that are both inserting into
the same table.
>Other than that they have nothing in common. One of the
procs has a locking
>hint of (TABLOCK, HOLDLOCK) on the insert so that the
table isn't modified
>until after the tranaction is completed. I thought that
deadlocking was the
>locking of two tables by two processes that that the
other wanted? I didn't
>think that dead locks could happen with two processes and
one table.
>
>.
>

Sunday, March 11, 2012

Deadlock

Hi All,
I need help urgently.
I got problem.
Whenever I issue DBCC SHRINKDATABASE the below message appear.
Server: Msg 1205, Level 13, State 57, Line 1
Transaction (Process ID 65) was deadlocked on lock resources with
another process and has been chosen as the deadlock victim. Rerun the
transaction.
I've tried to find out log transation by issue some command
sp_who,sp_who2,sp_lock,
SELECT spid, blocked, waittime
FROM sysprocesses
WHERE blocked <> 0
AND waittime > 10000
ORDER by waittime DESC
...
Yet It doesn't help me.
I found no deadlock process.
Could help me please?
Thanks, in advace, for helping me..
Regards,
Lux
*** Sent via Developersdex http://www.codecomments.com ***
It's known to happen sometimes. How to address it depends on
a few things. First, are you sure you actually need to
execute a shrink operation? Sometimes people start running
those and they really aren't necessary. Make sure you are
backing up your log as needed. You should check the
following article for more information:
http://www.karaszi.com/sqlserver/info_dont_shrink.asp
Also, if you really do need to do a shrink, try using dbcc
shrinkfile instead of shrinkdatabase so you have more
control over what files are being shrunk to what size. And
then if you are trying to shrink the data file...you may
want to try executing a DBCC INDEXDEFRAG which could help
when you then run a shrinkfile.
-Sue
On Mon, 22 Aug 2005 02:36:43 -0700, lux sok
<lux.lyny@.gmail.com> wrote:

>Hi All,
>I need help urgently.
>I got problem.
>Whenever I issue DBCC SHRINKDATABASE the below message appear.
>Server: Msg 1205, Level 13, State 57, Line 1
>Transaction (Process ID 65) was deadlocked on lock resources with
>another process and has been chosen as the deadlock victim. Rerun the
>transaction.
>I've tried to find out log transation by issue some command
>sp_who,sp_who2,sp_lock,
>SELECT spid, blocked, waittime
>FROM sysprocesses
>WHERE blocked <> 0
>AND waittime > 10000
>ORDER by waittime DESC
>...
>Yet It doesn't help me.
>I found no deadlock process.
>Could help me please?
>Thanks, in advace, for helping me..
>Regards,
>Lux
>
>*** Sent via Developersdex http://www.codecomments.com ***
|||Thanks, in advance, for helping me.
By the way, If i don't issue command DBCC SHRINKDATABASE/FILE do we have
any way to solve a logical file size grow ?
I mean when I droped/truncated a table the space remain the same
(logical file size).
For example, a table eat up 72GB when i dropped it.
I still can get this space back.
So my hard drive will full.
Any idea or comment please.
Maybe i'm not sure about the behind structure of MS SQLSERVER.
Thanks,
*** Sent via Developersdex http://www.codecomments.com ***
|||That should be a one time thing then right? You would use a
dbcc shrinkfile for that specifying the data file - that's
the file you are concerned about correct? The MDF?
Did you try dbcc shrinkfile?
If you get deadlocks, try the indexdefrag and then the
shrinkfile.
-Sue
On Tue, 23 Aug 2005 01:19:26 -0700, lux sok
<lux.lyny@.gmail.com> wrote:

>Thanks, in advance, for helping me.
>By the way, If i don't issue command DBCC SHRINKDATABASE/FILE do we have
>any way to solve a logical file size grow ?
>I mean when I droped/truncated a table the space remain the same
>(logical file size).
>For example, a table eat up 72GB when i dropped it.
>I still can get this space back.
>So my hard drive will full.
>Any idea or comment please.
>Maybe i'm not sure about the behind structure of MS SQLSERVER.
>Thanks,
>
>*** Sent via Developersdex http://www.codecomments.com ***

Thursday, March 8, 2012

Deadlock

Hi All,
I need help urgently.
I got problem.
Whenever I issue DBCC SHRINKDATABASE the below message appear.
Server: Msg 1205, Level 13, State 57, Line 1
Transaction (Process ID 65) was deadlocked on lock resources with
another process and has been chosen as the deadlock victim. Rerun the
transaction.
I've tried to find out log transation by issue some command
sp_who,sp_who2,sp_lock,
SELECT spid, blocked, waittime
FROM sysprocesses
WHERE blocked <> 0
AND waittime > 10000
ORDER by waittime DESC
...
Yet It doesn't help me.
I found no deadlock process.
Could help me please?
Thanks, in advace, for helping me..
Regards,
Lux
*** Sent via Developersdex http://www.codecomments.com ***It's known to happen sometimes. How to address it depends on
a few things. First, are you sure you actually need to
execute a shrink operation? Sometimes people start running
those and they really aren't necessary. Make sure you are
backing up your log as needed. You should check the
following article for more information:
http://www.karaszi.com/sqlserver/info_dont_shrink.asp
Also, if you really do need to do a shrink, try using dbcc
shrinkfile instead of shrinkdatabase so you have more
control over what files are being shrunk to what size. And
then if you are trying to shrink the data file...you may
want to try executing a DBCC INDEXDEFRAG which could help
when you then run a shrinkfile.
-Sue
On Mon, 22 Aug 2005 02:36:43 -0700, lux sok
<lux.lyny@.gmail.com> wrote:

>Hi All,
>I need help urgently.
>I got problem.
>Whenever I issue DBCC SHRINKDATABASE the below message appear.
>Server: Msg 1205, Level 13, State 57, Line 1
>Transaction (Process ID 65) was deadlocked on lock resources with
>another process and has been chosen as the deadlock victim. Rerun the
>transaction.
>I've tried to find out log transation by issue some command
>sp_who,sp_who2,sp_lock,
>SELECT spid, blocked, waittime
>FROM sysprocesses
>WHERE blocked <> 0
>AND waittime > 10000
>ORDER by waittime DESC
>...
>Yet It doesn't help me.
>I found no deadlock process.
>Could help me please?
>Thanks, in advace, for helping me..
>Regards,
>Lux
>
>*** Sent via Developersdex http://www.codecomments.com ***|||Thanks, in advance, for helping me.
By the way, If i don't issue command DBCC SHRINKDATABASE/FILE do we have
any way to solve a logical file size grow ?
I mean when I droped/truncated a table the space remain the same
(logical file size).
For example, a table eat up 72GB when i dropped it.
I still can get this space back.
So my hard drive will full.
Any idea or comment please.
Maybe i'm not sure about the behind structure of MS SQLSERVER.
Thanks,
*** Sent via Developersdex http://www.codecomments.com ***|||That should be a one time thing then right? You would use a
dbcc shrinkfile for that specifying the data file - that's
the file you are concerned about correct? The MDF?
Did you try dbcc shrinkfile?
If you get deadlocks, try the indexdefrag and then the
shrinkfile.
-Sue
On Tue, 23 Aug 2005 01:19:26 -0700, lux sok
<lux.lyny@.gmail.com> wrote:

>Thanks, in advance, for helping me.
>By the way, If i don't issue command DBCC SHRINKDATABASE/FILE do we have
>any way to solve a logical file size grow ?
>I mean when I droped/truncated a table the space remain the same
>(logical file size).
>For example, a table eat up 72GB when i dropped it.
>I still can get this space back.
>So my hard drive will full.
>Any idea or comment please.
>Maybe i'm not sure about the behind structure of MS SQLSERVER.
>Thanks,
>
>*** Sent via Developersdex http://www.codecomments.com ***

dd-mmm-yy date format?

Is there any way to make dates come out like "11-oct-07"? There does not
appear to be a built-in format like this. Is there a secret method?
MauryHi
select replace(convert(varchar(20),getdate(),106),' ','-')
"Maury Markowitz" <MauryMarkowitz@.discussions.microsoft.com> wrote in
message news:280EFB54-FE00-4153-A51F-C4D539D8EF12@.microsoft.com...
> Is there any way to make dates come out like "11-oct-07"? There does not
> appear to be a built-in format like this. Is there a secret method?
> Maury|||> select replace(convert(varchar(20),getdate(),106),' ','-')
returns: 11-Oct-2007
select replace(convert(varchar,getdate(),6),' ','-')
returns: 11-Oct-07
see 'convert' in BOL.
>
> "Maury Markowitz" <MauryMarkowitz@.discussions.microsoft.com> wrote in
> message news:280EFB54-FE00-4153-A51F-C4D539D8EF12@.microsoft.com...
>> Is there any way to make dates come out like "11-oct-07"? There does not
>> appear to be a built-in format like this. Is there a secret method?
>> Maury
>|||And to get an exact match to the request ...
select lower(replace(convert(varchar,getdate(),6),' ','-'))
returns: 11-oct-07
>> select replace(convert(varchar(20),getdate(),106),' ','-')
> returns: 11-Oct-2007
> select replace(convert(varchar,getdate(),6),' ','-')
> returns: 11-Oct-07
> see 'convert' in BOL.
>>
>> "Maury Markowitz" <MauryMarkowitz@.discussions.microsoft.com> wrote in
>> message news:280EFB54-FE00-4153-A51F-C4D539D8EF12@.microsoft.com...
>> Is there any way to make dates come out like "11-oct-07"? There does not
>> appear to be a built-in format like this. Is there a secret method?
>> Maury
>>
>

Friday, February 24, 2012

DBPROCESS is dead or not enabled

why the error message "DBPROCESS is dead or not enabled" appear frequently , but when i run the application again ,it can connect to the server.

What can i do to solve the problem?

SERVER 2000 enterprise edition (not sp4)

Hi,

this is a very generic one, indicating mainly that the communication between the server and the client failed, due to problems like a lost connection, problems in the used protocol, timeouts, or simply a SQL Server error which should be protocolled in the SQL Server log and/or event log (depending on the severity). In addition make sure that you enabled remote connections for named Pipes / TCP.
HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||The version of the sql server is enterprise edition, not at the level sp4.
But is there any problems, when i update the sql server to sq4, will the problem be resolve?
Is this sql server's bug or the network problems or client application's problem.
Anyone can help?|||Anybody has the same problem with me?|||

J'ai exactement le même problème au bout d'un certain temps d'inactivit. Je cherche à le rsoudre. J'ai ce problème depuis que je suis pass à SQL Server 2005. J'accède à SQL Server par l'intermdiaire d'un accès natif dans mes applications Windev. A bient?t avec la solution, j'espère

|||

also check whether the Auto close property of the database is on ... if it is on .. set it OFF and try

select DATABASEPROPERTY ('somedatabase' , 'isAutoClose' ) run this statement and if it returns 1 set this property off and see

Madhu

|||

Je rencontre galement ce problème seulement sur un ordinateur client parmi une dizaine sous Windev en accs natif ( l'ancien ) : j'attends le nouveau avec impatience mais si quelqu'un a une solution ?.

Idem : somedy has solved this problem ?

DBPROCESS is dead or not enabled

why the error message "DBPROCESS is dead or not enabled" appear frequently , but when i run the application again ,it can connect to the server.

What can i do to solve the problem?

SERVER 2000 enterprise edition (not sp4)

Hi,

this is a very generic one, indicating mainly that the communication between the server and the client failed, due to problems like a lost connection, problems in the used protocol, timeouts, or simply a SQL Server error which should be protocolled in the SQL Server log and/or event log (depending on the severity). In addition make sure that you enabled remote connections for named Pipes / TCP.
HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||The version of the sql server is enterprise edition, not at the level sp4.
But is there any problems, when i update the sql server to sq4, will the problem be resolve?
Is this sql server's bug or the network problems or client application's problem.
Anyone can help?|||Anybody has the same problem with me?|||

J'ai exactement le même problème au bout d'un certain temps d'inactivit. Je cherche à le rsoudre. J'ai ce problème depuis que je suis pass à SQL Server 2005. J'accède à SQL Server par l'intermdiaire d'un accès natif dans mes applications Windev. A bient?t avec la solution, j'espère

|||

also check whether the Auto close property of the database is on ... if it is on .. set it OFF and try

select DATABASEPROPERTY ('somedatabase' , 'isAutoClose' ) run this statement and if it returns 1 set this property off and see

Madhu

|||

Je rencontre galement ce problème seulement sur un ordinateur client parmi une dizaine sous Windev en accs natif ( l'ancien ) : j'attends le nouveau avec impatience mais si quelqu'un a une solution ?.

Idem : somedy has solved this problem ?

DBPROCESS is dead or not enabled

why the error message "DBPROCESS is dead or not enabled" appear frequently , but when i run the application again ,it can connect to the server.

What can i do to solve the problem?

SERVER 2000 enterprise edition (not sp4)

Hi,

this is a very generic one, indicating mainly that the communication between the server and the client failed, due to problems like a lost connection, problems in the used protocol, timeouts, or simply a SQL Server error which should be protocolled in the SQL Server log and/or event log (depending on the severity). In addition make sure that you enabled remote connections for named Pipes / TCP.
HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||The version of the sql server is enterprise edition, not at the level sp4.
But is there any problems, when i update the sql server to sq4, will the problem be resolve?
Is this sql server's bug or the network problems or client application's problem.
Anyone can help?|||Anybody has the same problem with me?|||

J'ai exactement le même problème au bout d'un certain temps d'inactivit. Je cherche à le rsoudre. J'ai ce problème depuis que je suis pass à SQL Server 2005. J'accède à SQL Server par l'intermdiaire d'un accès natif dans mes applications Windev. A bient?t avec la solution, j'espère

|||

also check whether the Auto close property of the database is on ... if it is on .. set it OFF and try

select DATABASEPROPERTY ('somedatabase' , 'isAutoClose' ) run this statement and if it returns 1 set this property off and see

Madhu

|||

Je rencontre galement ce problème seulement sur un ordinateur client parmi une dizaine sous Windev en accs natif ( l'ancien ) : j'attends le nouveau avec impatience mais si quelqu'un a une solution ?.

Idem : somedy has solved this problem ?

DBPROCESS is dead or not enabled

why the error message "DBPROCESS is dead or not enabled" appear frequently , but when i run the application again ,it can connect to the server.

What can i do to solve the problem?

SERVER 2000 enterprise edition (not sp4)

Hi,

this is a very generic one, indicating mainly that the communication between the server and the client failed, due to problems like a lost connection, problems in the used protocol, timeouts, or simply a SQL Server error which should be protocolled in the SQL Server log and/or event log (depending on the severity). In addition make sure that you enabled remote connections for named Pipes / TCP.
HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||The version of the sql server is enterprise edition, not at the level sp4.
But is there any problems, when i update the sql server to sq4, will the problem be resolve?
Is this sql server's bug or the network problems or client application's problem.
Anyone can help?|||Anybody has the same problem with me?|||

J'ai exactement le même problème au bout d'un certain temps d'inactivit. Je cherche à le rsoudre. J'ai ce problème depuis que je suis pass à SQL Server 2005. J'accède à SQL Server par l'intermdiaire d'un accès natif dans mes applications Windev. A bient?t avec la solution, j'espère

|||

also check whether the Auto close property of the database is on ... if it is on .. set it OFF and try

select DATABASEPROPERTY ('somedatabase' , 'isAutoClose' ) run this statement and if it returns 1 set this property off and see

Madhu

|||

Je rencontre galement ce problème seulement sur un ordinateur client parmi une dizaine sous Windev en accs natif ( l'ancien ) : j'attends le nouveau avec impatience mais si quelqu'un a une solution ?.

Idem : somedy has solved this problem ?

DBO Thing Doesn't Appear by Table Name

Hi, we are trying to simply import an existing MS Access 2003 table to MS SQL. I've gone through the export routine (the "upsizing" wizard in Access), but my Coldfusion app does not recognize the resultant MS SQL table as a real database object. It doesn't even include DBO next to the table name like all the other "real" tables that were made directly from within MS SQL. Is there something else I'm supposed to do? Thanks - and yes, I'm new at this. ;)
You can post your response here but feel free to drop me a direct reply at my website (which should hopefully be included in this message).For anyone that's interested, it appears that DBO may actually stand for Database Owner, not Database Object as I had previously speculated. Not sure how that helps resolve my issue per se, but there you have it. If anyone can offer a pointer on the original post it would be great, thanks!
Dave|||Hi,

dbo does stand for database owner. To help you determine what is going on with your application use SQL Server Profiler to trace the the queries that your application is issuing against the server. You can then copy the queries from Profiler to Management Studio and then run them manual to determine exactly why the query is failing.

Keep in mind for the owner of the object, if the owner of the object is not specified in the query, SQL server will search for dbo first.

If you have specific questions, please let us know.

Peter