DDLGEN
It is used to take the structure of a table or view (along with permissions and index)
This is a Java-based tool that generates definitions for server- and database-level objects in Adaptive Server, has expanded its list of filters to include indexes, triggers, and constraints out of table and database definitions in the DDL of database- as well as table-level objects.
The valid filters are:
-F filters out indexes, triggers, and constraints out of table and database definitions in the DDL of table- and database-level objects. The valid filters are:
- For tables – [ % | I | RI | KC | TR]
- For databases – [ % | SGM | GRP | USR | R | D | UDD | U | V | P | XP | I | RI | KC | TR]
- C – cache
- I – index
- RS – remote server
- DB – database
- KC – primary/unique
- key constraints
- SG – segment
- D – default TR – trigger
- DBD – database device
- L – login
- U – table
- DPD – dump device
- P - stored procedure
- UDD – user-defineddatatype
- EC – execution class
- R – rule USR – user
- EG – engine group
- RI – RI constraints
- V – view
- GRP – user group
- RO – role
- XP – extended storedprocedure
Syntax : ddlgen -Usa -Shostname:port -D database name -TU -N <object name> -o<out file>
Example : %ddlgen -Ulogin1 -Ppswd -Spluto:5001 -Dprod -TU -NA%
To know the version of ddlgen
To check your version of ddlgen, run ddlgen Ðv (NT:ddlgen.bat Ðv).
- The 12.5 GA version of ddlgen will print a single line saying:
% ddlgen -v
Product Release Version: 1.0, for ASE 12.5
- The 12.5.0.1 version of ddlgen prints a more complete version string as well as the standard Sybase copyright notice:
% ddlgen -v
Sybase DDLGen Utility/12.5.0.1/IR Build 1/I/1.2.2/rel125x/Tue Jan 29 12:08:47 2002
[...Sybase Copyright Notice omitted...]
What ddlgen Does Not Do
Despite its usefulness, it is no surprise that ddlgen has some limitations as well:
- ddlgen cannot reverse-engineer compiled objects whose source code has been encrypted with sp_hidetext.
- For logins and roles, ddlgen does not reverse-engineer the passwords (which are stored in an encrypted form).
- ddlgen does not reverse-engineer external logins or remote logins.
- ddlgen does not always take all object dependencies into account. See the next section for more information.
Path in which ddlgen is present
- On Unix, ddlgen is located in $SYBASE/sybcent32
- On Windows, ddlgen.bat is located in %SYBASE%\Sybase
- On Sybase /sybaseinstall/sybase/ASE/bin (example /sybase 12.5.3/ASEP/bin)
No comments:
Post a Comment