EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB483325: After upgrading to MicroStrategy 2019 or above, Enterprise Manager produced the error "invalid object name 'STG_IS_REP_SQL_STAT.'”


Yating (Tiffanie) Zhai

Senior Cloud Support Engineer III • MicroStrategy


This article explains a solution to the error "invalid object name 'STG_IS_REP_SQL_STAT'" in Enterprise Manager.

Description


After upgrading to Strategy 2019, the following error appeared in Enterprise Manager using SQL server database: 
DSSError.log
Invalid object name 'STG_IS_REP_SQL_STATS'.
EnterpriseManager_Upgrade.log
ERROR EnterpriseManagerUpgrade:143 - SQL executing error
com.Strategy.enterprisemanager.exceptions.StatementExecutionException: exec sp_rename "STG_IS_REP_SQL_STATS", "STG_IS_REP_SQL_STATS_OLD"
 

Why is this happening? 


The above errors appears after performing an in-place upgrade when the Microsoft SQL server database is used as the Enterprise Manager warehouse.
The

em_upgrade_sql.sql file
, located in .
\Enterprise Manager\Scripts
, will automatically be executed by the Strategy Installer Wizard. For more details, see KB483298.
However, when sp_rename is executed, the below message will be returned from the SQL server database:
 
Error type: Odbc success with info. Odbc operation attempted: SQLExecDirect. [01000:15477: on SQLHANDLE] [Strategy][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Caution: Changing any part of an object name could break scripts and stored procedures.
Although the message is only a caution and the execution is successful, the automatic execution of
em_upgrade_sql.sql
is interrupted. This is per design to prevent the consequent SQL execution, like the drop table, when any database error is returned. 
 

Solution

The Strategy Technology Team is considering a code change to ignore the above caution when executing the sp_rename script.
For users encountering this issue, use the steps below to resolve the error in Enterprise Manager. It's recommended to back up your Enterprise Manager warehouse before proceeding.

  1. Ensure the table STG_IS_REP_SQL_STATS_OLD exists in database. 
  2. Open
     em_upgrade_sql.sql 
    found in 
    .\Enterprise Manager\Scripts
  3. Locate the following SQL:
    exec rp_rename "STG_IS_REP_SQL_STATS", "STG_IS_REP_SQL_STATS_OLD";
  4. Manually execute all SQL found under the above SQL, starting from CREATE TABLE STG_IS_REP_SQL_STATS (xxxxxxx).
  5. To restore failed statistics, locate the StatisticsFailedSQLs0 log file in the Strategy log folder. Copy the SQL in the file and run it against the Enterprise Manager warehouse.
  6. Run the data load to ensure it works.

Comment

0 comments

Details

Knowledge Article

Published:

May 29, 2019

Last Updated:

May 29, 2019