Video Screencast Help

Procedure or function spGetUserTargets has too many arguments specified.

Created: 11 Nov 2013 • Updated: 11 Nov 2013 | 2 comments
This issue has been solved. See solution.

Receive this error when trying to open a target.  Needing assistance on resolving it:

This is the error from the logs:

<event date="Nov 11 18:12:23 +00:00" severity="1" hostName="SMPSPPW01" source="global.asax" module="w3wp.exe" process="w3wp" pid="4000" thread="290" tickCount="180157926"><![CDATA[Unhandled exception.  Type=System.Data.SqlClient.SqlException Msg=Procedure or function spGetUserTargets has too many arguments specified.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
   at Altiris.NS.DataAccessLayer.Implementation.Altiris_NS_StandardItems_Targeting_DataAccessLayerTargetingDataAccessLayer.spGetUserTargets(String trusteeMembership, Boolean editable, Nullable`1 autoGenerated, Guid currentUser)
   at Altiris.NS.StandardItems.Targeting.TargetHelper.GetUserTargetsImplementation(String trusteeMembership, FilterMode mode, Nullable`1 userGenerated)
   at Altiris.NS.StandardItems.Targeting.TargetHelper.GetUserGeneratedUserViewableTargets(String trusteeMembership)
   at Altiris.NS.UI.DataProviders.ResourceGroupOpenSaveProvider.GetExistingObjects()
   at Altiris.WebControls.OpenSaveControl.PopulateList(HtmlGenericControl listDiv)
   at Altiris.WebControls.OpenSaveControl.RenderBeginTag(HtmlTextWriter writer)
   at System.Web.UI.WebControls.CompositeControl.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
   at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)
   at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Page.Render(HtmlTextWriter writer)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
**CEDUrlStart** :**CEDUrlEnd**

This happens when I go to open an existing target to load for a policy.

This is the error in the console:

Symantec Management Server Error

An error has occurred that prevents the Symantec Management Console displaying correctly.

If this page is shown in place of a page or web part in the Symantec Management Console, navigate back to the page using the menu or tree and continue working. If the problem persists, see your local network administrator.

If this page is shown in place of the Symantec Management Console, one of the following could be the cause:

  • The "Altiris Service" service is not running. Start this service on the server and reload the console.
  • The account used for either the "Altiris Service" or the Notification Server webs is incorrect, disabled or the password for the account has expired. On the Notification Server computer, run "C:\Program Files\Altiris\Notification Server\bin\AeXConfig.exe /svcid user:(user name) password:(password)]", substituting the correct installation path if a non-default location was used, to provide a new account.
  • The name of the Notification Server computer has been renamed. The following steps will need to be taken to correct this:
    • If SQL Server is installed on the same machine as the Notification Server:
    • Open the file [NS INSTALL DIRECTORY]\Notification Server\Config\CoreSettings.config, search for the word 'key=DBServer'. Replace the 'value' attribute of the found XML element from the previous server name to the new server name.
    • If account used for either the "Altiris Service" or the Notification Server webs is a local user (i.e. Not a domain user), you will need to update the account to the new name. You can do so by following the 2nd bullet points on this page.
    • Open Registry Editor, browse to the registry key "HKLM\SOFTWARE\Altiris\express\Notification Server\". Find and replace any value that contains the old server name with the new name.
    • Re-push the agent out to all previously managed machines. (#)
    • Run the Windows schedule named "NS.Package Refresh" to re-validate site/package server packages. To get to the Windows schedules, go to 'Start' > 'Control Panel' > 'Scheduled Tasks'.
    • If you have hierarchy set up, you will need to remove and re-add the renamed server to the hierarchy. To do so, go to the "Hierarchy Management" page under the menu "Settings" > "Notification Server" > "Hierarchy".

In both cases, the Symantec Management Server log and the Windows Event log may contain useful information. The Symantec Management Server log can be accessed on the server by running "Start" menu > "All Programs" > "Altiris" > "Diagnostics" > "Altiris Log Viewer".

(#) If the NS hosted computer has yet been renamed, a better alternative would be to point all NS clients to the new server name first. You can do this by going to the menu "Settings" > "Agents/Plug-ins" > "Targeted Agent Settings". For each policy in the list, select the "Advanced" tab and specifies the new server name under the "Alternative URL for accessing NS" section. By doing this, all the clients will work automatically once the NS server has been renamed.

Operating Systems:

Comments 2 CommentsJump to latest comment

mmathews's picture

Replaced the stored procedure with the correct version and everything is working well now. 

bperkins's picture

I just stumbled across this issue as well. Just curious where you found the "correct version" of the stored procedure?