cancel
Showing results for 
Search instead for 
Did you mean: 

HANA user creation issue

oktay_simsek2
Explorer
0 Kudos

Hi,

I had run Hana initial load successfully. When I try to create a user, it gives the below error

"SAP DBTech JDBC: [257] (at 29): sql syntax error: zero-length delimited identifier""": line 1 col 29 (at pos 29)

java.lang.Throwable: SAP DBTech JDBC: [257] (at 29): sql syntax error: zero-length delimited identifier""": line 1 col 29 (at pos 29)

"

Anybody has any idea how to fix it?

Thank you very much.

Accepted Solutions (1)

Accepted Solutions (1)

ChrisPS
Contributor
0 Kudos

Hi Oktay - have you checked if SAP note 2118228 - Creation of user in HANA fails due to JDBCDriverException can fix the issue ?

Thanks

Chris
Product Support

SAP AGS


Answers (1)

Answers (1)

lambert-giese
Active Participant
0 Kudos

The SQL statement used in the SAP HANA connector is something like (code taken from 72 SP7):

CREATE USER 
    $FUNCTION.custom_imdb_generateUserName(%MSKEYVALUE%)$$ 
    PASSWORD $FUNCTION.sap_core_getPassword(%MX_ENCRYPTED_PASSWORD%)$$

The problem could be caused by either of the two functions returning an empty string.

To check, you could implement your own custom tracing function like:

function Z_TRACE(Par) { uWarning(Par); return Par; }

Then add a reference to this script to the job containing the above SQL statement, and finally modify the toDatabase pass by wrapping the original SQL code with a call to Z_TRACE, so it would finally look like:

$FUNCTION.Z_TRACE(
CREATE USER 
    $FUNCTION.custom_imdb_generateUserName(%MSKEYVALUE%)$$ 
    PASSWORD $FUNCTION.sap_core_getPassword(%MX_ENCRYPTED_PASSWORD%)$$
)$$

The result of this modification will be that the SQL statement used by SAP IDM at runtime will be logged as a warning message, so you can see exactly what's wrong with it.

From the error message and specifically the column number 29 mentioned there, I assume that sap_core_getPassword returns an empty string in your case.

Best regards,

Lambert

oktay_simsek2
Explorer
0 Kudos

Hi Lambert,

Thank you very much for reply.

I can find the functions you mentioned in create SAP HANA user task's destionations.

I changed it, however it didn't really help. 

Thanks

Oktay

lambert-giese
Active Participant
0 Kudos

Sorry to hear that. What's the content of the generated trace message, then?

Make sure to revert the change I suggested above as soon as you don't need it anymore. It will write cleartext passwords into the log and should hence never go into production.

Best regards,

Lambert