Using the Export Activity in automation generates the following error: Object reference not set to an instance of an object
To try and ferret out the problem I created an automation script with one each of Execute Script, Select To File, and Export Wizard activities. All use the same SQL code. The last two both save/export to a simple XLSX file. They all use the same connection object. That same connection object is specified in both the test and production settings. Note, the connection object has the database password saved in it. Also, Toad was logged in using the same connection when the automation script was created. One more point, the Export activity has the Use Automation Connection checked and the same connection is selected.
When I run the automation script Toad is not logged into the database (since this is what will happen when it is scheduled)
The Execute and Select work just fine, no problems. The export activity fails.
Addiitonal testing,
-
Logged Toad into the database, using the same connection object. Ran the script with the same results (Export failed)
-
Logged in using a DIFFERENT connection object (with the same username/password) - and it runs just fine! No error in the export activity.
If I can send addiitonal information, please let me know.
Thanks,
Ken