2

For MySQL, the MXJ connector makes it very easy to launch a managed MySQL instance.

I know that Oracle provides Oracle XE for quick setup, but I've only found an RPM distribution that needs to be installed. Is there a neatly packaged jar that I can just drop in the classpath and start up by calling a specific JDBC url, a la HSQLDB or MXJ?

I'm interested in having developers use this locally for running tests, as well as on our continuous integration server.

Community
  • 1
  • 1
oksayt
  • 4,333
  • 1
  • 22
  • 41

2 Answers2

3

The short answer is No. Oracle is a big meaty chunk of database. Amongst other things, it generally expects itself to be run by its own special user rather than the client user.

For simplicity, your best bet is a separate DB server with each of your developers having their own username/password (and hence their own independent schema) in the database.

Gary Myers
  • 34,963
  • 3
  • 49
  • 74
  • 2
    That's discouraging, as is the fact that the oracle-xe launcher script is exactly 666 lines long.. Thanks though! I'll give a shot to see how far I can get in starting up oracle without "installing" it. – oksayt Jun 29 '11 at 06:10
1

Although Oracle does not provide an embedded database, spinning up a local Docker container running Oracle XE might be an ideal way to accommodate Oracle-specific local integration tests. Since Docker containers are ephemeral in nature by design, the database could also be completely torn down as desired providing clean sandboxing.

The alexeiled/docker-oracle-xe-11g image on DockerHub I found has particularly clear setup and documentation instructions: https://hub.docker.com/r/alexeiled/docker-oracle-xe-11g/

After spinning up the Docker container, be sure to:

As the documentation describes, the docker run command can also be designed to automatically run SQL scripts on the container's startup, which could also be very valuable in the CI/integration testing workflow.

Hope this helps!

NaanProphet
  • 340
  • 1
  • 3
  • 7