This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Certain "On Demand" job templates can't be edited or removed

Hello,

 

I have a vRanger server with about 30 "On Demand" job templates lying around, mostly old restore jobs. I wanted to clean these up by removing or disabling them, but they won't budge. Most of the "On Demand" templates are affected, but not all.

 

If I want to disable them, I receive an SQLException:

SqlException
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_TemplateVersion_Template". The conflict occurred in database "vRangerPro", table "dbo.Template", column 'TemplateId'.
The statement has been terminated.

Server stack trace:
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Vizioncore.DataAccess.Database.ExecuteNonQuery(DbCommand command, DbTransaction transaction)
at Vizioncore.vRanger.Database.DataAccess.TemplateVersionSqlDAOBase.Insert(TemplateVersionDTO dto)
at Vizioncore.DataAccess.DAOBase`1.Save(T dto)
at Vizioncore.vRanger.Database.DataManager.DataManagers.RestoreTemplateDataManager.SaveTemplateDTO(RestoreJobTemplateBaseDTO bizDTO)
at Vizioncore.vRanger.Domain.Jobs.RestoreJobTemplateBE.Save()
at Vizioncore.vRanger.Service.Services.JobService.SaveJobTemplateEntity[dtoType,beType](beType entity)
at Vizioncore.vRanger.Service.Services.JobService.SaveJobTemplate[dtoType,beType](dtoType jobTemplate, Func`2 creator, Action`2 updater)
at Vizioncore.vRanger.Service.Services.JobService.SaveJobTemplate(JobTemplateDTO[] jobTemplateDTOs)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Vizioncore.vRanger.Facade.Interfaces.Providers.IJobProvider.SaveJobTemplate(JobTemplateDTO[] jobTemplateDTOs)
at Vizioncore.vRanger.Client.Common.JobsToolbarFunctions.DisableJobs(IJobProvider jobService, IVmwareProvider vmwareService, List`1 itemsToDisable)
at Microsoft.Practices.CompositeUI.Commands.Command.OnExecuteAction(Object sender, EventArgs e)
at Microsoft.Practices.CompositeUI.Commands.CommandAdapter.FireCommand()
at Infragistics.Practices.CompositeUI.WinForms.Commands.ToolBaseCommandAdapter.OnEventInvoked(Object sender, EventArgs e)
at Infragistics.Win.UltraWinToolbars.ToolClickEventHandler.Invoke(Object sender, ToolClickEventArgs e)
at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.OnToolClick(ToolClickEventArgs e)
at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.FireEvent(ToolbarEventIds id, EventArgs e)
at Infragistics.Win.UltraWinToolbars.ButtonToolUIElement.DoClickProcessing(MouseEventArgs e)
at Infragistics.Win.UltraWinToolbars.ButtonToolUIElement.OnMouseUp(MouseEventArgs e)
at Infragistics.Win.ControlUIElementBase.ProcessMouseUpHelper(Object sender, MouseEventArgs e)
at Infragistics.Win.ControlUIElementBase.ProcessMouseUp(Object sender, MouseEventArgs e)
at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e)
at Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

Removal does not work.

If I want to remove the job templates, the GUI pauses for a few seconds with the standard "working on it" window in the middle. After that, the job is still visible. If I attempt to remove it one more time, I receive the following error message (new popup window): "The job could not be removed"

 

Attempting to run them results in "NullReferenceException"

If I try to run any of them, I receive "Object reference not set to an instance of an object" when attempting to interact with the job/task:

NullReferenceException
Object reference not set to an instance of an object.
at Vizioncore.vRanger.Client.MyJobsModule.Presenters.MyJobsPresenterBase.GetJobType(Object gridRowListObject)
at Vizioncore.vRanger.Client.MyJobsModule.Presenters.MyJobsPresenterBase.GetScheduledActivityType(Object listObject)
at Vizioncore.vRanger.Client.MyJobsModule.Presenters.MyJobsPresenterBase.GetToolStripMenuItems(Object listObject, Boolean multipleRowsSelected)
at Vizioncore.vRanger.Client.MyJobsModule.Presenters.MyJobsPresenterBase.GridDisplayActivityMouseUp(Object sender, MouseEventArgs e)
at System.Windows.Forms.Control.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

Also, interestingly, if I attempt to run one of the jobs that I can't interact with, EVERY job template which I can't interact with shows as running. After I attempted to run one of these jobs, I can't attempt to remove them again since I can't cancel the job either... 

 

Relevant info: 

vRanger version: 7.6

I recently ran the cleanup-script from the following link due to full vRangerPro DB (10GB, licensing req.)

www.quest.com/.../purge-db-t-sql-script

 

 

A bit messy :) Any help would be appreciated. I guess I might have to open a support case on this one.

  • Well I guess I kind of made a fool of myself here. I forgot to restart the vRanger service after running the purge script. After I did that and opened the GUI, the jobs were back to normal.

    Don't follow my example... :)