Question
· Aug 16, 2017

PROTECT error

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 ?

Thanks.

Discussion (5)1
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.