SQL Server

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Leland Baker

SQL Server

Post by Leland Baker »

Someone here at work says I can use textpad to send queries and stored procs to SQL Server. Can someone tell me how to do this?
Erland Sommarskog

Re: SQL Server

Post by Erland Sommarskog »

You define a tool for which the program is ISQL. (I'd recommend ISQL over OSQL, because with ISQL you can have control over ASCII/OEM conversion.)

The parameter line would be something like this:

-S Server -P passwd -d database -U sa -n -i $file

In our shop we do this much more elaborate, since we have a homewritten program that sits in between and performs some modifiations on the SQL code such as adding DROP and GRANT statements. But pure command-line ISQL will take you a long way.
Post Reply