How can I export ddl of all objects like table, index, etc. In SYBASE IQ / SYBASE ASE without using any tools?

I created a sample program in which I want to get ddl of all objects, such as table, trigger, etc., using the get_ddl method. When I tried to execute queries in oracle, it worked.

SELECT DBMS_METADATA.GET_DDL('TABLE', TABLE_NAME) FROM USER_TABLES;
SELECT DBMS_METADATA.GET_DDL('TRIGGER', TRIGGER_NAME) FROM USER_TRIGGERS;
SELECT DBMS_METADATA.GET_DDL('VIEW', VIEW_NAME) FROM USER_VIEWS;
SELECT DBMS_METADATA.GET_DDL('FUNCTION', OBJECT_NAME) FROM USER_PROCEDURES WHERE OBJECT_TYPE = 'FUNCTION';
SELECT DBMS_METADATA.GET_DDL('PROCEDURE', OBJECT_NAME) FROM USER_PROCEDURES WHERE OBJECT_TYPE = 'PROCEDURE';
SELECT DBMS_METADATA.GET_DDL('INDEX', INDEX_NAME) FROM USER_INDEXES ;

But when I try to create the same sample for sybase to get ddl or script of all objects, it does not work. Because get_ddl is not supported in the sybase database. Can someone help me find out if sybase Iq 15 supports get_ddl methods or is there any other method / method or requests for creating ddl / script of all objects.

I want to post it on SAP forums, but all sites are not available. Someone can offer me a link to post my problem.

Thanks at Advance !!

+4
source share
2 answers

ddl for triggers, stored procedures, and views can be extracted from sys.syssource. Unfortunately, IQ does not store ddl for other objects.

0
source

For ase,

Use sybsystemprocs Go

sp_helptext (object) Go

For views, stored procedures, and triggers

0
source

Source: https://habr.com/ru/post/1619817/


All Articles