?
Solved

Cannot using OSQL to connect to a database on remote server

Posted on 2010-09-14
5
Medium Priority
?
791 Views
Last Modified: 2012-05-10
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"
0
Comment
Question by:KANEWONG
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 39

Expert Comment

by:BrandonGalderisi
ID: 33675371
What error or message do you get?
0
 
LVL 1

Expert Comment

by:innosys
ID: 33675374
try to identify linked server it will works
0
 
LVL 1

Author Comment

by:KANEWONG
ID: 33675489
But if "-D ODBCtoServerA" command has specify how to and what server to connect?
0
 
LVL 1

Author Comment

by:KANEWONG
ID: 33676496
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
 
LVL 39

Accepted Solution

by:
BrandonGalderisi earned 1000 total points
ID: 33676545
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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are some very powerful Dynamic Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a di…
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question