after Upgrade 7.3 SP3 -> 2018 R3 Calendar not loading

Hello Community,

after an Upgrade from 7.3 SP3 to 2018 R3 the Calendar ist not working.

It stucks on loading (spinner is running).

The Tomcat-Service is running and fileexports are working too.

Any ideas?

I can't find any helpful in the logs.

Hope to get help soon.

Tom

  • 0

    And does the System Health Check page in the Admin area indicate any problems?

  • 0

    Have you fixed the legacy data type conversion and trailing space if required in database?

    Please check following KB article for your reference for similar issues after upgrade:

    community.sagecrm.com/.../1088.636-17384-dashboards-not-working-correctly-after-upgrade.aspx

    These are usual areas to fix after upgrade.

  • 0

    is it only the calendar that is not working what about the dashboards. Have you tried it in another browser and also in te browser you normally use did you clear the cache?

  • 0

    Hello Jeff,

    thanks for your reply.

    There are no errors in the System Health Check page.

    Only the Exchange Synchronisation, CRM Indexer Service and CRM Escalation Service are not marked green, caused on the deactivated services.

    Do you have another advice for us?

    Tom

  • 0

    Hello Sharad,

    thank you for the hint.

    I've executed the 2 scripts without getting errors and I did an iisreset.

    But the calendar is still not working.

    Any ideas left?

    Tom

  • 0

    Same result with the ie.

    Even the cleared cache showed a positive result.

    Any more ideas?

    Tom

  • 0

    Hi Lars,

    I had the same issue, Sage gave me three scripts to run and it seems to fix it every time now for me.

    Steps are

    1. Run Scripts 1 & 2

    2. Check Custom_Captions & Custom_Edits and change any nchar fields to nvarchar

    3. Run Script 3

    4. Do a metadata refresh

    5. Do an IISReset and then restart TomCat

    ========= SCRIPT 1 =========

    DECLARE @table_name nvarchar(128)
    DECLARE @column_name nvarchar(128)
    DECLARE @view_name nvarchar(128)
    DECLARE ntext_columns CURSOR FOR
    SELECT so.name as table_name, sc.name as column_name
    FROM sys.objects so
    JOIN sys.columns sc ON so.object_id = sc.object_id
    JOIN sys.types stp ON sc.user_type_id = stp.user_type_id
    AND stp.name = 'ntext'
    WHERE so.type = 'U'

    OPEN ntext_columns

    FETCH NEXT FROM ntext_columns INTO @table_name, @column_name
    WHILE @@FETCH_STATUS = 0
    BEGIN
    print ('Altering ' + @column_name)
    EXEC ('ALTER TABLE ' + @table_name + ' ALTER COLUMN ' + @column_name + ' nvarchar(max);')
    SELECT @view_name = 'v' + @table_name
    IF EXISTS(select * FROM sys.views where name = @view_name )
    BEGIN
    print ('Refreshing ' + @view_name)
    EXECUTE sp_refreshview @view_name -- no harm if view doesn't exist....
    END
    FETCH NEXT FROM ntext_columns INTO @table_name, @column_name
    END
    CLOSE ntext_columns
    DEALLOCATE ntext_columns

    ========= SCRIPT 2 =========

    DECLARE @TableID INTEGER
    DECLARE @TableName SYSNAME
    DECLARE @ColName SYSNAME
    DECLARE @DataType SYSNAME
    DECLARE @Length SMALLINT
    DECLARE @IsNull INTEGER
    DECLARE @WorkSQL NVARCHAR(4000)
    DECLARE @Log NVARCHAR(4000)
    DECLARE @Counter INTEGER
    SET NOCOUNT ON


    -- curColumns returns the list of columns for the specified table
    -- JUST SELECT ALL THE NVARCHARS
    DECLARE curColumns CURSOR FOR
    SELECT sc.name, st.name, sc.Prec, sc.IsNullable, so.name
    FROM syscolumns sc, systypes st, sysobjects so
    WHERE sc.id = so.id
    AND so.type = 'u'
    AND sc.xtype = st.xtype
    AND (st.name = 'nchar' or st.name = 'nvarchar')
    AND sc.name in (
    'acse_action',
    'acse_altvalue',
    'acse_filename',
    'acse_right',
    'acse_table',
    'acse_value',
    'BCal_Default',
    'BCal_EntityName',
    'Bord_AccountUpdateFieldName',
    'bord_AssignedUserId',
    'Bord_Caption',
    'bord_ChannelId',
    'Bord_CompanyUpdateFieldName',
    'Bord_Component',
    'Bord_DescriptionField',
    'bord_EntityKind',
    'Bord_IdField',
    'Bord_Name',
    'Bord_PersonUpdateFieldName',
    'Bord_Prefix',
    'Bord_ProgressNoteField',
    'Bord_ProgressTableName',
    'Bord_SLAIdField',
    'Bord_ViewAction',
    'Bord_ViewFileName',
    'Bord_WorkflowIdField',
    'bord_xxx',
    'Capt_Code',
    'Capt_Component',
    'Capt_Context',
    'Capt_CS',
    'Capt_Family',
    'Capt_FamilyType',
    'Cdbo_AliasName',
    'Cdbo_Component',
    'Cdbo_DatabaseName',
    'Cdbo_Description',
    'Cdbo_DriverName',
    'Cdbo_Password',
    'Cdbo_Port',
    'Cdbo_ServerName',
    'Cdbo_UserName',
    'Chan_Description',
    'Chan_Rule',
    'Cnc_Replacewith',
    'Cnc_String',
    'CObj_Component',
    'CObj_CreateScript',
    'CObj_EntityName',
    'Cobj_FTable',
    'Cobj_FTableFCol',
    'CObj_Name',
    'CObj_TargetList',
    'CObj_TargetTable',
    'CObj_Type',
    'CObj_UseEntity',
    'Coch_ActionID',
    'Coch_CaptCode',
    'Coch_Component',
    'ColP_ColName',
    'ColP_Component',
    'ColP_DefaultValue',
    'Colp_EndTime',
    'ColP_Entity',
    'ColP_LinkedField',
    'ColP_LookupFamily',
    'ColP_LookupWidth',
    'Colp_Restricted',
    'Colp_SearchDefaultValue',
    'Colp_SearchSQL',
    'Colp_ssViewField',
    'Colp_StartTime',
    'Colp_TiedFields',
    'Cont_BlockName',
    'Cont_Component',
    'Cont_ContainerName',
    'Cont_Height',
    'Cont_Width',
    'CPag_Component',
    'CPag_Desc',
    'CPag_Html_CS',
    'CPag_Html_DE',
    'CPag_Html_DU',
    'CPag_Html_ES',
    'CPag_Html_FR',
    'CPag_Html_JP',
    'CPag_Html_UK',
    'CPag_Html_US',
    'CPag_PageName',
    'CPag_Script',
    'CScr_Component',
    'CScr_FailureMessage',
    'CScr_LoggingLevel',
    'CScr_ScriptName',
    'CScr_ScriptType',
    'CScr_ScriptUser',
    'CScr_ScriptUserPassword',
    'CScr_TableName',
    'CScr_ViewName',
    'CuVi_Component',
    'CuVi_Description',
    'CuVi_Entity',
    'CuVi_ViewName',
    'CuVi_ViewScript',
    'DDCat_CatType',
    'DDCat_FullPath',
    'DDCat_Misc',
    'DDCat_Name',
    'DDFld_BaseType',
    'DDFld_ChildrenIDs',
    'DDFld_Name',
    'DDFld_Properties',
    'Devi_Accepts',
    'Devi_AdminDescription',
    'Devi_ContentType',
    'devi_CSS',
    'Devi_UserDescription',
    'Devi_xslFileName',
    'Dot_FileName',
    'Dot_SecurityLevel',
    'EmSe_AdminAddress',
    'EmSe_API',
    'EmSe_Component',
    'EmSe_DefaultRuleAction',
    'emse_displayname',
    'EmSe_EmailAddress',
    'EmSe_eWareLogon',
    'EmSe_eWarePassword',
    'emse_fromchannelrestriction',
    'emse_fromuserrestriction',
    'EmSe_Password',
    'emse_replytochannelrestrict',
    'emse_replytouserrestriction',
    'EmSe_Server',
    'EmSe_SMTPPassword',
    'EmSe_SMTPServer',
    'EmSe_SMTPUserName',
    'EmSe_Template',
    'EmSe_UserName',
    'EmTe_BCC',
    'EmTe_CC',
    'EmTe_Comm_Email',
    'EmTe_Comm_From',
    'EmTe_Comm_Note',
    'EmTe_Comm_ReplyTo',
    'EmTe_Entity',
    'EmTe_Name',
    'EmTe_To',
    'EntH_Description',
    'EntH_Name',
    'EntP_Question',
    'ERPE_CRMEntity',
    'ERPE_ERPToken',
    'ERPE_LastERPID',
    'ERPE_MappingName',
    'ERPE_SyncData',
    'ERPI_AllowCreateAcc',
    'ERPI_CompanyName',
    'ERPI_ContractVersion',
    'ERPI_CRMPassword',
    'ERPI_ERPPassword',
    'ERPI_ERPURL',
    'ERPI_ERPUser',
    'ERPI_IntegrationName',
    'ERPI_MetaDataVersion',
    'ERPI_ProductName',
    'ERPI_RTDSchema',
    'ERPI_SchemaVersion',
    'ERPI_SyncSchema',
    'ERPI_SyncStatus',
    'FMap_DestTable',
    'FMap_DestTableFld',
    'FMap_SourceTable',
    'FMap_SourceTableFld',
    'GriP_Alignment',
    'GriP_AllowOrderBy',
    'GriP_AllowRemove',
    'GriP_ColName',
    'GriP_Component',
    'GriP_CreateScript',
    'GriP_CustomAction',
    'GriP_CustomFunction',
    'GriP_CustomIDField',
    'GriP_DefaultOrderBy',
    'GriP_GridName',
    'GriP_Jump',
    'GriP_OrderByDesc',
    'GriP_ShowHeading',
    'GriP_ShowSelectAsGif',
    'Grip_System',
    'GriP_ViewMode',
    'HeLi_ActionId',
    'HeLi_Component',
    'HeLi_CustomFile',
    'HeLi_File',
    'HeLi_GWTContext',
    'HSet_EntityName',
    'HSIt_HolidayName',
    'Link_ForeignTable',
    'Link_ForeignTableField',
    'Link_LinkTable',
    'Link_Table',
    'Link_TableField',
    'Link_ViewName',
    'Lom_LeadFieldName',
    'Lom_OppoFieldName',
    'MaRu_Fieldname',
    'MaRu_MatchType',
    'MaRu_Tablename',
    'mesg_body',
    'mesg_DedupeOn',
    'mesg_directory',
    'mesg_fromaddress',
    'mesg_name',
    'mesg_replytoaddress',
    'mesg_subject',
    'Notf_Condition',
    'Notf_Field',
    'Notf_Value',
    'Parm_Component',
    'Parm_Name',
    'Parm_Value',
    'PaSe_ProfileName',
    'prfa_active',
    'prfa_Description',
    'prfa_intforeignid',
    'prfa_name',
    'pric_intforeignid',
    'prli_Active',
    'prli_Description',
    'prli_intforeignid',
    'prli_name',
    'prod_Active',
    'prod_code',
    'Prod_Description',
    'prod_intforeignid',
    'Prod_Name',
    'RuSe_Component',
    'RuSe_Rule1Name',
    'RuSe_Rule1Operator',
    'RuSe_Rule1Value',
    'RuSe_Rule2Name',
    'RuSe_Rule2Operator',
    'RuSe_Rule2Value',
    'RuSe_Rule3Name',
    'RuSe_Rule3Operator',
    'RuSe_Rule3Value',
    'RuSe_RuleAction',
    'RuSe_RuleDesc',
    'SeaP_ColName',
    'SeaP_Component',
    'SeaP_Jump',
    'SeaP_SearchBoxName',
    'sla_businesscalendar',
    'sla_default',
    'sla_holidayset',
    'sla_name',
    'sls_severity',
    'Tabs_Action',
    'Tabs_Bitmap',
    'Tabs_Caption',
    'Tabs_Component',
    'Tabs_CustomFileName',
    'Tabs_CustomFunction',
    'Tabs_Entity',
    'tabs_SecurityEntity',
    'Tabs_SuperAdminOnly',
    'Team_Download',
    'Team_Notify',
    'Team_Type',
    'Terr_Caption',
    'TPro_Description',
    'uom_Active',
    'uom_description',
    'uom_intforeignid',
    'uom_name',
    'uomf_Active',
    'uomf_description',
    'uomf_intforeignid',
    'uomf_name',
    'User_CTICallScreen',
    'User_CTIDeviceName',
    'User_Department',
    'user_deskid',
    'User_Device_MachineName',
    'User_EmailAddress',
    'user_EnableDoNotReprice',
    'User_ExchangeSync',
    'User_Extension',
    'User_ExternalLogonAllowed',
    'User_Fax',
    'User_FirstName',
    'user_forecastcurrency',
    'User_ForecastSecurity',
    'User_Homephone',
    'User_IsTerritoryManager',
    'User_LastEntitySyncOutcome',
    'User_LastName',
    'User_LastServer',
    'user_licencetype',
    'user_location',
    'User_Logon',
    'user_MobileEmail',
    'User_MobilePhone',
    'User_Pager',
    'User_Password',
    'User_Per_Currency',
    'User_Per_Data',
    'User_Per_InfoAdmin',
    'User_Per_Product',
    'User_Per_Solutions',
    'user_per_tree',
    'User_Per_User',
    'User_Phone',
    'User_Profile',
    'User_Resource',
    'User_ShowLogs',
    'User_TemplateName',
    'user_title',
    'User_User1',
    'user_xttc_savedsearch',
    'user_xttc_secret',
    'user_xttc_token',
    'user_xttc_username',
    'USetDef_Key',
    'USetDef_Value',
    'UsrA_UserAgent',
    'view_details',
    'view_name',
    'view_whereClause',
    'WkAc_Action',
    'WkAc_EmailCC',
    'WkAc_Field',
    'WkAc_Table',
    'WkRl_AndOR',
    'WkRl_Caption',
    'WkRl_CustomFile',
    'WkRl_CustomFunction',
    'WkRl_DotNet',
    'WkRl_Entity',
    'WkRl_Image',
    'WkRl_JavaScript',
    'WkRl_RuleType',
    'WkRl_Table',
    'WkRl_Type',
    'WkRl_UserId',
    'WkSt_Name',
    'Work_Component',
    'Work_Description',
    'Curr_Symbol')


    ORDER BY sc.name -- order by the order of the columns within the table

    SET @Counter = 1
    OPEN curColumns
    FETCH NEXT FROM curColumns INTO @ColName, @DataType, @Length, @IsNull, @TableName
    -- Create the temporary table with the first column
    WHILE @@FETCH_STATUS = 0
    BEGIN
    Select @ColName='['+ltrim(rtrim(@ColName))+']'
    SELECT @Log = @ColName

    -- convert to nvarchar, if not already
    IF (@DataType <> 'nvarchar') AND (@Length > 0)
    BEGIN
    -- If we found nchar column drop indexes that block the alter (just once), installer will recreate them during the upgrade process.
    IF (@Counter = 1)
    BEGIN
    PRINT 'Droping indexes...'
    BEGIN TRY
    ALTER TABLE custom_tables drop constraint UC_CustomTables_Name
    END TRY
    BEGIN CATCH
    END CATCH
    BEGIN TRY
    Drop index CoachingCaptions.IDX_Coch_ActionID
    END TRY
    BEGIN CATCH
    END CATCH
    BEGIN TRY
    Drop index custom_tables.IDX_Bord_Caption
    END TRY
    BEGIN CATCH
    END CATCH
    BEGIN TRY
    Drop index custom_captions.IDX_Capt_Code
    END TRY
    BEGIN CATCH
    END CATCH
    BEGIN TRY
    Drop index custom_captions.IDX_Capt_Family_Code
    END TRY
    BEGIN CATCH
    END CATCH
    BEGIN TRY
    Drop index custom_databases.IDX_Cdbo_AliasName
    END TRY
    BEGIN CATCH
    END CATCH
    BEGIN TRY
    Drop index custom_screenobjects.IDX_Cobj_Name
    END TRY
    BEGIN CATCH
    END CATCH
    BEGIN TRY
    Drop index custom_lists.IDX_GriP_GridName_ColName_Order
    END TRY
    BEGIN CATCH
    END CATCH
    BEGIN TRY
    Drop index custom_screens.IDX_SeaP_SearchBoxName_ColName
    END TRY
    BEGIN CATCH
    END CATCH
    BEGIN TRY
    Drop index custom_tabs.IDX_Tabs_Entity_Caption
    END TRY
    BEGIN CATCH
    END CATCH
    BEGIN TRY
    Drop index workflowrules.IDX_WkRl_Composite
    END TRY
    BEGIN CATCH
    END CATCH
    END
    SET @Counter = 2; --anything <> 1

    SELECT @WorkSQL = 'ALTER TABLE ' + @TableName + ' ALTER COLUMN '+@ColName+' nvarchar('+CAST(@Length AS VARCHAR)+') '
    -- determine the nullability of the column
    IF @IsNull = 1
    SELECT @WorkSQL = @WorkSQL + ' NULL'
    ELSE
    SELECT @WorkSQL = @WorkSQL + ' NOT NULL'
    BEGIN TRY
    EXEC(@WorkSQL)
    END TRY
    BEGIN CATCH
    IF (@@ERROR <> 0)
    BEGIN
    Print 'Error: Error converting '+@TableName+','+@ColName+ '('+@WorkSQL+') '+Error_Message()
    END
    END CATCH
    SELECT @Log = @Log+'(convert)'
    END

    -- Trim the column
    SELECT @WorkSQL = 'UPDATE ' + @TableName + ' SET ' +@ColName + ' = RTRIM('+@ColName+')'
    BEGIN TRY
    EXEC(@WorkSQL)
    END TRY
    BEGIN CATCH
    IF (@@ERROR <> 0)
    BEGIN
    Print 'Error: Error trimming '+@TableName+','+@ColName+ '('+@WorkSQL+') '+Error_Message()
    END
    END CATCH

    SELECT @Log = @Log+'(trim)'
    PRINT @Log

    -- Onto the next column
    FETCH NEXT FROM curColumns INTO @ColName, @DataType, @Length, @IsNull,@TableName

    END

    CLOSE curColumns
    DEALLOCATE curColumns

    PRINT 'Finished'

    ========= SCRIPT 3 =========

    UPDATE Custom_Edits SET ColP_Entity = RTRIM(ColP_Entity)
    UPDATE Custom_Edits SET ColP_ColName = RTRIM(ColP_ColName)
    UPDATE Custom_Tables SET Bord_IdField = RTRIM(Bord_IdField)
    UPDATE Custom_Tables SET Bord_ProgressTableName = RTRIM(Bord_ProgressTableName)
    UPDATE Custom_Tables SET Bord_ViewAction = RTRIM(Bord_ViewAction)
    update Custom_Tables set Bord_Name = RTRIM(Bord_Name)
    update Custom_Tables set Bord_Caption = RTRIM(Bord_Caption)
    UPDATE Activity SET acty_DBName = RTRIM(acty_DBName)
    UPDATE Activity SET acty_IPAddress = RTRIM(acty_IPAddress)
    UPDATE Activity SET acty_LogoutMethod = RTRIM(acty_LogoutMethod)
    UPDATE Activity SET acty_SID = RTRIM(acty_SID)
    UPDATE Activity SET acty_Server = RTRIM(acty_Server)
    UPDATE Activity SET acty_UserLogon = RTRIM(acty_UserLogon)
    UPDATE Activity SET acty_method = RTRIM(acty_method)
    UPDATE Address SET Addr_Address1 = RTRIM(Addr_Address1)
    UPDATE Address SET Addr_Address2 = RTRIM(Addr_Address2)
    UPDATE Address SET Addr_Address3 = RTRIM(Addr_Address3)
    UPDATE Address SET Addr_Address4 = RTRIM(Addr_Address4)
    UPDATE Address SET Addr_City = RTRIM(Addr_City)
    UPDATE Address SET Addr_Country = RTRIM(Addr_Country)
    UPDATE Address SET Addr_PostCode = RTRIM(Addr_PostCode)
    UPDATE Address SET Addr_State = RTRIM(Addr_State)
    UPDATE Address_Link SET AdLi_Type = RTRIM(AdLi_Type)
    UPDATE AdvancedFindFields SET AdFd_CloseParenthesis = RTRIM(AdFd_CloseParenthesis)
    UPDATE AdvancedFindFields SET AdFd_FieldName = RTRIM(AdFd_FieldName)
    UPDATE AdvancedFindFields SET AdFd_OpenParenthesis = RTRIM(AdFd_OpenParenthesis)
    UPDATE AdvancedFindFields SET AdFd_Operator = RTRIM(AdFd_Operator)
    UPDATE AdvancedFindFields SET AdFd_TextValue1 = RTRIM(AdFd_TextValue1)
    UPDATE AdvancedFinds SET AdFi_EntityName = RTRIM(AdFi_EntityName)
    UPDATE AdvancedFinds SET AdFi_FindName = RTRIM(AdFi_FindName)
    UPDATE CRMEmailPhoneData SET epd_EmailAddress = RTRIM(epd_EmailAddress)
    UPDATE CRMEmailPhoneData SET epd_FaxAreaCode = RTRIM(epd_FaxAreaCode)
    UPDATE CRMEmailPhoneData SET epd_FaxCountryCode = RTRIM(epd_FaxCountryCode)
    UPDATE CRMEmailPhoneData SET epd_FaxNumber = RTRIM(epd_FaxNumber)
    UPDATE CRMEmailPhoneData SET epd_PhoneAreaCode = RTRIM(epd_PhoneAreaCode)
    UPDATE CRMEmailPhoneData SET epd_PhoneCountryCode = RTRIM(epd_PhoneCountryCode)
    UPDATE CRMEmailPhoneData SET epd_PhoneNumber = RTRIM(epd_PhoneNumber)
    UPDATE Campaigns SET Camp_Name = RTRIM(Camp_Name)
    UPDATE Campaigns SET Camp_Status = RTRIM(Camp_Status)
    UPDATE CaseProgress SET Case_Priority = RTRIM(Case_Priority)
    UPDATE CaseProgress SET Case_ProblemType = RTRIM(Case_ProblemType)
    UPDATE CaseProgress SET Case_Stage = RTRIM(Case_Stage)
    UPDATE CaseProgress SET Case_Status = RTRIM(Case_Status)
    UPDATE Cases SET Case_Description = RTRIM(Case_Description)
    UPDATE Cases SET Case_FoundVer = RTRIM(Case_FoundVer)
    UPDATE Cases SET Case_Priority = RTRIM(Case_Priority)
    UPDATE Cases SET Case_ProblemType = RTRIM(Case_ProblemType)
    UPDATE Cases SET Case_Source = RTRIM(Case_Source)
    UPDATE Cases SET Case_Stage = RTRIM(Case_Stage)
    UPDATE Cases SET Case_Status = RTRIM(Case_Status)
    UPDATE Cases SET Case_TargetVer = RTRIM(Case_TargetVer)
    UPDATE Channel SET Chan_Description = RTRIM(Chan_Description)
    UPDATE CoachingCaptions SET Coch_ActionID = RTRIM(Coch_ActionID)
    UPDATE Comm_Link SET CmLi_Comm_WaveResponse = RTRIM(CmLi_Comm_WaveResponse)
    UPDATE Comm_Link SET cmli_recipient = RTRIM(cmli_recipient)
    UPDATE Communication SET Comm_Action = RTRIM(Comm_Action)
    UPDATE Communication SET Comm_Organizer = RTRIM(Comm_Organizer)
    UPDATE Communication SET Comm_Priority = RTRIM(Comm_Priority)
    UPDATE Communication SET Comm_SMSNotification = RTRIM(Comm_SMSNotification)
    UPDATE Communication SET Comm_Status = RTRIM(Comm_Status)
    UPDATE Communication SET Comm_Subject = RTRIM(Comm_Subject)
    UPDATE Communication SET Comm_Type = RTRIM(Comm_Type)
    UPDATE Company SET Comp_Employees = RTRIM(Comp_Employees)
    UPDATE Company SET Comp_MailRestriction = RTRIM(Comp_MailRestriction)
    UPDATE Company SET Comp_Name = RTRIM(Comp_Name)
    UPDATE Company SET Comp_Sector = RTRIM(Comp_Sector)
    UPDATE Company SET Comp_Source = RTRIM(Comp_Source)
    UPDATE Company SET Comp_Status = RTRIM(Comp_Status)
    UPDATE Company SET Comp_WebSite = RTRIM(Comp_WebSite)
    UPDATE Components SET Cmp_Description = RTRIM(Cmp_Description)
    UPDATE Components SET Cmp_Name = RTRIM(Cmp_Name)
    UPDATE Custom_Captions SET Capt_Code = RTRIM(Capt_Code)
    UPDATE Custom_Captions SET Capt_Family = RTRIM(Capt_Family)
    UPDATE Custom_ContainerItems SET Cont_BlockName = RTRIM(Cont_BlockName)
    UPDATE Custom_ContainerItems SET Cont_ContainerName = RTRIM(Cont_ContainerName)
    UPDATE Custom_Databases SET Cdbo_AliasName = RTRIM(Cdbo_AliasName)
    UPDATE Custom_Databases SET Cdbo_Description = RTRIM(Cdbo_Description)
    UPDATE Custom_Edits SET ColP_LookupFamily = RTRIM(ColP_LookupFamily)
    UPDATE Custom_Edits SET ColP_LookupWidth = RTRIM(ColP_LookupWidth)
    UPDATE Custom_Lists SET GriP_Alignment = RTRIM(GriP_Alignment)
    UPDATE Custom_Lists SET GriP_AllowOrderBy = RTRIM(GriP_AllowOrderBy)
    UPDATE Custom_Lists SET GriP_AllowRemove = RTRIM(GriP_AllowRemove)
    UPDATE Custom_Lists SET GriP_CustomAction = RTRIM(GriP_CustomAction)
    UPDATE Custom_Lists SET GriP_CustomIDField = RTRIM(GriP_CustomIDField)
    UPDATE Custom_Lists SET GriP_GridName = RTRIM(GriP_GridName)
    UPDATE Custom_Lists SET GriP_OrderByDesc = RTRIM(GriP_OrderByDesc)
    UPDATE Custom_Lists SET GriP_ShowHeading = RTRIM(GriP_ShowHeading)
    UPDATE Custom_Lists SET GriP_ShowSelectAsGif = RTRIM(GriP_ShowSelectAsGif)
    UPDATE Custom_Lists SET GriP_ViewMode = RTRIM(GriP_ViewMode)
    UPDATE Custom_ReportBands SET ReBa_DatePartition = RTRIM(ReBa_DatePartition)
    UPDATE Custom_ReportBands SET ReBa_InRangeField = RTRIM(ReBa_InRangeField)
    UPDATE Custom_ReportSearches SET ReSe_Component = RTRIM(ReSe_Component)
    UPDATE Custom_ReportSearches SET ReSe_SearchName = RTRIM(ReSe_SearchName)
    UPDATE Custom_ScreenObjects SET CObj_EntityName = RTRIM(CObj_EntityName)
    UPDATE Custom_ScreenObjects SET CObj_Name = RTRIM(CObj_Name)
    UPDATE Custom_ScreenObjects SET CObj_TargetTable = RTRIM(CObj_TargetTable)
    UPDATE Custom_ScreenObjects SET CObj_Type = RTRIM(CObj_Type)
    UPDATE Custom_ScreenObjects SET CObj_UseEntity = RTRIM(CObj_UseEntity)
    UPDATE Custom_Screens SET SeaP_Jump = RTRIM(SeaP_Jump)
    UPDATE Custom_Screens SET SeaP_ColName = RTRIM(SeaP_ColName)
    UPDATE Custom_Screens SET SeaP_SearchBoxName = RTRIM(SeaP_SearchBoxName)
    UPDATE Custom_Tables SET Bord_ProgressNoteField = RTRIM(Bord_ProgressNoteField)
    UPDATE Custom_Tables SET Bord_ViewFileName = RTRIM(Bord_ViewFileName)
    UPDATE Custom_Tables SET bord_IntegrationTable = RTRIM(bord_IntegrationTable)
    UPDATE Custom_Tables SET bord_WebServiceTable = RTRIM(bord_WebServiceTable)
    UPDATE Custom_Tabs SET Tabs_Action = RTRIM(Tabs_Action)
    UPDATE Custom_Tabs SET Tabs_Bitmap = RTRIM(Tabs_Bitmap)
    UPDATE Custom_Tabs SET Tabs_Caption = RTRIM(Tabs_Caption)
    UPDATE Custom_Tabs SET Tabs_CustomFileName = RTRIM(Tabs_CustomFileName)
    UPDATE Custom_Tabs SET Tabs_Entity = RTRIM(Tabs_Entity)
    UPDATE DData SET DData_ShortStr = RTRIM(DData_ShortStr)
    UPDATE DataUpload SET DaUp_DateFormat = RTRIM(DaUp_DateFormat)
    UPDATE DataUpload SET DaUp_Description = RTRIM(DaUp_Description)
    UPDATE DataUpload SET DaUp_Type = RTRIM(DaUp_Type)
    UPDATE DataUpload SET DaUp_UploadFileName = RTRIM(DaUp_UploadFileName)
    UPDATE DataUpload_Link SET DLink_DataHeader = RTRIM(DLink_DataHeader)
    UPDATE DataUpload_Link SET DLink_Entity = RTRIM(DLink_Entity)
    UPDATE DataUpload_Link SET DLink_FieldName = RTRIM(DLink_FieldName)
    UPDATE DataUpload_Link SET DLink_FieldType = RTRIM(DLink_FieldType)
    UPDATE DataUpload_Link SET DLink_SubEntity = RTRIM(DLink_SubEntity)
    UPDATE Email SET Emai_EmailAddress = RTRIM(Emai_EmailAddress)
    UPDATE LPCategory SET LPCat_Name = RTRIM(LPCat_Name)
    UPDATE LPGadget SET LPGad_Name = RTRIM(LPGad_Name)
    UPDATE LPLayout SET LPLayout_Name = RTRIM(LPLayout_Name)
    UPDATE LeadProgress SET Lead_Description = RTRIM(Lead_Description)
    UPDATE LeadProgress SET Lead_Priority = RTRIM(Lead_Priority)
    UPDATE LeadProgress SET Lead_Source = RTRIM(Lead_Source)
    UPDATE LeadProgress SET Lead_Stage = RTRIM(Lead_Stage)
    UPDATE LeadProgress SET Lead_Status = RTRIM(Lead_Status)
    UPDATE Lead SET Lead_CompanyName = RTRIM(Lead_CompanyName)
    UPDATE Lead SET Lead_CompanyWebSite = RTRIM(Lead_CompanyWebSite)
    UPDATE Lead SET Lead_Description = RTRIM(Lead_Description)
    UPDATE Lead SET Lead_PersonEMail = RTRIM(Lead_PersonEMail)
    UPDATE Lead SET Lead_PersonFirstName = RTRIM(Lead_PersonFirstName)
    UPDATE Lead SET Lead_PersonLastName = RTRIM(Lead_PersonLastName)
    UPDATE Lead SET Lead_Priority = RTRIM(Lead_Priority)
    UPDATE Lead SET Lead_Rating = RTRIM(Lead_Rating)
    UPDATE Lead SET Lead_Stage = RTRIM(Lead_Stage)
    UPDATE Lead SET Lead_Status = RTRIM(Lead_Status)
    UPDATE Library SET Libr_Category = RTRIM(Libr_Category)
    UPDATE Library SET Libr_Status = RTRIM(Libr_Status)
    UPDATE Library SET Libr_Type = RTRIM(Libr_Type)
    UPDATE OpportunityProgress SET Oppo_Priority = RTRIM(Oppo_Priority)
    UPDATE OpportunityProgress SET Oppo_Stage = RTRIM(Oppo_Stage)
    UPDATE OpportunityProgress SET Oppo_Status = RTRIM(Oppo_Status)
    UPDATE Opportunity SET Oppo_Description = RTRIM(Oppo_Description)
    UPDATE Opportunity SET Oppo_Priority = RTRIM(Oppo_Priority)
    UPDATE Opportunity SET Oppo_Source = RTRIM(Oppo_Source)
    UPDATE Opportunity SET Oppo_Stage = RTRIM(Oppo_Stage)
    UPDATE Opportunity SET Oppo_Status = RTRIM(Oppo_Status)
    UPDATE Person SET Pers_Department = RTRIM(Pers_Department)
    UPDATE Person SET Pers_FirstName = RTRIM(Pers_FirstName)
    UPDATE Person SET Pers_LastName = RTRIM(Pers_LastName)
    UPDATE Person SET Pers_MailRestriction = RTRIM(Pers_MailRestriction)
    UPDATE Person SET Pers_MiddleName = RTRIM(Pers_MiddleName)
    UPDATE Person SET Pers_Salutation = RTRIM(Pers_Salutation)
    UPDATE Person SET Pers_Source = RTRIM(Pers_Source)
    UPDATE Person SET Pers_Status = RTRIM(Pers_Status)
    UPDATE Person SET Pers_Suffix = RTRIM(Pers_Suffix)
    UPDATE Person SET Pers_TitleCode = RTRIM(Pers_TitleCode)
    UPDATE Person SET Pers_Title = RTRIM(Pers_Title)
    UPDATE Person SET Pers_WebSite = RTRIM(Pers_WebSite)
    UPDATE Person_Link SET PeLi_Type = RTRIM(PeLi_Type)
    UPDATE Phone SET Phon_AreaCode = RTRIM(Phon_AreaCode)
    UPDATE Phone SET Phon_CountryCode = RTRIM(Phon_CountryCode)
    UPDATE Phone SET Phon_Number = RTRIM(Phon_Number)
    UPDATE RelatedEntityData SET rend_Notes = RTRIM(rend_Notes)
    UPDATE RelatedEntityLinks SET renl_Color = RTRIM(renl_Color)
    UPDATE RelatedEntityLinks SET renl_description = RTRIM(renl_description)
    UPDATE RelatedEntityLinks SET renl_entity1 = RTRIM(renl_entity1)
    UPDATE RelatedEntityLinks SET renl_entity2 = RTRIM(renl_entity2)
    UPDATE RelatedEntityLinks SET renl_reciprocal = RTRIM(renl_reciprocal)
    UPDATE RelatedEntityLinks SET renl_relationship = RTRIM(renl_relationship)
    UPDATE RelatedEntityLinks SET renl_type = RTRIM(renl_type)
    UPDATE Rep_EntityLinks SET RLink_Child = RTRIM(RLink_Child)
    UPDATE Rep_EntityLinks SET RLink_ExtraSql = RTRIM(RLink_ExtraSql)
    UPDATE Rep_EntityLinks SET RLink_LinkField = RTRIM(RLink_LinkField)
    UPDATE Rep_EntityLinks SET RLink_LinkIDField = RTRIM(RLink_LinkIDField)
    UPDATE Rep_EntityLinks SET RLink_Parent = RTRIM(RLink_Parent)
    UPDATE SDataService SET sdsv_IntegrationURLSuffix = RTRIM(sdsv_IntegrationURLSuffix)
    UPDATE TableScriptsLogs SET TLog_Function = RTRIM(TLog_Function)
    UPDATE Users SET User_Department = RTRIM(User_Department)
    UPDATE Users SET User_Disabled = RTRIM(User_Disabled)
    UPDATE Users SET User_Extension = RTRIM(User_Extension)
    UPDATE Users SET User_FirstName = RTRIM(User_FirstName)
    UPDATE Users SET User_Language = RTRIM(User_Language)
    UPDATE Users SET User_LastName = RTRIM(User_LastName)
    UPDATE Users SET User_Phone = RTRIM(User_Phone)
    UPDATE WaveItems SET WaIt_Name = RTRIM(WaIt_Name)
    UPDATE WaveItems SET WaIt_Status = RTRIM(WaIt_Status)
    UPDATE WaveItems SET WaIt_Type = RTRIM(WaIt_Type)
    UPDATE Waves SET Wave_Name = RTRIM(Wave_Name)
    UPDATE Waves SET Wave_Status = RTRIM(Wave_Status)
    UPDATE WorkflowActions SET WkAc_Action = RTRIM(WkAc_Action)
    UPDATE WorkflowActions SET WkAc_Field = RTRIM(WkAc_Field)
    UPDATE WorkflowActions SET WkAc_Table = RTRIM(WkAc_Table)
    UPDATE WorkflowRules SET WkRl_Caption = RTRIM(WkRl_Caption)
    UPDATE WorkflowRules SET WkRl_Entity = RTRIM(WkRl_Entity)
    UPDATE WorkflowRules SET WkRl_Image = RTRIM(WkRl_Image)
    UPDATE WorkflowRules SET WkRl_RuleType = RTRIM(WkRl_RuleType)
    UPDATE WorkflowRules SET WkRl_Table = RTRIM(WkRl_Table)
    UPDATE WorkflowState SET WkSt_Name = RTRIM(WkSt_Name)
    UPDATE Workflow SET Work_Description = RTRIM(Work_Description)


    EXEC sp_MSforeachtable @command1="print 'Rebuilding ?' ALTER INDEX ALL on ? REBUILD"
    GO
    EXEC sp_updatestats
    GO

  • 0

    Thank you.

    That fixed it.