Wednesday, February 27, 2013

Execution of job through command mode

Some times SSIS pacakages run through integration server but fails in Job from SQL Agent

This is the most common issue faced when we deploy packages in 64 bit system. When we create any package with Run64bit set as false, this issue occurs.


In order to overcome the 32\64 bit environment issue, we can execute the Job through command line mode

Apply the below code in job by mentioning the control flow package name

C:\Program Files\Microsoft SQL Server\110\DTS\Binn\dtexec.exe /FILE "\"M:/SSIS/MDR2.0/Imports/Imports20_ControlFlow.dtsx\"" /CHECKPOINTING OFF /REPORTING E

Apply the below code in job by mentioning the particular package name

C:\Program Files\Microsoft SQL Server\110\DTS\Binn\dtexec.exe/FILE "M:/SSIS/MDR2.0/EDW/EDW20_OfferedItemCBD.dtsx" /CHECKPOINTING OFF /REPORTING E

Index optimization command


sqlcmd -E -S $(ESCAPE_SQUOTE(SRVR)) -d master -Q "EXECUTE [dbo].[IndexOptimize] @Databases='ListSelect20',@FragmentationHigh='INDEX_REBUILD_OFFLINE',@FragmentationMedium='INDEX_REBUILD_OFFLINE',@FragmentationLevel1 = 1,@FragmentationLevel2 = 2,@PageCountLevel = 1,@SortInTempdb = 'Y'" -b


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.