- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Taking schema wise backup in SAP HANA
Data backup in any RDBMS system comes under Data Persistence layer. SAP HANA holds the bulk of its data in memory for maximum performance, but it still uses persistent storage to provide a fallback in case of failure.
When you refer a schema in database, it refers to a namespace in the database. It is not possible to take backup schema wise as you do for complete database.
However it is possible to export a schema using below command −
EXPORT "MY_SCHEMA".* AS BINARY INTO '/tmp/my_schema' WITH REPLACE;
Syntax
EXPORT <export_object_name_list> AS <export_format> INTO <path> [WITH <export_option_list>] [ <query_export_specification> ]
Note that you shouldn’t take schema on File System mounted on Windows OS.
Syntax Elements
<export_object_name_list>
Specifies a list of objects to export. The ALL and * options are only for use when exporting all objects from a specified schema.
<export_object_name_list> ::= {<export_object_name>[{, <export_object_name_list>}...] } | { ALL | * } <export_object_name> ::= [<schema_name>.]{<identifier> | "*" } <schema_name> ::= <identifier>
[<schema_name>.]<identifier> specifies objects in a schema for export. Specify <schema_name>."*" to select all objects within the specified schema for export. Specify ALL (without <schema_name>) to select all objects from all schemas in the system for export.
Specifies the format to export the data to −
<export_format> ::= BINARY | CSV
Specifies the server path where export files are placed.
<path> ::= <string_literal>
You have the following <export_option_list>
WITH <export_option_list> <export_option_list> ::= <export_option> [{, <export_option>}] <export_option> ::= REPLACE | CATALOG ONLY | NO DEPENDENCIES | SCRAMBLE [BY <password>] | STRIP | THREADS <number_of_threads> | STATISTICS ONLY | NO STATISTICS
Importing Schema backup
To import the schema backup, you can use the following command −
IMPORT "MY_SCHEMA".* FROM '/tmp/my_schema' WITH REPLACE;