Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Cannot using OSQL to connect to a database on remote server

Posted on 2010-09-14
5
Medium Priority
?
795 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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

636 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