Background: For the past few days weeks, I have been working on a way to export selective data from one schema to import into another. Now the problem is that “selective” data refers to the data as stored across various tables in the custom application that I’ve been working on, with elaborate relational links between the tables ( if you’re curious, the table count on the related data was about 65) - so it was not just couple of tables that I had to export.
I’ve been facing this really annoying problem for quite some time now. My job revolves around developing apps using Oracle Forms Builder. Oracle Forms applications, uses Java applets to run inside any browser, on most platforms. Here’s the kink - Oracle Forms applications by default uses Oracle’s jInitiator which is a JVM made by Oracle and allows a web enabled Oracle Forms client application to be run inside a web browser.
Couple of days ago at work I was asked to create a new environment(schema, user) for specific application testing conditions. While that was no big deal, I was also asked to import all the data from existing production environment into a new environment - and I was in a bit of bother here - generally the whole importing/exporting is done by DBA’s not developers. While I knew the usage of exp and imp commands, creating schema would require stuff like tablespace creating, adding data files and more importantly - grants which I had NO clue on.
Over the period of time that I’ve been working on PL/SQL, the one the thing that we end up doing often is reset the sequences we use for Primary keys in our tables. Why do we do that, you might wonder. Consider this case: You enter some values via the front end. Assume that there are *a lot* of fields to be entered. You save them. The .nextval will pick up the next number in the sequence and goes into your table as the primary key.