Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MS SQL Server Deploy Stored Procedures

Posted on 2014-11-27
2
Medium Priority
?
315 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 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

715 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