cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Using a schema mapping or schema synonym for SQL Views

Former Member
0 Likes
306

We have a scenario where a schema has different names in DEV, QA and Prod. This schema, which happens to be an SLT target, contains tables to be used in SQL Views.

Is there any way to establish a synonym or a mapping for this schema name? For example can I define a synonym/map for ECC to ED1/EQ1/EP1 depending on the system? Then all SQL view definitions would be able to be defined using the virtual schema name "ECC".

I know schema map capability exists, but I only see it being usable for Analytic/Calc Views and not SQL views or any SQL Script procedure. There is a Public Synonym feature, but it doesn't seem to apply on schema names.

What are my options to model this?

View Entire Topic
lbreddemann
Active Contributor
0 Likes

No, there is no general SCHEMA synonym feature available (neither in SAP HANA, standard SQL nor in any of the other DBMS used with SAP systems).

You might have to script the synonym creation for all referenced tables and run it on each system.

The question of course is: why have multiple schema names across multiple machines in the first place? That seems to make things only more complicated without much additional benefit.