Hi,

If you already have an encrypted database, then you need to decrypt it, not
encrypt it again:

    java -cp h2*.jar org.h2.tools.ChangeFileEncryption
        -dir pagwork.sys
        -db test
        -cipher AES
        -decrypt filepwd

> but in my case what contains the filepwd?

I don't understand. The password is up to you. Maybe you need to read the
documentation again.

Regards,
Thomas



On Friday, June 26, 2015, Domenico Repici <[email protected]> wrote:

> Hi I have a crypted H2 database whit connection like this :
>
>  - DB URL : jdbc:h2:file:~/dir/pagwork.sys;CIPHER=AES
>  - password : myFile.txt aPassword
>
> where password is a combined password between a file and a string
>
> so I want do read the trace file but it seems impossible.
> I tried to decrypt the database with the command:
>
> java -cp h2*.jar org.h2.tools.ChangeFileEncryption -dir pagwork.sys -db
> test -cipher AES -encrypt filepwd
>
> but in my case what contains the filepwd?
>
>
> thanks
> error in console :
>
>
> Exception in thread "main" org.h2.jdbc.JdbcSQLException: Encryption error
> in file "C:/Users/RD/dir/pagwork.sys.h
> 2.db" [90049-187]
>         at
> org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
>         at org.h2.message.DbException.get(DbException.java:179)
>         at org.h2.message.DbException.get(DbException.java:155)
>         at org.h2.store.FileStore.init(FileStore.java:203)
>         at
> org.h2.tools.ChangeFileEncryption.process(ChangeFileEncryption.java:211)
>         at
> org.h2.tools.ChangeFileEncryption.process(ChangeFileEncryption.java:189)
>         at
> org.h2.tools.ChangeFileEncryption.runTool(ChangeFileEncryption.java:104)
>         at
> org.h2.tools.ChangeFileEncryption.main(ChangeFileEncryption.java:66)
>
> --
> 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]
> <javascript:_e(%7B%7D,'cvml','h2-database%[email protected]');>
> .
> To post to this group, send email to [email protected]
> <javascript:_e(%7B%7D,'cvml','[email protected]');>.
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to