Solved

MS SQL Server Deploy Stored Procedures

Posted on 2014-11-27
2
301 Views
Last Modified: 2014-11-30
Without being too technical about, I would like to know the usual steps that are taken to deploy a Stored Procedure (Ex. A query that pulls the overnight orders) so that the Server (Windows) can trigger the Stored Procedure at a specified time and perhaps save a csv copy of this file in a predefined location.
0
Comment
Question by:Benki Canoso
[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 Comments
 
LVL 18

Expert Comment

by:Simon
ID: 40469766
It could be as simple as adding the stored procedure to the database then creating a single-step job that calls it and scheduling the job as desired.
Pinal Dave's article on exporting to CSV covers the file export nicely.

Edit: Also see previous thread on EE
scheduled export to csv
0
 
LVL 8

Accepted Solution

by:
Dung Dinh earned 500 total points
ID: 40469928
Hi,

In case, your .csv files is on local server, I mean that your data source  and csv files are on the same server you can use the solutions as SimonAdept's suggestion.

However, if your data source is from another server or you want to export .csv files and transfer them to anywhere, you should use SSIS tool. Because, it gives you the simpler / more flexible methods to help you export .csv file.

Create one SSIS package and call your store procedure. After then, you need also create a SQL job to call the package. You can see image below, I use 2 components File System Task and FPT Task. One is for copying file in local network and another is for copying file in external network. With File System Task, I will copy file to D:\ExportCSV\ folder after exporting data.
ExportCSVFiles.PNG
You can refer to article Exploring SSIS - Export to csv file for more detail.
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
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.

729 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