Dump of SQL View

Posted by Mark Davies on 31-Oct-2018 08:49

Hi All,

OE11.* 

Is there a way to dump SQL views created in an OpenEdge database? 

I am looking for a way to create the SQL View again, but am missing the original SQL Query I did to create it in the first place. 

Thanks in advance 

Posted by dbeavon on 31-Oct-2018 09:30

The SQL should be included in the output from dumping all schema.  There is a utility. 

https://knowledgebase.progress.com/articles/Article/P111448

Unfortunately we've had problems re-running the output from that utility and recreating an exact copy of the original definitions.  I don't think it was designed with that purpose in mind.   That would only affect you if you were trying to recreate *all* the SQL schema in the entire database.  (all views, permissions, etc)

All Replies

Posted by dbeavon on 31-Oct-2018 09:30

The SQL should be included in the output from dumping all schema.  There is a utility. 

https://knowledgebase.progress.com/articles/Article/P111448

Unfortunately we've had problems re-running the output from that utility and recreating an exact copy of the original definitions.  I don't think it was designed with that purpose in mind.   That would only affect you if you were trying to recreate *all* the SQL schema in the entire database.  (all views, permissions, etc)

Posted by Rob Debbage on 31-Oct-2018 09:30

Hi Mark,

Try the SQLSCHEMA utility from PROENV. For example,

sqlschema -u <username> -a <password> -t <schema>.<view> progress:T:<hostname>:<port>:<databaseName>

It will list the original View definition, so something like:

create view "MYSCHEMA"."SALESREP" (

       "RepName",

       "Region",

       "SalesRep",

       "MonthQuota"

) as

SELECT * FROM PUB . SALESREP WHERE SALESREP = 'BBB'

;

It's also possible to get the definitions by querying SYSPROGRESS.SYSVIEWS.

HTH,

Rob

Posted by Dileep Dasa on 31-Oct-2018 09:31

You can use SQLSCHEMA utility. More information here

Posted by Mark Davies on 31-Oct-2018 09:36

Thanks - will give this a try

This thread is closed