After scheduling a task through SQLServer Agent it generated the error below when executing the DTS. The DTS package required Oracle OLE-DB drivers which was installed. The error message is a generic error message.
Step Error Source: Microsoft Data Transformation Services (DTS) Package
Step Error Description:Class not registered
(Microsoft Data Transformation Services (DTS) Package (80040154): Class not registered) (Microsoft OLE DB Service Components (80040154): Class not registered)
Step Error code: 80040154
Step Error Help File:sqldts80.hlp
Step Error Help Context ID:1100
Command to be executed: dtsrun.exe /S server /E /N “DTS Package name”
To narrow down the issue the following steps were performed, the command was executed on the command line which ran successfully, then tried executing the command using the service account that SQLServer Agent runs using and which also run successfully too. This narrowed the issue that it was related to when the command was being executed through SQLServer Agent so after restarting SQLServer Agent it fixed the issue.