Solved! Go to Solution.
Hello guys,
I have a python script which geocodes data from a SQL Server database. The script uses an OLE DB connection to connect to the data, and the connection uses a SQL Server user with a password. I have created a SQL Server Agent job to run the script.
When the OLE DB connection points to a database on the same server where the Python script is, the SQL Server job starts the Python script and executes it successfully. No problems here.
When the OLE DB connection points to a database on a different server (not where the Python script is), the job starts the Python script (I have a log file and it shows that the first few statements are executed) and then when it has to connect to the database just hangs and does nothing. No error. Just hangs. If I run the same Python script from the IDLE, it runs successfully.
I believe that the problem comes from the account running the script, which in this case is the account running the SQL Sever job. But I am not sure what I need to do to make this work.
Any idea is greatly appreciated!
Thank you!
Darina