Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

defncopy(1) [debian man page]

defncopy(1)							 FreeTDS Utilities						       defncopy(1)

NAME
defncopy - extract procedures and views from a Microsoft server. SYNOPSIS
defncopy [-U username] [-P password] [-S server] [-D database] [-i input_file] [-o output_file] [-v] [owner.]object_name [[owner.]object_name...] DESCRIPTION
defncopy is 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 with CREATE INDEX, too. OBJECTS
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. OPTIONS
-U username database server login name. -P password database server password. -S server database server to which to connect. -D database database to use. Optional if the procedure/view being extracted is in your default database. -i input_file a script to apply to the database. Not currently implemented. -o output_file a file to hold the script, defaults to standard output. -v Show version information and copyright notice. NOTES
defncopy is a filter; it reads from standard input, writes to standard output, and writes errors to standard error. The -i and -o options override these, of course. defncopy makes use of the db-lib API provided by FreeTDS. This API is of course also available to application developers. EXIT STATUS
defncopy exits 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. HISTORY
defncopy first appeared in FreeTDS 0.63. AUTHORS
The defncopy utility was written by James K. Lowden <jklowden@schemamania.org> 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, defncopy could apply/produce DDL for any system object, but at present only tables, procedures and views are supported, and only for extraction. doc 13 November 2011 defncopy(1)

Check Out this Related Man Page

fisql(1)							 FreeTDS Utilities							  fisql(1)

NAME
fisql - interactive SQL shell SYNOPSIS
fisql [-e] [-F] [-g] [-p] [-n] [-v] [-X] [-Y] [-a display_charset] [-c cmdend] [-D database] [-E editor] [-h headers] [-H hostname] [-i inputfile] [-I interfaces_file] [-J client_charset] [-l login_timeout] [-m errorlevel] [-o outputfile] [-P password] [-s colseparator] [-S server] [-t timeout] [-U username] [-w width] [-y sybase_dir] [-z language] DESCRIPTION
fisql is very similar to the "isql" utility programs distributed by Sybase and Microsoft. Like them, fisql uses the command "go" on a line by itself as a separator between batches. OPTIONS
-a display_charset The client charset name. Not implemented. -c cmdend Command terminator, defaults to go. -D Database name on the server to use. -e Echo SQL input (usually in outputfile) -E editor Specify an editor to invoke. Defaults to vi. -F FIPS mode ON. Server returns a message (but processes the query anyway) when it encounters a non-standard SQL command. -g Display a brief help message -h headers Number of rows after which to repeat the column headers. Default is once per resultset. -H hostname Hostname of the client machine as it will be told to the server. -I interfaces_file Name of the interfaces or freetds.conf file to use. -i inputfile Name of script file, containing SQL. -J client_charset Not implemented. -l login_timeout How long to wait for the server to acknowledge a login attempt. -m errorlevel For errors of the severity level specified or higher, print only the message number, state, and error level. Below that level, print nothing. -n Suppress line numbers in echoed output. -o outputfile Name of output file, holding result data. -p Prints performance statistics. Not implemented. -P password Database server password. -s colseparator The column separator. Default is space. Shell metacharacters require quoting. -S server Database server to which to connect. -t timeout The query timeout, in seconds. How long to wait for a query to be processed. The default is indefinitely, or as determined by freetds.conf. -U username Database server login name. -v Display version and copyright. -w width How many characters wide to print the output. Defaults to 80. -X Use encrypted login. Not implemented in FreeTDS. -y sybase_dir Sets the SYBASE environment variable. Not used by FreeTDS. -Y Use chained transactions. -z language Name of a language for fisql's prompts and messages. Cf. DBSETLNATLANG. NOTES
fisql is a filter; it reads from standard input, writes to standard output, and writes errors to standard error. The -i, -o, and -e options override these, of course. fisql uses the db-lib API provided by FreeTDS. It was first implemented using Sybase's own library and continues to work with it. Before (and after) modifying it, it would be well to test it with Sybase's library to assure compatibility between it and FreeTDS. EXIT STATUS
fisql exits 0 on success, and >0 if the server cannot process the query. fisql will report any errors returned by the server, but will continue processing. In a production environment, this behavior may be insuf- ficiently stringent. To make it extremely intolerant of errors, change the message and error handlers to call exit(3). HISTORY
fisql first appeared in FreeTDS 0.65. AUTHORS
The fisql utility was written by Nicholas S. Castellano <entropy@freetds.org>, who contributed it to the FreeTDS project under the terms of the GPL. BUGS
Requires the GNU readline library. doc 13 November 2011 fisql(1)
Man Page