Forum: Building VoltDB Clients

Post: sqlcmd outputs org.voltdb.client.ProcCallException

sqlcmd outputs org.voltdb.client.ProcCallException
Monika
Dec 11, 2013
Hi,

I enabled security for VoltDB (3.7.0.1).
I added a user,

<user name="dbuser"
password="dbuser"
roles="dbuser" />


and a role

CREATE ROLE dbuser with adhoc, defaultproc

Now, when I issue sqlcmd --user=dbuser --password=dbuser the client is starting but outputting the following error:
org.voltdb.client.ProcCallException: User dbuser does not have sysproc permission
at org.voltdb.client.ClientImpl.callProcedure(ClientImpl.java:236)
at org.voltdb.client.ClientImpl.callProcedure(ClientImpl.java:190)
at org.voltdb.utils.SQLCommand.loadStoredProcedures(SQLCommand.java:988)


Is there a way to get rid of this output, am I doing something wrong? Why is it actually shown, as queries are working?

Many thanks,
Monika
nshi
Dec 11, 2013
Hi Monika,

As sqlcmd starts, it issues several system procedure calls to retrieve information about procedures available in the system. The user you added does not have permission to call system procedures, that is why the error is shown on sqlcmd startup. If you add sysproc to the list, you should be able to start sqlcmd without the error.
Monika
Dec 11, 2013
Hi Ning,

Thanks for your answer.
But this implies that I cannot have a user that has both restrictions in the set of queries that are allowed and has access with the sqlcmd. Having sysproc rights basically allows issuing all queries. Is that right?

Monika
nshi
Dec 12, 2013
Hi Monika,

You are correct. With a role that has permission to adhoc, defaultproc, and sysproc, the user can call any procedures.

However, as you may have noticed already, sqlcmd still allows you to run adhoc queries if you only have adhoc and defaultproc permissions. Calling any user procedures will give you the error that the procedure is not defined, since it cannot load the available procedures from the system on startup.