Joe Rojas
JRojas at tnco-inc.com
Wed Jul 13 07:33:05 CDT 2005
It turns out that the file (bom.txt) that is used in a prior step of my DTS is still opened by the DTS and therefore cannot be deleted. If I use a second DTS package that only deletes the file, then it works just fine. JR -----Original Message----- From: Michael Maddison [mailto:michael at ddisolutions.com.au] Sent: Wednesday, July 13, 2005 1:40 AM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] Active Script Task in DTS Joe, I suspect it's a permissions issue. What account is DTS (agent) running under? If its system then that may be the problem. We did something similar once and found that creating a job to run the package where you can set the permissions to run under fixed the issue we were having. cheers Michael M The E drive is an actual local drive. I know the path works because I am importing bom.txt in a previous step with success. To note, it looks like I can't delete a file from an ActiveX task, which is part of a move. I can use the CopyFile method from the FileSystemObject but I can't do a move or delete. If I run the code below from a .vbs file on the server that is running the DTS package, the DeleteFile and MoveFile methods work! I wonder is if this is some kind of limitation for DTS in SS7? Thanks, Joe Rojas IT Manager TNCO, Inc. 781-447-6661 x7506 jrojas at tnco-inc.com -----Original Message----- From: Elam, Debbie [mailto:DElam at jenkens.com] Sent: Tuesday, July 12, 2005 3:03 PM To: 'dba-sqlserver at databaseadvisors.com' Subject: RE: [dba-SQLServer] Active Script Task in DTS Are you sure that e:\ is the same drive you think you are referring to? This can be tricky with DTS, I always use the UNC path to avoid confusion. Debbie -----Original Message----- From: Joe Rojas [mailto:JRojas at tnco-inc.com] Sent: Tuesday, July 12, 2005 1:46 PM To: 'dba-sqlserver at databaseadvisors.com' Subject: [dba-SQLServer] Active Script Task in DTS In DTS designer, I added an Active Script Task to my DTS package as the last step. This task is supposed to move a text file from one location to another. I am trying to do this with the code below but I get a permission denied error. Function Main() Dim fso Set fso = CreateObject("Scripting.FileSystemObject") fso.MoveFile "E:\ftp\bom.txt", "E:\ftp\pub\" Set fso = Nothing Main = DTSTaskExecResult_Success End Function I check the folder permissions and the Everyone group has full control over these folders. Any ideas? Thanks! JR This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com - JENKENS & GILCHRIST E-MAIL NOTICE - This transmission may be: (1) subject to the Attorney-Client Privilege, (2) an attorney work product, or (3) strictly confidential. If you are not the intended recipient of this message, you may not disclose, print, copy or disseminate this information. If you have received this in error, please reply and notify the sender (only) and delete the message. Unauthorized interception of this e-mail is a violation of federal criminal law. This communication does not reflect an intention by the sender or the sender's client or principal to conduct a transaction or make any agreement by electronic means. Nothing contained in this message or in any attachment shall satisfy the requirements for a writing, and nothing contained herein shall constitute a contract or electronic signature under the Electronic Signatures in Global and National Commerce Act, any version of the Uniform Electronic Transactions Act or any other statute governing electronic transactions. _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com This electronic transmission is strictly confidential to TNCO, Inc. and intended solely for the addressee. It may contain information which is covered by legal, professional, or other privileges. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy, or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. While TNCO, Inc. uses virus protection, the recipient should check this email and any attachments for the presence of viruses. TNCO, Inc. accepts no liability for any damage caused by any virus transmitted by this email.