Invalid object name 'OSSYS_TENANT'

Hi team, my application was able to function till yesterday where this error pop up of nowhere.

It occurs when it trying to go into function in another module.

Related error was as below ::


Invalid object name 'OSSYS_TENANT'.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at OutSystems.HubEdition.DatabaseProvider.SqlServer.ExecutionService.ExecutionService.ExecuteReader(IDbCommand cmd)
   at OutSystems.HubEdition.DatabaseProvider.SqlServer.ExecutionService.ExecutionService.ExecuteScalar(IDbCommand cmd)
   at OutSystems.Internal.Db.Command.<ExecuteScalar>b__47_0()
   at OutSystems.Internal.Db.DatabaseAccess.ExecuteWithoutRequestTimeout[T](Func`1 action)
   at OutSystems.Internal.Db.Command.ExecuteScalar(String description, Boolean isApplication, Boolean skipLog, Boolean applyTransformationsToParameters)
   at OutSystems.HubEdition.RuntimePlatform.DBRuntimePlatform.GetTenantIdByEspaceId(Transaction tran, Int32 espaceId)
   at ssINF_Infinity_BL.Processes.ProcExcAddItemGroupToPayRun.LaunchAddItemGroupToPayRun(HeContext heContext, Int32 inParam_parentActivityId, Int32 inParam_parentProcessId, Object inParam_nextActivitiesIds, Int64 InParamPayRunId, Int32& outParamProcessId)
   at ssINF_Infinity_BL.Actions.ActionItemGroup_AddSelected(HeContext heContext, Int64 inParamPayRunId, RLItemGroupEmployeeStructureList inParamTimesheetEmployeeIdList, String inParamPayRunName, Int32 inParamPayRunTypeId, String inParamRequestId)
   at ssINF_Timesheet_UI.RsseSpaceINF_Infinity_BL.MssItemGroup_AddSelected(HeContext heContext, Int64 inParamPayRunId, RecordList inParamTimesheetEmployeeIdList, String inParamPayRunName, Int32 inParamPayRunTypeId, String inParamRequestId)
   at ssINF_Timesheet_UI.Flows.FlowPayRunFlow.ScrnTimesheetsForPayRun.CommandAddSelectedTimesheets_Click(HeContext heContext)


I was not able to find stuff related to tenant and debug is not to able trace either.

Hi Chun,

open the dependency tab, and check systems, there you can find it.

May be you need to refresh the dependency and try again.

Manish Jawla wrote:

Hi Chun,

open the dependency tab, and check systems, there you can find it.

May be you need to refresh the dependency and try again.


Hi, both my main module and function module are up to date from the dependences aspect and none of the tenant-related functions been add before.

Hi Chun,

have you tried to debug the scenario, where exactly it is breaking? i mean in which action?


Manish Jawla wrote:

Hi Chun,

have you tried to debug the scenario, where exactly it is breaking? i mean in which action?


Yes, The scenario is like below ::

Main module a call Function GetData (Dependencies.)
Function GetData in module b 


Debug ::
In module a, debug go until the function GetData.
Next step should be go to module b but it went error and show All exception error.

Manish Jawla wrote:

Hi Chun,

have you tried to debug the scenario, where exactly it is breaking? i mean in which action?



Function B is Process Launcher