dbTalk Databases Forums  

Permissions problems loading DTS file in C#

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Permissions problems loading DTS file in C# in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Paul Enfield
 
Posts: n/a

Default Permissions problems loading DTS file in C# - 01-12-2005 , 05:11 PM






I'm using the code sample provided at
http://SQLDev.Net/DTS/DotNETCookBook.htm to attempt to load a .DTS package
in C# through the COM Interop services, and execute it.

When the LoadFromStorageFile method is called I get the following error:

System.Runtime.InteropServices.COMException (0x80040414): Cannot find
specified package in the storage location specified. at
Microsoft.SQLServer.DTSPkg80.Package2Class.LoadFro mStorageFile(String
UNCFile, String Password, String PackageID, String VersionID, String Name,
Object& pVarPersistStgOfHost) at ExecPkg.App.Main(String[] args) in
h:\test\dts cookbook\execpkgcs\execpkg.cs:line 32

Initially I was getting a nondescript security exception but worked around
it by setting the .Net Framework Runtime Security Policy/Machine/Permission
Sets to FullTrust.

Thus far I have also tried:
- Granting full ACL's to the file to Everyone at both the domain level and
the local machine level.
- Using explicit path references
- Using UNC reference
- Placing the file local to the executable
- Placing the file on a remote network drive
- Placing the file on the SQL Server itself
- Enabling file auditing, and setting up Failure Audit's on the .DTS file
(nothing triggered... not entirely sure I did this right =^| )

Any pointers appreciated.



Reply With Quote
  #2  
Old   
Peter Warren via SQLMonster.com
 
Posts: n/a

Default Re: Permissions problems loading DTS file in C# - 01-12-2005 , 05:52 PM






May I suggest that you save your package in SQL Server and try loading from SQL Server, however, you may then encounter my problem which is the inability to access the local file system from the DTS Package.
I have run SQL under a special account, folder and files have permission to this account and the package runs using windows authentication. I have also used both UNC and local file naming conventions. I am trying to copy a file from a remote server to a local folder (on E and have tried mapping drive in vbscript and batch file and also tried using FTP. The issue seems to be with the local file system rather than the remote file system.

Error message:
OnError in DTSStep_DTSFTPTask_1; ErrorCode = -2147220489, Source = File Transfer Protocol Task, Description = Folder E:\SFU\LocalUser\ does not exist or is not accesible on destination.
OnFinish in DTSStep_DTSFTPTask_1

--
Message posted via http://www.sqlmonster.com

Reply With Quote
  #3  
Old   
Paul Enfield
 
Posts: n/a

Default Re: Permissions problems loading DTS file in C# - 01-12-2005 , 05:57 PM



I've had no problems running the packages from SQL Server using the
LoadFromSQLServer method.

I was hoping to avoid deployment challenges by deploying .DTS files as
opposed to storing them in the SQL Server itself.

Other suggestions appreciated as well.

TIA



"Peter Warren via SQLMonster.com" <forum (AT) SQLMonster (DOT) com> wrote

Quote:
May I suggest that you save your package in SQL Server and try loading
from SQL Server, however, you may then encounter my problem which is the
inability to access the local file system from the DTS Package.
Quote:
I have run SQL under a special account, folder and files have permission
to this account and the package runs using windows authentication. I have
also used both UNC and local file naming conventions. I am trying to copy a
file from a remote server to a local folder (on E and have tried mapping
drive in vbscript and batch file and also tried using FTP. The issue seems
to be with the local file system rather than the remote file system.
Quote:
Error message:
OnError in DTSStep_DTSFTPTask_1; ErrorCode = -2147220489, Source = File
Transfer Protocol Task, Description = Folder E:\SFU\LocalUser\ does not
exist or is not accesible on destination.
Quote:
OnFinish in DTSStep_DTSFTPTask_1

--
Message posted via http://www.sqlmonster.com



Reply With Quote
  #4  
Old   
Mark
 
Posts: n/a

Default Re: Permissions problems loading DTS file in C# - 01-14-2005 , 09:43 PM



Does the sample work?
As the COM Interop is used, it means something inside package is not in the
..net framework world. How about try to register the .dll with
regasm.exe...then try again.


Mark
"Paul Enfield" <penfield (AT) paraport (DOT) com> wrote

Quote:
I'm using the code sample provided at
http://SQLDev.Net/DTS/DotNETCookBook.htm to attempt to load a .DTS package
in C# through the COM Interop services, and execute it.

When the LoadFromStorageFile method is called I get the following error:

System.Runtime.InteropServices.COMException (0x80040414): Cannot find
specified package in the storage location specified. at
Microsoft.SQLServer.DTSPkg80.Package2Class.LoadFro mStorageFile(String
UNCFile, String Password, String PackageID, String VersionID, String Name,
Object& pVarPersistStgOfHost) at ExecPkg.App.Main(String[] args) in
h:\test\dts cookbook\execpkgcs\execpkg.cs:line 32

Initially I was getting a nondescript security exception but worked around
it by setting the .Net Framework Runtime Security
Policy/Machine/Permission
Sets to FullTrust.

Thus far I have also tried:
- Granting full ACL's to the file to Everyone at both the domain level and
the local machine level.
- Using explicit path references
- Using UNC reference
- Placing the file local to the executable
- Placing the file on a remote network drive
- Placing the file on the SQL Server itself
- Enabling file auditing, and setting up Failure Audit's on the .DTS file
(nothing triggered... not entirely sure I did this right =^| )

Any pointers appreciated.





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.