OSQL utility problem | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

OSQL utility problem

I am trying to run sql command using osql.
I have created test.sql file using my notepad. The files contains "USE pubs
GO
SELECT * FROM authors
GO"[?]
This file was saved in my c: root directory.
At the command prompt I executed the command " OSQL -E -i c: emp est.sql After 5 to 1- secs I am getting an error message saying
[Shared Memory] SQL Server does not exist or access denied.
[shared Memory] ConnectionOpen (connect()) What could be the problem? I can able to connect to query analyser.My database name is client . This I am connecting using sa with blank password. I tried changing the authenticatioin to windows authentication. After that also I a getting the same error. I tried giving the sql name and password at the command line window. After that also it is giving the same error. Pl. suggest. Thanks
Issolla
Have tried specifiying -S (server) and -d (database)? Dbu
KBA to referhttp://support.microsoft.com/default.aspx?scid=kb;EN-US;Q328306 for potentical causes of specified error message. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Check this
http://dbforums.com/showthread.php?threadid=432287
quote:Originally posted by issolla I am trying to run sql command using osql.
I have created test.sql file using my notepad. The files contains "USE pubs
GO
SELECT * FROM authors
GO"[?]
This file was saved in my c: root directory.
At the command prompt I executed the command " OSQL -E -i c: emp est.sql After 5 to 1- secs I am getting an error message saying
[Shared Memory] SQL Server does not exist or access denied.
[shared Memory] ConnectionOpen (connect()) What could be the problem? I can able to connect to query analyser.My database name is client . This I am connecting using sa with blank password. I tried changing the authenticatioin to windows authentication. After that also I a getting the same error. I tried giving the sql name and password at the command line window. After that also it is giving the same error. Pl. suggest. Thanks
Issolla

]]>