on ‎2018 Nov 15 10:55 AM
Hello,
I currently try to debug a SQLScript procedure when the procedure is called from the UI through a nodejs module.

I the debugger attach options options there is the option "Connection with following attributs" and the values
I assume the "HANA database user name" is the user from the environment of the node module:
xs env <node module name>:
"hana" : [ {
"name" : "XSA_DEV-kifpjs1yx3zmy7s9-xccelo-hdi-container",
"label" : "hana",
"tags" : [ "hana", "database", "relational" ],
"plan" : "hdi-shared",
"credentials" : {
"schema" : ".......",
"hdi_password" : "........",
"password" : "..........",
"driver" : "com.sap.db.jdbc.Driver",
"port" : "39013",
"host" : "hxehost",
"db_hosts" : [ {
"port" : 39013,
"host" : "hxehost"
} ],
"hdi_user" : "XCCELO_1_C4GGEY9MYHE64ZZTYOHJYE1W5_DT",
"user" : "XCCELO_1_D0JHPO5OLKLVNC323YG43GWBZ_RT",
"url" : "jdbc:sap://hxehost:39013/?currentschema=XCCELO_1"
}
} ],
Here "user" : "XCCELO_1_D0JHPO5OLKLVNC323YG43GWBZ_RT"
And the "Application user name" is the name of the user which is loggged on to the UI (in my case XSA_DEV).
When I try this options I get the error:
An error occurred when setting the user name: Error in attaching external session: 55 - you are not authorized to attach to a connection that belongs to this HANA user
Is my assumption for the "HANA database user name" right?
What HANA authorizations have to be assigned to which user ?
Where can I assign this authorizations ?
Which user should I use to assign the authorizations ?
Thanks
Achim
Request clarification before answering.
Solution
The privilege "ATTACH DEBUGGER" have to be assigned to the "Debugger-User" by the
NodeJS module runtime user (above "XCCELO_1_D0JHPO5OLKLVNC323YG43GWBZ_RT").
The name of the DEBUGGER_USER can be seen in the "Debugger Attach Options".
In the WEBIDE database explorer create a new database connection to the HANA Database for the NodeJS module runtime user. Open a SQL console for the new database connection and call
GRANT ATTACH DEBUGGER TO <DEBUGGER_USER>;Open the "Debugger Attach Options" again and specify the NodeJS module runtime user in the input field "Hana database user name".
Now the debugger stops at breakpoints when the procedure is called indirect by a SAPUI5 app.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi achim-vogel64 - I tried this but it did not work.
When I get the user from the xs env nodeapp:
"hdi_user" : "SAP_AD_HDB_1_006J49J3XJGJ6FSKNWKB5TPOZ_DT",
"user" : "SAP_AD_HDB_1_1A778UE240HFZ58VDLJ4AZHRY_RT",

But in the debugger options, i see them run as: SAP_AD_HDB_1_CONKGU06ET1CCQKSGFVXXS6RB_RT

I granted:
GRANT ATTACH DEBUGGER TO SAP_AD_HDB_1_CONKGU06ET1CCQKSGFVXXS6RB_RT;
I tried both and running the nodejs service - but it does not stop. Do we need to specify anything for the application user name - i did pass XSA_DEV? Once I get this working, I will write a Blog.
Thanks,
Jay
| User | Count |
|---|---|
| 13 | |
| 8 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.