Showing posts with label mapped. Show all posts
Showing posts with label mapped. Show all posts

Thursday, March 29, 2012

DTS run from .NET

My dts package has to pick up a file which is in a mapped drive of the
sql server... (system1)...
when I run it from code the execution ends up in an error... but if I
have the drive mapped (drive where I have the source file) onto the
web server (system2) the execution goes through fine.. I donot want to
have the drive mapped onto the web server.. how can I do this..Try and use the UNC path.

Joel Scavone|||I did use a full netwok path and even did add identity impersonate in
the web.config... but does not help..

The package runs fine when I register the sql server my machine and run
the package..

Sigh! Don't know what wrong

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Tuesday, March 27, 2012

DTS question

How do I use a global rowset variable in a SQL statement where a value should be IN ( ? )
where ? is mapped to the global rowset variableI have two different data sources.

I need to pull from source (1) to Souce (2).

The data pulled from souce(1) needs to be based on values in a table in source(2).

Select fields
from source(1)
where field1 in ( Table in source 2)

Is this possible with DTS?|||try this link
[BOL] Using Global Variables with DTS Packages
and

[BOL] Execute SQL Task look lower into the doc for "Populating a Single Global Variable with an Entire Rowset"|||I have the global variable (rowset) populated, but how do I use it in my where condition?

where field in ( ? ) I get an error when I map the parm to the global rowset variable.

Wednesday, March 7, 2012

DTS not running on a mapped drive

I created a DTS local package on the SQL Server. It's basically importing a text file into a table in my database. This file resides in a mapped drive (X:) from another server. When I schedule the DTS as a job, it fails. It doesn't execute any of the workflow in the design.

However, when I copy the text file into a drive local to the SQL server (D:), it runs flawlessly.

What I do right now is I have a windows scheduled task that runs a batch file that copies the text file from X: to D: at certain time intervals. Then the job scheduler runs to import it.

What am I missing? How come the job scheduler can't read the file directly from the mapped drive?

Any info would be appreciated. TIAWhat am I missing? How come the job scheduler can't read the file directly from the mapped drive?

Any info would be appreciated. TIA

A mapped drive only exists in the context of your login session. You will need to use a UNC path to reference the file:

\\MyServer\ServerShare\Path\FileName.txt

Alternatively (NOT recommended), you can use the command NET USE, but you are much better off using UNC.

Regards,

hmscott|||Thanks - that worked for me.