Displaying posts tagged with

“SQL Server”

Script to Remove Jobs History

Script to Remove Jobs History. You can remove jobs history for particular job for a fixed time. Below script will remove history data older then 30 days and where job name is “jobname”. I have used procedure “SP_PURGE_JOBHISTORY” provided by SQL Server, you just need to pass @JobName and @Date as a parameter. You can [...]

Script to get Jobs Execution Details

Script to get Jobs Execution Details. This script will give you whole execution details with job started time, job execution time, job finish time, and job execution status. Note: For multiple scheduled jobs it will fetche only last executed job details. You need to create one function for that with name “CONV_DATETIME”. Execute below script [...]

Script to get Job Name from Command

Script to get Job Name from Command This script helps to get a job name from command or job script. If you remembered only one word that you have used in your job script and you want to get a job name, this script helps you. Just paste your word instead of “AnyOneWordFromJobScript”.   Regards, [...]

Script to get failed jobs

Script to get failed jobs Below is a TSQL query to get failed jobs last hour. if you want failed jobs for whole day then comment “AND Run_time >= @Ctime” line Regards, Nirav gajjar

SSIS Package to Resize image

SSIS Package to Resize image. This script helps you to resize images as you needed in percentage(Dynamically). Step1 : drag n drop foreeach loop container. Step2 : drag n drop script task in to foreach loop container. Step3 : Right click on any part of your control flow and select variables to see list of [...]

SSIS Package to Read IISLog

SSIS Package to Read IISLog You need LogParser 2.2 installed on your machine. I need iislog every 1 hour so i have set this package to execute every hour and imports second last files to database. Before you start creating package you have to create one batch file and one table. Step1 : First of [...]