Wednesday 16 August 2017

What is Schema in SAP HANA?

A database schema is a way to logically group objects such as tables, views, stored procedures etc. Think of a schema as a container of objects. 
Types of Schemas
There are 3 types of schemas.
1.      User Defined Schema
2.      System Defined Schema
3.      SLT Derived Schema
User Defined Schema:
These are created by user (DBA or System Administrator)
Example:
Syntax: Create Schema <Schema_name>;
Code: create schema "KABIL_PRACTICE";
Note :
            The Created Schema is available in under the “Catalog”
SLT Derived Schema:
v  Schema which are created upon Data Provisioning by SLT process.
v  When SLT is configured, it creates schema in HANA system. All the tables replicated into HANA system are contained in this schema
System Defined Schema:
v  These schemas are delivered with the SAP HANA database and contains HANA system information. There are system schemas like _SYS_BIC, _SYS_BI, _SYS_REPO, _SYS_STATISTICS etc.

System Generated Schemas
SAP HANA System Schemas
_SYS_BIC:
v  This schema contains all the columns views of activated objects. When the user activates the Attribute View/Analytic View/Calculation View/Analytic Privilege /Procedure, the respective run-time objects are created under _SYS_BIC/ Column Views.
_SYS_REPO:
v  Whatever the objects are there in the system is available in repository. This schema contains the list of Activated objects, Inactive Objects, Package details and Runtime Objects information etc.
Also _SYS_REPO user must have SELECT privilege with grant option on the data schama.
_SYS_BI:
v  This schema stores all the metadata of created column Views. It contains the tables for created Variables, Time Data (Fiscal, Gregorian), Schema Mapping and Content Mapping tables.
_SYS_STATISTICS:
v  This schema contains all the system configurations and parameters.
_SYS_XS:

v  This schema is used for SAP HANA Extended Application Services.

2 comments: