March 23, 2006 at 2:18 pm
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.
March 24, 2006 at 4:59 am
Did this work for you in 2000?
Also I take it that package '\PkgFolder\DataUpload' does exists on the server and not as a file on the server?
Thanks Jeet
March 24, 2006 at 5:04 am
Yes. the directory under msdb\ in integration services. it is on SQL server, not on file server. That is why I execute the statement using /SQL.
Thanks
March 24, 2006 at 5:05 am
it appears that you are attempting to load a structured storage file (.dts) with the LoadFromSQLServer method. The package name appears to be a path.
-Mike Gercevich
March 24, 2006 at 5:10 am
Check the order of your parameters for the method call:
Package.LoadFromSQLServer ServerName, [ServerUserName], [ServerPassword], _
[Flags], [PackagePassword], [PackageGuid], [PackageVersionGuid], _
[PackageName], [pVarPersistStgOfHost]
All params are not optional, and will need to be nulled if not used.
-Mike Gercevich
March 24, 2006 at 5:11 am
THE FILE IS ON SQL SERVER. Please note that I included the stmt. dtexec /SQL pkgfolder\packagename.. The reason for the pkgfolder is a way to group my subsystems. Nothing to do with fileserver directories.
Thanks.
March 24, 2006 at 5:18 am
In which case you should be using the method LoadFromStorageFile.
Thanks Jeet
April 6, 2006 at 4:29 pm
None of the options worked. So I created a class to execute from VB rather than SQL server and included that class. I haven't finished testing yet and will post how it goes.
Thanks.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply