WHERE 1=2 with performance nightmares



Recently we started seeing this "WHERE 1=2" in sql profiler trace that even makes a lot of our sql statements invalid when there is *already* a WHERE clause in our sql.

Here is an example copied from a trace file:
SET FMTONLY ON SELECT Col1,Col2 from Table1 WHERE Col1 = 8 and Col2 = 6
WHERE 1=2 SET FMTONLY OFF

The actual sql we wrote inside the executable for this example is:
SELECT Col1,Col2 from Table1 WHERE Col1 = 8 and Col2 = 6

Btw, some of our guys have recently tried replication feature with our servers. Has that turned on some kind of server setting that cause all this?

The reason we started worrying about this is, we are experiencing performance issues like timeouts, connection losses etc.,

Thanks in advance,
Sarah
D7 + SQL Server 2000/2005
ADO with Provider=SQLOLEDB.1
.



Relevant Pages

  • Re: Query performance
    ... the SQL error log is located at Program Files\Microsoft SQL ... you may create a SQL Profiler Trace to trace the behavior of the ... This posting is provided "AS IS" with no warranties, ...
    (microsoft.public.sqlserver.clients)
  • RE: Fulltext failure on a 2 node cluster
    ... Server full-text search resource online: "SQL Cluster Resource 'Full Text' ...
    (microsoft.public.sqlserver.clustering)
  • Re: HELP PLEASE ~ ???
    ... You mentioned that it went ahead and added a SQL ... SQL Server 2000 database for all my data. ... find the connectionString in the newly recreated SQLExpress database. ... The connection string specifies a local Sql Server Express instance ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Multi-Channel Raid VS SAN Storage
    ... A 5~6 years old server is a very old server. ... As I mentioned, the server is one node in a cluster environment, and SQL is ... We actually are running RAID 1+0 and our aplication is definately more ... needs it's own SAN device, or at least a dedicated IO channel on the SAN. ...
    (microsoft.public.sqlserver.setup)
  • Re: Multi-Channel Raid VS SAN Storage
    ... A 5~6 years old server is a very old server. ... As I mentioned, the server is one node in a cluster environment, and SQL is ... We actually are running RAID 1+0 and our aplication is definately more ... needs it's own SAN device, or at least a dedicated IO channel on the SAN. ...
    (microsoft.public.sqlserver.setup)