on 01-20-2014 2:49 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Taw Fey Tan can you pls be little specific about your query as you told "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."
https://cookbook.experiencesaphana.com/bw/operating-bw-on-hana/data-safety/recovery/database-copy/
SAP Note 1642148 for sap hana backup and recovery
thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.