Posts

Showing posts with the label sql server 2014

T-sql procedure to wait for sql server agent job

/*   Awaits job to finish, then returns job_status   0 = Failed   1 = Succeeded   2 = Retry   3 = Canceled   null = Job never executed / no history   If job was executed and already finished successfully before this proc starts, it will return 1 (success) */   create   procedure   tools . AwaitSqlServerAgentJob      @jobName   sysname   as      declare   @jobid   uniqueidentifier   =   ( select   job_id   from   msdb . dbo . sysjobs   where   name   =   @jobname   )    declare   @sessionId   int   =   ( select   max ( session_id )   from   msdb . dbo . sysjobactivity ...

Solution: Stopping SSIS package causing "Unable to terminate process (reason: Access is denied)"

I had big problems finding the solution to the message [Job Name]:  Unable to terminate process  [pid]  launched by step  [x]  of job  [guid]  (reason: Access is denied). that fired when trying to stop Sql server agent jobs running step type "SQL Server Integration Services Package" Some suggested changing the job owner to sa or troubleshooting access. These suggestions did not fix it in my environment. Fix Change Step type from "SQL Server Integration Services Package" to "Operating System Command", and execute dtexec manually like so: dtexec /FILE "\"\\your file path.dtsx\"" /CHECKPOINTING OFF /REPORTING E The options are not relevant for my scenario, it was the type: Operating System Command that fixed it.

Getting Analysis Serivce Deployment Wizard running in TeamCity

Image
This process is tested with a tabular model on ssas 2014 and that you have the appropriate licences to use the software. First, ensure SSAS Deployment Wizard works on your local machine by installing appropriate prerequisits ssms and stuff (not listed here). Add deployment wizard to repo Microsoft.AnalysisServices.Deployment.exe Microsoft.AnalysisServices.Deployment.exe.config Microsoft.AnalysisServices.DeploymentEngine.dll  (exists in GAC only) Microsoft.AnalysisServices.DLL Microsoft.DataWarehouse.DLL Microsoft.DataWarehouse.Interfaces.DLL Microsoft.SqlServer.ConnectionInfo.dll Microsoft.SqlServer.Dmf.dll Microsoft.SqlServer.Management.Sdk.Sfc.dll Microsoft.SqlServer.Smo.dll Microsoft.SqlServer.SmoExtended.dll Microsoft.SqlServer.SqlEnum.dll Microsoft.SqlServer.SqlWmiManagement.dll Microsoft.SqlServer.WizardFramework.dll   (exists in GAC only) Possible locations for these are C:\Program Files (x86)\Microsoft SQL Server\120\SDK\Assemblies C:\Program Files...