INF: ISQL Is Faster When Output Is Sent to Disk File

ID Number: Q73212

1.10 | 1.10

MS-DOS | OS/2

Summary:

Performing large queries or using the DBCC CHECKALLOC or DBCC CHECKDB

commands can generate a great deal of output. When using ISQL, the

execution speed of these kind of queries can be greatly increased if

the output from ISQL is sent to a hard disk file.

More Information:

As an example of the speed increase, execute a SELECT * FROM

MASTER..SYSMESSAGES from ISQL. Sending the output to the screen takes

two minutes and thirty seconds. Sending the output to a hard disk file

takes only fifteen seconds.

To direct the output to a file, run ISQL with the following command

line:

ISQL /S<server> /U<login> /P<password> /i<input_file> /o<output_file>

Where <input_file> is an ASCII text file that contains the TRANSACT-

SQL commands, and <output_file> is the disk file to store the results.

Note that case is important and that there are no spaces between the

switches and the parameters. For example:

ISQL /Sgizmo /Usa /P /isqlin.txt /osqlout.txt