Solved

sql jobs - ssis packages

Posted on 2011-09-23
4
620 Views
Last Modified: 2012-05-12
Hello guys just a couple of questions.

1:- Apart from ssis being more powerful and having lots of extra features what’s the main difference between a ssis package and a sql server agent job.
The reason I am asking is because I was going to create a ssis package to run a sp, but then I realised I could just create a job.

2:- I know jobs are located under SQL Server Agent Jobs, but where are they actually stored on sql.

3:- ssis packages, if I create a ssis package how do I schedule the package.

Thanks.


0
Comment
Question by:aneilg
4 Comments
 
LVL 10

Accepted Solution

by:
gaurav05 earned 100 total points
Comment Utility
Hi,

your 3rd question answer:

The logic is like this:
      The job executor account needs the roles of sysadmin,  SQLAgentUserRole, SQLAgentReaderRole,  SQLAgentOperatorRole
      The job needs to be run under Proxy account
      The job executor account is better to be used to create SSIS package and so you are sure the job executor account has the right to run this SSIS package.
 
The following steps can be followed to get the job done.
The work environment is MS SQL Server Management Studio and you log in as sa.
 
I. Create job executor account
Highlight Security->New Login, say to make login as devlogin, type your password, default database can be your target database.
Server roles: check  sysadmin
User mapping: your target database
Msdb database: you make sure to include SQLAgentUserRole, SQLAgentReaderRole,  SQLAgentOperatorRole
Then click OK
 
II. Create SQL proxy account and associate proxy account with job executor account
Here is the code and run it the query window.
 
Use master
CREATE CREDENTIAL [MyCredential] WITH IDENTITY = 'yourdomain\myWindowAccount', secret = 'WindowLoginPassword'
Use msdb
Sp_add_proxy @proxy_name='MyProxy', @credential_name='MyCredential'
Sp_grant_login_to_proxy @login_name=' devlogin', @proxy_name='MyProxy'
Sp_grant_proxy_to_subsystem @proxy_name='MyProxy', @subsystem_name='SSIS'
 
III. Create SSIS package
In MS SQL Server Business Intelligence Development Studio, you use job executor account devlogin to create the SSIS package (DTS) and make sure you can execute this package in SQL Server Business Intelligence Development Studio. Compile/build this package.
 
IV. Create the job, schedule the job and run the job
In SQL Server Management Studio, highlight SQL Server Agent -> Start. Highlight Job ->New Job¿, name it , myJob.
Under Steps, New Step, name it, Step1,
Type: SQL Server Integration Service Package
Run as: myProxy
Package source: File System
Browse to select your package file xxx.dtsx
Click Ok
Schedule your job and enable it
 
Now you can run your job
0
 
LVL 15

Assisted Solution

by:Anuj
Anuj earned 75 total points
Comment Utility
1. SSIS is just a component of SQL Server used to perform data migration task which includes complex lookup and transfer. SSIS is otherwise called ETL, Extract Transfer and Load, which is mainly used to build datawarhouse from OLTP database.

SQL Server Agent is a Microsoft Windows service that executes scheduled administrative tasks, which are called jobs. SQL Server Agent uses SQL Server to store job

2. The jobs are stored in msdb database, you can query the following views and tables on msdb.for more details
sysjobs
sysjobservers
sysjobsteps
sysjobstepslogs
sysjobschedules
sysjobs_view
sysdbmaintplan_jobs

3.You should use SQL Server jobs for scheduling SSIS packages.

0
 
LVL 5

Assisted Solution

by:MrNetic
MrNetic earned 75 total points
Comment Utility
Hi,

Answering your question :


1:- Apart from ssis being more powerful and having lots of extra features what’s the main difference between a ssis package and a sql server agent job.
The reason I am asking is because I was going to create a ssis package to run a sp, but then I realised I could just create a job.

In few words, SSIS PACKAGE = PROCESS | SQL AGENT JOB = SCHEDULER

2:- I know jobs are located under SQL Server Agent Jobs, but where are they actually stored on sql.
For a begginer, you should use SQL SERVER MANAGEMENT STUDIO to handle your jobs.

3:- ssis packages, if I create a ssis package how do I schedule the package.
See Anwer 1

Thanks.
0
 

Author Comment

by:aneilg
Comment Utility
thanks guys.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
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.

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now