Connect to SQL Server instead of H2

I am using the built in H2 DB for storing metabase metadata. Can I use the sql server to host the client db as well as to store metabase db(instead of h2). In the documents , I see these settings for postgres, can you share similar configuration for MS SQL Server 2012 or greater.
export MB_DB_TYPE=postgres >>what should be here for sql server.
export MB_DB_DBNAME=metabase
export MB_DB_PORT=5432
export MB_DB_USER=
export MB_DB_PASS=
export MB_DB_HOST=localhost
java -jar metabase.jar

No, only MySQL and Postgress are supported.
If it helps, most of my DB experience is MS SQL Server. I found switching to MySQL straightforward. Only oddity is the different meaning of schema and the MySQL version of SSMS being so much poorer.

Thanks Andrew, I am seeing file lock issues with h2 db, what is the best alternative db ?

04-16 07:30:09 e[1mERROR jdbcjobstore.JobStoreTXe[0m :: MisfireHandler: Error handling misfires: Failed to obtain DB connection from data source ‘db’: java.sql.SQLException: Connections could not be acquired from the underlying database!
org.quartz.JobPersistenceException: Failed to obtain DB connection from data source ‘db’: java.sql.SQLException: Connections could not be acquired from the underlying database! [See nested exception: java.sql.SQLException: Connections could not be acquired from the underlying database!]
at org.quartz.impl.jdbcjobstore.JobStoreSupport.getConnection(
at org.quartz.impl.jdbcjobstore.JobStoreTX.getNonManagedTXConnection(
at org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(
at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(
at org.quartz.impl.jdbcjobstore.JobStoreSupport$
Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
at com.mchange.v2.sql.SqlUtils.toSQLException(
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(
at org.quartz.utils.PoolingConnectionProvider.getConnection(
at org.quartz.utils.DBConnectionManager.getConnection(
at org.quartz.impl.jdbcjobstore.JobStoreSupport.getConnection(
… 4 more
Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(
at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(
at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConnectionInUse(
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(
… 8 more
Caused by: org.h2.jdbc.JdbcSQLException: Database may be already in use: null. Possible solutions: close all other connection(s); use the server mode [90020-197]
at org.h2.message.DbException.getJdbcSQLException(
at org.h2.message.DbException.get(
at org.h2.mvstore.db.MVTableEngine$Store.convertIllegalStateException(
at org.h2.mvstore.db.MVTableEngine$
at org.h2.mvstore.db.MVTableEngine.init(
at org.h2.engine.Database.getPageStore(
at org.h2.engine.Database.openDatabase(
at org.h2.engine.Database.(
at org.h2.engine.Engine.openSession(
at org.h2.engine.Engine.openSession(
at org.h2.engine.Engine.createSessionAndValidate(
at org.h2.engine.Engine.createSession(
at org.h2.engine.Engine.createSession(
at org.h2.engine.SessionRemote.connectEmbeddedOrServer(
at org.h2.jdbc.JdbcConnection.(
at org.h2.jdbc.JdbcConnection.(
at org.h2.Driver.connect(
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(
at com.mchange.v2.resourcepool.BasicResourcePool.access$700(
at com.mchange.v2.resourcepool.BasicResourcePool$
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$
Caused by: java.lang.IllegalStateException: The file is locked: nio:F:/metabase/bin/ [1.4.197/7]
at org.h2.mvstore.DataUtils.newIllegalStateException(
at org.h2.mvstore.MVStore.(
at org.h2.mvstore.MVStore$
at org.h2.mvstore.db.MVTableEngine$
… 23 more
Caused by: java.nio.channels.OverlappingFileLockException
at java.base/
at java.base/
at java.base/
at java.base/java.nio.channels.FileChannel.tryLock(
… 26 more

I don’t think you should get locks - there’s only one application reading from the files. Are you sure you’re not trying to start two instances?

There doesn’t seem to be any reason to choose one of Postgress or MySQL more than the other. I’m more familiar with MySQL, so that’s what I choose.
Up to you really.

Is it okay to run two separate instances on the same computer?

I have the two installations in two different folders.

I don’t think so. Check the documentation.