Solved

FTP and file transfer from SQL Server

Posted on 2001-07-30
5
788 Views
Last Modified: 2008-03-06
I would like to confirm that it is possible to do the following with SQL Server.

I believe that using DTS from within SQL Server I will be able to:

Schedule a query to run automatically
Export this query to a CSV text file or XML file
FTP this file to another machine

If anybody has some more info on the specifics of doing this I would be grateful.
0
Comment
Question by:Jod
[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 6

Expert Comment

by:acampoma
ID: 6335314
listening
0
 
LVL 3

Expert Comment

by:ibro
ID: 6335319
Hi Jod,
> Schedule a query to run automatically
 you can do that. Use EM (Enterpise manager) Export wizard.

> Export this query to a CSV text file or XML file
 Use DTS wizard in EM. If you use MS SQL2K you can export it as XML as well. If you use lower version of SQL Server, this is not possible.

> FTP this file to another machine
 You can run shell programs directly from SQL (i think the name of the procedure was xp_cmdshell or something like that). So you can start some command line ftp client to transfer the file.

Hope this helps.
0
 
LVL 5

Author Comment

by:Jod
ID: 6337066
I thought SQL Server could FTP the exported file through an internal FTP functionality built into DTS?

Basically I am not totally familiar with SQL Server and the specifics of DTS so just wanted to check whether the above is feasible.
0
 
LVL 3

Accepted Solution

by:
ibro earned 100 total points
ID: 6337219
It is possible to FTP transfer file directly in SQL Server. You have to create DTS package using DTS package designer in Enterpise manager. You can also schedule this task to run on a regular basis.
Basicly you have to create an dts package that will run the query and export it in a text file and ftp-transfer it using DTS package designer. After that you can schedule this using SQL Server Agent (on the Jobs section).
0
 
LVL 5

Author Comment

by:Jod
ID: 6338076
That confimrs it.

Cheers,
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

705 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