Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 FTP SQL error

Author  Topic 

sqlserverdeveloper
Posting Yak Master

243 Posts

Posted - 2008-04-02 : 12:37:08
We are having the Connection closed by remote host issue when we are trying to run the below code in a ftp.bat file as a sql job:
c:
cd \server\dir
ftp -s:C:\folder1\FtpCommands.txt IPaddress

we wanted to debug the issue, then added the debug command which is shown below, then the error was "Unknown host debug".
c:
cd \server\dir
ftp debug
ftp -s:C:\folder1\FtpCommands.txt IPaddress

Please let me know how I can add the debug and trace commands to the ftp.bat file as I am running this .bat file
as a OS command type within the SQL job. I greatly appreciate your help!!

X002548
Not Just a Number

15586 Posts

Posted - 2008-04-02 : 12:50:57
ftp -s:C:\folder1\FtpCommands.txt > C:\folder1\FtpCommands.log

In The text file

open <machine name/IP>
<login>
<pwd>
ftpcommands

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

sqlserverdeveloper
Posting Yak Master

243 Posts

Posted - 2008-04-03 : 10:29:58
I need to find out if debug and trace will help us to determine why the connection is being lost as we are losing connection once in a while when we are FTP'ing lot of soa file's from Unix box to SQL server within a SQL job, below is the code I am planning to use to resolve the conn lost issue:

Username
passwd
cd /folder1/folder2/folder3
bin
prompt

debug
trace
get file1.soa
mget file1.soa.00?
get file2.soa
mget file2.soa.00?
get file3.soa
mget file3.soa.00?
get file4.soa
mget file4.soa.00?


quit
Go to Top of Page
   

- Advertisement -