Showing posts with label failed. Show all posts
Showing posts with label failed. Show all posts

Wednesday, March 28, 2012

Resetting Email Queue

Hi
I have a the database mail system parameters set to retry sending failed
emails every ten minutes. I want to leave these settings as is.
How can I reset the queue ? that is delete all items in the queue - even if
they have failed! I need to refresh/delete them because we send out the
emails manually if they failed tooo many times - and then eventually sql 2005
alse sends them - i have to prevent this.Answered my quesiton myself!
One can look at the default system stored procedure and modify it to accept
a subject for example as a parameter.
Then just tweak the rest of the stored procedure to make it select only mail
items with similar subjects and delete those!
done!
"I.W Coetzer" wrote:
> Hi
> I have a the database mail system parameters set to retry sending failed
> emails every ten minutes. I want to leave these settings as is.
> How can I reset the queue ? that is delete all items in the queue - even if
> they have failed! I need to refresh/delete them because we send out the
> emails manually if they failed tooo many times - and then eventually sql 2005
> alse sends them - i have to prevent this.

Tuesday, March 20, 2012

Re-run all the failed jobs

I'm wondering if there's an elegant/efficient way to automatically
re-run all the failed jobs under a SQL server 2000 installation.

TIA."NickName" <dadada@.rock.com> wrote in message
news:1105369505.976361.73090@.c13g2000cwb.googlegro ups.com...
> I'm wondering if there's an elegant/efficient way to automatically
> re-run all the failed jobs under a SQL server 2000 installation.
> TIA.

There's no one-click solution, if that's what you want - you would need to
write something yourself. You could create a proc which uses sp_help_job to
get job statuses, then sp_start_job to restart them. Another approach would
be to set each step in every job to go to step 1 on failure, so the job
keeps running until it succeeds.

Personally, I would avoid doing something like this anyway - it's rather
heavy-handed, and if you have job dependencies, critical scheduling issues
and so on, then you don't want jobs just starting at random times. Even if
every job you have now is independent of all others and could run at any
time, you don't don't know what future jobs you might add. And if a job
fails, I would prefer to investigate why, rather than simply keep running it
until it succeeds.

Simon|||You're right I'm not looking for a one-click solution, however, some
sort of automated way but still with some flexibility (as you correctly
pointed out "you don't know what future jobs you might add". Good to
know about sp_help_job and sp_start_job, they seem handy for the task
at hand, however, sp_help_job does not seem to help me much, I would
like it to list all the failed jobs for a given server, then loop
sp_start_job for each failed one. It would be desirable for
sp_help_job or the like to perform something like the above, that is,
EXEC sp_help_job @.execution_status = 'failed' | 0 (btw, currently the
@.execution_status values seems to be weird)
lists all the failed jobs

I appreciate your sharing of your knowledge, though I'm not a dba, it's
good to pick up some skill like this.

Don|||"NickName" <dadada@.rock.com> wrote in message
news:1105455394.853671.239030@.f14g2000cwb.googlegr oups.com...
> You're right I'm not looking for a one-click solution, however, some
> sort of automated way but still with some flexibility (as you correctly
> pointed out "you don't know what future jobs you might add". Good to
> know about sp_help_job and sp_start_job, they seem handy for the task
> at hand, however, sp_help_job does not seem to help me much, I would
> like it to list all the failed jobs for a given server, then loop
> sp_start_job for each failed one. It would be desirable for
> sp_help_job or the like to perform something like the above, that is,
> EXEC sp_help_job @.execution_status = 'failed' | 0 (btw, currently the
> @.execution_status values seems to be weird)
> lists all the failed jobs
> I appreciate your sharing of your knowledge, though I'm not a dba, it's
> good to pick up some skill like this.
> Don

This will list all failed job executions:

exec sp_help_jobhistory @.run_status = 0

Note that this will show all failures of all jobs (whereas sp_help_job shows
only the last run status for all _current_ jobs), so you might be looking at
a failure from 6 months ago for a job which no longer exists. Querying
sysjobs and sysjobhistory directly would give you more control (both tables
are documented in BOL).

But you should really consider concentrating on making sure that jobs do run
and reacting quickly when they don't, otherwise you may allow a situation
where job failures are considered normal, and therefore you never notice any
more serious issues (such as your backup jobs failing).

Of course, you may already have a good reason for doing this, and perhaps in
a development situation it might be useful.

Simon|||It would be really nice for the parameter of @.start_run_date to support
none equality operation, for instance,

exec sp_help_jobhistory @.run_status = 0, @.start_run_date > 20050108
would return all the failed jobs since Jan 8, 2005 instead of possibly
hundreds of rows/failed jobs.

Otherwise, have to use two loops of INNER and OUTER, just less
efficient.

And you're correct job failures are rare but it happens.
Thanks, Simon.

Don

Monday, March 12, 2012

Request to IIS failed

hi

i having having an error request to IIs failed evertime.i have even uinstall my firewall but it is still not wking.here is my sql server diagnotics

SQL Server Mobile Server Agent Diagnostics

2006/07/15 15:57:03

General Information Item Value Server Name nisha URL /SQLMobile/sqlcesa30.dll Authentication Type Anonymous Server Port 80 HTTPS off Server Software Microsoft-IIS/5.1 Replication Allowed RDA Allowed Logging Level 1


Impersonation and Access Tests Action Status ErrorCode Impersonate User SUCCESS 0x0 ReadWriteDeleteMessageFile SUCCESS 0x0


SQL Server Mobile Modules Test Module Status ErrorCode Version SQLCERP30.DLL SUCCESS 0x0 3.0.5207.0 SQLCESA30.DLL SUCCESS 0x0 3.0.5207.0


Reconciler Test Reconciler Status ErrorCode 9.0 Database Reconciler SUCCESS 0x0 8.0 Database Reconciler FAILURE 0x80004005


SQL Server Module Versions Module Version sqloledb.dll 2000.85.1117.0 9.0 replrec.dll 2005.90.1399.0 9.0 replprov.dll 2005.90.1399.0 9.0 msgprox.dll 2005.90.1399.0

i dont kno how to solve the database reconciler.i am not able to synchronize.my coding is as follows:

Dim repl As New SqlCeReplication()

Dim strpath As String

strpath = "\Program Files\Flight_PPC\SQLFlight.sdf"

repl.InternetUrl = "http://nisha/SQLMobile/sqlcesa30.dll"

repl.Publisher = "NISHA"

repl.PublisherDatabase = "flightDatabase"

repl.PublisherSecurityMode = SecurityType.DBAuthentication

repl.PublisherLogin = "sa"

repl.PublisherPassword = "pradha"

repl.Publication = "SQLMobile"

repl.Subscriber = "SQLMobile"

repl.SubscriberConnectionString = "Data Source=" + strpath

Try

repl.Synchronize()

Catch err As SqlCeException

MessageBox.Show(err.ToString)

End Try

Try increasing your default timeout value on the IIS server and also the timeout from the client and see if that helps.|||Hi, I'm having the same problem...

The timeout of my IIS is set to 120 seconds, so I don't think that is the problem. I have the same exact display page as posted above. Any other idea?

Thanks
|||

Hi, I still have the same issue. Any other suggestions will be appreciated. Thanks.

|||

Can you post the error message? You can see the log within "Replication Monitor". Open up SQL Server Managment Studio. Right click on "Replication" and choose "Launch Replication Monitor".

Request to IIS failed

hi

i having having an error request to IIs failed evertime.i have even uinstall my firewall but it is still not wking.here is my sql server diagnotics

SQL Server Mobile Server Agent Diagnostics

2006/07/15 15:57:03

General Information Item Value Server Name nisha URL /SQLMobile/sqlcesa30.dll Authentication Type Anonymous Server Port 80 HTTPS off Server Software Microsoft-IIS/5.1 Replication Allowed RDA Allowed Logging Level 1


Impersonation and Access Tests Action Status ErrorCode Impersonate User SUCCESS 0x0 ReadWriteDeleteMessageFile SUCCESS 0x0


SQL Server Mobile Modules Test Module Status ErrorCode Version SQLCERP30.DLL SUCCESS 0x0 3.0.5207.0 SQLCESA30.DLL SUCCESS 0x0 3.0.5207.0


Reconciler Test Reconciler Status ErrorCode 9.0 Database Reconciler SUCCESS 0x0 8.0 Database Reconciler FAILURE 0x80004005


SQL Server Module Versions Module Version sqloledb.dll 2000.85.1117.0 9.0 replrec.dll 2005.90.1399.0 9.0 replprov.dll 2005.90.1399.0 9.0 msgprox.dll 2005.90.1399.0

i dont kno how to solve the database reconciler.i am not able to synchronize.my coding is as follows:

Dim repl AsNew SqlCeReplication()

Dim strpath AsString

strpath = "\Program Files\Flight_PPC\SQLFlight.sdf"

repl.InternetUrl = "http://nisha/SQLMobile/sqlcesa30.dll"

repl.Publisher = "NISHA"

repl.PublisherDatabase = "flightDatabase"

repl.PublisherSecurityMode = SecurityType.DBAuthentication

repl.PublisherLogin = "sa"

repl.PublisherPassword = "pradha"

repl.Publication = "SQLMobile"

repl.Subscriber = "SQLMobile"

repl.SubscriberConnectionString = "Data Source=" + strpath

Try

repl.Synchronize()

Catch err As SqlCeException

MessageBox.Show(err.ToString)

EndTry

Try increasing your default timeout value on the IIS server and also the timeout from the client and see if that helps.|||Hi, I'm having the same problem...

The timeout of my IIS is set to 120 seconds, so I don't think that is the problem. I have the same exact display page as posted above. Any other idea?

Thanks
|||

Hi, I still have the same issue. Any other suggestions will be appreciated. Thanks.

|||

Can you post the error message? You can see the log within "Replication Monitor". Open up SQL Server Managment Studio. Right click on "Replication" and choose "Launch Replication Monitor".

Request to IIS failed

hi

i having having an error request to IIs failed evertime.i have even uinstall my firewall but it is still not wking.here is my sql server diagnotics

SQL Server Mobile Server Agent Diagnostics

2006/07/15 15:57:03

General Information

Item

Value

Server Name

nisha

URL

/SQLMobile/sqlcesa30.dll

Authentication Type

Anonymous

Server Port

80

HTTPS

off

Server Software

Microsoft-IIS/5.1

Replication

Allowed

RDA

Allowed

Logging Level

1

Impersonation and Access Tests

Action

Status

ErrorCode

Impersonate User

SUCCESS

0x0

ReadWriteDeleteMessageFile

SUCCESS

0x0

SQL Server Mobile Modules Test

Module

Status

ErrorCode

Version

SQLCERP30.DLL

SUCCESS

0x0

3.0.5207.0

SQLCESA30.DLL

SUCCESS

0x0

3.0.5207.0

Reconciler Test

Reconciler

Status

ErrorCode

9.0 Database Reconciler

SUCCESS

0x0

8.0 Database Reconciler

FAILURE

0x80004005

SQL Server Module Versions

Module

Version

sqloledb.dll

2000.85.1117.0

9.0 replrec.dll

2005.90.1399.0

9.0 replprov.dll

2005.90.1399.0

9.0 msgprox.dll

2005.90.1399.0

i dont kno how to solve the database reconciler.i am not able to synchronize.my coding is as follows:

Dim repl As New SqlCeReplication()

Dim strpath As String

strpath = "\Program Files\Flight_PPC\SQLFlight.sdf"

repl.InternetUrl = "http://nisha/SQLMobile/sqlcesa30.dll"

repl.Publisher = "NISHA"

repl.PublisherDatabase = "flightDatabase"

repl.PublisherSecurityMode = SecurityType.DBAuthentication

repl.PublisherLogin = "sa"

repl.PublisherPassword = "pradha"

repl.Publication = "SQLMobile"

repl.Subscriber = "SQLMobile"

repl.SubscriberConnectionString = "Data Source=" + strpath

Try

repl.Synchronize()

Catch err As SqlCeException

MessageBox.Show(err.ToString)

End Try

Try increasing your default timeout value on the IIS server and also the timeout from the client and see if that helps.|||Hi, I'm having the same problem...

The timeout of my IIS is set to 120 seconds, so I don't think that is the problem. I have the same exact display page as posted above. Any other idea?

Thanks|||

Hi, I still have the same issue. Any other suggestions will be appreciated. Thanks.

|||

Can you post the error message? You can see the log within "Replication Monitor". Open up SQL Server Managment Studio. Right click on "Replication" and choose "Launch Replication Monitor".

Saturday, February 25, 2012

REPOST: optimizations job for db maintenance plan failed

This is happening on two of our servers.
We get the warning in the application log as seen here:
http://support.microsoft.com/kb/902388/
But we don't get the SQL Server log entry that is mentioned in that KB
article.
Here are the commands from the jobs (after adding the
option -SupportComputedColumn , as recommended in the KB article) :
Server 1:
EXECUTE master.dbo.xp_sqlmaint N'-PlanID <GUID> -UpdOptiStats
10 -SupportComputedColumn '
Server 2:
EXECUTE master.dbo.xp_sqlmaint N'-PlanID <GUID> -Rpt
"G:\MSSQL\MSSQL\LOG\User DB Maintenance0.txt" -WriteHistory -UpdOptiStats
10 -SupportComputedColumn '
Any suggestions, anyone?
Regards,
JimIf you don't get the SQL Server log entry that is mentioned in the KB
you posted, it may not related at all. By just knowing the warning in
the application event, it is not sufficient to say more.
To find out why the job failed, go to the individual job in EM, right
click and select 'show job history' and check on 'Show Details' box.
It should give you more ideas what went wrong. It could be disk space,
permission, resources conflict issues etc.
Mel|||Hi Mel,
It shows the same message as is in the KB article:
"The job failed. The Job was invoked by User
<computer_system_administrator>. The last step to run was step 1 (Step 1)."
There is only one step:
EXECUTE master.dbo.xp_sqlmaint N'-PlanID <GUID> -UpdOptiStats
10 -SupportComputedColumn '
It's not clear to me how to troubleshoot further.
Jim
"MSLam" <MelodySLam@.googlemail.com> wrote in message
news:1145009319.702671.27150@.v46g2000cwv.googlegroups.com...
> If you don't get the SQL Server log entry that is mentioned in the KB
> you posted, it may not related at all. By just knowing the warning in
> the application event, it is not sufficient to say more.
> To find out why the job failed, go to the individual job in EM, right
> click and select 'show job history' and check on 'Show Details' box.
> It should give you more ideas what went wrong. It could be disk space,
> permission, resources conflict issues etc.
> Mel
>|||The error message isn't very helpful, is it :)
Okay last attempt, change the job owner to 'sa', to see if it is
because of that.
If still not joys, back to the old classic rule - re-create the plan
(delete the existing one and create a new one). Did you create the job
manually? If so, try to use the DB Maint Wizard to create the job and
compare the two.
Mel|||Thanks for the tip, Mel!
I've changed job owner to "sa". This job is part of a maintenance that runs
once a month, on the first of the month. We'll see how it goes in a two and
one-half weeks!
The plan was recently recreated, but it could be re-recreated to see if that
helps.
Good day,
Jim
"MSLam" <MelodySLam@.googlemail.com> wrote in message
news:1145046790.093217.94260@.g10g2000cwb.googlegroups.com...
> The error message isn't very helpful, is it :)
> Okay last attempt, change the job owner to 'sa', to see if it is
> because of that.
> If still not joys, back to the old classic rule - re-create the plan
> (delete the existing one and create a new one). Did you create the job
> manually? If so, try to use the DB Maint Wizard to create the job and
> compare the two.
> Mel
>

REPOST: optimizations job for db maintenance plan failed

This is happening on two of our servers.
We get the warning in the application log as seen here:
http://support.microsoft.com/kb/902388/
But we don't get the SQL Server log entry that is mentioned in that KB
article.
Here are the commands from the jobs (after adding the
option -SupportComputedColumn , as recommended in the KB article) :
Server 1:
EXECUTE master.dbo.xp_sqlmaint N'-PlanID <GUID> -UpdOptiStats
10 -SupportComputedColumn '
Server 2:
EXECUTE master.dbo.xp_sqlmaint N'-PlanID <GUID> -Rpt
"G:\MSSQL\MSSQL\LOG\User DB Maintenance0.txt" -WriteHistory -UpdOptiStats
10 -SupportComputedColumn '
Any suggestions, anyone?
Regards,
JimIf you don't get the SQL Server log entry that is mentioned in the KB
you posted, it may not related at all. By just knowing the warning in
the application event, it is not sufficient to say more.
To find out why the job failed, go to the individual job in EM, right
click and select 'show job history' and check on 'Show Details' box.
It should give you more ideas what went wrong. It could be disk space,
permission, resources conflict issues etc.
Mel|||Hi Mel,
It shows the same message as is in the KB article:
"The job failed. The Job was invoked by User
<computer_system_administrator>. The last step to run was step 1 (Step 1)."
There is only one step:
EXECUTE master.dbo.xp_sqlmaint N'-PlanID <GUID> -UpdOptiStats
10 -SupportComputedColumn '
It's not clear to me how to troubleshoot further.
Jim
"MSLam" <MelodySLam@.googlemail.com> wrote in message
news:1145009319.702671.27150@.v46g2000cwv.googlegroups.com...
> If you don't get the SQL Server log entry that is mentioned in the KB
> you posted, it may not related at all. By just knowing the warning in
> the application event, it is not sufficient to say more.
> To find out why the job failed, go to the individual job in EM, right
> click and select 'show job history' and check on 'Show Details' box.
> It should give you more ideas what went wrong. It could be disk space,
> permission, resources conflict issues etc.
> Mel
>|||The error message isn't very helpful, is it
Okay last attempt, change the job owner to 'sa', to see if it is
because of that.
If still not joys, back to the old classic rule - re-create the plan
(delete the existing one and create a new one). Did you create the job
manually? If so, try to use the DB Maint Wizard to create the job and
compare the two.
Mel|||Thanks for the tip, Mel!
I've changed job owner to "sa". This job is part of a maintenance that runs
once a month, on the first of the month. We'll see how it goes in a two and
one-half weeks!
The plan was recently recreated, but it could be re-recreated to see if that
helps.
Good day,
Jim
"MSLam" <MelodySLam@.googlemail.com> wrote in message
news:1145046790.093217.94260@.g10g2000cwb.googlegroups.com...
> The error message isn't very helpful, is it
> Okay last attempt, change the job owner to 'sa', to see if it is
> because of that.
> If still not joys, back to the old classic rule - re-create the plan
> (delete the existing one and create a new one). Did you create the job
> manually? If so, try to use the DB Maint Wizard to create the job and
> compare the two.
> Mel
>

Repost: Merge Replication Error - Failed to enumerate changes in the filtered article

Hi,
I am using Merge Replication and the subscriber is a pull subscriber.
Some tables are filtered, in the publication properties, if I go to FILTER
ROWS, then FILTER CLAUSE column, some tables are filtered like so
depot_system_id = 'xxxxx-xxxxx-xxxxx-xxxxxx' where x makes up the guid.
The replication objects are owned by DBO.
Versions of SQL:
Publisher:
Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation
Standard Edition on Windows NT 5.2 (Build 3790: )
Subscriber:
MSDE
Everything was working fine, then all of a sudden, I get this error. (See
below)
Does anyone know what would cause this and how I can overcome it?
Thanks in Advance
Warren
************************************************** *
******************ERROR DETAILS******************
************************************************** *
Last command: {call sp_MSsetupbelongs(?,?,?,?,?,1,?,?,1,?,?,?,?,?,?)}
Error Message: Failed to enumerate changes in the filtered articles.
Error Details:
Failed to enumerate changes in the filtered articles.
(Source: Merge Replication Provider (Agent); Error number: -2147200925)
Incorrect syntax near the keyword 'where'.
(Source: GENCENTRIC_SVR1 (Data source); Error number: 156)
Incorrect syntax near the keyword 'and'.
(Source: GENCENTRIC_SVR1 (Data source); Error number: 156)
************************************************** *
*******************END OF ERROR******************
************************************************** *
Someone reported a similar problem and solved it by reapplying sp3a.
http://groups-beta.google.com/group/... e3a5eb8c1ea7a
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Warren Patterson" <des@.newsgroups.nospam> wrote in message
news:eYSANebNFHA.2468@.tk2msftngp13.phx.gbl...
> Hi,
> I am using Merge Replication and the subscriber is a pull subscriber.
> Some tables are filtered, in the publication properties, if I go to FILTER
> ROWS, then FILTER CLAUSE column, some tables are filtered like so
> depot_system_id = 'xxxxx-xxxxx-xxxxx-xxxxxx' where x makes up the guid.
> The replication objects are owned by DBO.
> Versions of SQL:
> Publisher:
> --
> Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
> Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation
> Standard Edition on Windows NT 5.2 (Build 3790: )
> Subscriber:
> --
> MSDE
>
> Everything was working fine, then all of a sudden, I get this error. (See
> below)
> Does anyone know what would cause this and how I can overcome it?
> Thanks in Advance
> Warren
> ************************************************** *
> ******************ERROR DETAILS******************
> ************************************************** *
> Last command: {call sp_MSsetupbelongs(?,?,?,?,?,1,?,?,1,?,?,?,?,?,?)}
> Error Message: Failed to enumerate changes in the filtered articles.
> Error Details:
> Failed to enumerate changes in the filtered articles.
> (Source: Merge Replication Provider (Agent); Error number: -2147200925)
> ----
--
> --
> Incorrect syntax near the keyword 'where'.
> (Source: GENCENTRIC_SVR1 (Data source); Error number: 156)
> ----
--
> --
> Incorrect syntax near the keyword 'and'.
> (Source: GENCENTRIC_SVR1 (Data source); Error number: 156)
> ----
--
> --
> ************************************************** *
> *******************END OF ERROR******************
> ************************************************** *
>
>
|||Hi Hilary,
Installing SP3a doesnt make sense to me. I have 4 other publications on
that same machine, setup the exact same way, except the filters are on other
ID {"depot_system_id = 'xxxxx-xxxxx-xxxxx-xxxxxx' where x makes up the
guid."} and they are working perfectly.
I am running service pack 3 only. I cant remember, but something in the
deep recesses of my mind is telling me that there was a reason I didnt
install SP3a onto the publisher, but I cant remember why.
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:eYPCVpeNFHA.508@.TK2MSFTNGP12.phx.gbl...
> Someone reported a similar problem and solved it by reapplying sp3a.
>
http://groups-beta.google.com/group/... e3a5eb8c1ea7a[vbcol=seagreen]
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Warren Patterson" <des@.newsgroups.nospam> wrote in message
> news:eYSANebNFHA.2468@.tk2msftngp13.phx.gbl...
FILTER[vbcol=seagreen]
(See
> ----
> --
> ----
> --
> ----
> --
>