cancel
Showing results for 
Search instead for 
Did you mean: 

B1H - How to create demo db from other db backup

Former Member
0 Kudos

Dear Experts,

I would like to know how do I create a new DEMO company database from other B1H company database. In MS SQL environment I do a backup from base database and restore to a new database, but I did found any method in HANA environment.

I'm a implementation consultant and I need create a TEST company from the PRODUCTIVE company database.

Thank you in advance.

Nghia

Accepted Solutions (1)

Accepted Solutions (1)

duncanspeidel
Advisor
Advisor
0 Kudos

H Nghia,

At this time SAP Business One powered by HANA does not offer you the functionality of restoring a DB to a different name.  This is a HANA limitation, not a B1 limitation. 

The functionality will be available in HANA as of revision 61.  Revision 61 is not certified for B1.  I think B1 9.0 PL03 will run on revision 67, which also contains the Schema (DB) rename functionality.  The example below shows you how to rename a schema.

Example:

export "SBODEMOGB"."*" as binary into '/home/SBODEMOGB' with replace threads 10;

import "SBODEMOGB "."*" as binary from '/home/SBODEMOGB_901' with replace threads 10 rename schema "SBODEMOGB" to "SBODEMOGB_NEW";

Best regards,

Duncan

Former Member
0 Kudos

Hi Duncan,

Now we run B1H 9.0 on rev.53. When I understand you correctly the script below will not yet worked in present:

export "SBODEMOGB"."*" as binary into '/home/SBODEMOGB' with replace threads 10;

import "SBODEMOGB "."*" as binary from '/home/SBODEMOGB_901' with replace threads 10 rename schema "SBODEMOGB" to "SBODEMOGB_NEW";

I need waiting for B1H 9.0 PL03 on rev. 67 for running this script, right?

Thank you for your answer.

Nghia

duncanspeidel
Advisor
Advisor
0 Kudos

HI Nghia,

You are correct, you need to wait for B1H 9.0 PL03 on rev. 67.

Best regards,

Duncan

Former Member
0 Kudos

Hi,

I tested it successfully on SAP HANA SP06 rev 60 ( supported for B1A ).

But I can not find those parameters in any documentation.

Gregory

duncanspeidel
Advisor
Advisor
0 Kudos

Hi Gregory,

You cannot rename a schema until HANA revision 61. Revision 61 is not certified for use with Business One.  Schema rename details can be found in note 1888585.  You need an S-user to view the note.

Best regards,

Duncan

Former Member
0 Kudos

Hi Duncan,

After upgrade to HDB rev 67 and B1H PL3 I was still not be able to import backup using rename schema functionality.

A following error message appear:

Could not execute 'import "BASE_COMPANY"."*" as binary from '/hana/HANA_BACKUP/BASE_COMPANY' with replace threads 10 ...' in 795 ms 316 µs .

SAP DBTech JDBC: [2]: general error: SBOCOMMON.ETL_S  BASE_COMPANY:JDT1_tracking not found in the import directory.

I do a backup to local HANA box and I would like to restore to same HANA box as other name (PROD_DB to DEMO_DB).

I use the next import sql:

import "BASE_COMPANY"."*" as binary from '/hana/HANA_BACKUP/BASE_COMPANY' with replace threads 10 rename schema "BASE_COMPANY" to "TARGET_COMPANY";

What do you thing what did I wrong?

Thank you in advance.

Nghia

duncanspeidel
Advisor
Advisor
0 Kudos

Hi Nghia,

I will have to double check, but it is my understanding that the schema rename works when you export a schema.  It does not work with a backup file. 

I have seen the code below work:

export "SBODEMOGB"."*" as binary into '/home/SBODEMOGB' with replace threads 10;

import "SBODEMOGB "."*" as binary from '/home/SBODEMOGB_901' with replace threads 10 rename schema "SBODEMOGB" to "SBODEMOGB_NEW";

Best regards,

Duncan

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

SQL server is different from HANA.

You need to install or create another server to do this.

It is recommended when using HANA there will be a 3 server landscape.

First - Development server

Second - Quality Assurance/Testing server

Third - Production or the Live server

Or you may have.

First and second - Development and QA Server, just create another instance installation for QA

Third - Production / Live server

Thank you.

Regards,

Clint

Former Member
0 Kudos

Hi Clint,

Thank you for your answer. You mean I need install a separete HANA server on new Hardware for this purpose?

I try to install on same server 2 instance but this is not possible. For SAP Business One just one System ID (NDB) handled.

Best regards,

Nghia