amerar (AT) iwc (DOT) net schrieb:
Quote:
Hi All,
I need to create a script that can be run on different databases to
create some objects. Problem is, the databases have different layouts,
ie: the tablespaces are different.
Can I use the CASE statement to select a tablespace name from
dba_tablespaces, and if the tablespace exists, create the objects in
that tablespace, else create them in another?
So, the CASE statement would also have DDL statements..........
If I cannot do it this way, I'm open to other suggestions.
Thank you in advance.
You could do a little pl/sql procedure that expects a rudimentary ddl statement,
|
completes it with the tablespace information and executes it.
Your install script first installs the procedure and then calls it with the ddl.
Lots of Greetings!
Volker