|Database||JDBC Driver||Freeslick Profile||Build status|
|SQLServer 2008, 2012, 2014||jtds:1.2.8||freeslick.MSSQLServerProfile|
|SQLServer 2008, 2012, 2014||msjdbc:4.2||freeslick.MSJDBCSQLServerProfile|
Available on maven central
Free software continuation of the Slick MS-SQL driver, with a full suite of integration tests against actual MS-SQL (2008) instances. We did have tests running against 2000 and 2005, but it's hard to find CI environments to test against and they are quite old. Let us know if you need a driver maintained for those versions.
We have now added Oracle and DB2 profiles as well. These have been written from scratch.
If there is some driver/database combination you are looking for, that isn't covered yet. Let us know.
As is normal in Slick, import the "driver" (really these are profiles)
explicitly in order to get access to the
The Oracle profile is at freeslick.OracleProfile
and don't forget to pass your actual JDBC driver when creating a connection, e.g.
val db = Database.forURL(url, driver = "net.sourceforge.jtds.jdbc.Driver")
The artefact is published as:
"org.suecarter" %% "freeslick" % "184.108.40.206"
We are using AppVeyor to automate MSSQLServer tests. (https://ci.appveyor.com/project/smootoo/freeslick)
To run the tests locally on a docker image, follow the instructions on the Wiki.
Travis and docker drive the Oracle and DB2 tests. You can fire up the Oracle or DB2 docker images to test locally. Check the .travis.yml file.
We leverage the excellent Slick integration tests to validate our drivers and add some of our own to test specific driver functionality.
In version 2.0 of Slick, Typesafe removed support for their trivial MS-SQL driver, closed the source and started to charge for it. BSD and Apache OSS licenses allow such moves: this incident serves as a good reason for you to prefer a Copyleft license (e.g. LGPL) that cannot be closed in your next Free Software project.
Anybody who works in a corporate environment knows the challenges involved in getting approval to buy any form of license - no matter the cost - so this strategic move from Typesafe is not only concerning, but frustrating for anybody using a Scala stack.
This project offers community-maintained support for MS-SQL and is willing to take contributions for other proprietary databases. Although, bizarrely, the MS Access driver has remained part of Slick releases.
You can contribute by clicking the star button and using this software! Tweet about it if you find it useful.
Contributors are encouraged to fork this repository and issue pull requests. It's such a simple project that if you have a bug, you'll probably be able to fix it yourself.
Getting the dependencies right
If you want to contribute to the freeslick project, you first must install some dependencies before you can run the tests. This ascii cast shows how to do this.
- First you must have docker running. For Windows and Mac, use boot2docker or docker-machine for Mac or Windows. For Linux use the packet manager of your distribution
- Install the official docker image for DB2
docker run -d -p 50000:50000 --name db2freeslick -e DB2INST1_PASSWORD=db2inst1-pwd -e LICENSE=accept ibmcom/db2express-c:latest "db2start"
- Copy the needed driver file out of that image
docker cp db2freeslick:/home/db2inst1/sqllib/java/db2jcc4.jar ....
- ... and install it in the Maven cache on your local machine
mvn install:install-file -DgroupId=com.ibm -DartifactId=db2jcc4 -Dversion=4.19.26 -Dpackaging=jar -Dfile=./db2jcc4.jar
- Please download the Oracle JDBC driver manually from Oracle. Fetch the file called "ojdbc7.jar" (3,397,734 bytes, SHA1 Checksum: a2348e4944956fac05235f7cd5d30bf872afb157)`. You will need to create a free Oracle account for this.
- Copy the file from your download directory
cp ~/Downloads/ojdbc7.jar ./ojdbc7-220.127.116.11.jarand
install it in the Maven cache on your local machine mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc7 -Dversion=18.104.22.168 -Dpackaging=jar -Dfile=./ojdbc7-22.214.171.124.jar
sbt test should run without errors.
Please note that
sbt test will load the JDBC drivers, but not run the tests against the proprietary databases. It will use an in-memory H2 database. It will only test if you have all the dependencies right and are ready to run. To run the tests against the real databases, run
For detailed instructions, please see the following screen cast