To resolve this issue, install the hotfix package that is described in the following Microsoft Knowledge Base article:
2649961 Rollup 1 for Forefront Threat Management Gateway (TMG) 2010 Service Pack 2
To enable this fix, run the
FixActivityReports.js script on one of the Forefront Threat Management Gateway servers. You can run this script on any Forefront Threat Management Gateway server, on an array node, or on an Enterprise Management Server.
Note The script enumerates all available arrays and corrects the stored procedure so that the
Ole Automation Procedures option is not turned off for the activity reports. You may have to rerun the script if new arrays are added to the storage.
- Start Notepad. To do this, click Start, click Run, type notepad.exe in the Open box and then click OK.
- Paste the following script into a new file in Notepad:
var guidGenerator = new ActiveXObject("Scriptlet.TypeLib");
var fpcRoot = new ActiveXObject("FPC.Root");
try
{
WScript.Echo("Enumerating arrays:");
var arraysCollection = new Enumerator(fpcRoot.Arrays);
for (; !arraysCollection.atEnd(); arraysCollection.moveNext())
{
try
{
var array = arraysCollection.item();
var found = false;
WScript.Echo(" " + array.Name);
var rdlDefsCollection = new Enumerator(array.Reports.RdlReportDefinitions);
for(; !rdlDefsCollection.atEnd(); rdlDefsCollection.moveNext())
{
var rdlDef = rdlDefsCollection.item();
if((rdlDef.Name != "Ips_Metadata") && (rdlDef.Name != "UserActivity_Sites") && (rdlDef.Name != "Urlf_Metadata"))
{
continue;
}
if (rdlDef.DataGenerationStatement.search(/--EXEC sp_configure \'Ole Automation Procedures\', 0/) != -1)
{
WScript.Echo("---- DataGenerationStatement for " + rdlDef.Name +" already updated");
continue;
}
found = true;
WScript.Echo("Found RDL definition " + rdlDef.Name);
WScript.Echo("---- Old version start");
WScript.Echo(rdlDef.DataGenerationStatement);
WScript.Echo("---- Old version end");
rdlDef.DataGenerationStatement = rdlDef.DataGenerationStatement.replace(/EXEC sp_configure \'Ole Automation Procedures\', 0/g, "--EXEC sp_configure \'Ole Automation Procedures\', 0");
WScript.Echo("---- New version start");
WScript.Echo(rdlDef.DataGenerationStatement);
WScript.Echo("---- New version end");
}
if (found)
{
WScript.Echo("Updating configuration ID...");
WScript.Echo("Old configuration ID:" + array.Reports.ReportingServicesProperties.ReportingServicesConfigurationId);
array.Reports.ReportingServicesProperties.ReportingServicesConfigurationId = guidGenerator.Guid;
WScript.Echo("New configuration ID:" + array.Reports.ReportingServicesProperties.ReportingServicesConfigurationId);
WScript.Echo("Saving the current configuration...");
array.Save();
WScript.Echo("Waiting for configuration reload...");
array.WaitForReload();
}
}
catch (err)
{
WScript.Echo("An error occurred. Error Description: " + err.description);
WScript.Echo("Try running the script as an administrator");
}
}
}
catch (err)
{
WScript.Echo("An error occurred. Error Description: " + err.description);
WScript.Echo("Try running the script as an administrator");
}
- Save the file as FixActivityReports.js.
- On a server, open an administrative command prompt.
- Run the script in step 2 by using the following command:
cscript.exe FixActivityReports.js
Wait for the script to complete and the configuration to synchronize. You should now be able to generate User Activity and Site Activity reports.