SCO Command line: a way to include only Tables and Views

laruslarus Posts: 15
edited January 9, 2017 10:40AM in Schema Compare for Oracle
I'm trying to set a automated deployment of db objects using Schema Compare for Oracle, command line utility SCO.exe. Is there a way to include only tables and views in comparison? I'm trying to deploy using a predefined project:

sco /project:"C:UsersmyuserDocumentsSchema Compare for OracleProjectsmydbcompareproj.ocp" /deploy

I could not find this info from: https://documentation.red-gate.com/disp ... e+switches

Comments

  • Eddie DEddie D Posts: 1,806 Rose Gold 5
    Hi, thank you for your forum post.

    There are two methods on including and excluding objects from the deployment phase. You cannot filter prior to the comparison, as all objects are compared so that the dependencies between the objects are identified. But you can filter the deployment so that any reports you create or objects you wish to deploy can be deployed, leaving the excluded objects excluded from the comparison.

    Method 1
    As per your current choice, is to use the GUI, create and save a project. Then use the command line to call the project file using the /project switch.

    When creating the project, perform the comparison and review the results. At this point, use the filter down the left hand side to deselect the object types you are not interested in so that only tables and views are selected. Next , down the middle of the results is a 'Include in deployment check box', either set the check to select all remaining object in the results or select each table and view individually.

    Run deployment wizard, on step 2 of the wizard, ensure that 'include dependent objects' check box is not check and on step 3, review the deployment script tab to ensure that the objects you will to be deployed are in the script. Now press close and save the project.

    Method 2
    If you have a installation of Source Control for Oracle (SOCO) and created a saved project. SOCO creates a filter file with a .scpf file extension. Yoy can then use this filter file in your Schema Compare command line project.
    You need to use the source and target switches, replacing the /project switch and add the /include and /exclude switches to select the objects you wish to include in the command line task. Also add the /excludedependnencies switch to ensure that the not required dependent objects are not selected in the deployment. Plus the filter:<filterfile.scpf>

    For example:
    sco /source System/pass@TEST{SCHEMA_A} /target System/pass@my.host.com/PROD{SCHEMA_A} /excludedependencies /filter:"C:MyFilter.scpf

    I hope the above helps.

    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • bernyberny Posts: 4 Bronze 1

    You might also want to have a look at this new pre-filtering feature:

    https://documentation.red-gate.com/ddfo/other-resources/using-the-pre-filtering-preview-feature

  • AnaSLAnaSL Posts: 9 Bronze 1
    Hi,

    Is this feature existing for Microsoft SQL? I mean, is it possible to pre-filter some objects in order to make comparison faster?

    Thanks and regards.
Sign In or Register to comment.