Database setup errors ....

Database
Fan

Database setup errors ....

Hello Gurus,

To start with I am a newbie to Teradata who has been facing some suspicious errors while starting a Database Setup process in order to start using the Teradata Manager. It is to be noted that I am using Teradata Express 13.0

the following was my attributes for the DB setup:

-------------
Database Name : localtd
Super User: DBC
Super User Password: DBC
Console Password:
Set up DB for Teradata Manager: Yes
Perm Space: 100 MB
DB Type: Windows/Linux
Spool Space: Same as Parent

Create a Teradata Manager User: Yes
User Name: DBCMANAGER
User Account String: $H-DBC-MANAGER
User Password: DBCMANAGER
Perm Space: 100MB
Spool Space: Same as Parent
Give user privilages to run: Selected all options in combo
Migrate TDQM Database: No

-------------

After the initiation and completion of the setup process I have noticed the following errors being contained in the log file and I was wondering why are these errors showing up and what effect would these errors have on my overall setup and how can I overcome the messy consequences if any to be faced due to these errors. I'd be grateful if anyone would be able help.

---------------------------------------------------------------------------
The errors:
---------------------------------------------------------------------------

In the Setting up DBCMANAGER part:

>> help database dbcmngr;
*** Query failed
*** Database 'dbcmngr' does not exist. Code= 3802 Info=0 Function= 5

>> Drop profile pDBSSETUPDBA;
*** Query failed
*** Profile 'pDBSSETUPDBA' does not exist. Code= 5653 Info=0 Function= 5

>>Reading file c:\program files\teradata\teradata manager 13.0\sql\UmTransChkColSP.sql.
Compile file UmTransChkColSP.sql
-- Copyright 2007-2008 by Teradata Corporation.
-- All Rights Reserved.
-- Teradata Confidential and Trade Secret.
REPLACE PROCEDURE dbssetupdba.UM_TRANSLATE_CHK
(
IN database_name VARCHAR(128),
IN table_name VARCHAR(128),
IN column_name VARCHAR(128),
IN umTableCols VARCHAR(256),
IN strKanjiSJIS VARCHAR(128),
IN strKanjiEUC VARCHAR(128),
IN strKanjiEBCDIC VARCHAR(128)
)
BEGIN
-- Given a database.table.column, this procedure updates the TRANSCHECK
-- column of the corresponding row in the umTableCols table
-- with the number of rows in the specified column that would have
-- errors if we were to run the TRANSLATE function to translate the
-- existing data to Unicode.
-- Note: as currently written, this procedure treats a starting charset
-- of Unicode the same as "unknown".

DECLARE strCharType VARCHAR(30) CHARACTER SET UNICODE NOT CASESPECIFIC;

SET strCharType = '';

SELECT
CASE CharType
WHEN 1 THEN 'LATIN'
WHEN 2 THEN 'UNICODE'
WHEN 3 THEN 'KANJISJIS'
WHEN 4 THEN 'GRAPHIC'
WHEN 5 THEN 'KANJI1'
ELSE '-unknown-'
END INTO strCharType
FROM DBC.ColumnsV
WHERE ColumnName = column_name
AND TableName = table_name
AND DatabaseName = database_name ;

IF ('-unknown-' = strCharType)
THEN
CALL DBC.SysExecSQL (
'UPDATE '||umTableCols||'
SET TRANSCHECK = -1
WHERE Database_name = '''||database_name||'''
AND Table_name = '''||table_name||'''
AND Column_name = '''||column_name||''';');

ELSEIF ('UNICODE' = strCharType)
THEN
CALL DBC.SysExecSQL (
'UPDATE '||umTableCols||'
SET TRANSCHECK = -2
WHERE Database_name = '''||database_name||'''
AND Table_name = '''||table_name||'''
AND Column_name = '''||column_name||''';');

ELSEIF ('KANJI1' = strCharType)
THEN
CALL DBC.SysExecSQL (
'UPDATE TMP1
FROM '||umTableCols||' TMP1
, (SELECT COUNT ('||column_name||') AS ErrorCount
FROM '||database_name||'.'||table_name||'
WHERE '||column_name||' IS NOT NULL AND '||column_name||' <> ''''
AND
(CASE STRING_CS('||column_name||')
WHEN 3 THEN TRANSLATE_CHK ('||column_name||' USING '||strKanjiSJIS||')
WHEN 2 THEN TRANSLATE_CHK ('||column_name||' USING '||strKanjiEUC||')
WHEN 1 THEN TRANSLATE_CHK ('||column_name||' USING '||strKanjiEBCDIC||')
WHEN 0 THEN TRANSLATE_CHK ('||column_name||' USING KANJI1_SBC_TO_UNICODE)
END <> 0
OR STRING_CS('||column_name||') < 0)) TMP2
SET TRANSCHECK = TMP2.ErrorCount
WHERE TMP1.Database_name = '''||database_name||'''
AND TMP1.Table_name = '''||table_name||'''
AND TMP1.Column_name = '''||column_name||''' ; ');

ELSE
CALL DBC.SysExecSQL (
'UPDATE TMP1
FROM '||umTableCols||' TMP1
, (SELECT COUNT ('||column_name||') AS ErrorCount
FROM '||database_name||'.'||table_name||'
WHERE TRANSLATE_CHK ('||column_name||' USING '||strCharType||'_TO_UNICODE) <> 0) TMP2
SET TRANSCHECK = TMP2.ErrorCount
WHERE TMP1.Database_name = '''||database_name||'''
AND TMP1.Table_name = '''||table_name||'''
AND TMP1.Column_name = '''||column_name||''' ; ');

END IF;
END;

*** Query failed
*** C/C++ compiler is not installed. Code= 5862 Info=0 Function= 5

>>Reading file c:\program files\teradata\teradata manager 13.0\sql\UmTranslateColSP.sql.
Compile file UmTranslateColSP.sql
-- Copyright 2007-2008 by Teradata Corporation.
-- All Rights Reserved.
-- Teradata Confidential and Trade Secret.
REPLACE PROCEDURE dbssetupdba.UM_TRANSLATE
(
IN database_name VARCHAR(128),
IN table_name VARCHAR(128),
IN column_name VARCHAR(128),
IN data_type VARCHAR(1024),
IN pindex INTEGER,
IN pindex_desc VARCHAR(2048),
IN strKanjiSJIS VARCHAR(128),
IN strKanjiEUC VARCHAR(128),
IN strKanjiEBCDIC VARCHAR(128)
)
BEGIN

DECLARE strCharType VARCHAR(30) CHARACTER SET UNICODE NOT CASESPECIFIC;
DECLARE strUnknown VARCHAR(30) CHARACTER SET UNICODE NOT CASESPECIFIC;
DECLARE nExistsTempTbl INTEGER DEFAULT 0;

SET strUnknown = '-unknown-';
SET strCharType = '';

SELECT
CASE CharType
WHEN 1 THEN 'LATIN'
WHEN 2 THEN 'UNICODE'
WHEN 3 THEN 'KANJISJIS'
WHEN 4 THEN 'GRAPHIC'
WHEN 5 THEN 'KANJI1'
ELSE strUnknown
END INTO strCharType
FROM DBC.ColumnsV
WHERE ColumnName = column_name
AND TableName = table_name
AND DatabaseName = database_name ;

IF ('UNICODE' <> strCharType)
THEN
-- Add a temporary Unicode column to the table
CALL DBC.SysExecSQL(
'ALTER TABLE '||database_name||'.'|| table_name||'
ADD UniTempCol '||data_type||' CHARACTER SET UNICODE NOT CASESPECIFIC;');

-- Update the temporary column with the original text translated to Unicode
IF (strUnknown = strCharType)
THEN
CALL DBC.SysExecSQL(
'UPDATE '||database_name||'.'||table_name||'
SET UniTempCol = '||column_name||';');

ELSEIF ('KANJI1' = strCharType)
THEN
CALL DBC.SysExecSQL(
'UPDATE '||database_name||'.'||table_name||'
SET UniTempCol =
CASE STRING_CS('||column_name||')
WHEN 3 THEN TRANSLATE('||column_name||' USING '||strKanjiSJIS||')
WHEN 2 THEN TRANSLATE('||column_name||' USING '||strKanjiEUC||')
WHEN 1 THEN TRANSLATE('||column_name||' USING '||strKanjiEBCDIC||')
WHEN 0 THEN TRANSLATE('||column_name||' USING KANJI1_SBC_TO_UNICODE)
ELSE TRANSLATE('||column_name||' USING Kanji1_SBC_TO_UNICODE)
END
WHERE STRING_CS('||column_name||') >= 0;');

ELSE
CALL DBC.SysExecSQL(
'UPDATE '||database_name||'.'||table_name||'
SET UniTempCol = TRANSLATE('||column_name||' USING '||strCharType||'_TO_UNICODE);');

END IF;

IF (pindex = 1)
THEN
-- Special handling when the column being translated is a primary index column
CALL DBC.SysExecSQL(
'ALTER TABLE '||database_name||'.'||table_name||' ADD UniTempPICol INTEGER;');

CALL DBC.SysExecSQL(
'UPDATE '||database_name||'.'||table_name||' SET UniTempPICol = RANDOM(1,10240) ALL; ');

SELECT 1 INTO nExistsTempTbl FROM dbc.TablesV
WHERE TableKind = 'T' AND TableName = 'UniMigrationTemp_TABLE'
AND DatabaseName = database_name GROUP BY 1;

IF (0 < nExistsTempTbl)
THEN
CALL DBC.SysExecSQL(
'DROP TABLE '||database_name||'.UniMigrationTemp_TABLE;');
END IF;

CALL DBC.SysExecSQL(
'CREATE TABLE '||database_name||'.UniMigrationTemp_TABLE
AS '||database_name||'.'||table_name||' WITH DATA PRIMARY INDEX (UniTempPICol);');

CALL DBC.SysExecSQL(
'DROP TABLE '||database_name||'.'||table_name||';');

CALL DBC.SysExecSQL(
'ALTER TABLE '||database_name||'.UniMigrationTemp_TABLE DROP '||column_name||';');

CALL DBC.SysExecSQL(
'ALTER TABLE '||database_name ||'.UniMigrationTemp_TABLE
RENAME UniTempCol to '||column_name||';');

CALL DBC.SysExecSQL(
'CREATE table '||database_name ||'.'||table_name||'
AS '||database_name||'.UniMigrationTemp_TABLE WITH DATA
'||pindex_desc||';');

CALL DBC.SysExecSQL(
'DROP TABLE '||database_name||'.UniMigrationTemp_TABLE;');

CALL DBC.SysExecSQL(
'ALTER TABLE '||database_name ||'.'||table_name||' DROP UniTempPICol;');

ELSE
-- The column is not part of the primary index, so simply drop the old
-- column and rename the temporary column so it replaces the original.
CALL DBC.SysExecSQL(
'ALTER TABLE '||database_name ||'.'||table_name||'
DROP '||column_name||';');

CALL DBC.SysExecSQL(
'ALTER TABLE '||database_name ||'.'||table_name||'
RENAME UniTempCol TO '||column_name||';');

END IF;
END IF;
END;

*** Query failed
*** CLI2: BADSEGMENT(373): TDSP Input Segment is InValid.

Code= 373 Function= 4

>>Reading file c:\program files\teradata\teradata manager 13.0\sql\UmTransChkAllTdwmSP.sql.
Compile file UmTransChkAllTdwmSP.sql
-- Copyright 2007-2008 by Teradata Corporation.
-- All Rights Reserved.
-- Teradata Confidential and Trade Secret.
REPLACE PROCEDURE dbssetupdba.Tdwm_Unicode_Migration_Check()
BEGIN
-- Run the um_translate_chk procedure for each column
-- identified in the migration_tablecolumn table.

DECLARE mdatabase VARCHAR(128) DEFAULT '';
DECLARE mtable VARCHAR(128) DEFAULT '';
DECLARE mcolumn VARCHAR(128) DEFAULT '';

-- The following strings identify the Kanji to Unicode mappings that are
-- available on the DBS. Kanji flavors that are not installed on the DBS
-- shall default to Kanji_SBC.
DECLARE strKSJIS VARCHAR(128) DEFAULT 'KANJI1_SBC_TO_UNICODE';
DECLARE strKEUC VARCHAR(128) DEFAULT 'KANJI1_SBC_TO_UNICODE';
DECLARE strKEBCDIC VARCHAR(128) DEFAULT 'KANJI1_SBC_TO_UNICODE';

-- Query the CharTranslations table for each Kanji flavor.
-- If the charset is installed, then override the default value
-- of the corresponding str variable...
SELECT 'KANJI1_KanjiSJIS_TO_UNICODE' INTO strKSJIS
FROM dbc.CharTranslationsV
WHERE CharSetName = 'KANJISJIS_0S' AND InstallFlag = 'Y';

SELECT 'KANJI1_KanjiEUC_TO_UNICODE' INTO strKEUC
FROM dbc.CharTranslationsV
WHERE CharSetName = 'KANJIEUC_0U' AND InstallFlag = 'Y';

SELECT 'KANJI1_KanjiEBCDIC_TO_UNICODE' INTO strKEBCDIC
FROM dbc.CharTranslationsV
WHERE CharSetName LIKE 'KANJIEBCDIC%' AND InstallFlag = 'Y'
GROUP BY 1;

L1:
FOR UmCursor AS um_columns CURSOR FOR
SELECT
database_name AS DNAME,
table_name AS TNAME,
column_name AS CNAME
FROM tdwm.migration_tablecolumns
WHERE TRANSDONE = 0 OR TRANSDONE IS NULL
ORDER BY ColSequence
DO
SET mdatabase = UmCursor.DNAME;
SET mtable = UmCursor.TNAME;
SET mcolumn = UmCursor.CNAME;
CALL dbssetupdba.UM_TRANSLATE_CHK (mdatabase, mtable, mcolumn,
'tdwm.migration_tablecolumns', strKSJIS, strKEUC, strKEBCDIC);
END FOR;
END;

*** Query failed
*** CLI2: BADSEGMENT(373): TDSP Input Segment is InValid.

Code= 373 Function= 4

>>Reading file c:\program files\teradata\teradata manager 13.0\sql\UmTranslateAllTdwmSP.sql.
Compile file UmTranslateAllTdwmSP.sql
-- Copyright 2007-2008 by Teradata Corporation.
-- All Rights Reserved.
-- Teradata Confidential and Trade Secret.
REPLACE PROCEDURE dbssetupdba.Tdwm_Unicode_Migration_Trans()
BEGIN
-- Run the um_translate procedure for each column
-- identified in the migration_tablecolumns table.

DECLARE mdatabase VARCHAR(128) DEFAULT '';
DECLARE mtable VARCHAR(128) DEFAULT '';
DECLARE mcolumn VARCHAR(128) DEFAULT '';
DECLARE mtype VARCHAR(1024) DEFAULT '';
DECLARE mpindex INTEGER DEFAULT 0;
DECLARE mpindex_desc VARCHAR(2048) DEFAULT '';

-- The following strings identify the Kanji to Unicode mappings that are
-- available on the DBS. Kanji flavors that are not installed on the DBS
-- shall default to Kanji_SBC.
DECLARE strKSJIS VARCHAR(128) DEFAULT 'KANJI1_SBC_TO_UNICODE';
DECLARE strKEUC VARCHAR(128) DEFAULT 'KANJI1_SBC_TO_UNICODE';
DECLARE strKEBCDIC VARCHAR(128) DEFAULT 'KANJI1_SBC_TO_UNICODE';

-- Query the CharTranslations table for each Kanji flavor.
-- If the charset is installed, then override the default value
-- of the corresponding str variable...
SELECT 'KANJI1_KanjiSJIS_TO_UNICODE' INTO strKSJIS
FROM dbc.CharTranslationsV
WHERE CharSetName = 'KANJISJIS_0S' AND InstallFlag = 'Y';

SELECT 'KANJI1_KanjiEUC_TO_UNICODE' INTO strKEUC
FROM dbc.CharTranslationsV
WHERE CharSetName = 'KANJIEUC_0U' AND InstallFlag = 'Y';

SELECT 'KANJI1_KanjiEBCDIC_TO_UNICODE' INTO strKEBCDIC
FROM dbc.CharTranslationsV
WHERE CharSetName LIKE 'KANJIEBCDIC%' AND InstallFlag = 'Y'
GROUP BY 1;

L1:
FOR UmCursor AS um_columns CURSOR FOR
SELECT
m.database_name AS DNAME,
m.table_name AS TNAME,
m.column_name AS CNAME,
m.data_type AS DTYPE,
m.Primary_Index AS PIFlag,
m.Primary_Index_Description AS PIDESC
FROM tdwm.migration_tablecolumns m
INNER JOIN dbc.ColumnsV c
ON m.database_name = c.Databasename
AND m.table_name = c.Tablename
AND m.column_name = c.Columnname
WHERE c.CharType <> 2 AND TRANSDONE = 0
ORDER BY ColSequence
DO
SET mdatabase = UmCursor.DNAME;
SET mtable = UmCursor.TNAME;
SET mcolumn = UmCursor.CNAME;
SET mtype = UmCursor.DTYPE;
SET mpindex = UmCursor.PIFlag;
SET mpindex_desc = UmCursor.PIDESC;

CALL dbssetupdba.UM_TRANSLATE(mdatabase, mtable, mcolumn, mtype, mpindex, mpindex_desc,
strKSJIS, strKEUC, strKEBCDIC);

UPDATE tdwm.migration_tablecolumns
SET TRANSDONE = 1
WHERE migration_tablecolumns.Database_Name = mdatabase
AND migration_tablecolumns.Table_Name = mtable
AND migration_tablecolumns.Column_Name = mcolumn;
END FOR;
END;

*** Query failed
*** CLI2: BADSEGMENT(373): TDSP Input Segment is InValid.

Code= 373 Function= 4

---------------------------------------------------------------------------
In the Setting up CONSOLE part
---------------------------------------------------------------------------
>> help database console;
*** Query failed
*** Database 'console' does not exist. Code= 3802 Info=0 Function= 5

---------------------------------------------------------------------------
In the Setting up DBCMANAGER part
---------------------------------------------------------------------------
>> help user "DBCMANAGER";
*** Query failed
*** Database 'DBCMANAGER' does not exist. Code= 3802 Info=0 Function= 5

>>GRANT SELECT, INSERT, UPDATE, DELETE ON TDWM.QryBandPairs TO "DBCMANAGER";
*** Query failed
*** Object 'TDWM.QryBandPairs' does not exist. Code= 3807 Info=0 Function= 5

>>GRANT SELECT, INSERT, UPDATE, DELETE ON DBCMNGR.tmQBPairsTmp TO "DBCMANAGER";
*** Query failed
*** Object 'DBCMNGR.tmQBPairsTmp' does not exist. Code= 3807 Info=0 Function= 5

>>GRANT EXECUTE PROCEDURE ON dbcmngr.dcInsertQueryBandPairs TO "DBCMANAGER";
*** Query failed
*** Object 'dbcmngr.dcInsertQueryBandPairs' does not exist. Code= 3807 Info=0 Function= 5

>>GRANT SELECT ON TDWM.WlcDefs to "DBCMANAGER";
*** Query failed
*** Object 'TDWM.WlcDefs' does not exist. Code= 3807 Info=0 Function= 5

1 REPLY

Re: Database setup errors ....

Hi Sam

Please first create the below things before you configure the Teradata Manager

Database - DBCMNGR
DB User - DBCMANAGER

And allocate few MB space to the DBCMNGR and DBCMANAGER.It is better to create the database and user manually if u have space constraints.

And assign 'TeradataManager' profile to user DBCMANAGER .

Please do the above changes and configure the 'DataBase Setup' ( Teradata Manager).

It would resolve the issue,if not please let me know.

Thanks
Pradeep