on 01-08-2014 4:07 PM
How do we take an object definition (eg: compiled proc code) into flat file in Sybase IQ 15 . Something similar to "defncopy" in Sybase ASE. defncopy in IQ 15 does not seem to work . Is there any other command line utility to obtain the object definitions from the database
Hi,
Thanks all. Will try the options mentioned here and get back with results . We need it to be done through the unix command utilities of sybase as using sybase control and power designer is not an option for us .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I developed a set of stored procedures that allow to retrieve DDL statements of various IQ objects, including stored procedures. The stored procedures can be downloaded and used for free, see http://www.gvirtz-consulting.com/downloads.
Hope it helps
Leonid Gvirtz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you want only the stored procedures, then the following code will generate one file per procedure in /tmp:
select proc_name, proc_defn into #zzz from sp_iqprocedure();
set temporary option temp_extract_name1='procs.txt';
set temporary option temp_extract_directory='/tmp';
select proc_name, trim(proc_name)+'.txt' from #zzz;
select bfile('/tmp/'+trim(proc_name)+'.sql', proc_defn) from #zzz;
Cheers,
Dan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you could Use SAP Powerdesigner to reverseengenieer the db into a model and then create the scripts for a new target Db, if this is a onetime-job get a trial Version of PD16.5
regards
DJ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use Sybase Central 6.x -> choose 'Contents' tab -> double click 'Procedures & Functions' folder -> point to your desired procedure name -> right click mouse and choose 'Copy' ,
then open a notepad and choose 'Paste' to put create procedure DDL into notepad !!
this is a alternative way to retrieve creating object DDL in Sybase IQ 12.7 and above !!
Hope this will help !!
Thanks !!
Regards,
Robert Chu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.