AnsweredAssumed Answered

ArcPy is not able to open a Table.

Question asked by xtian79 on Aug 11, 2020

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 Nigthly 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.

What could be the possible causes for this behavior?

Outcomes