× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Let me explain first:

Around 3 years ago I wrote an application with new tables. All these tables
are created with DDL, Identity Columns are used in all tables. Primary Key
Constraints are created over these identity columns. Referential integrities
are defined (based on these identity columns). Additional triggers are
added. All to keep data consistent. Additionally a bulk of views was created
to move as much business logic into data base as possible. Most of these
views join the newly created tables with existing ones (mostly) within the
same schema but also with tables in other schemas.

Yesterday my manager came up: the tables (and dependent objects) for this
application must be moved into a different schema.
Unfortunately both schemas contain a lot of other objects, so save the
library and restore it with a different name is not possible.
... and unfortunately the second schema is also in the library list but
AFTER the first one where my tables are located currently.

What's the easiest way to get those tables moved?

What I've done so far is to generate an SQL script containing all the
creation statements for my tables and dependent objects, in the sequence I
need to create the objects (Tables first with identity columns GENERATE BY
DEFAULT without constraints and triggers, then copy data, change identity
columns back to GENERATE ALWAYS and RESTART WITH the next Id, then creating
all constraints, views, indexes). I' currently testing whether all objects
will be generated and copied correctly.
... and finally I'll rename all existing objects before deleting them after
having tested it.

Is there a better way?

BTW according to my manager this morning:
1. "It is normal to move productive data from one schema to another one"
(may be for test issues OK, but NOT productive data!)
2. "There are thousands of applications outside that work well without
Identities, Referential Integrities, triggers and commitment control."
"Why are you so arrogant to think you know it better!"
Also (according to my manager): "Those techniques are useless especially
because error messages are sent, that an user cannot understand."

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.