all groups > sql server programming > april 2007 >
You're in the

sql server programming

group:

Query Analyzer Command Line Switches


Query Analyzer Command Line Switches scott
4/30/2007 8:17:49 PM
sql server programming:
I want to create a desktop shortcut that will open QA with a .sql file and
also open with the master database as the current database. I found the
example syntax on the web, but still need some help.

If my server name is "myServer" and my script file is "c:\sql\myScript.sql"
and I'm using SQL authentication, can someone help me create the syntax for
such a shortcut?


Syntax *********************

isqlw -S(yourserver) -d(Database Name) -E(Trusted Connection)

Re: Query Analyzer Command Line Switches Alain Quesnel
4/30/2007 11:48:54 PM
I don't have MSSQL 2000 handy at the moment. Did you try typing isqlw /? at
the DOS prompt? It should give you a list of switches available.

--

Alain Quesnel
alainsanspam@logiquel.com

www.logiquel.com

[quoted text, click to view]

Re: Query Analyzer Command Line Switches Erland Sommarskog
5/1/2007 12:00:00 AM
scott (sbailey@mileslumber.com) writes:
[quoted text, click to view]

Here is what I have on my desktop:

"E:\Program Files\Microsoft SQL Server\80\Tools\Binn\isqlw.exe" -E -d tempdb -f e:\temp\slask.sql

I'm connecting to the local server, so there is no -S option.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
AddThis Social Bookmark Button