cancel
Showing results for 
Search instead for 
Did you mean: 

ddlgen for Functions

Former Member
0 Kudos

Hi, I need to generate ddl for functions but looks that ddlgen support them partially.

If I run

ddlgen -TDB -N<db name> ...

this generate all objects of the db <db name> and functions with grants as well.

but...

if I want to generate only functions looks from docs it is not possible, the parameter -T does not allow the value 'SF' (as 'type' in sysobjects for functions) or any suitable value for functions.

I would like to know if ddlgen can generate ddl only for functions.

I already found a workaround, my question is about ddlgen.

Just as additional information here is the workaround:

sp_showtext <function name>

or better

sp_showtext @objectname='<function name>', @printops='ddlgen'

but this does not generates grants

For grants I build a query joining sysobjects and sysprotects getting user with 'exec' permission on function.

All managed inside a shell script.

Working with ASE 15.0.3

Former Member
0 Kudos

I tested and it worked fine against my 27 Tsql functions.

I think the manul is not very clear about ddlgen.

As additional info I use ddlgen of 15.7 against a 15.0.3 server. I am migrating from 15.0.3 to 15.7 so I can use more recent version of ddlgen.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

kevin_sherlock
Contributor
0 Kudos

I suspect that was a bug in 15.0.3.  Unfortunately, early versions of ddlgen were very much quite unreliable.