Cannot create authorized schema as user "sa"

447 views
Skip to first unread message

Silencium Sixty-Eight

unread,
Mar 16, 2008, 5:21:02 AM3/16/08
to H2 Database
Hello,

I just wanted to create a schema "Test" as user "sa" and authorize it
to user "Test". This resulted in the error

Error: Admin rights are required for this operation [90040-67]
SQLState: 90040
ErrorCode: 90040

(using the SQirrel SQL client).

Up until now I was in the believe that "sa" is "the god of the
database" who can to whatever pleases him.

- Sil68

Rich

unread,
Mar 17, 2008, 7:57:09 AM3/17/08
to H2 Database
Hi

Could you please post the exact command sequence to reproduce?

Thanks

Rich

Silencium Sixty-Eight

unread,
Mar 18, 2008, 2:35:59 PM3/18/08
to h2-da...@googlegroups.com
Hi,

1) connecting to the database with SQirrel SQL using "jdbc:h2:tcp://localhost:9092/TestDB/TestDB"

2) create role if not exists TestRole;
create user if not exists TestUsr password 'TestUsr';
create schema if not exists Test authorization TestUsr;

3) Result:

Query 1 of 3 elapsed time (seconds) - Total: 0.005, SQL query: 0.005, Building output: 0

Query 2 of 3 elapsed time (seconds) - Total: 0.002, SQL query: 0.002, Building output: 0
Error: Admin rights are required for this operation [90040-67]
SQLState:  90040
ErrorCode: 90040
Error occured in:
create schema if not exists Test authorization TestUsr

Funny thing though: logged in as user "TestUsr" I can execute "create schema Test;" successfully.

- Sil68

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To post to this group, send email to h2-da...@googlegroups.com
To unsubscribe from this group, send email to h2-database...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---


PGP.sig

Thomas Mueller

unread,
Mar 19, 2008, 4:30:57 PM3/19/08
to h2-da...@googlegroups.com
Hi,

> A) create role if not exists TestRole;
> B) create user if not exists TestUsr password 'TestUsr';
> C) create schema if not exists Test authorization TestUsr;

I get the following exception at C)
Admin rights are required for this operation [90040-68]

Currently only administrators may create schemas, and only
administrators may be owners of schemas.

> Funny thing though: logged in as user "TestUsr" I can execute "create schema
> Test;" successfully.

I can't reproduce this: I get the same exception as above. Could you
try this again please?

Regards,
Thomas

Silencium Sixty-Eight

unread,
Mar 20, 2008, 2:22:20 AM3/20/08
to h2-da...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Uups! Sorry! My mistake!
I granted admin rights to user "TestUsr", so no wonder I could create
schema using this particular user.

- - Sil68
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFH4gKflGTYFTxvGjURAlJqAJ4i9SeQ7QliMJBZP6JQCGteipH0fQCZAYW7
pjDl9ygurieiTw1ODZFlKqQ=
=UR1j
-----END PGP SIGNATURE-----

Reply all
Reply to author
Forward
0 new messages