You can now use the new --skiprows parameter to skip the number of rows starting from the first row of an input file. This new feature provides BCP the ability to skip a specified number of rows before starting to copy from an input file. The valid range for --skiprows is between 0 and the actual number of rows in the input file. Providing an invalid value will display an error message.
The new --skiprows parameter cannot co-exist with the -F option.
In the following example, BCP will ignore the first two rows of the input file titles.txt and start to copy from the third row.
Two new parameters are included to support BCP computed columns:
Currently, data is retrieved in plain text when BCP is running against a table that supports encrypted columns, and the user has permission to view the data in the columns.
In the following example, BCP creates the discard file reject_titlesfile.txt:
If you use multiple input files, one discard file is created for every input file that has an erroneous row. If there are no rejected rows, no discard file is created.
If bcp reaches the maximum errors allowed and stops the operation, the bcp logs all the rows from the beginning of the batch until the failed row.
Currently, the bcp option -e errorfile logs the rows rejected due to conversion or format errors into an error file. ESD #8 extends the functionality of this option to log all rejected rows including those resulting from inserting duplicate rows when unique constraint is present, inserting into a table-partition that doesn’t fit the partition criteria, and truncation of data.
You can now set an alternate Sybase home directory using the new isql and bcp option -y.
In this example, isql encounters a server error of severity 16. Since the --retserverror option is specified, isql returns “2” to the calling shell, prints “Msg 207” to stderr, and exits. As before, isql prints the full server error message to stdout. The same behavior applies to Windows, where you will find the return value of “2” in %ERRORLEVEL%:
You can now set an alternate Sybase home directory using the new isql and bcp option -y.
Writes the output of the select @@servername command to the file myserver.txt, or overwrites that file if it already exists:
Writes the output of the select @@version command to the new file myserver.txt, or appends it to that file if it already exists:
Pipes the output of the sp_who command to grep and returns the lines that contain the string 'sa':
With the new --conceal command line option, you can hide your input during an isql session. The --conceal option is useful when entering sensitive information, such as passwords. The syntax for the --conceal option is:
Changes password without displaying the password entered. This example uses “old” and “new” as prompt labels:
Changes password without displaying the password entered. This example uses the default wildcard as the prompt label:
Activates a role for the current user. This example uses a custom wildcard and the prompt labels “role” and “password:”
The specified value appears in sysprocesses.program_name
Why is this useful ?
– Various ASE features are related to this application name:
– This feature simplifies:
Sets the application name to “isql Session 01”:
Sets the application name to the name of the script that started the isql session:
The following sample ocs.cfg file allows you to run isql normally or with network debug information. Because the configuration file is read and interpreted after the command line parameters are read and interpreted, setting CS_APPNAME to isql sets the application name back to isql:
To run isql normally:
To run isql with network debug information:
The isql command history feature enables you to list, recall, and reissue past commands. The command history is loaded into memory when you start isql, and is updated whenever a new command is issued. If specified, isql saves the in-memory history to disk when isql shuts down.
When --history_file is not specified, isql uses the default log file:
For UNIX: $HOME/.sybase/isql/isqlCmdHistory.log
For Windows: %APPDATA%\Sybase\isql\isqlCmdHistory.log
Deletes myaseHistory.log after loading its contents to memory. The session’s command history is not stored:
Loads and saves the command history using the default log file:
The command history feature is available only in command mode. Also, only commands that are issued interactively in isql are included in the command history.
Command history contains the most recent commands issued in an isql session. When history_length is reached, isql drops the oldest command from the history and adds the newest command issued.
If you do not specify an alternate log file, and if the $HOME or %APPDATA% environment variable used by the default log file is not defined, an error message appears and the command history log is not saved.
In an isql session, use the h command to display the command history. A page can display up to 24 lines of commands. If the command history contains more than 24 lines, press Enter to display the next set of commands or enter “a” to display all commands in one page. Enter “q” to return to isql.
n – indicates the number of commands to appear. If n is positive, the commands that appear start from the oldest command in the history. If n is negative, the n most recent commands appear.
Lists all the commands stored in the command history:
Lists the two most recent commands issued:
Use the ? command to recall and reissue a command from the command history.
n – when n is positive, isql looks for the command labeled with the number n and loads this to the command buffer. When n is negative, isql loads the nth most recent command issued.
?? – recalls the latest command issued and is equivalent to ? -1.
In this sample command history used for examples 1 and 2,  tags the oldest command issued and  tags the most recent command issued:
Recalls the command labeled 1 from the command history:
Recalls the latest issued command from the command history:
isql [option1] [option2] ... where [options] are ...
-b Disables the display of the table headers output.
-e Echoes input.
-F Enables the FIPS flagger.
-p Prints performance statistics.
-n Removes numbering and prompt symbol when used with -e.
-v Prints the version number and copyright message.
-W Turn off extended password encryption on
-X Initiates the login connection to the server with
client-side password encryption.
-Y Tells the Adaptive Server to use chained transactions.
-Q Enables the HAFAILOVER property.
-a display_charset Used in conjunction with -J to specify the character set
translation file (.xlt file) required for the conversion.
Use -a without -J only if the client character set is
the same as the default character set.
-A packet_size Specifies the network packet size to use for
this isql session.
-c cmdend Changes the command terminator.
-D database Selects the database in which the isql session begins.
-E editor Specifies an editor other than the default editor vi.
-h header Specifies the number of rows to print between
-H hostname Sets the client host name.
-i inputfile Specifies the name of the operating system file
to use for input to isql.
-I interfaces_file Specifies the name and location of the interfaces file.
-J client_charset Specifies the character set to use on the client.
-K keytab_file Specifies the path to the keytab file used
for authentication in DCE.
-l login_timeout Specifies the number of seconds to wait for the server
to respond to a login attempt.
-m errorlevel Customizes the error message display.
-M labelname labelvalue
Used for security labels. See CS_SEC_NEGOTIATE
for more details.
-o outputfile Specifies the name of an operating system file to
store the output from isql.
-P password Specifies your Adaptive Server password.
Specifies the principal name for the server as defined
to the security mechanism.
-s col_separator Resets the column separator character, which is
blank by default.
-S server_name Specifies the name of the Adaptive Server to which.
to connect to.
-t timeout Specifies the number of seconds before a SQL command
-U username Specifies a login name. Login names are case sensitive.
Specifies network-based user authentication.
c - Enable data confidentiality service.
i - Enable data integrity service.
m - Enable mutual authentication for connection
o - Enable data origin stamping service.
q - Enable out-of-sequence detection.
r - Enable data replay detection.
d - Requests credential delegation and forwards
-w column_width Sets the screen width for output.
-y sybase_directory Sets an alternate location for the Sybase home directory.
-z localename Sets the official name of an alternate language to
display isql prompts and messages.
Specifies the name of a security mechanism to use
on the connection.
-x trusted.txt_file Specifies an alternate trusted.txt file location.
--retserverror Forces isql to terminate and return a failure code when
it encounters a server error of severity greater than 10.
--conceal [wildcard] Obfuscates input in an ISQL session. The optional
wildcard will be used as a prompt.
Replaces the default 'isql' application name in
the server with 'application_name'.
--history [p]length [--history_file file_name]
Activates command history of <length> commands in isql.
With 'p' history will be saved at the end of the session.
--history_file file_name Path to, and including name of
the command history file.