Discussion:
PowerDesigner generate database scripts are impossible to run
(too old to reply)
rolfhsp
2011-03-14 13:20:05 UTC
Permalink
From a physical data model, when choosing "Generate database" or
"Apply Model changes to database", and deselecting the option for "one
file only", PD generates a set of files, one main sql file (default
named "_all.sql") and several other files for the table definitions.
In the _all.sql, the other files are referenced by "isql -i
<filename>".

But how can I run this _all.sql file?
If I try to run it by using "isql -Sxxx -Dxxx -Uxxx -Pxxx -i _all.sql"
then it fails when it comes to the isql commands.
Apparently you cannot run an isql command inside an isql session...?

How am I supposed to run the upgrade if I don't want to run it
straight away from PD itself?

Kind regards,
Rolf Pedersen
DBGuy
2011-03-29 17:48:30 UTC
Permalink
Post by rolfhsp
From a physical data model, when choosing "Generate database" or
"Apply Model changes to database", and deselecting the option for "one
file only", PD generates a set of files, one main sql file (default
named "_all.sql") and several other files for the table definitions.
In the  _all.sql, the other files are referenced by "isql -i
<filename>".
But how can I run this _all.sql file?
If I try to run it by using "isql -Sxxx -Dxxx -Uxxx -Pxxx -i _all.sql"
then it fails when it comes to the isql commands.
Apparently you cannot run an isql command inside an isql session...?
How am I supposed to run the upgrade if I don't want to run it
straight away from PD itself?
Kind regards,
Rolf Pedersen
I too have fought this issue. What I end up doing is just commenting
the isql commands out or deleting them from the _all.sql file. The
isql commands do provide one important bit of information. They tell
you the order in which to run the SQL files. Not a big deal when you
have just a few files, but when you hit more than about 20, it makes a
difference.

Tim
Mark Brady
2011-05-18 20:56:00 UTC
Permalink
Post by rolfhsp
From a physical data model, when choosing "Generate database" or
"Apply Model changes to database", and deselecting the option for "one
file only", PD generates a set of files, one main sql file (default
named "_all.sql") and several other files for the table definitions.
In the  _all.sql, the other files are referenced by "isql -i
<filename>".
But how can I run this _all.sql file?
If I try to run it by using "isql -Sxxx -Dxxx -Uxxx -Pxxx -i _all.sql"
then it fails when it comes to the isql commands.
Apparently you cannot run an isql command inside an isql session...?
How am I supposed to run the upgrade if I don't want to run it
straight away from PD itself?
Kind regards,
Rolf Pedersen
I too have fought this issue.  What I end up doing is just commenting
the isql commands out or deleting them from the _all.sql file.  The
isql commands do provide one important bit of information.  They tell
you the order in which to run the SQL files.  Not a big deal when you
have just a few files, but when you hit more than about 20, it makes a
difference.
Tim
My summary of the question is:

When I uncheck the do-it-the-easy-way checkbox, it's a lot harder.
What should I do?

That's not meant to be mean-spirited or anything like that, just
trying to understand.

I've never unchecked the 'one-file' box. I always generate one file
and run it. Works every time. So I'm missing why you'd uncheck it.
Obviously I'm missing some value to having lots of files. I also work
in Oracle and maybe that's part of it too.

Loading...