Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8388189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:25:01+00:00 2026-06-09T18:25:01+00:00

I am trying to embed h2 database to my spring appplication by setting the

  • 0

I am trying to embed h2 database to my spring appplication by setting the following in applicationcontext.xml

<jdbc:embedded-database id="embeddedDataSource" type="H2">

<jdbc:script location="classpath:data.sql"/>

</jdbc:embedded-database>

When am executing it it shows the syntax error in data.sql file.But this file is a backup file from the working mysql database.Does the h2 support mysql backup script files.Can any one give me an example for the h2 script file.

The error it shows is

Syntax error in sql statement "create database[*] ""test"" ";expected "OR,FORCE,VIEW,ALIAS,SEQUENCE,USER,TRIGGER,ROLE,SCHEMA,CONSTANT"; sql statement:

My data.sql contains

create database 'test';
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T18:25:02+00:00Added an answer on June 9, 2026 at 6:25 pm

    H2 is not 100% compatible with MySQL in the same way that other databases like Oracle, MS SQL Server, PostgreSQL and so on are also not 100% compatible with MySQL. Only MySQL is 100% compatible with MySQL. If you want to run SQL statements that were written for MySQL, then you need to make sure they don’t contain any syntax that is not supported by H2.

    it shows the syntax error

    Could you post it?

    Can any one give me an example for the h2 script file.

    The supported syntax is documented on the H2 web site.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Following chunk html code works as expected: <iframe src=http://www.amazon.com/></iframe> But when trying embed inner
I'm trying to embed an XML file into a C# console application via Right
Im trying to embed a tweet using twitter new embedded tweets but I dont
hey, I'm trying to insert an embed code in my database, and it's giving
I am trying to embed the following assembly instruction (of an ARM-like architecture) using
I am trying to embed an existing, public Google Map into a website. Specifically
I am trying to embed an opensocial gadget into a email. But I don't
I am trying to embed swf to html, and I'm using SwfObject 2.0 My
I'm trying to embed Python into a MATLAB mex function on OS X. I've
I am trying to embed a JFace TableViewer in a SWT TabFolder , but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.