Before running the setup script, you should be aware of the following requirements:
The database user who runs the setup script is expected to be the same one used to access the MobiLink system tables during synchronization. This user must be used to start the MobiLink server and to configure MobiLink applications. See Required privileges.
The RDBMS user that the MobiLink server uses to connect to the consolidated database must be able to use the MobiLink system tables, procedures, and so on, without any qualifiers (for example, SELECT * from ml_user). See MobiLink server system tables.
The RDBMS user must also have the CATALOG READ privilege.
To set up SAP HANA to work as a MobiLink consolidated database, you must run a setup procedure that adds MobiLink system tables, stored procedures, and views that are required for MobiLink synchronization. Use the following method to set up SAP HANA.
Run the synchana.sql setup script with SAP HANA Studio. The script file is located in %SQLANY16%\MobiLink\Setup.
The MobiLink server can only recognize the ODBC driver from SAP HDBODBC for SAP HANA databases. See:
SAP HANA does not support calling stored procedures with NULLs for scalar input parameters, so you should not implement the upload_insert and upload_update scripts as stored procedure calls for any synchronization tables with nullable columns. The MobiLink server replaces NULLs with zero length string or binary values for parameters with CHAR or BINARY types respectively, and then passes them to the SAP HANA database when it calls the user authentication scripts. The user authentication stored procedures should be written with this MobiLink server behavior in mind.
The user-defined parameters are also set to zero length strings when first referenced.
MobiLink System Database (MLSD) The MobiLink server does not support MLSD for SAP HANA.
MobiLink server system objects The primary key columns in the MobiLink server system tables are maintained by SAP HANA SEQUENCEs through stored procedure calls.
Use the ml_add_connection_script and ml_add_table_script system procedures to add, modify, or delete connection and table scripts, and the ml_add_user and ml_add_database system procedures to add MobiLink users and remote databases. Do not directly insert any rows into the MobiLink server system tables.
See:
Timestamp-based downloads Because SAP HANA supports snapshot isolation, the MobiLink server uses the start time of the oldest open transaction under the current user as the next last_download_timestamp so that the download_cursor and download_delete_cursor scripts can use the last modified column information to generate a timestamp-based download stream. Following is an example.
Create a synchronization table in SAP HANA.
create COLUMN table test (pk int primary key, c1 int, last_modified timestamp generated always as ( now() ) ) |
The clause generated always as ( now() ) causes the SAP HANA server to update the last_modified column with the current timestamp, whenever this row is inserted or updated.
The download_cursor script can be written as follows.
select pk,c1 from test where last_modified > {ml s.last_table_download} |
SAP HANA does not support triggers, so you may have to use logical deletes to generate download deletes from SAP HANA to the remote databases.
Alternatively, the download_cursor and download_delete_cursor scripts can be written based on the hidden columns $validto$ and $validfrom$ when the table is created with the HISTORY COLUMN clause and the next last_download_timestamp can be generated by the generate_next_last_download_timestamp script. For information about these hidden columns, see the SAP HANA documentation.
If the download_cursor and/or download_delete_cursor scripts access any tables owned by database users other than the user used by the MobiLink server to login to the SAP HANA database, you need to grant CATALOG READ privilege to the MobiLink server login user using the following statement:
GRANT CATALOG READ TO MobiLink_server_login_user_name |
This enables the MobiLink server login user to see all the open transactions in the database, and not just open transactions for the current user, when trying to get the oldest open transaction of the database.
Data type mapping The data types of columns must map correctly between your consolidated and remote database. See SAP HANA database server data type mapping.
![]() |
Discuter à propos de cette page dans DocCommentXchange.
|
Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0 |