Showing posts with label jobs. Show all posts
Showing posts with label jobs. Show all posts

Friday, March 30, 2012

Maintenance Plan Failure

SQL Server 2000 sp3a, running on Windows 2003 server, sp1.
I have two jobs, based on maintenance plans, that have been running fine for
over two years. One updates statistics for a database, and the other rebuild
s
indexes. Yesterday, they both started failing. The only info I can get is
from the Maintenance Plan History, both messages are similar:
[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 1934: [Microsoft]&#
91;ODBC SQL
Server Driver][SQL Server]DBCC failed because the following SET options
have
incorrect settings: 'QUOTED_IDENTIFIER'.
and
[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 1934: [Microsoft]&#
91;ODBC SQL
Server Driver][SQL Server]UPDATE STATISTICS failed because the following
SET
options have incorrect settings: 'QUOTED_IDENTIFIER'.
quoted_identifier is set to 1, and has not been changed. Nothing has changed
at all with the database and server.
I created two new plans to duplicate the above, and each of them fails with
the same messages.
I have no clue as to why these all of a sudden started to fail, and any
assistance would be greatly appreciated.
TomTSorry for the double post, I got a message saying the post was unsuccessful,
and posted again (and got the same message, by the way)...
"TomT" wrote:

> SQL Server 2000 sp3a, running on Windows 2003 server, sp1.
> I have two jobs, based on maintenance plans, that have been running fine f
or
> over two years. One updates statistics for a database, and the other rebui
lds
> indexes. Yesterday, they both started failing. The only info I can get is
> from the Maintenance Plan History, both messages are similar:
> [Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 1934: [Microsoft]
[ODBC SQL
> Server Driver][SQL Server]DBCC failed because the following SET option
s have
> incorrect settings: 'QUOTED_IDENTIFIER'.
> and
> [Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 1934: [Microsoft]
[ODBC SQL
> Server Driver][SQL Server]UPDATE STATISTICS failed because the followi
ng SET
> options have incorrect settings: 'QUOTED_IDENTIFIER'.
> quoted_identifier is set to 1, and has not been changed. Nothing has chang
ed
> at all with the database and server.
> I created two new plans to duplicate the above, and each of them fails wit
h
> the same messages.
> I have no clue as to why these all of a sudden started to fail, and any
> assistance would be greatly appreciated.
> TomT|||Hi Tom,
That's OK, I am composing a reply to that thread
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.

Maintenance Plan Failure

SQL Server 2000 sp3a, running on Windows 2003 server, sp1.
I have two jobs, based on maintenance plans, that have been running fine for
over two years. One updates statistics for a database, and the other rebuilds
indexes. Yesterday, they both started failing. The only info I can get is
from the Maintenance Plan History, both messages are similar:
[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 1934: [Microsoft][ODBC SQL
Server Driver][SQL Server]DBCC failed because the following SET options have
incorrect settings: 'QUOTED_IDENTIFIER'.
and
[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 1934: [Microsoft][ODBC SQL
Server Driver][SQL Server]UPDATE STATISTICS failed because the following SET
options have incorrect settings: 'QUOTED_IDENTIFIER'.
quoted_identifier is set to 1, and has not been changed. Nothing has changed
at all with the database and server.
I created two new plans to duplicate the above, and each of them fails with
the same messages.
I have no clue as to why these all of a sudden started to fail, and any
assistance would be greatly appreciated.
TomT
Sorry for the double post, I got a message saying the post was unsuccessful,
and posted again (and got the same message, by the way)...
"TomT" wrote:

> SQL Server 2000 sp3a, running on Windows 2003 server, sp1.
> I have two jobs, based on maintenance plans, that have been running fine for
> over two years. One updates statistics for a database, and the other rebuilds
> indexes. Yesterday, they both started failing. The only info I can get is
> from the Maintenance Plan History, both messages are similar:
> [Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 1934: [Microsoft][ODBC SQL
> Server Driver][SQL Server]DBCC failed because the following SET options have
> incorrect settings: 'QUOTED_IDENTIFIER'.
> and
> [Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 1934: [Microsoft][ODBC SQL
> Server Driver][SQL Server]UPDATE STATISTICS failed because the following SET
> options have incorrect settings: 'QUOTED_IDENTIFIER'.
> quoted_identifier is set to 1, and has not been changed. Nothing has changed
> at all with the database and server.
> I created two new plans to duplicate the above, and each of them fails with
> the same messages.
> I have no clue as to why these all of a sudden started to fail, and any
> assistance would be greatly appreciated.
> TomT
|||Hi Tom,
That's OK, I am composing a reply to that thread
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.
sql

Maintenance Plan Failure

SQL Server 2000 sp3a, running on Windows 2003 server, sp1.
I have two jobs, based on maintenance plans, that have been running fine for
over two years. One updates statistics for a database, and the other rebuilds
indexes. Yesterday, they both started failing. The only info I can get is
from the Maintenance Plan History, both messages are similar:
[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 1934: [Microsoft][ODBC SQL
Server Driver][SQL Server]DBCC failed because the following SET options have
incorrect settings: 'QUOTED_IDENTIFIER'.
and
[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 1934: [Microsoft][ODBC SQL
Server Driver][SQL Server]UPDATE STATISTICS failed because the following SET
options have incorrect settings: 'QUOTED_IDENTIFIER'.
quoted_identifier is set to 1, and has not been changed. Nothing has changed
at all with the database and server.
I created two new plans to duplicate the above, and each of them fails with
the same messages.
I have no clue as to why these all of a sudden started to fail, and any
assistance would be greatly appreciated.
TomTSorry for the double post, I got a message saying the post was unsuccessful,
and posted again (and got the same message, by the way)...
"TomT" wrote:
> SQL Server 2000 sp3a, running on Windows 2003 server, sp1.
> I have two jobs, based on maintenance plans, that have been running fine for
> over two years. One updates statistics for a database, and the other rebuilds
> indexes. Yesterday, they both started failing. The only info I can get is
> from the Maintenance Plan History, both messages are similar:
> [Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 1934: [Microsoft][ODBC SQL
> Server Driver][SQL Server]DBCC failed because the following SET options have
> incorrect settings: 'QUOTED_IDENTIFIER'.
> and
> [Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 1934: [Microsoft][ODBC SQL
> Server Driver][SQL Server]UPDATE STATISTICS failed because the following SET
> options have incorrect settings: 'QUOTED_IDENTIFIER'.
> quoted_identifier is set to 1, and has not been changed. Nothing has changed
> at all with the database and server.
> I created two new plans to duplicate the above, and each of them fails with
> the same messages.
> I have no clue as to why these all of a sudden started to fail, and any
> assistance would be greatly appreciated.
> TomT|||Hi Tom,
That's OK, I am composing a reply to that thread :)
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.

Wednesday, March 28, 2012

Maintenance plan error in SQL Server 2000(SP3) Standard Ed!

Hi,
I have delete the user BUILTIN\Administrators, afte that
Maintenance Plan jobs are failed with the following error:
Microsoft (R) SQLMaint Utility (Unicode), Version
[Microsoft SQL-DMO (ODBC SQLState: 28000)] Error 18456:
[Microsoft][ODBC SQL Server Driver][SQL Server]Login
failed for user 'NT AUTHORITY\SYSTEM'.
I have given access to the User, under which SQL Server
Agent services runs.
When i added back the user BUILTIN\Administrators, after
that it's runing fine. Please suggest for above problem.
I appreciate it.
Thanks
ssWhat account was the job set up under? And with which account is the
sqlagent running?
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

Monday, March 26, 2012

Maintenance Plan "fails"..

Thanks in advance for any insight.
On occasion, one of my schedule jobs will "fail", in that all tasks
complete, but it still reports failure. Strangely enough, nothing is written
to SQL Server log, but I do have the following entry in the Event Viewer:
"SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan 'Non-Great
Plains Daily Backup'' (0x01BF5D1C32E9FF418D67E99A77A4A014) - Status:
Failed - Invoked on: 2004-06-08 20:00:00 - Message: The job failed. The Job
was invoked by Schedule 35 (Schedule 1). The last step to run was step 1
(Step 1)."
Any ideas on how to troubleshoot this?
Thanks,
MorganAny messages in the report file? (Did you specify a report file, btw?)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Morgan" <abcd@.senditon.com> wrote in message news:eiY8NRjTEHA.1284@.TK2MSFTNGP10.phx.gbl...[
vbcol=seagreen]
> Thanks in advance for any insight.
> On occasion, one of my schedule jobs will "fail", in that all tasks
> complete, but it still reports failure. Strangely enough, nothing is writt
en
> to SQL Server log, but I do have the following entry in the Event Viewer:
> "SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan 'Non-Grea
t
> Plains Daily Backup'' (0x01BF5D1C32E9FF418D67E99A77A4A014) - Status:
> Failed - Invoked on: 2004-06-08 20:00:00 - Message: The job failed. The Jo
b
> was invoked by Schedule 35 (Schedule 1). The last step to run was step 1
> (Step 1)."
> Any ideas on how to troubleshoot this?
>
> Thanks,
> Morgan
>[/vbcol]|||Hi Tibor,
The only thing in the report file is that it was unable to delete one of the
database backups. Other than that, all of the steps completed. Would that
cause the job to think it failed?
Thanks,
Morgan
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:ubeNMltTEHA.2544@.TK2MSFTNGP10.phx.gbl...
> Any messages in the report file? (Did you specify a report file, btw?)
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Morgan" <abcd@.senditon.com> wrote in message
news:eiY8NRjTEHA.1284@.TK2MSFTNGP10.phx.gbl...
written[vbcol=seagreen]
Viewer:[vbcol=seagreen]
'Non-Great[vbcol=seagreen]
Job[vbcol=seagreen]
>|||If I wrote the code, yes a failed deletion of a backup file would cause the
job to fail.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Morgan" <abcd@.senditon.com> wrote in message news:eVp7v$uTEHA.3988@.tk2msftngp13.phx.gbl...[
vbcol=seagreen]
> Hi Tibor,
> The only thing in the report file is that it was unable to delete one of t
he
> database backups. Other than that, all of the steps completed. Would that
> cause the job to think it failed?
> Thanks,
> Morgan
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n
> message news:ubeNMltTEHA.2544@.TK2MSFTNGP10.phx.gbl...
> news:eiY8NRjTEHA.1284@.TK2MSFTNGP10.phx.gbl...
> written
> Viewer:
> 'Non-Great
> Job
>[/vbcol]|||Ha! I hear ya. Would be nice if each piece of a maintenance plan could be a
seperate job, that way if deleting a previous days backup failed it wouldn't
look like the databases didn't get backed up since that would be a seperate
task with its own status.
Thanks,
Morgan
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e3i9JIvTEHA.644@.tk2msftngp13.phx.gbl...
> If I wrote the code, yes a failed deletion of a backup file would cause
the job to fail.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Morgan" <abcd@.senditon.com> wrote in message
news:eVp7v$uTEHA.3988@.tk2msftngp13.phx.gbl...
the[vbcol=seagreen]
that[vbcol=seagreen]
in[vbcol=seagreen]
The[vbcol=seagreen]
step 1[vbcol=seagreen]
>|||A "hack" way is to create a script that does a "DIR" in the directory and de
lete old files. This can be done
using ActiveScript, TSQL of whatever is your preference...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Morgan" <abcd@.senditon.com> wrote in message news:OPwIwByTEHA.3480@.TK2MSFTNGP11.phx.gbl...[
vbcol=seagreen]
> Ha! I hear ya. Would be nice if each piece of a maintenance plan could be
a
> seperate job, that way if deleting a previous days backup failed it wouldn
't
> look like the databases didn't get backed up since that would be a seperat
e
> task with its own status.
> Thanks,
> Morgan
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n
> message news:e3i9JIvTEHA.644@.tk2msftngp13.phx.gbl...
> the job to fail.
> news:eVp7v$uTEHA.3988@.tk2msftngp13.phx.gbl...
> the
> that
> in
> The
> step 1
>[/vbcol]

Maintenance Plan "fails"..

Thanks in advance for any insight.
On occasion, one of my schedule jobs will "fail", in that all tasks
complete, but it still reports failure. Strangely enough, nothing is written
to SQL Server log, but I do have the following entry in the Event Viewer:
"SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan 'Non-Great
Plains Daily Backup'' (0x01BF5D1C32E9FF418D67E99A77A4A014) - Status:
Failed - Invoked on: 2004-06-08 20:00:00 - Message: The job failed. The Job
was invoked by Schedule 35 (Schedule 1). The last step to run was step 1
(Step 1)."
Any ideas on how to troubleshoot this?
Thanks,
Morgan
Any messages in the report file? (Did you specify a report file, btw?)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Morgan" <abcd@.senditon.com> wrote in message news:eiY8NRjTEHA.1284@.TK2MSFTNGP10.phx.gbl...
> Thanks in advance for any insight.
> On occasion, one of my schedule jobs will "fail", in that all tasks
> complete, but it still reports failure. Strangely enough, nothing is written
> to SQL Server log, but I do have the following entry in the Event Viewer:
> "SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan 'Non-Great
> Plains Daily Backup'' (0x01BF5D1C32E9FF418D67E99A77A4A014) - Status:
> Failed - Invoked on: 2004-06-08 20:00:00 - Message: The job failed. The Job
> was invoked by Schedule 35 (Schedule 1). The last step to run was step 1
> (Step 1)."
> Any ideas on how to troubleshoot this?
>
> Thanks,
> Morgan
>
|||Hi Tibor,
The only thing in the report file is that it was unable to delete one of the
database backups. Other than that, all of the steps completed. Would that
cause the job to think it failed?
Thanks,
Morgan
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:ubeNMltTEHA.2544@.TK2MSFTNGP10.phx.gbl...
> Any messages in the report file? (Did you specify a report file, btw?)
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Morgan" <abcd@.senditon.com> wrote in message
news:eiY8NRjTEHA.1284@.TK2MSFTNGP10.phx.gbl...[vbcol=seagreen]
written[vbcol=seagreen]
Viewer:[vbcol=seagreen]
'Non-Great[vbcol=seagreen]
Job
>
|||If I wrote the code, yes a failed deletion of a backup file would cause the job to fail.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Morgan" <abcd@.senditon.com> wrote in message news:eVp7v$uTEHA.3988@.tk2msftngp13.phx.gbl...
> Hi Tibor,
> The only thing in the report file is that it was unable to delete one of the
> database backups. Other than that, all of the steps completed. Would that
> cause the job to think it failed?
> Thanks,
> Morgan
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:ubeNMltTEHA.2544@.TK2MSFTNGP10.phx.gbl...
> news:eiY8NRjTEHA.1284@.TK2MSFTNGP10.phx.gbl...
> written
> Viewer:
> 'Non-Great
> Job
>
|||Ha! I hear ya. Would be nice if each piece of a maintenance plan could be a
seperate job, that way if deleting a previous days backup failed it wouldn't
look like the databases didn't get backed up since that would be a seperate
task with its own status.
Thanks,
Morgan
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e3i9JIvTEHA.644@.tk2msftngp13.phx.gbl...
> If I wrote the code, yes a failed deletion of a backup file would cause
the job to fail.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Morgan" <abcd@.senditon.com> wrote in message
news:eVp7v$uTEHA.3988@.tk2msftngp13.phx.gbl...[vbcol=seagreen]
the[vbcol=seagreen]
that[vbcol=seagreen]
in[vbcol=seagreen]
The[vbcol=seagreen]
step 1
>
|||A "hack" way is to create a script that does a "DIR" in the directory and delete old files. This can be done
using ActiveScript, TSQL of whatever is your preference...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Morgan" <abcd@.senditon.com> wrote in message news:OPwIwByTEHA.3480@.TK2MSFTNGP11.phx.gbl...
> Ha! I hear ya. Would be nice if each piece of a maintenance plan could be a
> seperate job, that way if deleting a previous days backup failed it wouldn't
> look like the databases didn't get backed up since that would be a seperate
> task with its own status.
> Thanks,
> Morgan
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:e3i9JIvTEHA.644@.tk2msftngp13.phx.gbl...
> the job to fail.
> news:eVp7v$uTEHA.3988@.tk2msftngp13.phx.gbl...
> the
> that
> in
> The
> step 1
>

Maintenance Plan "fails"..

Thanks in advance for any insight.
On occasion, one of my schedule jobs will "fail", in that all tasks
complete, but it still reports failure. Strangely enough, nothing is written
to SQL Server log, but I do have the following entry in the Event Viewer:
"SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan 'Non-Great
Plains Daily Backup'' (0x01BF5D1C32E9FF418D67E99A77A4A014) - Status:
Failed - Invoked on: 2004-06-08 20:00:00 - Message: The job failed. The Job
was invoked by Schedule 35 (Schedule 1). The last step to run was step 1
(Step 1)."
Any ideas on how to troubleshoot this?
Thanks,
MorganAny messages in the report file? (Did you specify a report file, btw?)
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Morgan" <abcd@.senditon.com> wrote in message news:eiY8NRjTEHA.1284@.TK2MSFTNGP10.phx.gbl...
> Thanks in advance for any insight.
> On occasion, one of my schedule jobs will "fail", in that all tasks
> complete, but it still reports failure. Strangely enough, nothing is written
> to SQL Server log, but I do have the following entry in the Event Viewer:
> "SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan 'Non-Great
> Plains Daily Backup'' (0x01BF5D1C32E9FF418D67E99A77A4A014) - Status:
> Failed - Invoked on: 2004-06-08 20:00:00 - Message: The job failed. The Job
> was invoked by Schedule 35 (Schedule 1). The last step to run was step 1
> (Step 1)."
> Any ideas on how to troubleshoot this?
>
> Thanks,
> Morgan
>|||Hi Tibor,
The only thing in the report file is that it was unable to delete one of the
database backups. Other than that, all of the steps completed. Would that
cause the job to think it failed?
Thanks,
Morgan
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:ubeNMltTEHA.2544@.TK2MSFTNGP10.phx.gbl...
> Any messages in the report file? (Did you specify a report file, btw?)
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Morgan" <abcd@.senditon.com> wrote in message
news:eiY8NRjTEHA.1284@.TK2MSFTNGP10.phx.gbl...
> > Thanks in advance for any insight.
> >
> > On occasion, one of my schedule jobs will "fail", in that all tasks
> > complete, but it still reports failure. Strangely enough, nothing is
written
> > to SQL Server log, but I do have the following entry in the Event
Viewer:
> > "SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan
'Non-Great
> > Plains Daily Backup'' (0x01BF5D1C32E9FF418D67E99A77A4A014) - Status:
> > Failed - Invoked on: 2004-06-08 20:00:00 - Message: The job failed. The
Job
> > was invoked by Schedule 35 (Schedule 1). The last step to run was step 1
> > (Step 1)."
> >
> > Any ideas on how to troubleshoot this?
> >
> >
> > Thanks,
> >
> > Morgan
> >
> >
>|||If I wrote the code, yes a failed deletion of a backup file would cause the job to fail.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Morgan" <abcd@.senditon.com> wrote in message news:eVp7v$uTEHA.3988@.tk2msftngp13.phx.gbl...
> Hi Tibor,
> The only thing in the report file is that it was unable to delete one of the
> database backups. Other than that, all of the steps completed. Would that
> cause the job to think it failed?
> Thanks,
> Morgan
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:ubeNMltTEHA.2544@.TK2MSFTNGP10.phx.gbl...
> > Any messages in the report file? (Did you specify a report file, btw?)
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> > http://www.solidqualitylearning.com/
> >
> >
> > "Morgan" <abcd@.senditon.com> wrote in message
> news:eiY8NRjTEHA.1284@.TK2MSFTNGP10.phx.gbl...
> > > Thanks in advance for any insight.
> > >
> > > On occasion, one of my schedule jobs will "fail", in that all tasks
> > > complete, but it still reports failure. Strangely enough, nothing is
> written
> > > to SQL Server log, but I do have the following entry in the Event
> Viewer:
> > > "SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan
> 'Non-Great
> > > Plains Daily Backup'' (0x01BF5D1C32E9FF418D67E99A77A4A014) - Status:
> > > Failed - Invoked on: 2004-06-08 20:00:00 - Message: The job failed. The
> Job
> > > was invoked by Schedule 35 (Schedule 1). The last step to run was step 1
> > > (Step 1)."
> > >
> > > Any ideas on how to troubleshoot this?
> > >
> > >
> > > Thanks,
> > >
> > > Morgan
> > >
> > >
> >
> >
>|||Ha! I hear ya. Would be nice if each piece of a maintenance plan could be a
seperate job, that way if deleting a previous days backup failed it wouldn't
look like the databases didn't get backed up since that would be a seperate
task with its own status.
Thanks,
Morgan
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e3i9JIvTEHA.644@.tk2msftngp13.phx.gbl...
> If I wrote the code, yes a failed deletion of a backup file would cause
the job to fail.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Morgan" <abcd@.senditon.com> wrote in message
news:eVp7v$uTEHA.3988@.tk2msftngp13.phx.gbl...
> > Hi Tibor,
> >
> > The only thing in the report file is that it was unable to delete one of
the
> > database backups. Other than that, all of the steps completed. Would
that
> > cause the job to think it failed?
> >
> > Thanks,
> >
> > Morgan
> >
> >
> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in
> > message news:ubeNMltTEHA.2544@.TK2MSFTNGP10.phx.gbl...
> > > Any messages in the report file? (Did you specify a report file, btw?)
> > >
> > > --
> > > Tibor Karaszi, SQL Server MVP
> > > http://www.karaszi.com/sqlserver/default.asp
> > > http://www.solidqualitylearning.com/
> > >
> > >
> > > "Morgan" <abcd@.senditon.com> wrote in message
> > news:eiY8NRjTEHA.1284@.TK2MSFTNGP10.phx.gbl...
> > > > Thanks in advance for any insight.
> > > >
> > > > On occasion, one of my schedule jobs will "fail", in that all tasks
> > > > complete, but it still reports failure. Strangely enough, nothing is
> > written
> > > > to SQL Server log, but I do have the following entry in the Event
> > Viewer:
> > > > "SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan
> > 'Non-Great
> > > > Plains Daily Backup'' (0x01BF5D1C32E9FF418D67E99A77A4A014) - Status:
> > > > Failed - Invoked on: 2004-06-08 20:00:00 - Message: The job failed.
The
> > Job
> > > > was invoked by Schedule 35 (Schedule 1). The last step to run was
step 1
> > > > (Step 1)."
> > > >
> > > > Any ideas on how to troubleshoot this?
> > > >
> > > >
> > > > Thanks,
> > > >
> > > > Morgan
> > > >
> > > >
> > >
> > >
> >
> >
>|||A "hack" way is to create a script that does a "DIR" in the directory and delete old files. This can be done
using ActiveScript, TSQL of whatever is your preference...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Morgan" <abcd@.senditon.com> wrote in message news:OPwIwByTEHA.3480@.TK2MSFTNGP11.phx.gbl...
> Ha! I hear ya. Would be nice if each piece of a maintenance plan could be a
> seperate job, that way if deleting a previous days backup failed it wouldn't
> look like the databases didn't get backed up since that would be a seperate
> task with its own status.
> Thanks,
> Morgan
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:e3i9JIvTEHA.644@.tk2msftngp13.phx.gbl...
> > If I wrote the code, yes a failed deletion of a backup file would cause
> the job to fail.
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> > http://www.solidqualitylearning.com/
> >
> >
> > "Morgan" <abcd@.senditon.com> wrote in message
> news:eVp7v$uTEHA.3988@.tk2msftngp13.phx.gbl...
> > > Hi Tibor,
> > >
> > > The only thing in the report file is that it was unable to delete one of
> the
> > > database backups. Other than that, all of the steps completed. Would
> that
> > > cause the job to think it failed?
> > >
> > > Thanks,
> > >
> > > Morgan
> > >
> > >
> > > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in
> > > message news:ubeNMltTEHA.2544@.TK2MSFTNGP10.phx.gbl...
> > > > Any messages in the report file? (Did you specify a report file, btw?)
> > > >
> > > > --
> > > > Tibor Karaszi, SQL Server MVP
> > > > http://www.karaszi.com/sqlserver/default.asp
> > > > http://www.solidqualitylearning.com/
> > > >
> > > >
> > > > "Morgan" <abcd@.senditon.com> wrote in message
> > > news:eiY8NRjTEHA.1284@.TK2MSFTNGP10.phx.gbl...
> > > > > Thanks in advance for any insight.
> > > > >
> > > > > On occasion, one of my schedule jobs will "fail", in that all tasks
> > > > > complete, but it still reports failure. Strangely enough, nothing is
> > > written
> > > > > to SQL Server log, but I do have the following entry in the Event
> > > Viewer:
> > > > > "SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan
> > > 'Non-Great
> > > > > Plains Daily Backup'' (0x01BF5D1C32E9FF418D67E99A77A4A014) - Status:
> > > > > Failed - Invoked on: 2004-06-08 20:00:00 - Message: The job failed.
> The
> > > Job
> > > > > was invoked by Schedule 35 (Schedule 1). The last step to run was
> step 1
> > > > > (Step 1)."
> > > > >
> > > > > Any ideas on how to troubleshoot this?
> > > > >
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Morgan
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>

Friday, March 23, 2012

Maintenance Plan

I created a simple Maintenance Plan that backup my
Database every 12 hour and backup the log every 6 hour
so it's created 2 Jobs
al;l the time I am getting an error the the Maintenance
Plan failed
the plan created the backup files (*.bak) but not the log
why ?
w2000+ SP3+SQL7.4
error in the event viewer
SQL Server Scheduled Job 'DB Backup Job for DB Maintenance
Plan 'DB Maintenance Plan1''
(0x98D3C40024DF964584FEBD0E4F8E9782) - Status: Failed -
Invoked on: 7/16/2003 7:34:14 PM - Message: The job
failed. The Job was invoked by User
COMPAQ\Administrator. The last step to run was step 1
(Step 1).Are you logging the transactions? In SQL 7 that means
the "truncate log on checkpoint" is NOT on, in SQL 2000 a
Simple Recovery plan will not log transactions. Also, the
Select/into bulk copy setting, if on, will allow someone
to do certain commands which will make the log backup
fail. Have to check those and look into why the option is
needed to be set on if it IS... or a log backup device is
blocked by something like a tape backup job?!? Bruce
>--Original Message--
>I created a simple Maintenance Plan that backup my
>Database every 12 hour and backup the log every 6 hour
>so it's created 2 Jobs
>al;l the time I am getting an error the the Maintenance
>Plan failed
>the plan created the backup files (*.bak) but not the log
>why ?
>w2000+ SP3+SQL7.4
>error in the event viewer
>SQL Server Scheduled Job 'DB Backup Job for DB
Maintenance
>Plan 'DB Maintenance Plan1''
>(0x98D3C40024DF964584FEBD0E4F8E9782) - Status: Failed -
>Invoked on: 7/16/2003 7:34:14 PM - Message: The job
>failed. The Job was invoked by User
>COMPAQ\Administrator. The last step to run was step 1
>(Step 1).
>.
>|||In your job that runs these backups, if you're not saving
the job step's output to a file, I'd do that... it may
show what's happening.
Maybe the files can't be deleted due to being locked by
something like a tape backup?
You have Truncate/log on, so in the case a non-logged
command is executed, then I can see why that would cause
your log backup to have problems...
I'd look at each job step output first... Bruce
>--Original Message--
>I tried to trace the History and I fou that I have 2
>problems with this Maintenance Plan :
>Problem A :
>The step that should delete old db files (olderedv then 4
>days ) get the red alert :
>In the History :
>Activity=Delete old DB file backup files
>Status=RED X
>Message=2 file(s) deleted.
>Problem B
>The step that should backup the transaction log event it
>BLUE checked does not succssed !
>In the History :
>Activity=Backup transaction log
>Status=BLUE checked
>Message=Backup can not be performed on this database.
this
>sub task is ignored
>The options that marked in my databases are :
>Truncate log on check point
>Auto create statistic
>Auto update statistic
>.
>sql

Maintenance Jobs Failed

Hi
Recently I have moved sql 2005 from one box to another with bigger hdd space and more memory. Since then I am getting the attached error message when I Execute all the job.Hey Common Gurus Help Me out... since 24 hours no reply
Thanks|||Resolved the issue.. thanks...|||Can you please post your resolution?|||Follow the link, has complete solution...

http://support.microsoft.com/kb/903205sql

Monday, March 19, 2012

Maintain Jobs, View Logs

I have a user who needs to check whether 2 jobs have run on a SQL Server 200
0 instance, and be able to view logs.
Is there a way of doing this, and not allowing them access to anything else?Hi
Does the use have EM on his/her workstation?
Does the user have permissions to run the job?
See this example written by Neil
/*** Scheduled task reporter for SQL 2000
**** Copyright Neil Boyle 2003.
**** Use entirely at your own risk
***/
use MSDB
go
select convert(varchar(22), j.name) as job_name
, case freq_type -- Daily, weekly, Monthly
when 1 then 'Once'
when 4 then 'Daily'
when 8 then 'Wk ' -- For weekly, add in the days of the week
+ case freq_interval & 2 when 2 then 'M' else '' end -- Monday
+ case freq_interval & 4 when 4 then 'Tu' else '' end -- Tuesday
+ case freq_interval & 8 when 8 then 'W' else '' end -- etc
+ case freq_interval & 16 when 16 then 'Th' else '' end
+ case freq_interval & 32 when 32 then 'F' else '' end
+ case freq_interval & 64 when 64 then 'Sa' else '' end
+ case freq_interval & 1 when 1 then 'Su' else '' end
when 16 then 'Mthly on day ' + convert(varchar(2), freq_interval) --
Monthly on a particular day
when 32 then 'Mthly ' -- The most complicated one, "every third Friday
of the month" for example
+ case freq_relative_interval
when 1 then 'Every First '
when 2 then 'Every Second '
when 4 then 'Every Third '
when 8 then 'Every Fourth '
when 16 then 'Every Last '
end
+ case freq_interval
when 1 then 'Sunday'
when 2 then 'Monday'
when 3 then 'Tuesday'
when 4 then 'Wednesday'
when 5 then 'Thursday'
when 6 then 'Friday'
when 7 then 'Saturday'
when 8 then 'Day'
when 9 then 'Week day'
when 10 then 'Weekend day'
end
when 64 then 'Startup' -- When SQL Server starts
when 128 then 'Idle' -- Whenever SQL Server gets bored
else 'Err' -- This should never happen
end as schedule
, case freq_subday_type -- FOr when a job funs every few seconds, minutes
or hours
when 1 then 'Runs once at:'
when 2 then 'every ' + convert(varchar(3), freq_subday_interval) + '
seconds'
when 4 then 'every ' + convert(varchar(3), freq_subday_interval) + '
minutes'
when 8 then 'every ' + convert(varchar(3), freq_subday_interval) + '
hours'
end as frequency
-- All the subsrings are because the times are stored as an integer with no
leading zeroes
-- i.e. 0 means midnight, 13000 means half past one in the morning
(01:30:00)
, substring (right (stuff (' ', 1, 1, '000000') +
convert(varchar(6),active_start_time), 6), 1, 2)
+ ':'
+ substring (
right (stuff (' ', 1, 1, '000000') + convert(varchar(6),
active_start_time), 6) ,3 ,2)
+ ':'
+ substring (
right (stuff (' ', 1, 1, '000000') + convert(varchar(6),active_start_time),
6) ,5 ,2) as start_at
,case freq_subday_type
when 1 then NULL -- Ignore the end time if not a recurring job
else substring (right (stuff (' ', 1, 1, '000000') + convert(varchar(6),
active_end_time), 6), 1, 2)
+ ':'
+ substring (
right (stuff (' ', 1, 1, '000000') + convert(varchar(6), active_end_time),
6) ,3 ,2)
+ ':'
+ substring (
right (stuff (' ', 1, 1, '000000') + convert(varchar(6), active_end_time),
6) ,5 ,2) end as end_at
from sysjobs j
join sysJobSchedules s
on j.job_id = s.job_id
order by j.name, start_at
"JamesNZ" <JamesNZ.24lo0y@.mail.webservertalk.com> wrote in message
news:JamesNZ.24lo0y@.mail.webservertalk.com...
> I have a user who needs to check whether 2 jobs have run on a SQL Server
> 2000 instance, and be able to view logs.
> Is there a way of doing this, and not allowing them access to anything
> else?
>
> --
> JamesNZ
> ---
> Posted via http://www.webservertalk.com
> ---
> View this thread: http://www.webservertalk.com/message1430463.html
>|||Here is one solution which should work for you:
1. Create a SP using the following script. Just mention your job names in
the following line of the script:
--sj.name in ('Job1', 'Job2') and
CREATE PROCEDURE dbo.read_jobhistory
as
select sjh.server, sj.name, case sjh.run_status
when 0 then 'Failed'
when 1 then 'Succeeded'
when 2 then 'Retry'
when 3 then 'Canceled'
when 4 then 'In progress'
end as 'Job Status',
sjh.sql_message_id, sjh.sql_severity,sjh.message,
convert(datetime, cast (sjh.run_date as char(8)) + ' ' +
left(right('000000' + cast (sjh.run_time as varchar(6)),6),2) + ':' +
substring(right('000000' + cast (sjh.run_time as varchar(6)),6),3,2) + ':' +
right('000000' + cast (sjh.run_time as varchar(6)),2))as 'Run Date',
sjh.run_duration, sjh.operator_id_emailed,
sjh.operator_id_netsent, sjh.operator_id_paged, sjh.retries_attempted
from
msdb..sysjobhistory sjh
join msdb..sysjobs sj
on sjh.job_id = sj.job_id
where
sj.name in ('Job1', 'Job2') and
step_id = 0
and sjh.run_date >= convert(char(10),getdate(),112)
order by sjh.server, sj.name, sjh.run_date, sjh.run_time
2. Grant Execution on this SP to the concerned user.
3. The concerned user can get the report for the today's date just by
executing the SP.
"JamesNZ" wrote:

> I have a user who needs to check whether 2 jobs have run on a SQL Server
> 2000 instance, and be able to view logs.
> Is there a way of doing this, and not allowing them access to anything
> else?

Maintain Jobs, View Logs

I have a user who needs to check whether 2 jobs have run on a SQL Server
2000 instance, and be able to view logs.
Is there a way of doing this, and not allowing them access to anything
else?
--
JamesNZ
---
Posted via http://www.webservertalk.com
---
View this thread: http://www.webservertalk.com/message1430463.htmlHi
Does the use have EM on his/her workstation?
Does the user have permissions to run the job?
See this example written by Neil
/*** Scheduled task reporter for SQL 2000
**** Copyright Neil Boyle 2003.
**** Use entirely at your own risk
***/
use MSDB
go
select convert(varchar(22), j.name) as job_name
, case freq_type -- Daily, weekly, Monthly
when 1 then 'Once'
when 4 then 'Daily'
when 8 then 'Wk ' -- For weekly, add in the days of the week
+ case freq_interval & 2 when 2 then 'M' else '' end -- Monday
+ case freq_interval & 4 when 4 then 'Tu' else '' end -- Tuesday
+ case freq_interval & 8 when 8 then 'W' else '' end -- etc
+ case freq_interval & 16 when 16 then 'Th' else '' end
+ case freq_interval & 32 when 32 then 'F' else '' end
+ case freq_interval & 64 when 64 then 'Sa' else '' end
+ case freq_interval & 1 when 1 then 'Su' else '' end
when 16 then 'Mthly on day ' + convert(varchar(2), freq_interval) --
Monthly on a particular day
when 32 then 'Mthly ' -- The most complicated one, "every third Friday
of the month" for example
+ case freq_relative_interval
when 1 then 'Every First '
when 2 then 'Every Second '
when 4 then 'Every Third '
when 8 then 'Every Fourth '
when 16 then 'Every Last '
end
+ case freq_interval
when 1 then 'Sunday'
when 2 then 'Monday'
when 3 then 'Tuesday'
when 4 then 'Wednesday'
when 5 then 'Thursday'
when 6 then 'Friday'
when 7 then 'Saturday'
when 8 then 'Day'
when 9 then 'Week day'
when 10 then 'Weekend day'
end
when 64 then 'Startup' -- When SQL Server starts
when 128 then 'Idle' -- Whenever SQL Server gets bored
else 'Err' -- This should never happen
end as schedule
, case freq_subday_type -- FOr when a job funs every few seconds, minutes
or hours
when 1 then 'Runs once at:'
when 2 then 'every ' + convert(varchar(3), freq_subday_interval) + '
seconds'
when 4 then 'every ' + convert(varchar(3), freq_subday_interval) + '
minutes'
when 8 then 'every ' + convert(varchar(3), freq_subday_interval) + '
hours'
end as frequency
-- All the subsrings are because the times are stored as an integer with no
leading zeroes
-- i.e. 0 means midnight, 13000 means half past one in the morning
(01:30:00)
, substring (right (stuff (' ', 1, 1, '000000') +
convert(varchar(6),active_start_time), 6), 1, 2)
+ ':'
+ substring (
right (stuff (' ', 1, 1, '000000') + convert(varchar(6),
active_start_time), 6) ,3 ,2)
+ ':'
+ substring (
right (stuff (' ', 1, 1, '000000') + convert(varchar(6),active_start_time),
6) ,5 ,2) as start_at
,case freq_subday_type
when 1 then NULL -- Ignore the end time if not a recurring job
else substring (right (stuff (' ', 1, 1, '000000') + convert(varchar(6),
active_end_time), 6), 1, 2)
+ ':'
+ substring (
right (stuff (' ', 1, 1, '000000') + convert(varchar(6), active_end_time),
6) ,3 ,2)
+ ':'
+ substring (
right (stuff (' ', 1, 1, '000000') + convert(varchar(6), active_end_time),
6) ,5 ,2) end as end_at
from sysjobs j
join sysJobSchedules s
on j.job_id = s.job_id
order by j.name, start_at
"JamesNZ" <JamesNZ.24lo0y@.mail.webservertalk.com> wrote in message
news:JamesNZ.24lo0y@.mail.webservertalk.com...
> I have a user who needs to check whether 2 jobs have run on a SQL Server
> 2000 instance, and be able to view logs.
> Is there a way of doing this, and not allowing them access to anything
> else?
>
> --
> JamesNZ
> ---
> Posted via http://www.webservertalk.com
> ---
> View this thread: http://www.webservertalk.com/message1430463.html
>|||Here is one solution which should work for you:
1. Create a SP using the following script. Just mention your job names in
the following line of the script:
--sj.name in ('Job1', 'Job2') and
CREATE PROCEDURE dbo.read_jobhistory
as
select sjh.server, sj.name, case sjh.run_status
when 0 then 'Failed'
when 1 then 'Succeeded'
when 2 then 'Retry'
when 3 then 'Canceled'
when 4 then 'In progress'
end as 'Job Status',
sjh.sql_message_id, sjh.sql_severity,sjh.message,
convert(datetime, cast (sjh.run_date as char(8)) + ' ' +
left(right('000000' + cast (sjh.run_time as varchar(6)),6),2) + ':' +
substring(right('000000' + cast (sjh.run_time as varchar(6)),6),3,2) + ':' +
right('000000' + cast (sjh.run_time as varchar(6)),2))as 'Run Date',
sjh.run_duration, sjh.operator_id_emailed,
sjh.operator_id_netsent, sjh.operator_id_paged, sjh.retries_attempted
from
msdb..sysjobhistory sjh
join msdb..sysjobs sj
on sjh.job_id = sj.job_id
where
sj.name in ('Job1', 'Job2') and
step_id = 0
and sjh.run_date >= convert(char(10),getdate(),112)
order by sjh.server, sj.name, sjh.run_date, sjh.run_time
2. Grant Execution on this SP to the concerned user.
3. The concerned user can get the report for the today's date just by
executing the SP.
"JamesNZ" wrote:
> I have a user who needs to check whether 2 jobs have run on a SQL Server
> 2000 instance, and be able to view logs.
> Is there a way of doing this, and not allowing them access to anything
> else?

Maintain Jobs, View Logs

I have a user who needs to check whether 2 jobs have run on a SQL Server
2000 instance, and be able to view logs.
Is there a way of doing this, and not allowing them access to anything
else?
JamesNZ
Posted via http://www.webservertalk.com
View this thread: http://www.webservertalk.com/message1430463.html
Hi
Does the use have EM on his/her workstation?
Does the user have permissions to run the job?
See this example written by Neil
/*** Scheduled task reporter for SQL 2000
**** Copyright Neil Boyle 2003.
**** Use entirely at your own risk
***/
use MSDB
go
select convert(varchar(22), j.name) as job_name
, case freq_type -- Daily, weekly, Monthly
when 1 then 'Once'
when 4 then 'Daily'
when 8 then 'Wk ' -- For weekly, add in the days of the week
+ case freq_interval & 2 when 2 then 'M' else '' end -- Monday
+ case freq_interval & 4 when 4 then 'Tu' else '' end -- Tuesday
+ case freq_interval & 8 when 8 then 'W' else '' end -- etc
+ case freq_interval & 16 when 16 then 'Th' else '' end
+ case freq_interval & 32 when 32 then 'F' else '' end
+ case freq_interval & 64 when 64 then 'Sa' else '' end
+ case freq_interval & 1 when 1 then 'Su' else '' end
when 16 then 'Mthly on day ' + convert(varchar(2), freq_interval) --
Monthly on a particular day
when 32 then 'Mthly ' -- The most complicated one, "every third Friday
of the month" for example
+ case freq_relative_interval
when 1 then 'Every First '
when 2 then 'Every Second '
when 4 then 'Every Third '
when 8 then 'Every Fourth '
when 16 then 'Every Last '
end
+ case freq_interval
when 1 then 'Sunday'
when 2 then 'Monday'
when 3 then 'Tuesday'
when 4 then 'Wednesday'
when 5 then 'Thursday'
when 6 then 'Friday'
when 7 then 'Saturday'
when 8 then 'Day'
when 9 then 'Week day'
when 10 then 'Weekend day'
end
when 64 then 'Startup' -- When SQL Server starts
when 128 then 'Idle' -- Whenever SQL Server gets bored
else 'Err' -- This should never happen
end as schedule
, case freq_subday_type -- FOr when a job funs every few seconds, minutes
or hours
when 1 then 'Runs once at:'
when 2 then 'every ' + convert(varchar(3), freq_subday_interval) + '
seconds'
when 4 then 'every ' + convert(varchar(3), freq_subday_interval) + '
minutes'
when 8 then 'every ' + convert(varchar(3), freq_subday_interval) + '
hours'
end as frequency
-- All the subsrings are because the times are stored as an integer with no
leading zeroes
-- i.e. 0 means midnight, 13000 means half past one in the morning
(01:30:00)
, substring (right (stuff (' ', 1, 1, '000000') +
convert(varchar(6),active_start_time), 6), 1, 2)
+ ':'
+ substring (
right (stuff (' ', 1, 1, '000000') + convert(varchar(6),
active_start_time), 6) ,3 ,2)
+ ':'
+ substring (
right (stuff (' ', 1, 1, '000000') + convert(varchar(6),active_start_time),
6) ,5 ,2) as start_at
,case freq_subday_type
when 1 then NULL -- Ignore the end time if not a recurring job
else substring (right (stuff (' ', 1, 1, '000000') + convert(varchar(6),
active_end_time), 6), 1, 2)
+ ':'
+ substring (
right (stuff (' ', 1, 1, '000000') + convert(varchar(6), active_end_time),
6) ,3 ,2)
+ ':'
+ substring (
right (stuff (' ', 1, 1, '000000') + convert(varchar(6), active_end_time),
6) ,5 ,2) end as end_at
from sysjobs j
join sysJobSchedules s
on j.job_id = s.job_id
order by j.name, start_at
"JamesNZ" <JamesNZ.24lo0y@.mail.webservertalk.com> wrote in message
news:JamesNZ.24lo0y@.mail.webservertalk.com...
> I have a user who needs to check whether 2 jobs have run on a SQL Server
> 2000 instance, and be able to view logs.
> Is there a way of doing this, and not allowing them access to anything
> else?
>
> --
> JamesNZ
> Posted via http://www.webservertalk.com
> View this thread: http://www.webservertalk.com/message1430463.html
>
|||Here is one solution which should work for you:
1. Create a SP using the following script. Just mention your job names in
the following line of the script:
--sj.name in ('Job1', 'Job2') and
CREATE PROCEDURE dbo.read_jobhistory
as
select sjh.server, sj.name, case sjh.run_status
when 0 then 'Failed'
when 1 then 'Succeeded'
when 2 then 'Retry'
when 3 then 'Canceled'
when 4 then 'In progress'
end as 'Job Status',
sjh.sql_message_id, sjh.sql_severity,sjh.message,
convert(datetime, cast (sjh.run_date as char(8)) + ' ' +
left(right('000000' + cast (sjh.run_time as varchar(6)),6),2) + ':' +
substring(right('000000' + cast (sjh.run_time as varchar(6)),6),3,2) + ':' +
right('000000' + cast (sjh.run_time as varchar(6)),2))as 'Run Date',
sjh.run_duration, sjh.operator_id_emailed,
sjh.operator_id_netsent, sjh.operator_id_paged, sjh.retries_attempted
from
msdb..sysjobhistory sjh
join msdb..sysjobs sj
on sjh.job_id = sj.job_id
where
sj.name in ('Job1', 'Job2') and
step_id = 0
and sjh.run_date >= convert(char(10),getdate(),112)
order by sjh.server, sj.name, sjh.run_date, sjh.run_time
2. Grant Execution on this SP to the concerned user.
3. The concerned user can get the report for the today's date just by
executing the SP.
"JamesNZ" wrote:

> I have a user who needs to check whether 2 jobs have run on a SQL Server
> 2000 instance, and be able to view logs.
> Is there a way of doing this, and not allowing them access to anything
> else?

Monday, March 12, 2012

Maint. plan data optimization on system DBs

Hello,
Does it really make sense to run maint. plan data optimization jobs on
SQL Server 2K system DBs (master,msdb)? If yes, why? Isn't it risky
(e.g. when rebuilding an index fails in the middle of the process)?
Many thanks,
Pablo
No it doesn't - unless you're storing user data in them. You cannot rebuild
the indexes of the critical system tables (sysindexes, syscolumns,
sysobjects) anyway.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"msnews.microsoft.com" <pablo@.this_isnt_my_mail.cc> wrote in message
news:udEsTKpPEHA.308@.TK2MSFTNGP11.phx.gbl...
> Hello,
> Does it really make sense to run maint. plan data optimization jobs on
> SQL Server 2K system DBs (master,msdb)? If yes, why? Isn't it risky
> (e.g. when rebuilding an index fails in the middle of the process)?
> --
> Many thanks,
> Pablo

Maint. plan data optimization on system DBs

Hello,
Does it really make sense to run maint. plan data optimization jobs on
SQL Server 2K system DBs (master,msdb)? If yes, why? Isn't it risky
(e.g. when rebuilding an index fails in the middle of the process)?
--
Many thanks,
PabloNo it doesn't - unless you're storing user data in them. You cannot rebuild
the indexes of the critical system tables (sysindexes, syscolumns,
sysobjects) anyway.
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"msnews.microsoft.com" <pablo@.this_isnt_my_mail.cc> wrote in message
news:udEsTKpPEHA.308@.TK2MSFTNGP11.phx.gbl...
> Hello,
> Does it really make sense to run maint. plan data optimization jobs on
> SQL Server 2K system DBs (master,msdb)? If yes, why? Isn't it risky
> (e.g. when rebuilding an index fails in the middle of the process)?
> --
> Many thanks,
> Pablo

Maint. plan data optimization on system DBs

Hello,
Does it really make sense to run maint. plan data optimization jobs on
SQL Server 2K system DBs (master,msdb)? If yes, why? Isn't it risky
(e.g. when rebuilding an index fails in the middle of the process)?
Many thanks,
PabloNo it doesn't - unless you're storing user data in them. You cannot rebuild
the indexes of the critical system tables (sysindexes, syscolumns,
sysobjects) anyway.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"msnews.microsoft.com" <pablo@.this_isnt_my_mail.cc> wrote in message
news:udEsTKpPEHA.308@.TK2MSFTNGP11.phx.gbl...
> Hello,
> Does it really make sense to run maint. plan data optimization jobs on
> SQL Server 2K system DBs (master,msdb)? If yes, why? Isn't it risky
> (e.g. when rebuilding an index fails in the middle of the process)?
> --
> Many thanks,
> Pablo

Friday, March 9, 2012

mail without mapi

Hi All,
I've got a SQL cluster in its own domain that I need to get notifications
from when the maintenance jobs fail. If I can't use an outlook mapi client
to send mail how can I get notified that jobs fail? Someone said I could use
SMTP mail but I don't know how to do this. Please help.
TIA!!
jj
Use xpsmtp from www.sqldev.net. I have used this in clustered environments
for a long time and have had zero problems.
Geoff N. Hiten
Microsoft SQL Server MVP
"jj" <jeff_detoro@.urmc.rochester.edu> wrote in message
news:OcWeEBAeFHA.584@.TK2MSFTNGP15.phx.gbl...
> Hi All,
> I've got a SQL cluster in its own domain that I need to get notifications
> from when the maintenance jobs fail. If I can't use an outlook mapi client
> to send mail how can I get notified that jobs fail? Someone said I could
> use SMTP mail but I don't know how to do this. Please help.
> TIA!!
> jj
>

mail without mapi

Hi All,
I've got a SQL cluster in its own domain that I need to get notifications
from when the maintenance jobs fail. If I can't use an outlook mapi client
to send mail how can I get notified that jobs fail? Someone said I could use
SMTP mail but I don't know how to do this. Please help.
TIA!!
jjUse xpsmtp from www.sqldev.net. I have used this in clustered environments
for a long time and have had zero problems.
Geoff N. Hiten
Microsoft SQL Server MVP
"jj" <jeff_detoro@.urmc.rochester.edu> wrote in message
news:OcWeEBAeFHA.584@.TK2MSFTNGP15.phx.gbl...
> Hi All,
> I've got a SQL cluster in its own domain that I need to get notifications
> from when the maintenance jobs fail. If I can't use an outlook mapi client
> to send mail how can I get notified that jobs fail? Someone said I could
> use SMTP mail but I don't know how to do this. Please help.
> TIA!!
> jj
>

mail without mapi

Hi All,
I've got a SQL cluster in its own domain that I need to get notifications
from when the maintenance jobs fail. If I can't use an outlook mapi client
to send mail how can I get notified that jobs fail? Someone said I could use
SMTP mail but I don't know how to do this. Please help.
TIA!!
jjUse xpsmtp from www.sqldev.net. I have used this in clustered environments
for a long time and have had zero problems.
Geoff N. Hiten
Microsoft SQL Server MVP
"jj" <jeff_detoro@.urmc.rochester.edu> wrote in message
news:OcWeEBAeFHA.584@.TK2MSFTNGP15.phx.gbl...
> Hi All,
> I've got a SQL cluster in its own domain that I need to get notifications
> from when the maintenance jobs fail. If I can't use an outlook mapi client
> to send mail how can I get notified that jobs fail? Someone said I could
> use SMTP mail but I don't know how to do this. Please help.
> TIA!!
> jj
>

Wednesday, March 7, 2012

Mail Notifications Stop Working

We have some jobs that should e-mail the operator upon certain conditions. For reasons I cannot seem to find, the e-mail notifications have stopped coming (net sends do work). I can send mail from the SQL Agent service account from the desktop, but SQL won't even send me a test mail from within SQL (using Ent. Mgr). However, SQL thinks the mail was sent OK, as it says "mail successfully sent". However, the test mails never show up. Short of rebooting the server (a 24/7 production server), I don't know where to go. Have checked the accounts, stopped and started the agent, etc. If this is a clue, the agent also won't run some scheduled jobs. One daily job actually last ran two days ago, yet I don't see any errors or messages. Using Win2K, SQL2K (SP3a) on a 4-processor Dell box.Do you have any warnings or errors in your SQL Server Agent
Error log - right click on SQL Server Agent in Enterprise
Manager and select Display Error Log.
Also - are you by any chance running in fiber mode?
-Sue
On Tue, 20 Jul 2004 13:33:03 -0700, "DaveK"
<DaveK@.discussions.microsoft.com> wrote:
>We have some jobs that should e-mail the operator upon certain conditions. For reasons I cannot seem to find, the e-mail notifications have stopped coming (net sends do work). I can send mail from the SQL Agent service account from the desktop, but SQL won't even send me a test mail from within SQL (using Ent. Mgr). However, SQL thinks the mail was sent OK, as it says "mail successfully sent". However, the test mails never show up. Short of rebooting the server (a 24/7 production server), I don't know where to go. Have checked the accounts, stopped and started the agent, etc. If this is a clue, the agent also won't run some scheduled jobs. One daily job actually last ran two days ago, yet I don't see any errors or messages. Using Win2K, SQL2K (SP3a) on a 4-processor Dell box.

Mail Notifications Stop Working

We have some jobs that should e-mail the operator upon certain conditions. For reasons I cannot seem to find, the e-mail notifications have stopped coming (net sends do work). I can send mail from the SQL Agent service account from the desktop, but SQL
won't even send me a test mail from within SQL (using Ent. Mgr). However, SQL thinks the mail was sent OK, as it says "mail successfully sent". However, the test mails never show up. Short of rebooting the server (a 24/7 production server), I don't kno
w where to go. Have checked the accounts, stopped and started the agent, etc. If this is a clue, the agent also won't run some scheduled jobs. One daily job actually last ran two days ago, yet I don't see any errors or messages. Using Win2K, SQL2K (SP
3a) on a 4-processor Dell box.
Do you have any warnings or errors in your SQL Server Agent
Error log - right click on SQL Server Agent in Enterprise
Manager and select Display Error Log.
Also - are you by any chance running in fiber mode?
-Sue
On Tue, 20 Jul 2004 13:33:03 -0700, "DaveK"
<DaveK@.discussions.microsoft.com> wrote:

>We have some jobs that should e-mail the operator upon certain conditions. For reasons I cannot seem to find, the e-mail notifications have stopped coming (net sends do work). I can send mail from the SQL Agent service account from the desktop, but SQL
won't even send me a test mail from within SQL (using Ent. Mgr). However, SQL thinks the mail was sent OK, as it says "mail successfully sent". However, the test mails never show up. Short of rebooting the server (a 24/7 production server), I don't kn
ow where to go. Have checked the accounts, stopped and started the agent, etc. If this is a clue, the agent also won't run some scheduled jobs. One daily job actually last ran two days ago, yet I don't see any errors or messages. Using Win2K, SQL2K (S
P3a) on a 4-processor Dell box.
|||Not using fibers. The only messages in the agent error log are the normal informational ones that are found when restarting the agent, i.e., version, processors, memory, etc. It says the mail session was successfuly started.
"Sue Hoegemeier" wrote:
[vbcol=seagreen]
> Do you have any warnings or errors in your SQL Server Agent
> Error log - right click on SQL Server Agent in Enterprise
> Manager and select Display Error Log.
> Also - are you by any chance running in fiber mode?
> -Sue
> On Tue, 20 Jul 2004 13:33:03 -0700, "DaveK"
> <DaveK@.discussions.microsoft.com> wrote:
QL won't even send me a test mail from within SQL (using Ent. Mgr). However, SQL thinks the mail was sent OK, as it says "mail successfully sent". However, the test mails never show up. Short of rebooting the server (a 24/7 production server), I don't
know where to go. Have checked the accounts, stopped and started the agent, etc. If this is a clue, the agent also won't run some scheduled jobs. One daily job actually last ran two days ago, yet I don't see any errors or messages. Using Win2K, SQL2K
(SP3a) on a 4-processor Dell box.
>