Toad World® Forums

issue seeing agent job history in prod version 6.5 and beta 6.6.0.236 has this been fixed in newer beta 6.6.0.291? in the works?


#1

in the agents under jobs when trying to view the job history of last runs and status I get an error in both beta and prd versions.

System.InvalidCastException Specified cast is not valid. Stack Trace:

Server stack trace: at Quest.Toad.SqlServer.Trl.Jobs.JobHistoryTrl.QueryDone_EventHandler(Object sender, EventArgs e) at Quest.Toad.Trl.BaseSqlTrl.CompletelyDone(Boolean hasLock)

Exception rethrown at [0]: at Quest.Toad.Util.Global.RethrowKeepingStackTrace(Exception e) at Quest.Toad.Trl.BaseSqlTrl.OnFetchException(Exception exc, Boolean notificationManager) at Quest.Toad.Trl.BaseSqlTrl.CompletelyDone(Boolean hasLock) at Quest.Toad.Trl.BaseSqlTrl.Done(Object sender, EventArgs args) at Quest.Toad.Trl.BaseSqlTrl.AsyncDone(Object sender)

is anyone looking into this?

thanks Brett

Toad for SQL Server user since 2005


#2

still an error in beta 6.6.0.291


#3

Hi,brett

Could you give me the job creation sql?


#4

/****** Object: Job [NetApps_Prd Daily Backup USPHC.Subplan_1] Script Date: 10/28/2014 7:35:14 AM ******/

USE [master];

GO

DECLARE @JobID BINARY(16)

EXECUTE msdb.dbo.sp_add_job @job_id = @JobID OUTPUT, @job_name = N’NetApps_Prd Daily Backup USPHC.Subplan_1’,

@enabled = 1,

@owner_login_name = N’USPC\SASQLAdmin’,

@description = N’No description available.’,

@category_name = N’Database Maintenance’,

@notify_level_eventlog = 2,

@notify_level_email = 2,

@notify_email_operator_name = N’John Doe’,

@notify_level_netsend = 0,

@notify_level_page = 2,

@notify_page_operator_name = N’Helpdesk’,

@delete_level = 0;

EXECUTE msdb.dbo.sp_add_jobstep @job_id = @JobID, @step_id = 1, @step_name = N’Subplan_1’,

@command = N’/Server “$(ESCAPE_NONE(SRVR))” /SQL “Maintenance Plans\NetApps Daily Backup USPC” /set “\Package\Subplan_1.Disable;false”’,

@subsystem = N’SSIS’,

@retry_attempts = 0,

@retry_interval = 0,

@on_success_step_id = 0,

@on_success_action = 1,

@on_fail_step_id = 0,

@on_fail_action = 2;

EXECUTE msdb.dbo.sp_update_job @job_id = @JobID, @start_step_id = 1;

EXECUTE msdb.dbo.sp_add_jobserver @job_id = @JobID, @server_name = N’(LOCAL)’;

EXECUTE msdb.dbo.sp_add_jobschedule @job_id = @JobID,

@name = N’NetApps_Prd auto schedule backup’,

@enabled = 1,

@freq_type = 4,

@active_start_date = 20120827,

@active_end_date = 99991231,

@freq_interval = 1,

@freq_subday_type = 1,

@freq_subday_interval = 1,

@freq_relative_interval = 1,

@freq_recurrence_factor = 1,

@active_start_time = 20000,

@active_end_time = 235959;

GO


#5

this happens for all my jobs not just a particular one. something with toad works in version 5.8 also but not any versions newer. works also fine in ms sql server management console. so not a dbase issue but looks like a permissions issue. thanks for your time.


#6

I can not reproduce it. i will ask somebody to try it more.

And tell you the result later.