Feature Class getting stuck in Load-Only Mode running script through task scheduler

123
4
09-11-2013 04:55 AM
MarcCusumano
Occasional Contributor
I have developed a Python Script that performs a variety of geoprocessing and data-loading tasks, including kicking off SQL statements through the command-line. We have tested the script extensively in our development environment, and it successfully runs in production. However when run through the windows task scheduler the target SDE feature class ends up getting stuck in "Load-Only Mode", even though the script ran successfully.

All SQL statements run as a sub-process and report errors back to the Python environment, but messages that do not halt execution are not transferred.

I'm at a loss as to why this would happen exclusively through automation and not when run manually. Any help, ideas, or comments would be appreciated.
0 Kudos
4 Replies
SachinKanaujia
Occasional Contributor III
Can you elaborate a bit on it? Is it a long running script? Have you run the script again after that and it works fine when not run from Task scheduler? Can you try to run just a script from the task scheduler which changes the layer from loadonly to normal_io. I am just trying to rule out a possibility of timeout issues etc.

Are you logging all messages?
0 Kudos
MarcCusumano
Occasional Contributor
The script takes about 45 minutes to complete. After the feature class gets stuck in "Load-Only Mode" it is unusable.

I have tried replicating the issue in our development environment by launching the script in task scheduler there, but have been unsuccessful. I am thinking it is something unique to production, ie a conflict with another process etc.
0 Kudos
MarcoBoeringa
MVP Regular Contributor
I have tried replicating the issue in our development environment by launching the script in task scheduler there, but have been unsuccessful. I am thinking it is something unique to production, ie a conflict with another process etc.


Have you ruled out differences in database privileges / rights between development and production? It might be that your development environment database user login has more rights than a "similar" user on production.
0 Kudos
SachinKanaujia
Occasional Contributor III
You can try to explicitly change it to normal_io mode and see if it is giving you some error. It could be something specific to your production environment. Either its failing abruptly while loading the data and so leaves it in load only mode or else there are tablespace issues which is not allowing it to rebuild the indexes and thus change it to normal mode.
0 Kudos