Explained step by step in this blog
Scheduling Data Imports in SQL Server
Part three of a three-part series of blogs
If you frequently import data into a SQL
Server database from the same source you'll probably be sick of going
through the import wizard again and again. So why not learn how to
schedule an automatic import of your data using SSIS packages and the
SQL Server Agent? This blog explains how to do exactly that!
You can then use the dialog box to set up the job you want to create. The
steps we need to follow in order to schedule our SSIS package execution are
described below.
And that's it! As long as your database server is running and SQL Server
Agent has been started your data import will occur on a scheduled basis from now
on.
Reference
http://www.wiseowl.co.uk/blog/s231/schedule_data_import_in_sql_server_pt3.htm
- Scheduling Data Imports in SQL Server
- Using the Import Wizard in SQL Server
- Scheduling a Job in SQL Server (this blog)
Scheduling a Job in SQL Server
The final stage of this blog series is to create a scheduled job to execute the SSIS package on a regular basis.The SQL Server Agent
You can schedule jobs using the SQL Server Agent. You should find this at the bottom of the list of objects in any database server that you've connected to in SQL Server Management Studio:
The
SQL Server Agent appears at the bottom of the list of objects in a database server.
Creating a Job
To create a new job using SQL Server Agent:
Right-click the
Jobs folder and choose New Job...
Step 1 - Enter a Name for the Job
The first step is to give the new job a sensible name, as shown below:
In the
General category, enter a descriptive name for the job.
Step 2 - Create the Job Steps
Next, you can create the steps that will make up the job. Our job should have only one step and here's how to create it:- Select the Steps page of the dialog box.
Build a list of steps for the job using this page of the dialog box.
- Click the New... button to add a new step to the job.
Use this dialog box to specify the settings for this job step.
- Enter a sensible name for this step of the job.
- Choose the type of action to perform. Here we want to execute an SSIS package.
- Choose where the SSIS package is stored. Here we've selected the package that we saved earlier on our SQL Server.
- Click the ellipsis (...) to choose the package you want to execute.
- Click OK to return to the New Job dialog box.
Our entire job consists of a single step, but we could always add more to this by clicking the
New... button at the bottom of the dialog box.
Step 3 - Creating the Job Schedule
To ensure that the job runs at a specific time you need to specify the schedule for the job. To do this:- Select the Schedules page of the dialog box.
Use this page to set up the job schedule.
- Click New... to create a new schedule.
- Complete the dialog box as shown below:
The
options in this page of the dialog box are self-explanatory. The
options we have selected here ensures the job will be carried out each
week at 9am on a Monday morning.
- Click OK to return to the New Job dialog box.
Step 5 - Creating the Job
When you have finished applying all of the settings listed above, you can create the job by simply clicking OK on the New Job dialog box.
Your new job will appear in the
Jobs folder within SQL Server Agent.
Reference
http://www.wiseowl.co.uk/blog/s231/schedule_data_import_in_sql_server_pt3.htm
No comments:
Post a Comment