| Code comparison [message #556044] |
Wed, 30 May 2012 13:52  |
pointers
Messages: 324 Registered: May 2008
|
Senior Member |
|
|
Hi,
I have to compare my SVN source code (packages, views etc) with the production code in the database like views etc (actually we are not sure that what we have in the svn is the final version of production code, we have objects created in the production database, but we dont have latest scripts for that. we have to deploy the svn code in the unix box).
So here the comparison is between the OS files and the database objects.
I thought I would get scripts of all the packages, views etc from the production database by using DBMS_METADATA or some utility
and save the code in OS files then compare one svn file with OS file manually by using some comparison tools e.g toad provide one comparison tool.
Could you please advice if my approach is correct, if not please suggest best approach.
Thank you very much in advance.
Regards,
Pointers
|
|
|
|
|
|
| Re: Code comparison [message #556046 is a reply to message #556045] |
Wed, 30 May 2012 14:09   |
pointers
Messages: 324 Registered: May 2008
|
Senior Member |
|
|
@Blackswan:
Quote:>we have to deploy the svn code in the unix box).
What does this mean?
As part of the release we copy all the source code of database from SVN to UNIX solaris directory and we run release script which will run all the source code.
Quote:>I have to compare my SVN source code (packages, views etc) with the production code in the database
what is OS name & version of Production DB Server?
Its UNIX solaris, I am not sure about version at this moment as I am not at office, our DB server is Oracle 10.2.0.3
Quote:Why don't you simply replace the code in SVN with what exists from Production DB?
The problem is there are too many objects to do that, its not straight forward, moreover we dont have readily available source code of production code, for that we need to write sql scripts to get the production code. By the way, we will replace svn code from the production code if both are not same may be at file level, before that we have to compare, thats where the actual question raised.
Regards,
Pointers
|
|
|
|
| Re: Code comparison [message #556048 is a reply to message #556046] |
Wed, 30 May 2012 14:20   |
 |
BlackSwan
Messages: 20086 Registered: January 2009
|
Senior Member |
|
|
>The problem is there are too many objects to do that,
regardless of the actual number of objects that exist,
*ALL* must reside in SVN
>its not straight forward,
yes, it is straight forward
>moreover we dont have readily available source code of production code,
>for that we need to write sql scripts to get the production code.
so, somebody needs to start writing code to extract source from the DB
>By the way, we will replace svn code from the production code
>if both are not same may be at file level,
>before that we have to compare, thats where the actual question raised.
I contend that doing the compare is as waste of time & CPU cycles.
The process will be simpler without any compare & doing blind replacement.
the *NIX utility "diff" compares two text files & reports any differences.
|
|
|
|
|
|
|
|