Showing posts with label strange. Show all posts
Showing posts with label strange. Show all posts

Friday, March 23, 2012

MS SQL Server 2005 hang

Hi All,
We get very strange hang situation at our customers from time to time.
I execute very simple query like
insert into <table1>
select <columns> from <table2>
where <conditions>
Table <table1> has clustered index on float column.
Normally this query is executing, say, 2 minutes. But sometimes it
suddenly begins to hang for 2 hours and go to query timeout. I did not
find something special or different in execution plan.
The only workaround I have found is to recreate <table1>. I just copy
all data from this table to another table, then drop table <table1>,
then create it with adding necessary index and then copy data back
from temptable to original one. And it helps! The same data is easily
inserted in 2 minutes.
I have never experienced such problem on SQL Server 2000, only on
2005. Unfortunately, we cannot reproduce it on our environment but
there are no visible differences in server or db options.
Probably somebody already solved such problem or can advise where to
go. Any help would be appreciated.
Thanks in advance!Hi
"prudon@.inbox.ru" wrote:
> Hi All,
> We get very strange hang situation at our customers from time to time.
> I execute very simple query like
> insert into <table1>
> select <columns> from <table2>
> where <conditions>
> Table <table1> has clustered index on float column.
> Normally this query is executing, say, 2 minutes. But sometimes it
> suddenly begins to hang for 2 hours and go to query timeout. I did not
> find something special or different in execution plan.
> The only workaround I have found is to recreate <table1>. I just copy
> all data from this table to another table, then drop table <table1>,
> then create it with adding necessary index and then copy data back
> from temptable to original one. And it helps! The same data is easily
> inserted in 2 minutes.
> I have never experienced such problem on SQL Server 2000, only on
> 2005. Unfortunately, we cannot reproduce it on our environment but
> there are no visible differences in server or db options.
> Probably somebody already solved such problem or can advise where to
> go. Any help would be appreciated.
> Thanks in advance!
>
Have you checked the version of SQL 2005 that you are running? Make sure
that it is up to date. Also look for blocking
http://support.microsoft.com/kb/271509 missing indexes
http://msdn2.microsoft.com/en-us/library/ms345524.aspx or out of date
statistics http://msdn2.microsoft.com/en-us/library/ms190397.aspx
John|||1) Almost certainly a blocking situation. moving (potentially large)
amounts of data like this is often a performance issue because the locks
escalate to full table, preventing ANY other update/delete/insert access to
the table for the duration of the transaction.
2) My gut tells me to question a clustered index on a float datatype.
TheSQLGuru
President
Indicium Resources, Inc.
<prudon@.inbox.ru> wrote in message
news:1180681124.707731.111770@.q69g2000hsb.googlegroups.com...
> Hi All,
> We get very strange hang situation at our customers from time to time.
> I execute very simple query like
> insert into <table1>
> select <columns> from <table2>
> where <conditions>
> Table <table1> has clustered index on float column.
> Normally this query is executing, say, 2 minutes. But sometimes it
> suddenly begins to hang for 2 hours and go to query timeout. I did not
> find something special or different in execution plan.
> The only workaround I have found is to recreate <table1>. I just copy
> all data from this table to another table, then drop table <table1>,
> then create it with adding necessary index and then copy data back
> from temptable to original one. And it helps! The same data is easily
> inserted in 2 minutes.
> I have never experienced such problem on SQL Server 2000, only on
> 2005. Unfortunately, we cannot reproduce it on our environment but
> there are no visible differences in server or db options.
> Probably somebody already solved such problem or can advise where to
> go. Any help would be appreciated.
> Thanks in advance!
>|||Thank you very much!
The specific thing of our application that there is only one connect
per database. So, there are no other transactions on those database. I
cannot understand why we didn't experienced such problems on SQL
Server 2000 for more than 4 years nowhere. If the problem is in
clustered index, why "re-creating" table with index helps to avoid the
problem. Next time I get such problem I will check statistics, but I'm
afraid it will not give anything.
Many thanks for your feedback

MS SQL Server 2005 hang

Hi All,
We get very strange hang situation at our customers from time to time.
I execute very simple query like
insert into <table1>
select <columns> from <table2>
where <conditions>
Table <table1> has clustered index on float column.
Normally this query is executing, say, 2 minutes. But sometimes it
suddenly begins to hang for 2 hours and go to query timeout. I did not
find something special or different in execution plan.
The only workaround I have found is to recreate <table1>. I just copy
all data from this table to another table, then drop table <table1>,
then create it with adding necessary index and then copy data back
from temptable to original one. And it helps! The same data is easily
inserted in 2 minutes.
I have never experienced such problem on SQL Server 2000, only on
2005. Unfortunately, we cannot reproduce it on our environment but
there are no visible differences in server or db options.
Probably somebody already solved such problem or can advise where to
go. Any help would be appreciated.
Thanks in advance!Hi
"prudon@.inbox.ru" wrote:

> Hi All,
> We get very strange hang situation at our customers from time to time.
> I execute very simple query like
> insert into <table1>
> select <columns> from <table2>
> where <conditions>
> Table <table1> has clustered index on float column.
> Normally this query is executing, say, 2 minutes. But sometimes it
> suddenly begins to hang for 2 hours and go to query timeout. I did not
> find something special or different in execution plan.
> The only workaround I have found is to recreate <table1>. I just copy
> all data from this table to another table, then drop table <table1>,
> then create it with adding necessary index and then copy data back
> from temptable to original one. And it helps! The same data is easily
> inserted in 2 minutes.
> I have never experienced such problem on SQL Server 2000, only on
> 2005. Unfortunately, we cannot reproduce it on our environment but
> there are no visible differences in server or db options.
> Probably somebody already solved such problem or can advise where to
> go. Any help would be appreciated.
> Thanks in advance!
>
Have you checked the version of SQL 2005 that you are running? Make sure
that it is up to date. Also look for blocking
http://support.microsoft.com/kb/271509 missing indexes
http://msdn2.microsoft.com/en-us/library/ms345524.aspx or out of date
statistics http://msdn2.microsoft.com/en-us/library/ms190397.aspx
John|||1) Almost certainly a blocking situation. moving (potentially large)
amounts of data like this is often a performance issue because the locks
escalate to full table, preventing ANY other update/delete/insert access to
the table for the duration of the transaction.
2) My gut tells me to question a clustered index on a float datatype.
TheSQLGuru
President
Indicium Resources, Inc.
<prudon@.inbox.ru> wrote in message
news:1180681124.707731.111770@.q69g2000hsb.googlegroups.com...
> Hi All,
> We get very strange hang situation at our customers from time to time.
> I execute very simple query like
> insert into <table1>
> select <columns> from <table2>
> where <conditions>
> Table <table1> has clustered index on float column.
> Normally this query is executing, say, 2 minutes. But sometimes it
> suddenly begins to hang for 2 hours and go to query timeout. I did not
> find something special or different in execution plan.
> The only workaround I have found is to recreate <table1>. I just copy
> all data from this table to another table, then drop table <table1>,
> then create it with adding necessary index and then copy data back
> from temptable to original one. And it helps! The same data is easily
> inserted in 2 minutes.
> I have never experienced such problem on SQL Server 2000, only on
> 2005. Unfortunately, we cannot reproduce it on our environment but
> there are no visible differences in server or db options.
> Probably somebody already solved such problem or can advise where to
> go. Any help would be appreciated.
> Thanks in advance!
>|||Thank you very much!
The specific thing of our application that there is only one connect
per database. So, there are no other transactions on those database. I
cannot understand why we didn't experienced such problems on SQL
Server 2000 for more than 4 years nowhere. If the problem is in
clustered index, why "re-creating" table with index helps to avoid the
problem. Next time I get such problem I will check statistics, but I'm
afraid it will not give anything.
Many thanks for your feedback

MS SQL Server 2005 hang

Hi All,
We get very strange hang situation at our customers from time to time.
I execute very simple query like
insert into <table1>
select <columns> from <table2>
where <conditions>
Table <table1> has clustered index on float column.
Normally this query is executing, say, 2 minutes. But sometimes it
suddenly begins to hang for 2 hours and go to query timeout. I did not
find something special or different in execution plan.
The only workaround I have found is to recreate <table1>. I just copy
all data from this table to another table, then drop table <table1>,
then create it with adding necessary index and then copy data back
from temptable to original one. And it helps! The same data is easily
inserted in 2 minutes.
I have never experienced such problem on SQL Server 2000, only on
2005. Unfortunately, we cannot reproduce it on our environment but
there are no visible differences in server or db options.
Probably somebody already solved such problem or can advise where to
go. Any help would be appreciated.
Thanks in advance!
Hi
"prudon@.inbox.ru" wrote:

> Hi All,
> We get very strange hang situation at our customers from time to time.
> I execute very simple query like
> insert into <table1>
> select <columns> from <table2>
> where <conditions>
> Table <table1> has clustered index on float column.
> Normally this query is executing, say, 2 minutes. But sometimes it
> suddenly begins to hang for 2 hours and go to query timeout. I did not
> find something special or different in execution plan.
> The only workaround I have found is to recreate <table1>. I just copy
> all data from this table to another table, then drop table <table1>,
> then create it with adding necessary index and then copy data back
> from temptable to original one. And it helps! The same data is easily
> inserted in 2 minutes.
> I have never experienced such problem on SQL Server 2000, only on
> 2005. Unfortunately, we cannot reproduce it on our environment but
> there are no visible differences in server or db options.
> Probably somebody already solved such problem or can advise where to
> go. Any help would be appreciated.
> Thanks in advance!
>
Have you checked the version of SQL 2005 that you are running? Make sure
that it is up to date. Also look for blocking
http://support.microsoft.com/kb/271509 missing indexes
http://msdn2.microsoft.com/en-us/library/ms345524.aspx or out of date
statistics http://msdn2.microsoft.com/en-us/library/ms190397.aspx
John
|||1) Almost certainly a blocking situation. moving (potentially large)
amounts of data like this is often a performance issue because the locks
escalate to full table, preventing ANY other update/delete/insert access to
the table for the duration of the transaction.
2) My gut tells me to question a clustered index on a float datatype.
TheSQLGuru
President
Indicium Resources, Inc.
<prudon@.inbox.ru> wrote in message
news:1180681124.707731.111770@.q69g2000hsb.googlegr oups.com...
> Hi All,
> We get very strange hang situation at our customers from time to time.
> I execute very simple query like
> insert into <table1>
> select <columns> from <table2>
> where <conditions>
> Table <table1> has clustered index on float column.
> Normally this query is executing, say, 2 minutes. But sometimes it
> suddenly begins to hang for 2 hours and go to query timeout. I did not
> find something special or different in execution plan.
> The only workaround I have found is to recreate <table1>. I just copy
> all data from this table to another table, then drop table <table1>,
> then create it with adding necessary index and then copy data back
> from temptable to original one. And it helps! The same data is easily
> inserted in 2 minutes.
> I have never experienced such problem on SQL Server 2000, only on
> 2005. Unfortunately, we cannot reproduce it on our environment but
> there are no visible differences in server or db options.
> Probably somebody already solved such problem or can advise where to
> go. Any help would be appreciated.
> Thanks in advance!
>
|||Thank you very much!
The specific thing of our application that there is only one connect
per database. So, there are no other transactions on those database. I
cannot understand why we didn't experienced such problems on SQL
Server 2000 for more than 4 years nowhere. If the problem is in
clustered index, why "re-creating" table with index helps to avoid the
problem. Next time I get such problem I will check statistics, but I'm
afraid it will not give anything.
Many thanks for your feedback

Wednesday, March 21, 2012

MS SQL Server 2000: Can Insert New Rows, but can't Update or Delete!!

I'm facing a strange problem here (SQL Server 2000).
I can Insert new rows from My ASP.NET 2.0 Pages but Can't Update or Delete.
usualy I test and build my web applications offline on my home workstation before I uppload them to my Server (Windows Server 2003 Standard), and I make sure that its error free.
The problem goes as follows:
1- I created a data grid that you can insert, delete and update and it worked fine when I tested it on my home computer.
2- When I updated the application to my server, I've noticed that I can Insert new columns to the database but When I try to update or delete the old columns, it doesn't allow me (so I have to use interprise manager to delete them from under- using same username and password!!!!).

I've never faced anything like this before, so please if anyone can give me any advice...

The problem only happened when I was using ASP.NET 2.0 Beta on my Home computer, and the full version on my server. so it was obvious that i need to install the same thing on both computers. but when I did I had to reconfigure my connection to accomodate the changes with the version. and now its working fine...

MS SQL Server 2000: Can Insert New Rows, but can't Update or Delete!!

I'm facing a strange problem here (SQL Server 2000).
I can Insert new rows from My ASP.NET 2.0 Pages but Can't Update or Delete.
usualy I test and build my web applications offline on my home workstation before I uppload them to my Server (Windows Server 2003 Standard), and I make sure that its error free.
The problem goes as follows:
1- I created a data grid that you can insert, delete and update and it worked fine when I tested it on my home computer.
2- When I updated the application to my server, I've noticed that I can Insert new columns to the database but When I try to update or delete the old columns, it doesn't allow me (so I have to use interprise manager to delete them from under- using same username and password!!!!).

I've never faced anything like this before, so please if anyone can give me any advice...

The problem only happened when I was using ASP.NET 2.0 Beta on my Home computer, and the full version on my server. so it was obvious that i need to install the same thing on both computers. but when I did I had to reconfigure my connection to accomodate the changes with the version. and now its working fine...

sql

Friday, March 9, 2012

MS -SQL behaviour of INSERTED / DELETED tables --> very strange

Hi All,
We have an odd thing while using the DELETED and INSERTED-
"tables"in triggers.
If my collegue executes and SP in the Query Analizer, a
query in a trigger takes a lot less when I execute the
same SP.
We think the difference is in the the usages of the
DELETED and INSERTED-tables. When my colleque runs it, the
DELETED and INSERTED-tables are being used, but when I run
the SP, a full tables scan is being performed (we
think!!!).
Has anyone seen this behaviour before or does anyone have
a solution for this?
Time difference between my collegue and I is 0.5 sec per
trigger (2 triggers in the SP are executed and lots of SP
executions).
Thanks in Advance,
Jeroen
PS. MS-SQL 2000 with SP3 on WIN 2000 serverJeroen
Can you show us your SP's code?
Have you ran SQL Server Profiler to identify what is going on when you
execute the SP?
"Jeroen Kraij" <jkrai@.kempen.nl> wrote in message
news:080e01c3bfc7$e7334580$a401280a@.phx.gbl...
> Hi All,
> We have an odd thing while using the DELETED and INSERTED-
> "tables"in triggers.
> If my collegue executes and SP in the Query Analizer, a
> query in a trigger takes a lot less when I execute the
> same SP.
> We think the difference is in the the usages of the
> DELETED and INSERTED-tables. When my colleque runs it, the
> DELETED and INSERTED-tables are being used, but when I run
> the SP, a full tables scan is being performed (we
> think!!!).
> Has anyone seen this behaviour before or does anyone have
> a solution for this?
> Time difference between my collegue and I is 0.5 sec per
> trigger (2 triggers in the SP are executed and lots of SP
> executions).
> Thanks in Advance,
> Jeroen
> PS. MS-SQL 2000 with SP3 on WIN 2000 server|||Hi,
The "thing" I would like to focus on is that we have a Pc
with an SQL-client.
My coleque logs in to this PC and connects to SQL-server
and executes the SP.
When I do exactly the same on this PC, The execution of
the SP takes a lot more time.
In the executionplan we can see that the processingtime of
the trigger(s) are the difference...
Is there any logical explanation for this? Or a solution?
Jeroen
>--Original Message--
>Jeroen
>Can you show us your SP's code?
>Have you ran SQL Server Profiler to identify what is
going on when you
>execute the SP?
>
>
>
>"Jeroen Kraij" <jkrai@.kempen.nl> wrote in message
>news:080e01c3bfc7$e7334580$a401280a@.phx.gbl...
>> Hi All,
>> We have an odd thing while using the DELETED and
INSERTED-
>> "tables"in triggers.
>> If my collegue executes and SP in the Query Analizer, a
>> query in a trigger takes a lot less when I execute the
>> same SP.
>> We think the difference is in the the usages of the
>> DELETED and INSERTED-tables. When my colleque runs it,
the
>> DELETED and INSERTED-tables are being used, but when I
run
>> the SP, a full tables scan is being performed (we
>> think!!!).
>> Has anyone seen this behaviour before or does anyone
have
>> a solution for this?
>> Time difference between my collegue and I is 0.5 sec per
>> trigger (2 triggers in the SP are executed and lots of
SP
>> executions).
>> Thanks in Advance,
>> Jeroen
>> PS. MS-SQL 2000 with SP3 on WIN 2000 server
>
>.
>