Hi Evgenij.

I've added an ALTER USER statement to my script, and it now works fine.

Many thanks.

Cheers,

pr1


CREATE USER IF NOT EXISTS us1 PASSWORD 'us1';

ALTER USER us1 ADMIN TRUE;

CREATE SCHEMA IF NOT EXISTS MY_SCHEMA AUTHORIZATION us1;

SET SCHEMA = MY_SCHEMA;

CREATE TABLE table1 (

...







Le dimanche 29 septembre 2019 10:34:22 UTC+2, pr1 a écrit :
>
> Hello,
>
> In a Spring Boot project, I have defined an H2 Scope.
>
> My schema-h2.sql script contains the following code:
>
> CREATE SCHEMA IF NOT EXISTS ABC_SCHEMA AUTHORIZATION xyz;
>
>
> SET SCHEMA = ABC_SCHEMA;
>
>
>
> Unfortunately, when I "install" my Java project, I get the following error 
> message:
>
> Admin rights are required for this operation; SQL statement:
> CREATE SCHEMA IF NOT EXISTS ABC_SCHEMA AUTHORIZATION xyz [90040-199]
>
>
> Does anyone know how make the schema-h2.sql script run in admin mode?
>
> Many thanks.
>
> Best regards,
>
> pr1
>
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/54df5a15-c905-427c-ad2b-415a45be30eb%40googlegroups.com.

Reply via email to