A command failed in the SQL query when using SQL_RunSQL Knowledge Script (NETIQKB47164)

  • 7747164
  • 02-Feb-2007
  • 21-Jan-2011

Environment

NetIQ AppManager 6.x
NetIQ AppManager 7.0.x
SQL_RunSql Knowledge Script

Situation

Error: 'Operation is not allowed when the object is closed.'

Resolution

Change the SQL Query command to include the database name to execute the SELECT statement against.

For example, if your database is named "mydatabase", you would change the SELECT statement to be:

          SELECT FROM mydatabase.dbo.tablename where ...

Cause

The query being used requires the name of the database to be provided. The query has a use database statement before the SELECT statement.

Additional Information

Formerly known as NETIQKB47164