running isql from command line

running isql from command line

Post by adam » Sun, 08 Sep 2002 18:18:52



I am having difficulty running isql from a command line.

isql -U sa -e -P -i CreateDB.sql

fails with the error message:

Login failed for user 'sa'. Reasong: Not associated with
a trusted SQL Server connection.
DB-Library: Login incorrect.

I have tried setting up another user with appropriate
priveleges user the Enterprise manager, but I get the
same error message. Any ideas?

Thanks,
Adam

 
 
 

running isql from command line

Post by Jasper Smit » Sun, 08 Sep 2002 21:46:38


Sounds like your Server is set to Mixed Mode Authentication
You can change this using Enterprise Manager, Right Click
on the Server>Properties>Security Tab

Also you can use a trusted connection

isql -E -S Servername -i c:\inputfile.sql

Any reason you are using isql instead of osql ?

HTH
Jasper Smith


Quote:> I am having difficulty running isql from a command line.

> isql -U sa -e -P -i CreateDB.sql

> fails with the error message:

> Login failed for user 'sa'. Reasong: Not associated with
> a trusted SQL Server connection.
> DB-Library: Login incorrect.

> I have tried setting up another user with appropriate
> priveleges user the Enterprise manager, but I get the
> same error message. Any ideas?

> Thanks,
> Adam


 
 
 

running isql from command line

Post by adam » Mon, 09 Sep 2002 04:18:55


Thanks for the reply which has got me sorted using the
trusted connection approach, although Im not using Mixed
Mode authentication - but Windows authentication.

As to isql vs osql, I just use what someone showed me to
be run from batch files. I dont really understand when I
should use one over the other for this purpose.

Adam

>-----Original Message-----
>Sounds like your Server is set to Mixed Mode
Authentication
>You can change this using Enterprise Manager, Right Click
>on the Server>Properties>Security Tab

>Also you can use a trusted connection

>isql -E -S Servername -i c:\inputfile.sql

>Any reason you are using isql instead of osql ?

>HTH
>Jasper Smith



>> I am having difficulty running isql from a command
line.

>> isql -U sa -e -P -i CreateDB.sql

>> fails with the error message:

>> Login failed for user 'sa'. Reasong: Not associated
with
>> a trusted SQL Server connection.
>> DB-Library: Login incorrect.

>> I have tried setting up another user with appropriate
>> priveleges user the Enterprise manager, but I get the
>> same error message. Any ideas?

>> Thanks,
>> Adam

>.

 
 
 

running isql from command line

Post by Eric Yang [M » Mon, 09 Sep 2002 11:44:36


Dear Adam,

The isql utility uses DB-library to communicate with the SQL Server, while
the osql utility uses ODBC to communicate with the SQL Server.
All DB-Library applications, such as isql, work as SQL Server 6.5-level
clients when connected to SQL Server 2000. They do not support some SQL
Server 2000 features. The osql utility is based on ODBC and does support
all SQL Server 2000 features. Use osql to run scripts that isql cannot run.
Please refer to the SQL Server 2000 online books about the topic 'isql
utility' for more information.

Sincerely,

Eric Yang [MS]
Microsoft Online Support Engineer

Please do not send email directly to this alias.  This is our online
account name for newsgroup participation only.
This posting is provided 'AS IS' with no warranties, and confers no rights.
Get Secure! - www.microsoft.com/security

 
 
 

1. How to get command line argument when running a script through ISQL

Hi,
  Pretty much the command line explains itself. I would like to pass a
parameter to a sql script when invoking it through isql. How can I do
that. Something similiar to &1 in Oracle. ?

i.e.

isql -i select_me.sql a_table_name

select_me.sql..follows...
select owner
from   sysobjects
where  type = 'U'
  and  name = &1

--
Ender Wiggin

Sent via Deja.com http://www.deja.com/
Before you buy.

2. msjro.tlh files differ on different machines

3. running isql from the command line...

4. Can v6 & v7 OS/2 Server run on same machine?

5. Package runs in EM - doesn't from ISQL / Command LIne DTSRun

6. Fast inserts and indexes on table?

7. ISQL COMMAND line problem

8. Output custom log file in SQL Server 7

9. ISQL command-line switch

10. isql command line programming

11. isql command line

12. using switch /c in ISQL command line

13. isql error on the command line.