There are several scripts that create a geodatabase, modify the schema and insert data on the database. This scripts are designed as part of a solution. In a Nightly process this scripts are called, several times, in order to have several databases (Development/Testing process).
The scripts include the creation of SDE files for the connection based on User/Password.
When progress logs are checked,time to time, the scripts have failed:
cannot open 'DataOwner.PROJECT_STATUS'
but is not always the same table.
Running the set of scripts again in the morning they work fine.
Trying to find a possible cause, in the SQL server logs I found some entries that match the time when the scripts fail:
Date 8/11/2020 5:18:45 AM Log SQL Server (Current - 8/11/2020 6:00:00 AM) Source spid71 Message The connection has been dropped because the principal that opened it subsequently assumed a new security context, and then tried to reset the connection under its impersonated security context. This scenario is not supported. See "Impersonation Overview" in Books Online.
Currently in the scripts, there is no impersonation.
After checking the configuration of the server, there is no other task/batch/script running at the same time that modifies/tries access to the database server instance. After some research with colleagues, the behavior has been seldom spotted on manual execution of the scripts.
What could be the possible causes for this behavior?