|DEFNCOPY(FreeTDS)||FreeTDS (freetds reference manual)||DEFNCOPY(FreeTDS)|
defncopyis a utility program distributed with FreeTDS. It replaces a similar program of the same name distributed by Sybase.
defncopy reads the text of a stored
procedure or view, and writes a script suitable for recreating the procedure
or view. For tables, it reads the output of sp_help and constructs a
CREATE TABLE’ statement, complete
owner is optional if you or the database owner is the
owner of the procedure/view being copied. object_name
is the name of the system object you wish to extract.
- database server login name.
- database server password.
- database server to which to connect.
- database to use. Optional if the procedure/view being extracted is in your default database.
- a script to apply to the database. Not currently implemented.
- a file to hold the script, defaults to standard output.
- Show version information and copyright notice.
defncopyis a filter; it reads from standard input, writes to standard output, and writes errors to standard error. The
-eoptions override these defaults.
defncopy makes use of the db-lib API
provided by FreeTDS. This API is of course also available to application
defncopyexits 0 on success, and >0 if the server cannot process the query.
defncopy will report any errors returned
by the server, but will continue processing.
defncopyfirst appeared in FreeTDS 0.63.
defncopyutility was written by James K. Lowden ⟨email@example.com.⟩
BUGS¶Works only with Microsoft servers and ancient Sybase servers. Does not create primary keys. Many options are defined by Sybase that this version does not implement. Feel free to correct this situation. In theory,
defncopycould apply/produce DDL for any system object, but at present only tables, procedures and views are supported, and only for extraction.
|April 26, 2012||FreeTDS 1.00.104|