RE: FTPing and Calling an EXE from a SQL Statement
From: Michael Cheng [MSFT] (v-mingqc_at_online.microsoft.com)
Date: 01/22/05
- Next message: DBA: "Re: Query Help...please"
- Previous message: oj: "Re: sql server automatic update error"
- In reply to: Chris Hayes: "FTPing and Calling an EXE from a SQL Statement"
- Next in thread: Chris Hayes: "Re: FTPing and Calling an EXE from a SQL Statement"
- Reply: Chris Hayes: "Re: FTPing and Calling an EXE from a SQL Statement"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 22 Jan 2005 05:46:10 GMT
Hi Chris,
Thanks for your posting!
>From your descriptions, I understood that you would like to use FTP within
T-SQL statement and you would like to know whether it is possible for you
to execute exe file directly from T-SQL statement. Have I understood you?
Correct me if I was wrong.
For the first questions, yes, we are able to create FTP scripts 'on the
fly' and I find MVP oj have a good sample here
exec master..xp_cmdshell 'echo open ftp.{server name}.com > c:\ftp.input'
exec master..xp_cmdshell 'echo {user}>>c:\ftp.input'
exec master..xp_cmdshell 'echo {password}>>c:\ftp.input'
exec master..xp_cmdshell 'echo put {filepath & filename to
send}>>c:\ftp.input'
exec master..xp_cmdshell 'echo bye>>c:\ftp.input'
exec master..xp_cmdshell 'ftp -s:c:\ftp.input'
I am not sure what you would like to do with FTP so that I was not able to
provide more infomation on this. Here is another thread that I think might
help much.
http://groups-beta.google.com/group/microsoft.public.sqlserver.server/browse
_frm/thread/215cb2fd0459ce64/df62a4137206e879#df62a4137206e879
For the second questions, you could use xp_cmdshell to execute the exe
files, however, ONLY console will be executable and no inputs after
execution. Check xp_cmdshell for more detailed information.
BTW, I would like to suggest you how to find the some common issue with the
help of google.com, which I think will be the quickest way for you to get
the answer
http://groups-beta.google.com/advanced_search?q=group:microsoft.public.sqlse
rver.*
Thank you for your patience and corporation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Online Partner Support Specialist
Partner Support Group
Microsoft Global Technical Support Center
---------------------------------------------------------------
Get Secure! - http://www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks!
- Next message: DBA: "Re: Query Help...please"
- Previous message: oj: "Re: sql server automatic update error"
- In reply to: Chris Hayes: "FTPing and Calling an EXE from a SQL Statement"
- Next in thread: Chris Hayes: "Re: FTPing and Calling an EXE from a SQL Statement"
- Reply: Chris Hayes: "Re: FTPing and Calling an EXE from a SQL Statement"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|