Cannot using OSQL to connect to a database on remote server

Hi;

My Server A is hosting a database in SQL 2005 64 bit and the "Allow Remote Connection" is ON on the Server A, however on Server B, when I tried to use OSQL to access and login to the server A database via ODBC, it does not work.  I test the ODBC connection on Server B, it works fine.  Any idea?  Server B is my app server which will call osql in a batch program to backup the database in Server A.

I used this syntax, "osql -U sa -P password -D ODBCtoServerA

But the result is..


Login failed for user "sa"
LVL 1
KANEWONGAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
BrandonGalderisiConnect With a Mentor Commented:
If you have a blank password, which I PRAY you don't, just enter -P in the command line with no value after it.
0
 
BrandonGalderisiCommented:
What error or message do you get?
0
 
innosysCommented:
try to identify linked server it will works
0
 
KANEWONGAuthor Commented:
But if "-D ODBCtoServerA" command has specify how to and what server to connect?
0
 
KANEWONGAuthor Commented:
I tried with this command and it prompt me 1> after I enter the password ... what is that mean?

osql -S ServerA -U sa
Password:
1>
0
All Courses

From novice to tech pro — start learning today.