dbTalk Databases Forums  

DTS: exporting data to csv file

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


Discuss DTS: exporting data to csv file in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
X. Zhang
 
Posts: n/a

Default DTS: exporting data to csv file - 12-03-2004 , 08:49 AM






I got a very strange situation:
I wrote code to export data to csv file within ASP using VBScript. (My
VBScript code was based on the VB code that was created by "Save As" to
"Visual Basic File" in DTS Designer.) In debug mode, I had no problem to
export data. However, the Copy-data step failed when I open this ASP page
directly in IE. I tried to export data to xls file with the same method, and
I had no problem to export data in both debug and non-debug mode.

Anybody has any clues for this problem? Thanks.

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: DTS: exporting data to csv file - 12-07-2004 , 07:18 AM






In message <6183EC2A-3176-41AF-BD0D-2E6EF2CC8EF5 (AT) microsoft (DOT) com>, X.
Zhang <XZhang (AT) discussions (DOT) microsoft.com> writes
Quote:
I got a very strange situation:
I wrote code to export data to csv file within ASP using VBScript. (My
VBScript code was based on the VB code that was created by "Save As" to
"Visual Basic File" in DTS Designer.) In debug mode, I had no problem to
export data. However, the Copy-data step failed when I open this ASP page
directly in IE. I tried to export data to xls file with the same method, and
I had no problem to export data in both debug and non-debug mode.

Anybody has any clues for this problem? Thanks.
It is probably die to the security context that the package is running
under. You are best of using impersonation, perhaps through COM+. This
is explained a bit further here, on page 2-

Execute a package from Active Server Pages (ASP)
(http://www.sqldts.com/default.aspx?207)
--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #3  
Old   
X. Zhang
 
Posts: n/a

Default Re: DTS: exporting data to csv file - 12-16-2004 , 09:15 AM



But why does it work while running in debug mode? And why does it work for
XLS file (both XLS and CSV in the same security context)?

PS: I tried to save the package to a storage file, and then
LoadFromStorageFile. I thought in this way I can bypass some SQL Server
security stuff. But it still did not work.

"Darren Green" wrote:

Quote:
In message <6183EC2A-3176-41AF-BD0D-2E6EF2CC8EF5 (AT) microsoft (DOT) com>, X.
Zhang <XZhang (AT) discussions (DOT) microsoft.com> writes
I got a very strange situation:
I wrote code to export data to csv file within ASP using VBScript. (My
VBScript code was based on the VB code that was created by "Save As" to
"Visual Basic File" in DTS Designer.) In debug mode, I had no problem to
export data. However, the Copy-data step failed when I open this ASP page
directly in IE. I tried to export data to xls file with the same method, and
I had no problem to export data in both debug and non-debug mode.

Anybody has any clues for this problem? Thanks.

It is probably die to the security context that the package is running
under. You are best of using impersonation, perhaps through COM+. This
is explained a bit further here, on page 2-

Execute a package from Active Server Pages (ASP)
(http://www.sqldts.com/default.aspx?207)
--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #4  
Old   
Darren Green
 
Posts: n/a

Default Re: DTS: exporting data to csv file - 12-16-2004 , 12:40 PM



In message <79B01EF5-5DF3-43CD-8B3A-74CC7670B969 (AT) microsoft (DOT) com>, X.
Zhang <XZhang (AT) discussions (DOT) microsoft.com> writes
Quote:
But why does it work while running in debug mode? And why does it work for
XLS file (both XLS and CSV in the same security context)?

PS: I tried to save the package to a storage file, and then
LoadFromStorageFile. I thought in this way I can bypass some SQL Server
security stuff. But it still did not work.

By debug do you mean running it through Enterprise Manager?
This means you are running on the same machine as EM using the
credentials of the logged on user. Quite different to running on the IIS
machine using the IWAM account.


When using Local Storage (SQL Server) to store your packages, you need
some connection credentials to connect to the server and load the
package, or really just run a select statement to grab a blob of data.
This gets the package into memory on the client. You then execute the
package, and the loading credentials have no bearing at all on the
connections inside the package and how they are used.

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



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.