Schema Compare/Source Control

Brian.LiebBrian.Lieb Posts: 29 New member
edited January 15, 2015 9:46AM in Schema Compare for Oracle
I am not totally sure where to post this, but I have a question at the Schema Compare for Oracle ( and Source Control for Oracle ( border.

So, the deployment process that I have been using to go from the repository to our production database server is to have the developers commit their changes to an SVN reposority via Source Control for Oracle. Then, they let me know which revision of the database to deploy to production.

I then use TortoiseSVN to Checkout that version of the repository. I then compare that scripts folder with where I would like to deploy that revision using Schema Compare.

However, when I open the scripts folder, I always get the notification:
This scripts folder is in an old format. Upgrade the folder to use it in comparisons.

When I click the Upgrade link, it removes the .svn folder and touches every file in the scripts folder. So, it doesn't change the repository, so the next time I checkout from the repository, I have the same issue.

I am wondering a few things, is there a better practice than how I am doing the deployments from the repository (realizing that I don't always want to pull the head revision from SVN)? Or is there a setting that will ignore the .svn folder so when Schema Compare touches all the script files it will allow me to easily check in the changes?

Finally, it would be a GREAT feature to have the repository be a choice instead of just "Database", "Snapshot", and "Scripts Folder" from the schema compare tool.


  • Yeah this is an issue that we introduced in the latest release, we tried to make use of an existing update mechanism as we modified the enumeration for the database version but it's very brutal and in fact causes issues in your situation.

    The easiest workaround for your situation would be to allow the "upgrade" to happen and then recommit the databaseinformation.xml file into source control, this should contain a new <DatabaseVersionNew> element and the version should have been updated.

    &lt;ScriptsFolderInformation version="3" type="ScriptsFolderInformation"&gt;
    This was needed as we need to know if the database is 11.0 or 11.2 as the COMPRESS clauses changed significantly between the two releases.
    Richard Mitchell
    Project Manager
    Red Gate Software Ltd
  • Brian.LiebBrian.Lieb Posts: 29 New member

    Thanks for the response. I have done this, and things seemed to be working fine for checking out, and then comparing using schema compare.

    To be clear the steps I took were

    - Checked the repository using Tortoise to two places on my harddrive. (repo1, repo2)
    - Used schema compare to 'Update' repo1, which removed the .svn folder and thereby removing the recognition this is an SVN repo from Tortoise
    - Copied the contents of repo1 over the top of repo2, making sure to overwrite the files in repo2.
    - Checked in repo2.
    - Removed all local copies.
    - Used Tortoise to checkout again to a folder called repo
    - Opened Schema compare and used the repo as the source
    VOILA! I don't need to update any more and schema compare works fine.

    However, now, when I try to check in changes via Oracle Source Control, I get this error:

    Error Some objects were out of date. Review the changes and check in again.

    When I click the Report link, Source Control crashes with this:
    System.NullReferenceException: Object reference not set to an instance of an object.
    Smartassembly.SmartExceptionsCore.UnhandledExceptionHandler.ReportException(Exception exception, Boolean, continue, Boolean manuallyReported)

    I can probably destroy the entire repository and start over from the schema, but that is not a palatable option. Is there any suggestion on how to proceed?
  • Brian.LiebBrian.Lieb Posts: 29 New member

    I removed the project from Oracle Source Control, and re-created it and was able to check the project in without an error.

    Unfortunately, this did not fix the problem for all the other users. This is not 'unfixable', but is not very convenient or easy to fix.

    I have seen this error before in other SVN clients, and I was able re-checkout the repo to fix it. It seems like something must be out of synch on the local machine.
  • It could be you've got into a tree-conflict situation where the folders themselves are in conflict even thought they are the same name SVN still thinks they are different. Especially if you deleted all the files/folders from the repo and re-added them.

    Not sure what to suggest from here if that's the situation as the only way to clear out Source Control for Oracles local copies is to remove the project and re-add it.
    Richard Mitchell
    Project Manager
    Red Gate Software Ltd
  • For future releases I've turned off this require upgrade system as it just seems to cause more issues that it's worth currently.

    New scripts folders are created with the new file format and old ones are read without complaint.
    Richard Mitchell
    Project Manager
    Red Gate Software Ltd
Sign In or Register to comment.