Showing posts with label executes. Show all posts
Showing posts with label executes. Show all posts

Friday, March 30, 2012

Intermittent SQLSERVERAGENT error "unable to send job completion..

A batch job that executes once daily is configured to send job completion
notification on success or failure. Usually it works. Twice in the past
week it didn't, and this message is in the Application Log:
Event Type:Error
Event Source:SQLSERVERAGENT
Event Category:Job Engine
Event ID:210
Date:8/8/2005
Time:11:10:07 PM
User:N/A
Computer:xxxxxxx (name withheld to protect the guilty)
Description:Unable to send job completion notification email to operator
'DBA - SQLExec' for job 'Maintenance and backup'.
Both before and after the occurence of the problem, I am able to
successfully send mail with a 'test' of the operator 'DBA - SQLExec'.
Our environment is as follows:
SQL Server 2000 SP3a on Windows 2000 Server.
Outlook 2000 on the SQL Server box.
WAN; and the SQL box is geographically remote from the Exchange server.
MS Exchange email system (newly implemented).
Any ideas would be appreciated. Thanks in advance.
Hi,
Thanks for your post.
From your descriptions, I understood your SQLAgent intermittently failed to
report the error message that unable to send job completion notification
email to operator 'DBA - SQLExec' for job. If I have misunderstood your
concern, please feel free to point it out.
I have noticed that this issue will not happen all the time and and based
on my knowledge it is most possible that the Exchange server is unavailable
at that time of name resolution the above error will occur. Check logs of
exchange server to go further for this loss of connectivity between the
MAPI client and Exchange server
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ===
This posting is provided "AS IS" with no warranties, and confers no rights.

Intermittent SQLSERVERAGENT error "unable to send job completion..

A batch job that executes once daily is configured to send job completion
notification on success or failure. Usually it works. Twice in the past
week it didn't, and this message is in the Application Log:
Event Type: Error
Event Source: SQLSERVERAGENT
Event Category: Job Engine
Event ID: 210
Date: 8/8/2005
Time: 11:10:07 PM
User: N/A
Computer: xxxxxxx (name withheld to protect the guilty)
Description:Unable to send job completion notification email to operator
'DBA - SQLExec' for job 'Maintenance and backup'.
Both before and after the occurence of the problem, I am able to
successfully send mail with a 'test' of the operator 'DBA - SQLExec'.
Our environment is as follows:
SQL Server 2000 SP3a on Windows 2000 Server.
Outlook 2000 on the SQL Server box.
WAN; and the SQL box is geographically remote from the Exchange server.
MS Exchange email system (newly implemented).
Any ideas would be appreciated. Thanks in advance.Hi,
Thanks for your post.
From your descriptions, I understood your SQLAgent intermittently failed to
report the error message that unable to send job completion notification
email to operator 'DBA - SQLExec' for job. If I have misunderstood your
concern, please feel free to point it out.
I have noticed that this issue will not happen all the time and and based
on my knowledge it is most possible that the Exchange server is unavailable
at that time of name resolution the above error will occur. Check logs of
exchange server to go further for this loss of connectivity between the
MAPI client and Exchange server
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Intermittent SQLSERVERAGENT error "unable to send job completion..

A batch job that executes once daily is configured to send job completion
notification on success or failure. Usually it works. Twice in the past
week it didn't, and this message is in the Application Log:
Event Type: Error
Event Source: SQLSERVERAGENT
Event Category: Job Engine
Event ID: 210
Date: 8/8/2005
Time: 11:10:07 PM
User: N/A
Computer: xxxxxxx (name withheld to protect the guilty)
Description:Unable to send job completion notification email to operator
'DBA - SQLExec' for job 'Maintenance and backup'.
Both before and after the occurence of the problem, I am able to
successfully send mail with a 'test' of the operator 'DBA - SQLExec'.
Our environment is as follows:
SQL Server 2000 SP3a on Windows 2000 Server.
Outlook 2000 on the SQL Server box.
WAN; and the SQL box is geographically remote from the Exchange server.
MS Exchange email system (newly implemented).
Any ideas would be appreciated. Thanks in advance.Hi,
Thanks for your post.
From your descriptions, I understood your SQLAgent intermittently failed to
report the error message that unable to send job completion notification
email to operator 'DBA - SQLExec' for job. If I have misunderstood your
concern, please feel free to point it out.
I have noticed that this issue will not happen all the time and and based
on my knowledge it is most possible that the Exchange server is unavailable
at that time of name resolution the above error will occur. Check logs of
exchange server to go further for this loss of connectivity between the
MAPI client and Exchange server
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.

Monday, March 26, 2012

intermitent connection failure

We have written a thread to monitor whether the database connection is still
alive or not.
This monitoring thread executes a stored procedure, sp_TestDB, with ADO
_CommandPtr every 3 seconds.
Most of the time we have no problems executing it. However, we receive the
following error randomly:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionWrite
(WrapperWrite()). Msg:Unspecified error
We are convinced that the machine where the database server is installed is
definitely alive as we ping it all the time and there is no request time out
.
We want to know what other problems could cause this error to happen randoml
y?
The development language we use is Visual C++.
The database server we use is :
Microsoft SQL Server 2000 - 8.00.194 (Intel X86) Aug 6 2000 00:57:48
Copyright (c) 1988-2000 Microsoft Corporation
Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
ScottHi Scott,
Since this is an unspecified error on the client side, In this case, please
try to use SQL profiler to start a trace to see what is actually happening
on the server. The trace log might show more information on this error.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."|||Excuse me, but I have the same problem, could you tell me how can I fix ?
I will appreciate it.
Thanks
Bruno Martinez
MCDBA
BMartinez@.cosapisoft.com.pe
"scottrm" <scottrm@.newsgroup.nospam> escribi en el mensaje
news:AD41E055-5B53-4015-B73E-88086A949CE4@.microsoft.com...
> We have written a thread to monitor whether the database connection is
> still
> alive or not.
> This monitoring thread executes a stored procedure, sp_TestDB, with ADO
> _CommandPtr every 3 seconds.
> Most of the time we have no problems executing it. However, we receive the
> following error randomly:
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionWrite
> (WrapperWrite()). Msg:Unspecified error
> We are convinced that the machine where the database server is installed
> is
> definitely alive as we ping it all the time and there is no request time
> out.
> We want to know what other problems could cause this error to happen
> randomly?
> The development language we use is Visual C++.
> The database server we use is :
> Microsoft SQL Server 2000 - 8.00.194 (Intel X86) Aug 6 2000 00:57:48
> Copyright (c) 1988-2000 Microsoft Corporation
> Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
>
>
> --
> Scott

intermitent connection failure

We have written a thread to monitor whether the database connection is still
alive or not.
This monitoring thread executes a stored procedure, sp_TestDB, with ADO
_CommandPtr every 3 seconds.
Most of the time we have no problems executing it. However, we receive the
following error randomly:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionWrite
(WrapperWrite()). Msg:Unspecified error
We are convinced that the machine where the database server is installed is
definitely alive as we ping it all the time and there is no request time out.
We want to know what other problems could cause this error to happen randomly?
The development language we use is Visual C++.
The database server we use is :
Microsoft SQL Server 2000 - 8.00.194 (Intel X86) Aug 6 2000 00:57:48
Copyright (c) 1988-2000 Microsoft Corporation
Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
Scott
Hi Scott,
Since this is an unspecified error on the client side, In this case, please
try to use SQL profiler to start a trace to see what is actually happening
on the server. The trace log might show more information on this error.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
|||Excuse me, but I have the same problem, could you tell me how can I fix ?
I will appreciate it.
Thanks
Bruno Martinez
MCDBA
BMartinez@.cosapisoft.com.pe
"scottrm" <scottrm@.newsgroup.nospam> escribi en el mensaje
news:AD41E055-5B53-4015-B73E-88086A949CE4@.microsoft.com...
> We have written a thread to monitor whether the database connection is
> still
> alive or not.
> This monitoring thread executes a stored procedure, sp_TestDB, with ADO
> _CommandPtr every 3 seconds.
> Most of the time we have no problems executing it. However, we receive the
> following error randomly:
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionWrite
> (WrapperWrite()). Msg:Unspecified error
> We are convinced that the machine where the database server is installed
> is
> definitely alive as we ping it all the time and there is no request time
> out.
> We want to know what other problems could cause this error to happen
> randomly?
> The development language we use is Visual C++.
> The database server we use is :
> Microsoft SQL Server 2000 - 8.00.194 (Intel X86) Aug 6 2000 00:57:48
> Copyright (c) 1988-2000 Microsoft Corporation
> Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
>
>
> --
> Scott
sql

Friday, March 23, 2012

Interesting UPDATE STATEMENT for SQL

This Following statement executes perfectly in SQL2000
but not in SQL7.0 it gives the message
Server: Msg 147, Level 16, State 2, Procedure spTEST1, Line 57
An aggregate may not appear in the WHERE clause unless it is in a subquery contained in a HAVING clause or a select list, and the column being aggregated is an outer reference.

Create Procedure "spTEST1"
As

--Update Processed Flags
UPDATE tblTransaction
SET TransProcessed = 1
FROM dbo.tblTrustGroupTrust
INNER JOIN dbo.tblTrust ON dbo.tblTrustGroupTrust.TgtTrustID = dbo.tblTrust.TrustID
INNER JOIN dbo.tblTransaction ON dbo.tblTrust.TrustID = dbo.tblTransaction.TransTrustID
INNER JOIN dbo.tblShareholder ON dbo.tblTransaction.TransShID = dbo.tblShareholder.ShID
INNER JOIN dbo.tblTransType ON dbo.tblTransType.TransTypeID = dbo.tblTransaction.TransTypeID
WHERE (dbo.tblTrustGroupTrust.TgtTrustGroupID = 3) AND (dbo.tblTransaction.TransProcessed = 0)
AND (dbo.tblShareholder.ShPaymentMethod = 1) AND (dbo.tblShareholder.ShDeceased = 0) AND tblShareholder.ShBankAccount IS NOT NULL
AND EXISTS
(
SELECT dbo.tblTransaction.TransShID
FROM dbo.tblTrustGroupTrust
INNER JOIN dbo.tblTransaction ON dbo.tblTrustGroupTrust.tgtTrustID = dbo.tblTransaction.TransTrustID
WHERE (dbo.tblTransaction.TransProcessed = 0) AND (dbo.tblTrustGroupTrust.TgtTrustGroupID = 3) AND (dbo.tblShareholder.SHID = dbo.tblTransaction.TransShID)
GROUP BY dbo.tblTransaction.TransShID
HAVING SUM(tblTransaction.TransAmt) >= 10
)

When using a straight select on this statement in SQL7.0 it works fine:
SELECT tblTransaction.TransProcessed
FROM .....

Can anyone shed some light on this?The aggregate is on the table being updated - although it is in a subquery this is correllated and so still fails the test.

If you can change the having clause to
HAVING SUM(dbo.tblTransaction.TransAmt) >= 10

so that it is using the copy of the table in the subquery then it should work.|||It might be clearer if you use an alias for the subquery table like
tblTransaction t2.|||Thanks, I very nearly tried to add the missing dbo prefix's in but I presumed that would be too trivial and the error was more complicated than something like that.

Obviously SQL2000 is a little more relaxed on this sort of thing, as it works without error.