Skip to Content
0

SAP HANA 2.0 XSA Synonym to a stored procedure in a classical schema

Mar 16 at 04:12 AM

84

avatar image

My synonym for tables of a classical schema works but not a synonym to a stored procedure. just to be cautious I have grant ascess on the whole schema ( i did try by granting individual grants to table type and stored procedure)

GRANT SELECT, EXECUTE, UPDATE , DELETE , INSERT  ON SCHEMA TRAINING1 TO "TRAINING1::EXTERNAL_ACCESS";
GRANT SELECT, EXECUTE ,UPDATE , DELETE , INSERT ON SCHEMA TRAINING1 TO "TRAINING1::EXTERNAL_ACCESS_G" WITH GRANT OPTION;

The stored proc exists and I can run it from the classical SQL side but tying to a synonym of it in XSA , it fails and says that the object does not exist. Am I missing any authorization ?

{
  "PROJ1.DB::Synonym_0": {
    "target": {
      "object": "PROCX",
      "schema": "TRAINING1",
      "database": "SAHDB"
    }
  }
}

capture.jpg (16.3 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Ravindra Channe Mar 25 at 04:52 PM
0

Hi,

I am not sure if you can create a synonym for a stored procedure. I know it can be done for Tables and views in the system. One quick question, did you try to create the synonym using the graphical editor. Could you see the source schema and objects ?

https://help.sap.com/viewer/52715f71adba4aaeb480d946c742d1f6/2.0.02/en-US/2a26e16e712c4dcaabd02f063fb88e05.html

Also, if you have the execute privilege to the procedure, can you execute it directly from the SQL console (from the XSA, mapped to your container).

Regards

Ravi

Show 1 Share
10 |10000 characters needed characters left characters exceeded

ok I think I had misunderstood , about which container .. So I went back and again checked . If I open a SQL windows in the CONTAINER defined on the SERVICE . So in the SERVICE container i am seeing the SP and being able to call it too

0
Rajarshi Muhuri Mar 26 at 05:05 AM
0

Hi Ravindra

I am being able to see the SP while in the Synonym graphical editor , but it does not do the build saying that the SP does not exist . Now I wont be able to execute from the SQL console of the XSA mappened container till the synonym is been BUILD .

just to make sure I created a read only SP in the classical schema with the table type defined in the SP it self , as I could not see the table type from the services

CREATE PROCEDURE TRAINING1.SP(OUT  O TABLE( ID INTEGER, NAME NVARCHAR(20)))  

Also how do I monitor RAM and CPU per container ? and also set max limiting resources on it ?

Share
10 |10000 characters needed characters left characters exceeded
Thomas Jung
Apr 10 at 07:04 PM
0

Is the tenant of the procedure the same as the tenant mapped into the space of your project? The Value Help in the synonym editor will use the user provided service, but the deployer will use the space mapped tenant and they may not be the same. That is the most likely cause of the object not being found during the build.

Also you should never grant access directly to container roles like EXTERNAL_ACCESS. Instead always use the hdbgrants to grant access upon build/deploy.

Share
10 |10000 characters needed characters left characters exceeded