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

sql server programming

group:

Needs to create a batch file


Re: Needs to create a batch file Immy
3/14/2007 3:51:14 PM
sql server programming:
Your syntax is correct and works for me when executed.
I can only assume that it's a problem with your credentials!

[quoted text, click to view]

Needs to create a batch file Remo
3/14/2007 8:44:25 PM
Hi All,
I need to create a batch that generates the output of a query into a text
file.The batch file I created goes like this, but it is thrwing login
error.Please help me.try to give me a complete bacth file.

@echo off
echo Hello this is a test batch file
set mysqlcommand=select * from employee
osql /U rmk /P reallove /d Love /S DBheaven /Q "%mysqlcommand%" -o
"C:\Me\new.txt"
exit

Thanks,
Remo

Re: Needs to create a batch file Remo
3/15/2007 12:00:00 AM
Thanks Immy for your prompt update.By credentials, you mean the permissoin
to execute osql , or my login ID and password.Please clarify

Thanks,

[quoted text, click to view]

Re: Needs to create a batch file Immy
3/15/2007 12:00:00 AM
I mean by your login username or password.
Can you paste the exact error you are getting when you execute the batch?
Thanks

[quoted text, click to view]

Re: Needs to create a batch file Remo
3/15/2007 12:00:00 AM
Hi Immy, you are absolutely right.
The error message is 'Login failed for user 'rmk'.
But the login credentials are correct, the same that I am using to connect
to my dev server. What could be wrong then.??...

thanks,
Remo

[quoted text, click to view]

AddThis Social Bookmark Button