SSIS – String or binary data would be truncated. Invalid object name ‘sys.trusted_assemblies’.

I have SQL Server Management studio 14.0 as well as version 11.0 installed. When I was trying to setup SSISDB under Integration Services Catalogs using SSMS version 14.0, I  encountered below exception:

TITLE: Microsoft SQL Server Management Studio
——————————

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Management.IntegrationServices)

——————————
ADDITIONAL INFORMATION:

String or binary data would be truncated.
Invalid object name ‘sys.trusted_assemblies’. (Microsoft SQL Server, Error: 8152)

 

I wasn’t really sure what should  be done to resolve this as the password I provided was proper and also checked the first checkbox “Enable CLR Integration”.

I just tried the same operation from SSMS version 11.0 and it worked. Still not sure what the issue was but I could carry on with work.

Hope this helps someone facing the same issue.

 

 

 

SQL – Get Start and End Date of the Current Financial Year

Here is the formula I use to calculate start and end date of the current financial year. I hope it helps.

DECLARE @StartDate DateTime

DECLARE @EndDate DateTime
SET @StartDate = cast(’01-July-‘ + cast(CASE WHEN datepart(mm, CAST(GETDATE() AS datetime)) IN (7, 8, 9, 10, 11, 12) THEN DATEPART(yy, CAST(GETDATE() AS datetime)) ELSE DATEPART(yy, CAST(GETDATE()                          AS datetime)) – 1 END AS varchar) AS datetime)

SET @EndDate = EOMONTH(DATEADD(MONTH, 11, @StartDate))