|
Sybernet / Supplied Procedures Reference
Release 3.00 Jul 10, 2008 |
|
SP_HTML_CVS implements CVS for Oracle objects. With it you can synchronize objects between two databases, compare objects, retrieve objects, and create archives.
Storing source files in a CVS repository is considered dangerous because you never know for sure if the CVS repository really contains the most current revision of this object. There is, however, no doubt that your Oracle database always contains the most current revision because that is the version that actually exists in your database. Sybernet CVS operates on real objects in your database.
Developers are allowed to do anything they want in your development database. When ready for production, the developer creates a project. A project contains the various objects (such as tables, views, and stored procedures) that are to be copied from the development database to your production database. This simplfied scenario isn't real world because you probably go through one or more stages of user testing and quality assurance before you actually move something from development to production.
Sybernet CVS requires one of the following two roles:
| Role | Description |
|---|---|
CVS_USER |
A cvs user can create projects, retrieve source code, inspect the archive directory, and compare objects. |
CVS_ADMINISTRATOR |
A cvs administrator can do anything that a cvs user can do. A cvs administrator can also copy projects between two databases or restore an object from the Sybernet CVS repository. |
Use the following commands to compare, archive, and synchronize objects between two databases.
| Command | Description |
|---|---|
Project Synchronize |
This command allows you to create and synchronize projects.
Projects consist of one or more objects that are to be copied between two databases.
|
Retrieve Source |
This command allows you to retrieve the current source from a database. |
Compare Source |
This command allows you to compare the source of two objects between two databases and / or between two schemas. |
Archive Schema |
This command allows you archive all objects in a particular schema and database. |
Archive History |
This command allows you to retrieve or restore a prior revision of this object. |
Synchronize History |
This command allows you view a history of all objects that have been synchronized. |
This command allows you to create and synchronize projects. To create a project the first thing you want to do is drill down in the destination (right) window to specify the instance (database) and schema (owner). Then use the the source (left) window to specify the instance, schema, object type, and name that is to be copied to this project. Although you can specify multiple sources (instance and schema), all objects must copy to a single instance and schema. When you are done, click Save Project and give it a name. If you are a cvs administrator you can synchronize this project without saving it or giving it a name.
Clicking a folder type from the source window will copy all objects of that type to your project. Clicking a folder type from the destination window will delete all objects of that type from your project. Clicking an object name from the source window adds that to your project. Clicking an object name from the destination window deletes that name from your project. Note that a mouseOver on the destination name will reveal the complete name from the source window.
Anyone can create a project. Anyone can open a project (even if it doesn't belong to you). Only a cvs administrator can "Synchronize" a project. Although you can open and (possibly) edit anyone's project, you can only save this project under your username. That is, if I opened one of your projects, deleted an object (perhaps a table), and saved that project, I would now have a project under the HTTP schema. Even cvs administrators cannot overwrite someone else's project.
Project Synchronize recognizes the following commands:
| Button | Description |
|---|---|
Synchronize |
This command synchronizes a project. Before the synch takes place some objects may be deleted from your project because they already exist on the destination server. This includes tables, roles, and sequences. Your DBA will have to drop these objects before they can be synched. If you are trying to synchronize objects of different types (a function that used to be a procedure, for example), these too will have to be dropped. Note that appropriate alerts are displayed whenever you open such a project or synchronize such a project. |
Save Project |
This command allows you to save a project. Projects are always saved under your username which means you are not allowed to edit someone else's project. |
Open Project |
This command allows you to open a project. |
Drop Project |
This command allows you to drop a project. |
Compare Project |
This command generates a compare report between all objects in your project. This report will summarize whether the two objects are the Same, Different, or Absent (from the destination). If different, you can click the Different link to see a detail description of these differences. |
Clone Project |
Typicially, projects are not copied from development to production. Instead projects are copied from development to user testing or quality assurance. The latter could take several weeks or months. When approved for production you don't want to copy these objects from development because there is no guarantee that the objects in development are the same as user testing. What you want to do is copy these objects from the latter. The Clone Project button makes this an easy task because you clone the objects that you copied from development, but uses the destination server as the source server while it also allows you to specify a new destination server and project name. |
Exclude Same |
This command excludes all objects that are the same between the source and destination database. A cvs user might do this because they just want to see the differences between the source and destination database. A cvs administrator would do this to eliminate the synchronization of objects that are identical. |
Use the Preferences button on the menubar to specify your preferences for this session. This dialog box is also presented whenever you click Synchronize or Save Project.
| Preference | Description |
|---|---|
Project |
Used to specify the name of your project. This field is read-only if you are not saving a project. |
MailTo |
A comma separated list of e-mails that are to receive notification of this synch. |
TableSpace |
The tablespace to store tables. |
IndexSpace |
The tablespace to store indexes. |
Permissions |
Determines if you want to copy the permissions on this object. |
Register |
Determines if you want to copy the Sybernet Register for this object. |
DDL |
Determines if you want to create the DDL for this object. This is TRUE by default. You might want to set it to FALSE when copying a table and you do not want to recreate that table, but you do want to insert its contents. |
CSV |
Determines if you want to copy the contents of this table. |