dbTalk Databases Forums  

Execute DTS package with a local text file

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


Discuss Execute DTS package with a local text file in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ILCSP@NETZERO.NET
 
Posts: n/a

Default Execute DTS package with a local text file - 01-04-2006 , 12:31 PM






Hello, I have a DTS package in my SQL Server 2000 database. What it
does is to import records from a text file in a Floppy disk (a:\) into
a SQL Table. However, when I execute the DTS via Query Analyzer I get
this error:

DTSRun: Loading...
DTSRun: Executing...
DTSRun OnStart: Copy Data from textfile to [SQLDB].[dbo].[Table] Step
DTSRun OnError: Copy Data from textfile to [SQLDB].[dbo].[Table] Step,
Error = -2147467259 (80004005)
Error string: Error opening datafile: The device is not ready.

Error source: Microsoft Data Transformation Services Flat File
Rowset Provider
Help file: DTSFFile.hlp
Help context: 0

Error Detail Records:

Error: 21 (15); Provider Error: 21 (15)
Error string: Error opening datafile: The device is not ready.

Error source: Microsoft Data Transformation Services Flat File
Rowset Provider
Help file: DTSFFile.hlp
Help context: 0

DTSRun OnFinish: Copy Data from textfile to [SQLDB].[dbo].[Table] Step

DTSRun: Package execution complete.
NULL

____________________________

If I place this txt file in the same server drive where the database is
located and I modify the DTS package to reflect the change, I can run
it with no problem. However, I don't want to do so. I am aware that
the job is being run in the server and not in my local computer and
that's why it is not finding the drive a: (server does not have one).
Still, since this job will be ran by several people, I need to use the
drive a: from any remote computer to make this work.

This is the command I use in the query analyzer:

EXEC master..xp_cmdshell 'dtsrun /s Servername /E /N DTSpackagename'

Can anyone please let me know how to make this DTS job find the local
drive a:? If I run the DTS from EM it does it with no errors either.
I wanna do just that.

Regards

JR


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Execute DTS package with a local text file - 01-04-2006 , 03:02 PM






Hello ILCSP (AT) NETZERO (DOT) NET,

So the issue is then that the a:\ drive does not exist on the server.

Your file is on a Floppy somwhere else.

You could try mapping a drive to the remote a:\ drive. and/or sharing the
drive out.

Why can the person with the text file not place it on a network share for
you. If it is in a consistent place then you will always be able to find
it. UNC is always best.



Allan

Quote:
Hello, I have a DTS package in my SQL Server 2000 database. What it
does is to import records from a text file in a Floppy disk (a:\)
into a SQL Table. However, when I execute the DTS via Query Analyzer
I get this error:

DTSRun: Loading...
DTSRun: Executing...
DTSRun OnStart: Copy Data from textfile to [SQLDB].[dbo].[Table] Step
DTSRun OnError: Copy Data from textfile to [SQLDB].[dbo].[Table]
Step,
Error = -2147467259 (80004005)
Error string: Error opening datafile: The device is not ready.
Error source: Microsoft Data Transformation Services Flat File
Rowset Provider
Help file: DTSFFile.hlp
Help context: 0
Error Detail Records:

Error: 21 (15); Provider Error: 21 (15)
Error string: Error opening datafile: The device is not ready.
Error source: Microsoft Data Transformation Services Flat File
Rowset Provider
Help file: DTSFFile.hlp
Help context: 0
DTSRun OnFinish: Copy Data from textfile to [SQLDB].[dbo].[Table]
Step

DTSRun: Package execution complete.
NULL
____________________________

If I place this txt file in the same server drive where the database
is located and I modify the DTS package to reflect the change, I can
run it with no problem. However, I don't want to do so. I am aware
that the job is being run in the server and not in my local computer
and that's why it is not finding the drive a: (server does not have
one). Still, since this job will be ran by several people, I need to
use the drive a: from any remote computer to make this work.

This is the command I use in the query analyzer:

EXEC master..xp_cmdshell 'dtsrun /s Servername /E /N DTSpackagename'

Can anyone please let me know how to make this DTS job find the local
drive a:? If I run the DTS from EM it does it with no errors either.
I wanna do just that.

Regards

JR




Reply With Quote
  #3  
Old   
ILCSP@NETZERO.NET
 
Posts: n/a

Default Re: Execute DTS package with a local text file - 01-09-2006 , 10:08 AM



Hi Allan, thanks for your reply. After writing some code that copies
the file from the floppy to the server and then I ran the process, the
whole thing works.

Thanks a lot for your help.

JR.


Allan Mitchell wrote:
Quote:
Hello ILCSP (AT) NETZERO (DOT) NET,

So the issue is then that the a:\ drive does not exist on the server.

Your file is on a Floppy somwhere else.

You could try mapping a drive to the remote a:\ drive. and/or sharing the
drive out.

Why can the person with the text file not place it on a network share for
you. If it is in a consistent place then you will always be able to find
it. UNC is always best.



Allan

Hello, I have a DTS package in my SQL Server 2000 database. What it
does is to import records from a text file in a Floppy disk (a:\)
into a SQL Table. However, when I execute the DTS via Query Analyzer
I get this error:

DTSRun: Loading...
DTSRun: Executing...
DTSRun OnStart: Copy Data from textfile to [SQLDB].[dbo].[Table] Step
DTSRun OnError: Copy Data from textfile to [SQLDB].[dbo].[Table]
Step,
Error = -2147467259 (80004005)
Error string: Error opening datafile: The device is not ready.
Error source: Microsoft Data Transformation Services Flat File
Rowset Provider
Help file: DTSFFile.hlp
Help context: 0
Error Detail Records:

Error: 21 (15); Provider Error: 21 (15)
Error string: Error opening datafile: The device is not ready.
Error source: Microsoft Data Transformation Services Flat File
Rowset Provider
Help file: DTSFFile.hlp
Help context: 0
DTSRun OnFinish: Copy Data from textfile to [SQLDB].[dbo].[Table]
Step

DTSRun: Package execution complete.
NULL
____________________________

If I place this txt file in the same server drive where the database
is located and I modify the DTS package to reflect the change, I can
run it with no problem. However, I don't want to do so. I am aware
that the job is being run in the server and not in my local computer
and that's why it is not finding the drive a: (server does not have
one). Still, since this job will be ran by several people, I need to
use the drive a: from any remote computer to make this work.

This is the command I use in the query analyzer:

EXEC master..xp_cmdshell 'dtsrun /s Servername /E /N DTSpackagename'

Can anyone please let me know how to make this DTS job find the local
drive a:? If I run the DTS from EM it does it with no errors either.
I wanna do just that.

Regards

JR



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.