bcp modes  sp_sproc_columns

Release Bulletin Adaptive Server® Enterprise Version 12.5.2 for Silicon Graphics IRIX

ddlgen

ddlgen, the 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:

The filter options are:

Filter option

Filters out:

%

Everything, and retrieves the schema-only definition of a database or table.

SGM

Segments

GRP

Groups

USR

Users

R

Rules

D

Defaults

UDD

Uer-defined datatypes

U

User tables

V

Views

P

Stored procedures

XP

Extended stored procedures

I

Indexes

RI

Referential integrity constraints

KC

Primary- and unique-key constraints

TR

Triggers

Examples

Example 1

Generates DDL for the authors table in the pubs2 database, filtering for all indexes (I), and referential integrity constraints (RI), primary and unique key constraints (KC), and triggers (TR) from the DDL of a table:

ddlgen -Uroy -Proy123 -TU -Nauthors -Dpubs2 -F%

Alternatively, you can specify each of the filters individually:

ddlgen -Ulogin -Ppassword -TU -Ndbname.owner.table
    -FI,RI,KC,TR

NoteWhen you use the -F parameter to filter a table, then indexes, referential integrity, key constraints and triggers automatically get filtered, as they are a subset of table object.

The following generates the definition of table_name while filtering out foreign keys and primary-unique keys:

ddlgen -Ulogin -Ppassword -TU -Ntable_name -Ddbname 
    -FRI,KC

Both of these generate foreign keys for a specified user in the entire database:

ddlgen -Ulogin -Ppassword -TRI -N%.%.% -Ddbname

Or:

ddlgen -Ulogin -Ppassword -TRI -Ndbname%.%.%

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

NoteAlthough you can normally generate all indexes only for a table, the -T object type parameter with the RI and KC value allows you to generate foreign keys as well as primary and unique keys for an entire database.

The following generates schema-only definition of a database:

ddlgen -Ulogin -Ppassword -Sserver:port -TDB -Ndbname -F%

Alternatively, you can specify each of the filters individually:

ddlgen -Ulogin -Ppassword -Sserver:port -TDB -Ndbname 
    -FSGM,GRP,USR,R,D,UDD,V,P,XP,I,RI,KC,TR

The following generates the database DDL skipping the compiled object:

ddlgen -Ulogin -Ppassword -Sserver:port -TDB -Ndbname -FTR,D,XP,V,R

The following generates database definition without a table definition:

ddlgen -Ulogin -Ppassword -Sserver:port -TDB -Ndbname 
    -FU

ddlgen update

Servers The existing description of the -S parameter in ddlgen is:

The updated description is as follows:

Interfaces files -I – specifies the interfaces file name, and corresponds to $SYBASE/interfaces for UNIX, and %SYBASE%\ini\sql.ini for Windows. Use this optional parameter with -S.

Indexes You can now run the ddlgen utility for all indexes of all tables in a database in the following command:

ddlgen -Ulogin -Ppassword -Sserver:port -TI 
    -Ndbname.%.%.%

For example, this generates DDL for all indexes for all tables in the pubs2 database:

ddlgen -Usa -P -SHARBOR:1955 -TI -Npubs2.%.%.%




Copyright © 2004. Sybase Inc. All rights reserved. sp_sproc_columns

View this release bulletin as PDF