Click to See Complete Forum and Search --> : Refreshing Oracle Database


buckey
April 27th, 2007, 11:57 AM
I have recently been charged with the task of refreshing an oracle database. Unfortunatly I am not very experienced with oracle. This poses a rather daunting challenge. Anyway, I will try to get pointed in the right direction by any guru's willing to share their knowledge with me.

The way the refresh procedure was explained to me was that our development environment will be refreshed with our production environment. This is more or less a copy for lack of better terms. (Forgive me as i am a newbie)

So, after this copy takes place there is fresh data in our development environment. However, the catch is that all changes made to the dev environment and not the prod environment will not be in the newly refreshed dev environment. This requires re applying all changes made to the development environment which have not made it to the production environment prior to the refresh.

Here is the problem. I have only half a solution. Here is what i am planning on doing. First, i wrote a program to select all text from dba_source for each package, package body and trigger between the two refresh dates. This seems as though it would, in theory work great.

For the second thing i am having an issue with is finding out what alter statements have been made in that time period. That way, i can make the appropriate changes to my newly created dev environment tables. Is there oracle logs or anything like that i can have my program search through to determine what has been applied to make sure my tables are the same?

at any rate, please give me some ideas on how to get around this issue. Any suggestions are greatly appreciated. Thanks in advance!

i am using oracle 10g.

cjard
April 28th, 2007, 08:13 AM
the only thing you can really do is copy the data, though bear in mind that even that may cause a breakage to code, if you dont copy some data simply because it doesnt exist in live (i.e. its acolumn newly added in dev) and the new code in dev relies on that column not being null.

I dont envy you; i wouldnt like to have to do it..

buckey
May 2nd, 2007, 07:29 AM
What about this? Is there any way i can record the names of the scripts as they are applied to the database with sql plus? Can i make a trigger to insert the text of a script in to a table i create to keep track of this? Please, any suggestions are appreciated. Thanks.

buckey
May 3rd, 2007, 08:09 AM
I think I found somthing that may be possible to help me achive what i am after. That is, capturing the text by means of a schema trigger before/after ddl or create or alter or drop. I think I can get the text from sql_text, however, I am not sure of the v$ view this may be on. I have seen examples of v$_open_cursor and othere similar code snipets, but not sure what direction to go in with this. Please comment on a possible avenue for me to pursue. Thanks in advance!