Schema Compare for Oracle - 3.0
Working with scripts folders - Schema Compare for Oracle
Note: You can use scripts folders only if you are using Schema Compare version 3.0 or later.
A scripts folder contains a set of object creation scripts representing a database's schema(s). A script file, containing a creation script, is created for each object in the schema. Objects are organized by schema, then object type; for example, widget_test\tables.
You can use scripts folders to:
- Compare databases on unconnected Oracle databases
- Source-control databases (for example, to source-control the script files so you can track new or modified objects)
You can use scripts folders as the source or target for comparison and deployment, as you would databases and snapshots.
For more information about using scripts folders in source control, see Continuous integration for databases using Red Gate SQL tools (pdf).
Creating a scripts folder
You can create a scripts folder by using the deployment wizard.
To do this:
- On the toolbar, click
New Project.A new Project Configuration dialog box is displayed:

- On the left-hand side, under Source, select the database and schema you want to create the scripts folder from.
For more information, see Setting data sources.
- On the right-hand side, under Target, select Scripts folder.
- In the right-hand pane, specify an empty folder you want to use as a scripts folder.
- Click
.The comparison wizard runs, and displays the comparison results:

- Select the schema objects you want to include in the scripts folder.
- On the toolbar, click
Deployment Wizard.The deployment wizard is displayed:

- On the left-hand side, make sure "Write scripts to folder" is selected, and click Next.

- Review the objects you have selected to deploy, and click Update Scripts.
The deployment wizard runs and populates the target folder with creation scripts.
Creating scripts folders from snapshots or other scripts folders
You can create scripts folders from snapshots or other scripts folders by selecting a snapshot or scripts folder as the source, as shown in this example:

Deploying from a scripts folder to a database
You can deploy from scripts folders to live databases by selecting the scripts folder as the source and the database as the target, as shown in this example:

Source-controlling databases with scripts folders
You can use scripts folders to source-control your database schemas.
To do this:
- Create a scripts folder from the database you want to source-control.
- Commit the scripts folder to your source-control system. For information on how to do this, see your source control system's documentation.
To commit a new version of your database schema to source control, repeat both steps.
Reverting to an earlier database version
You can revert to an earlier version of your database by deploying from an earlier version of your scripts folder using source control.
To do this:
- Revert to an earlier version of your scripts folder using your source control system. For information on how to do this, see your source control system's documentation.
- Deploy from the scripts folder to the database by selecting the scripts folder as the source and the database as the target:

After running the deployment wizard, the database is updated from the source-controlled scripts folder.
For an example of source-controlling a database using Subversion, see Example: source-controlling a database using scripts folders.
Was this article helpful?
Schema Compare for Oracle
all SQL products
- Compatibility of Red Gate tools in 64-bit environments
- Application has encountered an error and needs to close
- Error message after installing SQL Toolbelt - The description for Event ID ( 1 ) in Source ( nview_info ) cannot be found.
- Changing the temporary directory used by the installer
- Toolbelt Installer "hanging" while "scanning volumes"
- Login failing with "trusted SQL Server connection" error when using RunAs
all products
- Some Red Gate products identified as containing a trojan by Anti-Virus software
- Activation may fail with Unknown Error -1
- Product uses web help although a CHM file is available locally
- Argument exception resulting from missing environment variable
- Check for updates may fail when used through proxies
- 'Unidentified Publisher' error when repairing or uninstalling
- Licensing activates product as standard edition
- Moving Red Gate software products to another machine
- Red Gate tools log locations
- The application UI opening slowly when there is no internet access
Schema Compare for Oracle
all SQL products
all products
- Red Gate product acknowledgements
- Activating your products
- Activating your products
- Red Gate bundle history
- Check for updates
- Troubleshooting Check for Updates errors
- Current versions
- Deactivating your products
- Installing Red Gate products from the .msi file
- Requesting additional activations
- Serial numbers for bundles
- Reactivating using a different serial number
- Extending your trial
- Finding your serial numbers
- Moving a serial number from one computer to another
- No response received for manual activation
- Licensing and activation resources
- Licensing and activation resources
- Troubleshooting licensing and activation errors
- Licensing and activation FAQs
- Red Gate tools log file locations
- Download old versions of products
- Download product prerequisites & utilities
- Support & upgrades
- Upgrading your software
- Upgrading FAQs

Using Schema Compare for Oracle