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

KB16795: 'The warehouse catalog SQL contains a template string '#?DATABASE_NAME?#' that must be completed before catalog updates can be run' error occurs when reading the Warehouse Catalog in MicroStrategy 9.x against a Teradata warehouse


Community Admin

• Strategy


SYMPTOM:
When loading or reading the Warehouse Catalog, whether from an existing project or when creating a new project, the following error occurs:
 

ka04W000000OhDbQAK_0EM440000002F8s.jpeg

 
An error was detected while trying to read the warehouse catalog:
The warehouse catalog SQL contains a template string '#?DATABASE_NAME?#' that must be completed before catalog updates can be run.
Do you want to modify the Warehouse Catalog Browser options to try solve this problem?
Please re-run the Warehouse Catalog Browser after you make your changes.
Attempting a manual read of the Warehouse Catalog results in the following error:
 

ka04W000000OhDbQAK_0EM440000002F8o.jpeg

 
Unexpected Error.
The warehouse catalog SQL contains a template string '#?DATABASE_NAME?#' that must be completed before catalog updates can be run.
Attempting to add a table to the schema results in the following error:
 

ka04W000000OhDbQAK_0EM440000002F91.jpeg

 
Error adding Table(s) to the schema.
The warehouse catalog SQL contains a template string '#?DATABASE_NAME?#' that must be completed before catalog updates can be run.
CAUSE:
This is a known issue with the Strategy Warehouse Catalog 8.x. The issue is caused by the placeholder '#?DATABASE_NAME?#' found in one or both of the SQL statements for the 'Catalog - Read Settings'.
 
The first two errors listed in the Technical Document are caused by the appearance of '#?DATABASE_NAME?#' in the first of the 'Catalog -Read Settings' SQL statements which is used to retrieve the list of available tables from the Warehouse Catalog:
 
SELECT DISTINCT DatabaseName NAME_SPACE, TableName TAB_NAME
FROM DBC.TABLES
WHERE DatabaseName = '#?DATABASE_NAME?#'
The third error is caused by the appearance of '#?DATABASE_NAME?#' in the second of the 'Catalog -Read Settings' SQL statements used to retrieve the columns for the selected table(s):
 
SELECT DatabaseName NAME_SPACE, TableName TAB_NAME, ColumnName COL_NAME, ColumnType DATA_TYPE, ColumnLength DATA_LEN, DecimalTotalDigits DATA_PREC, DecimalFractionalDigits DATA_SCALE
FROM DBC.COLUMNS
WHERE TableName in (#TABLE_LIST#) AND DatabaseName = '#?DATABASE_NAME?#'
ORDER BY 1, 2
ACTION:
Contact Strategy Technical Support for the latest update on this issue.
 
WORKAROUND:
To workaround the issue manually replace the placeholder, '#?DATABASE_NAME?#', with the actual database name containing the warehouse data.
 

  • In Strategy Desktop 8.x select the project in either a 2-tier or 3-tier, if the Strategy Intelligence Server 9.x is running, project source.
  • From the 'Schema' menu select 'Warehouse Catalog'.
ka04W000000OhDbQAK_0EM440000002F93.jpeg
  • If one of the messages appears select 'Yes' and go to step 5.
  • Click the 'Options' button on the tool bar.
ka04W000000OhDbQAK_0EM440000002F95.jpeg
  • Under 'Catalog - Read Settings' click the 'Settings' button.
ka04W000000OhDbQAK_0EM440000002F8m.jpeg
  • Replace the place holder '#?DATABASE_NAME?#' with the actual database name in both of the SQL statements (in this example the Teradata database name is 'WAREHOUSE_DATABASE'):
     
    Before change:
     
ka04W000000OhDbQAK_0EM440000002F8q.jpeg
  •  
    SELECT DISTINCT DatabaseName NAME_SPACE, TableName TAB_NAME
    FROM DBC.TABLES
    WHERE DatabaseName = '#?DATABASE_NAME?#'
    SELECT DatabaseName NAME_SPACE, TableName TAB_NAME, ColumnName COL_NAME, ColumnType DATA_TYPE, ColumnLength DATA_LEN, DecimalTotalDigits DATA_PREC, DecimalFractionalDigits DATA_SCALE
    FROM DBC.COLUMNS
    WHERE TableName in (#TABLE_LIST#) AND DatabaseName = '#?DATABASE_NAME?#'
    ORDER BY 1, 2
    After change:
     
ka04W000000OhDbQAK_0EM440000002F9G.jpeg
  •  
    SELECT DISTINCT DatabaseName NAME_SPACE, TableName TAB_NAME
    FROM DBC.TABLES
    WHERE DatabaseName = 'WAREHOUSE_DATABASE'
    SELECT DatabaseName NAME_SPACE, TableName TAB_NAME, ColumnName COL_NAME, ColumnType DATA_TYPE, ColumnLength DATA_LEN, DecimalTotalDigits DATA_PREC, DecimalFractionalDigits DATA_SCALE
    FROM DBC.COLUMNS
    WHERE TableName in (#TABLE_LIST#) AND DatabaseName = 'WAREHOUSE_DATABASE'
    ORDER BY 1, 2
  • Click OK to return to the 'Catalog - Read Settings' windows.
  • Click OK to save the setting changes.

Comment

0 comments

Details

Knowledge Article

Published:

May 30, 2017

Last Updated:

May 30, 2017