Written by

Huge Software
Question Peter Smit · Jul 15, 2022

Dynamic SQL giving security error

I get this on preparing a sql query

 

ERROR #5580: SQL Privilege Violation: 'User UnknownUser is not privileged for the operation'

There was some embedded sql queries before that which worked fine however.

Comments

Lucas Fernandes · Jul 15, 2022

You can review the 'UnknownUser' user's permissions. In the documentation it says that 'Embedded SQL' does not check permissions:

InterSystems SQL enforces privilege checking for ODBC, JDBC, Dynamic SQL, and the SQL Shell interface on InterSystems IRIS data platform. Embedded SQL statements do not perform privilege checking;

Or use an authenticated user with the proper permissions;

About privileges and users: Users, Roles, and Privileges

About authentication: Authentication and Authorization

0
Peter Smit  Jul 15, 2022 to Lucas Fernandes

Thanks, that fixed it

0