cancel
Showing results for 
Search instead for 
Did you mean: 

Copy system schema content to another schema

Former Member
0 Kudos

Hi Team,

We have requirement where we want to Export the system schema full data (including indexes , Table , Function etc) and import the same to another schema say system1 .so that if we are going to change any table inside system1 schema ,should not effect the system schema,,,

What will the shortest and simplest method for doing this.

Your suggestion will be really appreciable .

Regards

Rableen

Accepted Solutions (0)

Answers (2)

Answers (2)

kr_pavankumar
Contributor
0 Kudos

Hi Rableen,

Below is one way of having same schema objects in another schema in same system and it worked.

Export:

Export the schema to Server/Client location using Export selection as Column table format = CSV

Import using SQL:

IMPORT "system"."*" AS CSV FROM '/usr/sap/HDB/HDB00/work' WITH

RENAME schema "system" to "system1"

You no need to change anything for catalog objects such as tables, views, procedures, indexes.

All these objects will refer to the new schema and are independent which points to its respective schema. This way you can have two schemas - 'system' and 'system1' in same system.

Hope it helps.

-- KRPK

Former Member
0 Kudos

Hi all,

We are able to export , but not with the data..Export and import is working but data is coming .

Regards

Rableen

kr_pavankumar
Contributor
0 Kudos

Including data should be unchecked. Then data won't be available

Former Member
0 Kudos

Hi all,

Exact Error we are facing is "SAP DBTech JDBC: [258]: insufficient privilege: Can't export objects in schema SYSTEM. Can't export view SYSTEM._SYS_SS_CE_599436_RET. user has no privilege on the underlying objects"

Please suggest.

Regards

Rableen

Former Member
0 Kudos

Hi Pavan,

We need the data also ....while taking with data option it is giving Error below.

"

SAP DBTech JDBC: [258]: insufficient privilege: Can't export objects in schema SYSTEM. Can't export view SYSTEM._SYS_SS_CE_599436_RET. user has no privilege on the underlying objects"

Regards

Rableen

kr_pavankumar
Contributor
0 Kudos

May I know which user you are using to perform this acitvity. Is it SYSTEM user??

Former Member
0 Kudos

Hi Pavan,

Yes we are using system user and try to export system Schema with data.

Regards

Rableen

kr_pavankumar
Contributor
0 Kudos

Rableen, Whats the HANA version you are using? Is this resolved??

Former Member
0 Kudos

Rableen

Have you examine the role and privileges assigned to this object? Does it have the rights assigned to it ?

Examine these to and if not check all to assign privileges to this object.

Former Member
0 Kudos

I belive Import/Export method will be good.  

Former Member
0 Kudos

Hi Pavan,

Once we will export the schema with SYSTEM1,while import we have to change the schema name from SYSTEM1 to SYSTEM2 , How many place we have to change as i wanted to export whole schema , so is there any other way available or while import mass change from SYSTEM1 to SYSTEM2.

Regards

Rableen

Former Member
0 Kudos

You will have to inspect all views for all references to the SYSTEM1 schema and change to the new schema name. Additionally, this applies for all procedures as well.

Regards

Former Member
0 Kudos

Hi Sarah,

But this way it will take long time and become complex..

0 Kudos

Hi Rableen,

The import statement has a rename schema option as per the syntax in the below page. Did you try that out?

http://help.sap.com/saphelp_hanaplatform/helpdata/en/20/f75ade751910148492a90e5e375b8f/content.htm?f...

Regards,

Sathish