Notifications
Clear all

2121486 - SAP HANA instance backup ensures data consistency while schema export does not

1 Posts
1 Users
0 Likes
386 Views
admin
Posts: 337
Admin
Topic starter
(@admin)
Prominent Member
Joined: 3 years ago

Symptom

With SAP HANA, the proper backup policy is to regularly back up the entire instance to an external medium. Although SQL commands (and the backup service provided by SAP Business One) can help you to export individual SAP Business One company database schemas, the schema-level export does not ensure data consistency. Schema export can work as a complement to the instance backup operation but cannot replace instance backup as the sole or major backup policy.

Cause

Consulting.

Solution

If any other transactions happen while a schema export is already in progress, the new transactions may or may not reflect themselves in the export; or part of the new transactions are included in the export while the others are not. In other words, the export does not take a snapshot of the schema at the point in time when export started; this is a risk that you must be aware of if schema export is a complementing backup policy of your company.

On the contrary, if you perform an instance backup, a snapshot of the instance is taken; any new transactions are NOT included in the instance backup and later you can use the instance backup to recover the instance to a point in time.

Therefore, as a rule of thumb, always back up your SAP HANA instance regularly to safeguard your data. If schema export is part of your backup policy, perform the export during off hours when no transactions are running in the database.

If you want to check if any client (e.g. SAP Business One client, SAP HANA studio) still connects to a schema to be exported, run the following SQL query in the SAP HANA studio:

select distinct client_host, client_ip, client_pid from m_connections where connection_id > 0 and current_schema_name = ?;

If no result is returned for the schema to be exported, there exists no connection to the schema; if any results are returned for the schema, to avoid data inconsistency in export, you had better manually close the connections or wait until all connections are closed.

Schema Import

When importing a schema, you must ensure that the operation is not interrupted (e.g. close the SAP HANA studio when the process is still running). Otherwise, data in some tables may be inaccessible in the imported schema or even the original schema.

Recommendations

  • Upgrade to the latest version of SAP Business One, version for SAP HANA, which is compatible with newer versions of SAP HANA.
  • When performing system administrative tasks (e.g. in the SAP HANA studio or using PuTTY), ensure that the tools are installed in the same network environment as the system itself.
  • Import:
    • Before importing a schema, we highly recommend that you back up the SAP HANA instance.
      In the extreme case where data becomes inaccessible after an unsuccessful import, you can recover your SAP HANA instance to resolve the issue.
    • When importing a schema, use the "with ignore existing" option (which is available as of SAP HANA 1.0 SPS 07).
      Do NOT use the "with replace" option for import. SAP Business One company schemas usually reference objects in the SBOCOMMON system schema. Using the "with replace" option would overwrite the contents of the referenced objects in SBOCOMMON and may cause problems.
    • If the schema already exists in the system, use the "rename" option to import the schema under a new name.
    • If you want to overwrite the existing schema with a previous version, you can drop the schema first, and then import it using the "with ignore existing" option.
Reply
Share:
x  Powerful Protection for WordPress, from Shield Security
This Site Is Protected By
Shield Security