8

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.

Community
  • 1
  • 1
mauryat
  • 1,610
  • 5
  • 29
  • 53
  • 2
    Not sure it's quite a duplicate question, but you might want to consider [a sandboxed VM image](http://stackoverflow.com/a/9289802/266304). But surely you have a development environment already where you can try out this sort of thing? – Alex Poole Feb 20 '14 at 18:56
  • @AlexPoole Thanks for the link. The remote database is a production parallel classified as development database. It was created for querying to generate reports so that the production database can handle traffic only from the application. Hence, I'm having to recreate a local development env. – mauryat Feb 20 '14 at 19:04
  • Either it's a development database where you can do development, or it's a live database where you can't. Sounds like it's a reporting DB rather than a dev one. There should still be somewhere where that DB was first developed, and where maintenance and enhancements are developed and tested. I don't understand why you'd need to create a new DB at this point, for a one-off bit of work. But if you do, then I'd use a VM image *8-) – Alex Poole Feb 20 '14 at 19:11
  • @AlexPoole Unfortunately, we don't have the original one where this reporting DB was developed as it has never been touched in years. You are right in that this might be an overkill for a small change. However, I'd like to have it ready for bigger changes that are in the offing. – mauryat Feb 20 '14 at 19:22
  • OK, well if it's going to be a permanent development environment then you probably need to match the Oracle edition and version and platform you have in live and recreate the whole thing, not just a few tables. In that case a VM might not be the right way to go. But as jonearles says, it might be worth taking the pain now and getting it out of the way. (Before you have a high-priority fault to fix and nowhere to develop/test it, for example *8-) – Alex Poole Feb 20 '14 at 19:32

1 Answers1

5

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.

Jon Heller
  • 34,999
  • 6
  • 74
  • 132