Showing posts with label package. Show all posts
Showing posts with label package. Show all posts

Wednesday, 13 May 2015

Find SSIS package details scheduled in jobs - SQL Server by serverku

I would like to share the script to find out the scheduled jobs which call SSIS packages in SQL Server.
USE MSDB
GO
SELECT
sj.job_id as JobId,
sj.name as JobName,
sjs.step_name as StepName,
sjs.Command as Command
FROM sysjobs sj
INNER JOIN sysjobsteps sjs
ON(sj.job_id = sjs.job_id)
WHERE sjs.subsystem = 'SSIS'
GO
The script return job name and the SSIS package full path as a command like "/FILE " here SSIS package full path" /CHECKPOINTING OFF /REPORTING E"

Tuesday, 12 May 2015

Download all files through FTP in SQL Server by serverku

We have completed the reading of earlier methods to receive single file and receive file dynamically through the FTP in SSIS. Hope you like those posts. Previously we have downloaded a file which has specific extension with format of current date. The same thing and criteria will be repeated again, but one thing is different and it's not downloading a single file and not the specific current date format. It's a download of multiple files which are having an extension with current year like you can see in below shot.

1. Here you can see the files from FTP, among them we will download files meet with the criteria. You can see target files.


2. Drag and drop FTP Task as shown on screen


3. Choose new FTP connection option for to connect FTP and apply FTP configuration as shown below.


4. Here we want to download files, so we need to go ahead with 'Receive' operation.


5. Configure Local Folder for file to be downloaded.


6. Create one variable for the Remote Path for the FTP and assign the value of the FTP directory from where the file will be received.


7. Here we haven't given static value of Remote Path and file name, but the qualified name will be created dynamically. So apply expression for the Remote Path option like following.


8. Finally, execute the created SSIS package and you will see the files received in the local folder. You can see the target files received.


What is the next? Stay tuned for the next posts.