I forgot to mention another error while creating one SCHEMA:
[code]
CREATE SCHEMA park
  AUTHORIZATION park;
GRANT ALL ON SCHEMA park TO park;
[/code]

error:
[quote]
Error: org.h2.jdbc.JdbcSQLException: Table "SCHEMA" not found; SQL
statement:

GRANT ALL ON SCHEMA park TO park [42102-131], SQL State: 42S02, Error
Code: 42102
Error occured in:

GRANT ALL ON SCHEMA park TO park
[/quote]

But at the end the SCHEMA park was created. See my build log:
[code]
[INFO] [sql:execute {execution: create-schema}]
[INFO] Executing file: /home/gilberto/dev/netbeans-config/park-jpa/
core/src/test/resources/sql/park.usr.sql
[ERROR] Failed to execute:    CREATE ROLE park LOGIN ENCRYPTED
PASSWORD 'md5cc67fcf394136f13be5b9615a8ff6310' NOSUPERUSER NOINHERIT
CREATEDB CREATEROLE
[ERROR] org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement
"   CREATE ROLE PARK LOGIN[*] ENCRYPTED PASSWORD
'md5cc67fcf394136f13be5b9615a8ff6310' NOSUPERUSER NOINHERIT CREATEDB
CREATEROLE "; SQL statement:
   CREATE ROLE park LOGIN ENCRYPTED PASSWORD
'md5cc67fcf394136f13be5b9615a8ff6310' NOSUPERUSER NOINHERIT CREATEDB
CREATEROLE [42000-131]
[ERROR] Failed to execute:  GRANT ALL ON SCHEMA park TO park
[ERROR] org.h2.jdbc.JdbcSQLException: Table "SCHEMA" not found; SQL
statement:
 GRANT ALL ON SCHEMA park TO park [42102-131]
[INFO] 1 of 3 SQL statements executed successfully
[INFO] [compiler:compile {execution: default-compile}]
[/code]

Thanks,

Gilberto

On May 7, 10:34 am, gilbertoca <gilbert...@gmail.com> wrote:
> OS: opensuse 11.2
> java: openjdk 1.6.0
> h2: 1.2.131
>
> Sql statement:
> [code]
> CREATE ROLE park LOGIN
>   ENCRYPTED PASSWORD 'md5cc67fcf394136f13be5b9615a8ff6310'
>   NOSUPERUSER NOINHERIT CREATEDB CREATEROLE;
> [/code]
>
> The error:
> [quote]
> Error: org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement
> "CREATE ROLE PARK LOGIN[*]
>   ENCRYPTED PASSWORD 'md5cc67fcf394136f13be5b9615a8ff6310'
>   NOSUPERUSER NOINHERIT CREATEDB CREATEROLE "; SQL statement:
> CREATE ROLE park LOGIN
>   ENCRYPTED PASSWORD 'md5cc67fcf394136f13be5b9615a8ff6310'
>   NOSUPERUSER NOINHERIT CREATEDB CREATEROLE [42000-131], SQL State:
> 42000, Error Code: 42000
> [/quote]
>
> Can anyone show more role creation example?
> If the "CREATE ROLE" has just this syntax (http://www.h2database.com/
> html/grammar.html#create_role), so I can't neither assign password nor
> grants to the role. Is that right?
> I'm trying to convert a postgresql database to h2.
>
> Regards,
>
> Gilberto Caetano de Andradewww.secad.to.gov.br
> blog.gilbertoca.com
>
> --
> You received this message because you are subscribed to the Google Groups "H2 
> Database" group.
> To post to this group, send email to h2-datab...@googlegroups.com.
> To unsubscribe from this group, send email to 
> h2-database+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/h2-database?hl=en.

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

Reply via email to