Skip to Content
0
Jul 22, 2016 at 06:15 AM

Best way to reset database in Hana

556 Views

Hello everyone,

during development i came across the question how to reset the whole database to the initial state very fast. Currently i create all database artifacts via CDS service. All views and tables are defined within .hdbdd file, the corresponding sequences are defined in the .hdbsequence file (for each table one .hdbsequence file). I import the data via .csv files via .hdbti file.

Currently everytime when i want to reset my database i perform the following steps:

1. Created a own sql script which delete all rows from the tables. Moreover it drops the all sequences. I only execute the whole script once.

2. Re-Import the data from .hdbti file by reactivate it from the webide.

3. Reactivate all sequences from webide.

My question is, it is possible to speed up this process. Especially the last step to create the sequences again bother. It is possible somehow to reset the sequences via SQL or create one script that reset all artifacts automatically and reimport the data.

Hope somebody can share best way practices during projects how they handle this problem.

Best regards

Manjinder