Comparing Objects | KEVIN RESCHENBERG 11-08-2004 |
When you create a new object, Application Designer automatically
flags the object for copying. When you then select Tools | Upgrade | Copy,
the object is copied. This can give us a false sense of security
and we might at times forget the importance of doing a compare before
copying.
App Designer gives us the flexibility of determining which objects contained
in a project should be copied. The compare (Tools | Upgrade | Compare and Report)
gives sort of a recommendation or "educated guess". Before the compare is run,
App Designer has no idea whether an object even exists in the target environment.
This may seem obvious to you, but do you rely on other people to migrate projects?
It is common to have a DBA or migration coordinator perform the migrations to certain
environments, such as a user acceptance test environment or production. Does this
person run a compare, or are you expected to set the "upgrade" (copy) flags in
the project yourself? Be sure that you and the DBA both understand the procedure.
If the DBA does a compare each time (which I think is the best way), you still
might need to monitor one situation. An object that is in your project and exists
in the target database but not the source database is marked for deletion.
However, App Designer is afraid to take the final step and actually delete the
object without confirmation. Look under the Upgrade tab after a compare. Objects
marked "delete" will have the "upgrade" box unchecked. You must check this box
to perform the delete. I like to remind the DBA to do this when there are
objects to be deleted.
Comparing projects is just as important during development. Not only does this
ensure that all objects will be copied, but it also simulates what will happen
during migrations to other environments. Remember to clear your local cache
frequently (say, at least once a week) and before any major compares (such as
while applying large "bundle" projects). Also remember to remind your DBA of
this, or migrations to production could be impacted.
Although I recommend always doing compares, I know that this entire subject can be
confusing. I'd appreciate hearing about any pitfalls or special situations you
may know about.
|