Show TOC

sysadmin schema_checkLocate this document in the navigation structure

Compares datatype mappings between the primary and replicate databases. For each column, the command returns a mapping status of right or wrong and suggested types for the replicate database and replication definition.

Syntax
sysadmin schema_check, {<table_rep_def_name> | <table_name>}, <pds_name>,
<pdb_name>, <pdb_username>, <pdb_username_password>, 
<rds_name>, <rdb_name>, <rdb_username>, <rdb_username_password>,
<pdb_table_owner>, <rdb_table_owner>
Parameters
table_rep_def_name

The name of the table replication definition to check.

table_name
The name of the table to check. May be up to 200 characters.
Note

When it processes a sysadmin schema_check command, Replication Server assumes that the first parameter (for which you can enter either <table_rep_def_name> or <table_name>) is a table replication definition, unless there is no table replication definition that matches. In that case, Replication Server treats the first parameter as a table name.

If <table_rep_def_name> is the same as any <table_name>, sysadmin schema_check assumes that the name refers to the table replication definition. This is likely to produce the desired behavior if the matching <table_rep_def_name> and <table_name> refer to the same table. However, if any table has a <table_name> that matches the <table_rep_def_name> of another table, you might not get the result you expect. For example, suppose you have two tables:

<table_name> <table_rep_def_name>
table_1 table_1_rep_def
table_1_rep_def table_2_rep_def

The name table_1_rep_def is ambiguous in this case: it can refer to either table. The sysadmin schema_check command assumes than an ambiguous name is a <table_rep_def_name>.

pds_name

The primary data server name.

pdb_name

The primary database name.

pdb_username

A user with privileges needed to connect to the primary database.

pdb_username_password

The password for <pdb_username>.

rds_name

The replicate data server name.

rdb_name

The replicate database name.

rdb_username

A user with privileges needed to connect to the replicate database.

rdb_username_password

The password for <rdb_username>.

pdb_table_owner

The owner of <table_name> in the primary database.

rdb_table_owner

The owner of <table_name> in the replicate database.

Examples
Example 1
This command compares schemas in an SAP ASE to SAP HANA replication scenario:
sysadmin schema_check, tb1, repl0_17364, tdb1, tdb1_maint, tdb1_maint_ps, 
REPL2_17364_REP_hanads, REPL2_17364_REP_hanads, JASON, Sybase123, dbo, JASON
Example 2
This command compares schemas in an Oracle to SAP HANA replication scenario:
sysadmin schema_check, dl_mat_tb, RQAS6_29393_RA, o12sunx1a, sa, Sybase123, 
REPL3_29393_REP_hanads, REPL3_29393_REP_hanads, JASON, Sybase123, qaxuser, JASON
Example 3
This command compares schemas in a Microsoft SQL Server to SAP HANA replication scenario:
1> sysadmin schema_check, dl_mat_tb, VWIN6_27862_RA, pdbxn, sa, Sybase123, 
REPL3_27862_REP_hanads, REPL3_27862_REP_hanads, JASON, Sybase123, dbo, JASON
go2>
go
Column Type_in  Type_in   Length     Length     Mapping Suggested Suggested
_name  _pdb     _rdb      _in_pdb    _in_rdb    _status _type_in  _repdef
                                                        _rdb      _type
------ -------- --------- ---------- ---------- ------- --------- ----------
col1   int      INTEGER   0          10          Right  INTEGER   int        
col2   char     CHAR      50         50          Wrong  VARCHAR   CHAR        
col3   varchar  VARCHAR   50         50          Wrong  CLOB      RS_MSSS
                                                                   _VARCHAR
                                                                   _MAX
col4   datetime TIMESTAMP 21         27          Right  TIMESTAMP RS_MSSS
                                                                   _DATETIME
col5   text     CLOB      2147483647 2147483647  Right  CLOB      TEXT        
col6   image    BLOB      2147483647 2147483647  Right  BLOB      IMAGE       

(6 rows affected)
======================================================================
1>

Usage
  • Use sysadmin schema_check after making a schema change to the primary database, or when you see a schema error or a data error such as a data truncation error, data overflow error, or data corruption error.
  • The sysadmin schema_check command supports these types of replication:
    • SAP ASE to SAP ASE
    • SAP ASE to SAP HANA
    • Oracle to SAP HANA
    • Microsoft SQL Server to SAP HANA
    • IBM DB2 UDB to SAP HANA
  • The sysadmin schema_check command does not support Oracle to Oracle or Microsoft SQL Server to Microsoft SQL Server replication.
  • The command requires that the table name and column names in the primary database match the table name and column names in the replicate database.