马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?站点注册 
 
 
 
×
 
Getting the DDL 
The lesson started with showing how you can get the DDL for an object, you can use Sybase Central to do this or you can use the ddlgen Utility. Sybase Central is similar to SSMS, you right click on the object and select the Generate DDL option. The ddlgen utility is a Java based command line tool Syntax looks like this ddlgen         -Ulogin        -Ppassword        -S[server | host_name : port_number]        [-I interfaces_file]        [-Tobject_type]        [-Nobject_name]        [-Ddbname]        [-Xextended_object_type]        [-Ooutput_file]        [-Eerror_file]        [-Lprogress_log_file]        [-Jclient_charset]        -F[ % | SGM | GRP | USR | R | D | UDD | U | V |                 P | XP | I | RI | KC | TR | PC ]Here is what object_type (switch T) can be Object type        Description------------        ------------------C                cacheD                defaultDB                databaseDBD                database deviceDPD                dump deviceEC                execution classEG                engine groupEK                encrypted keysGRP                groupI                indexKC                key constraintsL                loginLK                logical keyP                stored procedureR                ruleRI                referential integrityRO                roleRS                remote serverSGM                segmentTR                triggerU                tableUDD                user-defined datatypeUSR                userV                viewWS                user-defined Web serviceWSC                Web service consumerXP                extended stored procedureHere are two examples. Both of these generate DDL for the primary and unique keys of all the tables in a database that begin with “PK”: ddlgen -Ulogin -Ppassword -TKC -Ndbname.%.%.PK% Or: ddlgen -Ulogin -Ppassword -TKC -N%.%.PK% -Ddbname  
 |