Professional Documents
Culture Documents
2134959 - Schema Export and Import Guide for SAP Business One, version for SAP HANA
Component: SBO-HANA-IE (SAP HANA schema import and export), Version: 14, Released On: 15.06.2023
Symptom
Depending on your specific needs, you may need to create information models, tables, or stored procedures on a schema; this is usually done in a development system. As well, you
may want to reuse these customized objects. Instead of re-creating everything in a different system, you can simply export the schema from the original system and then import the
schema into the target system.
This guide introduces how to export and import schemas in the SAP HANA studio and provides some additional information (for example, troubleshooting). Nevertheless, please
note that schema export-import is not equivalent to full instance backup and recovery. Regular full instance backup must be performed to ensure system recoverability. This point is
further explained in SAP Note 2121486.
Image/data in this SAP Note is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
Solution
Table of Contents
1. Export-Import Statements
2. Collecting SAP HANA Traces for Troubleshooting
3. Monitoring Import-Export Processes
4. Common Issues and Solutions
5. SAP Business One Backup Service
6. Recommendations on Transferring Schema Exports to SAP
7. More Information
Export statement:
Example:
EXPORT "SBODEMOUS"."*" AS BINARY INTO '/usr/backup' WITH REPLACE THREADS 10;
Note: Make sure that you use an empty folder in the "export_path" before exporting the schema.
EXPORT "SCHEMA_NAME"."*" AS BINARY INTO 'export_path' WITH REPLACE NO DEPENDENCIES THREADS 10;
Example:
EXPORT "SBODEMOUS"."*" AS BINARY INTO '/usr/backup' WITH REPLACE NO DEPENDENCIES THREADS 10;
Import statements:
Example:
2. IMPORT "SCHEMA_NAME"."*"AS BINARY FROM 'import_path' WITH IGNORE EXISTING THREADS 10 RENAME SCHEMA "SCHEMA_NAME" TO
"NEW_SCHEMA_NAME";
Example:
Do NOT use the "WITH REPLACE" option for import on a productive environment. SAP Business One company schemas usually reference objects in the SBOCOMMON
system schema, or there could be dependencies on other schema objects because of hardcoded schema names within stored procedures. Using the "WITH REPLACE" option
would overwrite the contents of the referenced objects in SBOCOMMON or in any other dependent schema and could cause problems (possibly causing data overwrite).Refer
SAP Note 2404319.
If the target schema already exists, the option "IGNORE EXISTING" won't overwrite the existing schema. You can consider to drop it firstly by the SQL statement: drop schema
"SBODEMOUS" cascade.
2. Configuring SAP HANA Traces for Troubleshooting
For detailed investigation of import or export failure, configure the indexserver trace and then check the errors in the collected trace, as below:
1. Set the trace level to DEBUG for import-export in the indexserver traces, as below:
1. In the SAP HANA studio, open the administration console of your system.
2. On the Trace Configuration tab, click the
Example of trace entries for a failed import from an indexserver trace file:
Cause:
SAP HANA database services might be running out of memory.
Solution:
1. In the SAP HANA studio, in the administration console of your system, on the Diagnosis Files tab, check if there is any crash dump or out-of-memory dump, file name ending
with "XXXXXXXX.oom.trc".
2. Reboot the Linux server and attempt the import again.
3. If the problem persists, contact SAP Business One Global Support.
Cause:
The SAP Business One database schema you are trying to import is incompatible with the version of the SAP HANA database. For example, an SAP Business One 8.82 database is
incompatible with Revision 67 of the SAP HANA database.
Solution:
Upgrade the SAP Business One schema to a compatible version before import.
4.2.2
Error:
"SAP DBTech JDBC: [2] general error: DE.ETL_S DE:xxx_tracking not found in the import directory.” (where “xxx” represents a particular table in SAP Business One, for example,
INV1).
Solution:
Please refer to SAP Note 1944485.
4.2.3
Error:
"SAP DBTech JDBC: [2]: general error: <> not found in the import directory"
Causes:
You provided an incorrect name for the exported schema or an incorrect directory.
You transferred the schema export to a Windows machine without compressing the export in an archive package.
Solution:
1. Be sure to provide the correct schema name and the correct directory, which contains an "export" folder and an "index" folder. In the "export" folder, you can find a folder
named after the schema.
2. Always zip an exported schema before transferring it to another machine, especially when transferring between Windows and Linux machines.
4.2.4
Error:
"SAP DBTech JDBC: [2048]: column store error: table import failed: [30149] Found lob container reference with no entry in the provided mapping."
Cause:
You have activated hybrid LOBs. The issue described above is a known error with this LOB storage type. For more information, see SAP Note 1994962.
Solution:
Please refer to SAP Note 2051378.
4.2.5
Error:
"SAP DBTech JDBC: [2048]: column store error: table import failed: [30111] Could not find table/view OGAR_TMP in schema XXXX: line 14 col 8 (at pos 293)."
Solution:
Please refer to SAP Note 1951219.
4.2.6
Error:
"* 2048: column store error: table import failed: [30111] Binary import failed (could not execute create statement);object=
<SCHEMA_NAME>:PAL_TRIPLE_SMOOTH_WRAPPERen,invalid table name: Could not find table/view PAL_TRIPLE_SMOOTH_ORIGINAL_INPUT in schema
<SCHEMA_NAME> at ptime/query/catalog/catalog.cc:5259 SQLSTATE: HY000"
Solution:
Please refer to SAP Note 2122157.
4.2.7
Error:
Could not execute 'IMPORT "A1"."*" FROM '/usr/sap/JY2/HDB30/work/export' WITH RENAME SCHEMA A1 TO A2' in 243 ms 419 µs .
SAP DBTech JDBC: [2048]: column store error: table import failed: [30138] No such schema in the import path.
Solution:
Make sure the import path is to the directory containing the "export" and the "index" folders. Here in the example, it should be
‘/usr/sap/JY2/HDB30/work’.
Enhancements of the backup service are gradually introduced in different patches. For best practices and known limitations, please refer to SAP Note 2072868.
Caution: The schema backup function provided by the backup service is based on the same SQL statements as manual export-import. You must be aware of the limitation of
schema backup, as outlined in SAP Note 2121486 and 2404319. Regular full instance backup is required for system recoverability - the backup service provides the instance backup
function as of release 9.1 PL05.
Before performing an import or export operation, always grant full authorization to the <sid>adm user on the specified directory.
Always export the schema to a Linux directory/disk and not to a Windows directory/drive.
The export directory must already exist with requisite permissions.
Compress the schema export on a Linux machine in the .tar.gz format.
You can use the following command to compress your schema export:
tar -zcvf archive_name.tar.gz /<Export Location>/export /<Export Location>/index
e.g. tar -zcvf archive_name.tar.gz /usr/sap/HA0/HDB000/work/test_export
For more information, please refer to SAP Note 1936989 (How to back up HANA database and transfer it to SAP Business One Support).
Attributes
Key Value
Products
Products
1969397 Troubleshooting Guide for SAP Business One, version for SAP HANA
2713616 Import Error: "SAP DBTech JDBC: [2048]: column store error: table import failed: [0] No error"
1936989 How to Backup HANA Database for SAP Business One Support
2212872 No value for time dimensions in schemas exported from an SAP HANA version lower than SPS08
2121486 SAP HANA instance backup ensures data consistency while schema export does not