sp_OAMethod

  •  Trying to execute the Stored procedure with the following statment

    -- Call the load method on the DTS Package object pass the path

    EXEC

    @HRESULT = sp_OACreate 'DTS.Package', @DTSPackageObject OUTPUT

    EXEC @HRESULT = sp_OAMethod @DTSPackageObject, 'LoadFromSqlServer', Null, @ServerName='XYZ', @packagename='\PkgFolder\DataUpload', @flags=256

    Getting the following error

    The specified DTS Package ('Name = '\PkgFolder\DataUpload'; ID.VersionID = {[not specified]}.{[not specified]}') does not exist.

    I am executing the SP from Query Analyzer and using SQL Server 2005. As noticed I am using windows authentication. I can execute this package using dtexec /SQL pkgfolder\Dataupload on the command window of sql server 2005 with out any problem. Any help is greatly appreciated. 

    For that matter I am not able to execute any package from the stored proc. I am getting the same error.

     

    Thanks. 

  • This was removed by the editor as SPAM

  • Try using the full UNC path for the package.  The current drive and current directory for the command window is not necessarily the same as the settings used by sp_OAMethod.

    It also may be a security issue.  sp_OAMethod may run as the SQL Server service login, while a command executed at a command prompt runs with your login credentials.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply