CM Wang · Aug 16, 2017


I try to run below two statements

Set tRS = ##class(%ResultSet).%New("%Dictionary.ClassDefinition:SubclassOf")
​set tSC = tRS.Execute("%Persistent")

and I always get <PROTECT>check+5^%Dictionary.ClassDefinitionQuery.1

The login user is _SYSTEM and should have all the permissions.

I cannot run queries in the $SYSTEM.SQL.Shell(). I would get <PROTECT>%GenerateMetadata+16^%SQL.StatementMetadata.1

However, when I run the query through SMP, everything is fine.

Any idea where could I start to investigate ?


0 1,758
Discussion (5)6
Log in or sign up to continue

Hello CM,

What OS is this? What user are you logged into the OS as before starting the terminal/csession?

<PROTECT> errors can sometimes be caused by OS-level permissions on the CACHE.DAT. I recommend to make sure this user has permissions on the CACHE.DAT file and directory. It could be working through SMP because that process will run as the same user as other background processes, which could be a different user than your terminal process.



Thanks, it was worked for me after giving Cache.Dat file permission for User account.

Use the Audit log features from the management portal.   The error details will tell you more specifically why it failed.