May 9, 2013 at 4:00 am
I tried to ran a package containing simple script task having messagebox.show(string) in sql server agent as a job using proxy account.It gave me a error stating following message:
Message
Executed as user: SRM1\SYSTEM. Microsoft (R) SQL Server Execute Package Utility Version 10.0.2531.0 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 1:18:30 PM Error: 2013-05-23 13:18:31.04 Code: 0x00000001 Source: Script Task
Description: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application. at System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp) at System.Windows.Forms.MessageBox.Show(String text) at ST_7999b53452eb43ee8a98fe4494c8ccb0.csproj.ScriptMain.Main() --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture) at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript() End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 1:18:30 PM Finished: 1:18:31 PM Elapsed: 0.579 seconds. The package execution failed. The step failed.
what is wrong here not understanding can anybody tell me??
May 9, 2013 at 4:47 am
The error seems to suggest your script task may be trying to display a message box. When this package is running via the agent there is no user to display the message box to. Therefore if you want to display some sort of output or message you'll have to come up with another way of doing it. Maybe write an entry to a log file or something?
Thanks,
Simon
May 10, 2013 at 1:20 am
s_osborne2 (5/9/2013)
The error seems to suggest your script task may be trying to display a message box. When this package is running via the agent there is no user to display the message box to. Therefore if you want to display some sort of output or message you'll have to come up with another way of doing it. Maybe write an entry to a log file or something?Thanks,
Simon
This is a duplicate thread. Similar advice given here.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply