Help on Migration Scripts [message #435353] |
Tue, 15 December 2009 14:12 |
Ravizzz
Messages: 1 Registered: December 2009 Location: Bangalore
|
Junior Member |
|
|
Hello,
I am new to Oracle, and the task I have with me is to migrate database tables of one version of an application to another.
With the help of few forums and ebooks, I have achieved few basic things, but I am stuck with a strange problem, not very sure on how to go by.
The scenario I have is:-
I have table X, which is having 4 columns in old version of application let's call it as A.1, with 20 rows of data filled in it of which I know the ID using which I can migrate to new table.
In the new version of application, let's call it as 'A.2' which is having same table X is having 5 columns. And it is having the old 20 rows plus 2 new rows added. (Please note addition of new column field.)
If we directly install the A.2 all the rows and columns are present so application will work fine.
Customer using this application is moving from A.1 to A.2.
Customer is having 10 more rows of data filled in X table in A.1 in addition to 20 Rows data we have provided with A.1, of whose we don't have a way to get the ID's..
I have managed to write a script which would migrate the 20 rows provided in A.1, also have added data into the new column which is required as per A.2.
Also here the requirement changes, for one single row in A.1 I need to insert 4 Rows
1) By modifying ID to new ID as well.
2) Adding appropriate data into the new Column.
3)
So my query is
1) How to move the rest of the 10 rows?
2) Problem here is the range of ID that User might have generated is not generic or does not fall into specific range.
3) Please do note that, I should not modify anything w.r.t 20 row data which came with A.1, but I have to modify only data which Customer as added newly after 20 row data in A.1 to suit A.2
4) There is no restriction on what ID I have to use for new 10 rows I have to add, (ideally 10*4 rows, as for each row of A.1 would be inserted with 4 rows with different values of ID and new column value)
5) I am not very sure on how to fetch this Data for insertion at first place here, as there is no common thing that I am sure that customer would have inserted.
Hope I am clear with my queries, Any ideas and help is much appreciated.
|
|
|
Re: Help on Migration Scripts [message #435362 is a reply to message #435353] |
Tue, 15 December 2009 17:22 |
|
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
Go to the URL above click the link "Posting Guidelines"
Go to the section labeled "Practice" & do as directed.
Perhaps I am just having a bad Senior Moment, but I doubt I could identify a valid solution if one were posted.
Along with the prose description, I request that you post actual DDL for the tables involved so everyone has a solid understanding about the requirements.
Most application providers include conversion SQL to allow a smooth migration from 1 version to the next.
So why do you have to produce this for your customer?
|
|
|