Reputation: 1646
Is there a quick way to create a local test Oracle database? I need to modify a stored procedure in a remote database. However, I'd ideally like to test it possibly by cloning the remote database locally.
I don't need the same set of data, possibly just a very small subset and only a few tables if possible. I've read about Oracle XE and others, but not sure if there's a quick and easy way of doing it.
Upvotes: 10
Views: 10070
Reputation: 1206
There are Docker containers out there, that you can run on your local development machine, for example banglamon's Oracle 19c container.
You can start it with
docker run --restart=always -itd --name oracle19c -p 1521:1521 -e ORACLE_SID=XE -e ORACLE_PDB=PDB -e ORACLE_PWD=YourPassword banglamon/oracle193db:19.3.0-ee
Once it is running (takes some time to warm up), you can connect as user sys
in role sysdba
with YourPassword
and setup the users (=Schemas) you need.
This also runs on Docker for Windows.
Upvotes: 2
Reputation: 36798
No, there is no quick way to create an Oracle database the first time.
There are many technologies that can help to rapidly rebuild a database: virtual machines, data pump over network links, transportable tablespaces, response files, 12c container databases(?), or just some plain old SQL*Plus scripts.
But all of those methods will be painful to setup the first time. Installing Oracle is difficult because it's a complicated product and there is little demand for those types of solutions. Most Oracle professionals do not value the ability to rebuild a database in a few minutes.
Personally I think local development and testing is far superior than developing on a server. So don't give up. The first time will be a pain, but it will pay off in the long run.
Upvotes: 7