cancel
Showing results for 
Search instead for 
Did you mean: 

Can I duplicate HANA database

Former Member


Hi,

In our HANA server, we have 2 LIVE databases. I would like to duplicate 1 of the LIVE databases as a TEST environment for some testing.

I am not able to find any notes or tips to duplicate a single database.

Can anyone help?

Thanks,

Taw-Fey, Tan

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Watch this video (uses IMPORT statement with  RENAME SCHEMA current_schema TO targetschema): SAP HANA Academy - EXPORT/IMPORT: Using With Rename Schema option during import - YouTube

praveen_kumar235
Explorer
0 Kudos

Hi Taw -


In our HANA server, we have 2 LIVE databases.

To precise, this means you have 2 databases in two different HANA installations (systems, each with its own SIDs), on same HANA appliance hardware.

Note, HANA currently does not support multiple databases in same installation (i.e. logical system with its SID).

In this case, backups will happen separately for each database -> you can simply backup the one you need copy of, and restore on target server.

You can also play around with snapshots for this task (ref SAP note 1703435).

If your requirement is simply to tryout some crazy stuff, and if you can afford outage + rollbacks on this database -> you can use snapshot only, without having to create another duplicate copy of database.

BR

Former Member
0 Kudos

HI Praveen,

We are implementing SAP B1H 9.0. In our HANA server, we only have one HANA installation, one instance ID with multiple databases.

Are you suggesting that I should consider creating different HANA installation instances within 1 HANA server?

Thanks,

Taw-Fey, Tan

praveen_kumar235
Explorer
0 Kudos

Hi Taw-Fey,

Fact that this is B1H use case is interesting to know.

I am inclined to think that what you call multiple databases is actually schema.

The fact that what B1 terms as database (from application perspective), would not mean that it is a database as per HANA implementation.

If you can paste here the screenshots from HDB studio admin console, it'll be clear.

Given that you are then looking at schemas, you can then satisfy your requirement by additional means - schema export/import.

In summary, your options:

1. HANA backup --> restore on target --> delete the schema not needed (or let it be, if it's not a huge resource hogger)

2. Use snapshot on source database itself, as I explained before. In this case, note that entire database (all schemas) will get reverted.

3. Schema export --> schema import on target.

BR

Former Member
0 Kudos

Hi Praveen,

This is the screenshot of my B1H HANA Studio.

The databases that i am trying to duplicate is the CHEMPROCESS_DEMO2. I would like to create a new database from this one and name it CHEMPROCESS_DEMO_TEST.

I can't find any of your options in HANA Studio. Kindly point me to any notes that describe how to achieve your suggestions.

Thanks,

Taw-Fey, Tan

former_member182302
Active Contributor
0 Kudos

Hi Taw,

You can export "SCHEMA" using export Wizard i.e

Export --> SAP HANA Studio --> Catalog Objects --> Choose schema i.e CHEMPROCESS_DEMO2

This will help you to export the schema and you can import this in to a different HANA system.

What i understand from your requirement is you need it as a new schema in the same system.

Though we can manually change the schema names in DDL's generated after export, I will also wait to listen from the experts to check if there is any other better approach for doing it.

Regards,

Krishna Tangudu

praveen_kumar235
Explorer
0 Kudos

Hi Taw-Fey

You can see these are in fact schemas.

Export / import can be done via studio File -> Export / Import, or via SQLs

(http://help.sap.com/hana/SAP_HANA_SQL_and_System_Views_Reference_en.pdf)

For more recent HANA revisions, you have option to rename schema while import (refer to doc).

Consider also 'CREATE TABLE LIKE' option if it suits the needs and is simpler for your requirement.

BR

Former Member
0 Kudos

Hi Poorna,

Thanks for replying

As my understanding, there are only 2 types of HANA backup, Complete databackup and log backup. When i run Complete Databackup, both databases in my HANA server gets backup. There are total of 6 files created for the complete databackup, and i cannot tell which backup files are for which databases.

So how can i restore just 1 of the databases and named it differently?

Thanks,

Taw-Fey, Tan

Former Member
0 Kudos

hi Tan pls find the bellow links

SAP HANA Administration Guide | SAP HANA

AtulKumarJain
Active Contributor
0 Kudos

Hi TFT,

For restore all 6 file requird .so you need to copy all data and log backup file for recovery.

Best Regards,

Atul

AtulKumarJain
Active Contributor
0 Kudos

Hi Taw Fey Tan,

For dupicating your HANA DB you need to perform , Backup and restore of current DB.

For that purpose you have to install new hana software in other server with same or higher version.

Once s/w installtion done you can take backup of current HANA DB and restore it to newly installed server.

Best Regards,

Atul

Former Member
0 Kudos

Hi Atul,

This is my understanding as well. I can only restore the same HANA database to another HANA server.

i cannot restore the same HANA database to the same server with a different datebase name.

Thanks for your confirmation.

Regards,

Taw-Fey, Tan

Former Member
0 Kudos

Dear