Materialized View

92 views
Skip to first unread message

Sarat Vemuri

unread,
Dec 12, 2024, 2:23:12 PM12/12/24
to H2 Database
Hello,

I tried to create materialized view in H2 database and after that I am getting below error while load the database file.

Caused by: java.lang.UnsupportedOperationException: not yet implemented
        at org.h2.command.Parser.parseCreateMaterializedView(Parser.java:7680)

Version used h2-2.2.224

I am assuming the db file is corrected. My goal is to read data from the corrupted database file.

Thanks,
Sarat Vemuri.

Evgenij Ryazanov

unread,
Dec 13, 2024, 5:01:43 AM12/13/24
to H2 Database
Hello!

Unfortunately, implementation of materialized views in H2 is not ready to be used in production.

To open a database with corrupted metadata you need to implement a dummy database event listener and specify it in JDBC URL:
https://h2database.com/html/commands.html#set_database_event_listener

This listener must be in classpath of H2.

Sarat Vemuri

unread,
Dec 15, 2024, 11:38:30 AM12/15/24
to H2 Database
Hello!!!!

Thank you very much. I will try this out and post the results.

Thanks,
Sarat Vemuri.

Reply all
Reply to author
Forward
0 new messages