Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Selecting job history information from sysjobhistory in msdb

 
   Database Help (Home) -> Programming RSS
Next:  Get Least Number  
Author Message
gv

External


Since: Sep 13, 2006
Posts: 91



(Msg. 1) Posted: Tue Nov 28, 2006 12:02 pm
Post subject: Selecting job history information from sysjobhistory in msdb
Archived from groups: microsoft>public>sqlserver>programming (more info?)

Hi all,

using SQL 2000

When selecting "message" column from "sysjobhistory" table, doesn't contain
the entire error message compared to the job history option, from right
clicking on a certain job under SQL Server Agent - Jobs.

For Example:
under Job history when right clicking on a job in Enterprise Manager I see
this:

Executed as user: ACCESS1\SQL2KAdmin. ... 42000] (Error 5173) Database 'AC'
cannot be opened. It is in the middle of a restore. [SQLSTATE 42000] (Error
927) ALTER DATABASE statement failed. [SQLSTATE 42000] (Error 5069) Log
file 'E:\D\CO\AC\D\AC_LOG.LDF' does not match the primary file. It may be
from a different database or the log may have been rebuilt previously.
[SQLSTATE 01000] (Error 5108) 10 percent restored. [SQLSTATE 01000]
(Message 3211) 20 percent restored. [SQLSTATE 01000] (Message 3211) 30
percent restored. [SQLSTATE 01000] (Message 3211) 40 percent restored.
[SQLSTATE 01000] (Message 3211) 50 percent restored. [SQLSTATE 01000]
(Message 3211) 60 percent restored. [SQLSTATE 01000] (Message 3211) 70
percent restored. [SQLSTATE 01000] (Message 3211) 80 percent restored.
[SQLSTATE 01000] (Message 3211) 90 percent restored. [SQLSTATE 01000]
(Message 3211) 100 percent restored. [SQLSTATE 01000] (Message 3211)
Processed 10... The step failed.

And when I query it in query analyzer I get partial message:

Executed as user: ACCESS1\SQL2KAdmin. ... 42000] (Error 5173) Database 'AC'
cannot be opened. It is in the middle of a restore. [SQLSTATE 42000] (Error
927) ALTER DATABASE statement failed. [SQLSTATE 42000] (Error 5069) Log
file 'E:\D\CO

How can I query the entire message like what is shown under job history in
Enterprise Manager?

thanks
gv

 >> Stay informed about: Selecting job history information from sysjobhistory in msdb 
Back to top
Login to vote
Tibor Karaszi

External


Since: Jan 29, 2004
Posts: 1559



(Msg. 2) Posted: Tue Nov 28, 2006 9:07 pm
Post subject: Re: Selecting job history information from sysjobhistory in msdb [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

QA has an option to only show some 250 characters for a column. You can configure this under Tools,
Options.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/


"gv" wrote in message
> Hi all,
>
> using SQL 2000
>
> When selecting "message" column from "sysjobhistory" table, doesn't contain
> the entire error message compared to the job history option, from right
> clicking on a certain job under SQL Server Agent - Jobs.
>
> For Example:
> under Job history when right clicking on a job in Enterprise Manager I see this:
>
> Executed as user: ACCESS1\SQL2KAdmin. ... 42000] (Error 5173) Database 'AC' cannot be opened. It
> is in the middle of a restore. [SQLSTATE 42000] (Error 927) ALTER DATABASE statement failed.
> [SQLSTATE 42000] (Error 5069) Log file 'E:\D\CO\AC\D\AC_LOG.LDF' does not match the primary file.
> It may be from a different database or the log may have been rebuilt previously. [SQLSTATE 01000]
> (Error 5108) 10 percent restored. [SQLSTATE 01000] (Message 3211) 20 percent restored. [SQLSTATE
> 01000] (Message 3211) 30 percent restored. [SQLSTATE 01000] (Message 3211) 40 percent restored.
> [SQLSTATE 01000] (Message 3211) 50 percent restored. [SQLSTATE 01000] (Message 3211) 60 percent
> restored. [SQLSTATE 01000] (Message 3211) 70 percent restored. [SQLSTATE 01000] (Message 3211)
> 80 percent restored. [SQLSTATE 01000] (Message 3211) 90 percent restored. [SQLSTATE 01000]
> (Message 3211) 100 percent restored. [SQLSTATE 01000] (Message 3211) Processed 10... The step
> failed.
>
> And when I query it in query analyzer I get partial message:
>
> Executed as user: ACCESS1\SQL2KAdmin. ... 42000] (Error 5173) Database 'AC' cannot be opened. It
> is in the middle of a restore. [SQLSTATE 42000] (Error 927) ALTER DATABASE statement failed.
> [SQLSTATE 42000] (Error 5069) Log file 'E:\D\CO
>
> How can I query the entire message like what is shown under job history in Enterprise Manager?
>
> thanks
> gv
>

 >> Stay informed about: Selecting job history information from sysjobhistory in msdb 
Back to top
Login to vote
gv

External


Since: Sep 13, 2006
Posts: 91



(Msg. 3) Posted: Tue Nov 28, 2006 9:07 pm
Post subject: Re: Selecting job history information from sysjobhistory in msdb [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thank You!!!!!
gv




"Tibor Karaszi" wrote in
message
> QA has an option to only show some 250 characters for a column. You can
> configure this under Tools, Options.
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
>
> "gv" wrote in message
>
>> Hi all,
>>
>> using SQL 2000
>>
>> When selecting "message" column from "sysjobhistory" table, doesn't
>> contain
>> the entire error message compared to the job history option, from right
>> clicking on a certain job under SQL Server Agent - Jobs.
>>
>> For Example:
>> under Job history when right clicking on a job in Enterprise Manager I
>> see this:
>>
>> Executed as user: ACCESS1\SQL2KAdmin. ... 42000] (Error 5173) Database
>> 'AC' cannot be opened. It is in the middle of a restore. [SQLSTATE 42000]
>> (Error 927) ALTER DATABASE statement failed. [SQLSTATE 42000] (Error
>> 5069) Log file 'E:\D\CO\AC\D\AC_LOG.LDF' does not match the primary
>> file. It may be from a different database or the log may have been
>> rebuilt previously. [SQLSTATE 01000] (Error 5108) 10 percent restored.
>> [SQLSTATE 01000] (Message 3211) 20 percent restored. [SQLSTATE 01000]
>> (Message 3211) 30 percent restored. [SQLSTATE 01000] (Message 3211) 40
>> percent restored. [SQLSTATE 01000] (Message 3211) 50 percent restored.
>> [SQLSTATE 01000] (Message 3211) 60 percent restored. [SQLSTATE 01000]
>> (Message 3211) 70 percent restored. [SQLSTATE 01000] (Message 3211) 80
>> percent restored. [SQLSTATE 01000] (Message 3211) 90 percent restored.
>> [SQLSTATE 01000] (Message 3211) 100 percent restored. [SQLSTATE 01000]
>> (Message 3211) Processed 10... The step failed.
>>
>> And when I query it in query analyzer I get partial message:
>>
>> Executed as user: ACCESS1\SQL2KAdmin. ... 42000] (Error 5173) Database
>> 'AC' cannot be opened. It is in the middle of a restore. [SQLSTATE 42000]
>> (Error 927) ALTER DATABASE statement failed. [SQLSTATE 42000] (Error
>> 5069) Log file 'E:\D\CO
>>
>> How can I query the entire message like what is shown under job history
>> in Enterprise Manager?
>>
>> thanks
>> gv
>>
>
>
 >> Stay informed about: Selecting job history information from sysjobhistory in msdb 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Potential problem with msdb database - Recently our web site database started slowing down so that it became unusable. It was working perfectly and then a few days ago we got this problem. Looking at Performance Monitor, we could see that ave disk queue length shooting up: from being in....

msdb..sp_start_job Launching NOW and getting Instance_Id b.. - I have sql server job defined, it currently does not have a schedule defined. In t-sql, how can I launch the job the instantly and get back Instance_Id or something that I can use to check to see if the job is running or finished in a later step?

History of data for documents - Hello, I have following situation: CREATE TABLE [dbo].[Address] ( <font color=purple> ; [Id] uniqueidentifier ROWGUIDCOL NOT NULL ,</font> <font color=purple> ; [CityId] [uniqueidentifier] NOT NULL ,</font> &lt...

table modification history - Hi, what is the command to see who changed/modified a table/sp last? any historial modification trail command? Thansk

Relational "history," ala, data-audit trail - Long story short: small company, 1 technical called upon to perform several roles. I've created a web-site allowing users to edit/insert/delete records. There are 8 tables involved here. The DB is relational. I have the task now of creating a site that..
   Database Help (Home) -> Programming All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]