Hey guys, I would like to know, how I could compare two databases with NAV2018, which contain similar and different objects like tables, pages, codeunits and program code. Is there a possibility to extract only the differences?
Imagine, database A contains procedures A, B, C and D in some codeunits. Database B contains also the procedures A, B, C but instead of D, it has E in the codeunits. Now I want to compare them, to get D and E.
Does it make sense to work with something like sqldiff.exe: Database Difference Utility?
@malue19 there is no way to extract the differences/deltas from NAV directly. Assuming both databases are at the same cumulative update release (I find the easiest way to determine this in <= NAV2018 is check the build# in codeunit 1), you can extract all modified objects to a single text file in database A, then extract all modified objects to text file in database B.
Now you have two text objects. one for database A and one for database B. use the Split-NAVApplicationObjectFile cmdlet to split each big file into their individual txt object files (one file per object).
create a local git repository. commit all split files from database A into it. At the latest commit, create a new branch. Copy your files from database B into into your repo folder and commit the changes in the new branch. If you use a decent git GUI, you can easily identify the deltas from there.
Don't know if others have an easier way but that's what I do.
You can also use Compare-NAVApplicationObject on the resulting paths. But this will show only the differences and not context like you would get from a diff as @CanuckNav74's suggested.
Most helpful comment
@malue19 there is no way to extract the differences/deltas from NAV directly. Assuming both databases are at the same cumulative update release (I find the easiest way to determine this in <= NAV2018 is check the build# in codeunit 1), you can extract all modified objects to a single text file in database A, then extract all modified objects to text file in database B.
Now you have two text objects. one for database A and one for database B. use the Split-NAVApplicationObjectFile cmdlet to split each big file into their individual txt object files (one file per object).
create a local git repository. commit all split files from database A into it. At the latest commit, create a new branch. Copy your files from database B into into your repo folder and commit the changes in the new branch. If you use a decent git GUI, you can easily identify the deltas from there.
Don't know if others have an easier way but that's what I do.