MSSQL - tables in a non "dbo" schema preventing onboarding

Feature(s) impacted

I’m not able to add tables my project as they are not in the DBO schema in my MSSQL Database

Observed behavior

When setting up the project I get the following error

An error occurred, when deploying Agent: Forest Admin Cloud introspection error: The object ‘[xxxx]’ does not exist in database ‘yyyy’ or is invalid for this operation.

Expected behavior

It should detect all the tables in the non “DBO” schema"

Failure Logs

I used SQL Profiler and found the SQL statement returning the message.

exec sp_executesql @statement=N’EXEC sys.sp_helpindex @objname = N’‘[TABLENAME]’‘;’

I think the schema name may need to be in the TABLENAME space along with the table name.


  • Project name: Company Editor
  • Team name: Operations
  • Environment name: Dev
  • Agent (forest package) name & version: Hosting
  • Database type: MSSQL 15.0.4236
  • Recent changes made on your end if any: None

I think I have worked out the fix.

The statement should be like this IF a schema is set in the connection details screen

exec sp_executesql @statement=N’EXEC sys.sp_helpindex @objname = N’‘[SCHEMA].[TABLE]’‘;’


exec sp_executesql @statement=N’EXEC sys.sp_helpindex @objname = N’‘[TABLE]’‘;’


Hello @David_Martin,

Thank you for your very detailed report. I’ll try to reproduce the issue on my side and let you know.

Just to be sure, are you using the cloud version of Forest Admin, or are you hosting the agent’s code yourself?


First off - Great product!

Hosted with you guys.

I have a work around. If I set the DEFAULT schema to the schema that has my table it works fine.


Ok, thanks for sharing the tip. I’m glad to see that you found a workaround in the meantime. It’ll give me more time to investigate!

1 Like