isql

  • I wanted to write a batch file which opened 30 isql threads and created 1 index on each.

    Any ideas?

  • Batch file could look like this:

    start isql -S servername -d databasename -U Username -P password -Q "create index index1 on table (column)" -o Index1.log

    start isql -S servername -d databasename -U Username -P password -Q "create index index2 on table (column)" -o Index2.log

    .......etc.

    The start command will create a new instance on the command object to execute statements following it on the same line. It will not wait for the command to return before moving on to the next statement in the batch unless you specify the /WAIT parameter (which it sounds like you don't want anyways).

    The -Q option for ISQL will execute the statement and then exit out.

    the -o option can be used if you would like to review the output of each session, since the command windows will close once ISQL is completed.

  • Thanks, I'll give it a try.

    -Kevin

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply