Re: FTPing and Calling an EXE from a SQL Statement

From: Dan Guzman (guzmanda_at_nospam-online.sbcglobal.net)
Date: 01/22/05


Date: Fri, 21 Jan 2005 23:28:44 -0600

I don't have links handy on this specific requirement, but one method is to
execute the needed FTP command (perhaps with the -s parameter) via
xp_cmdshell. You can find more info on accomplishing this securely at
http://www.winnetmag.com/Article/ArticleID/25145/25145.html. This article
was written before SQL 2000 SP3. If your are running SQL 2000 SP3+, your
user database needs to be owned by 'sa' and you need to enable the 'db
chaining' database option in your user database in order to maintain an
unbroken ownership chain to xp_cmdshell.

Note that you should enable the 'db chaining' option in sa-owned user
databases when only sysadin role members have permissions to create
dbo-owned objects in that database.

-- 
Hope this helps.
Dan Guzman
SQL Server MVP
"Chris Hayes" <cp.hayesATsbcglobal.net@nospam.nospam> wrote in message 
news:e3i0aTCAFHA.3592@TK2MSFTNGP09.phx.gbl...
> Greetings,
>
> I've seen this done in other places...I wish I had paid better attention 
> because I can't remember how it was all done.
>
> But can someone point me the resources to accomplish my stated desires to 
> FTP a file from within a SQL Statement and also to run an .EXE from within 
> a SQL Statement...
>
> Thanks,
>
> Chris
>
>
>
> 


Relevant Pages

  • Re: FTPing and Calling an EXE from a SQL Statement
    ... >chaining' database option in your user database in order to maintain an ... > SQL Server MVP ... >> FTP a file from within a SQL Statement and also to run an .EXE from ...
    (microsoft.public.sqlserver.programming)
  • Re: dbdebunk Quote of Week comment
    ... > a lot of really bad SQL programmers. ... But SQL does not have a pointer data type or the ... > being told to design a database. ... But why is little Cindy Lou Who employee ...
    (comp.databases.theory)
  • Re: DBMS and lisp, etc.
    ... Naively implemented with SQL, again for 10 ... (1 query for the initial orders, 1 query for each order for its ... soon as you upgrade to the SQL database. ... (eq (order-customer orderA) ...
    (comp.lang.lisp)
  • Re: dbdebunk Quote of Week comment
    ... > a lot of really bad SQL programmers. ... a surrogate key should support the primary key. ... But SQL does not have a pointer data type or the ... > being told to design a database. ...
    (comp.databases.theory)
  • Re: dbdebunk Quote of Week comment
    ... But SQL does not have a pointer data type or the ... More and more programmers who have absolutely no database training are ... But why is little Cindy Lou Who employee ...
    (comp.databases.theory)