Gulden


Hi,

I have a package which reads an XML file from a certain folder and parses it.

I deployed my package onto the server. Copied XML files on the D:\ drive the following folder on the server.

Dim reader As New Xml.XmlTextReader("D:\Apps\Request\Clients\ClientsStatus.xml") is fine.

But

Do While (reader.Read())

generates "The Device is not ready"

I think it is still trying to read it from my desktop on which I don't have a D drive.

Any help is appreciated.

 

 

 




Re: The Device is not ready error when Executing package on the server

Samuel Lester - MSFT


Hi Gulden, which package are you referring to

Thanks,
Sam Lester (MSFT)







Re: The Device is not ready error when Executing package on the server

Gulden

I meant to post it to the SSIS forum.

 

 






Re: The Device is not ready error when Executing package on the server

Samuel Lester - MSFT

No problem... moving to SSIS forum.




Re: The Device is not ready error when Executing package on the server

Jennifer LaMacchia

I have the same problem. I am able to successfully map a drive but as soon as I attempt any file manipulation I get the "device is not ready" error message when running from SQL Scheduled job using xp_cmdshell or if running from SQL Management Studio in a query window. The commands work fine outside of SQL in a regular command window.



Re: The Device is not ready error when Executing package on the server

Phil Brammer

Jennifer LaMacchia wrote:
I have the same problem. I am able to successfully map a drive but as soon as I attempt any file manipulation I get the "device is not ready" error message when running from SQL Scheduled job using xp_cmdshell or if running from SQL Management Studio in a query window. The commands work fine outside of SQL in a regular command window.


Have you tried using the UNC form of the path \\server\path\file





Re: The Device is not ready error when Executing package on the server

Jennifer LaMacchia

Yes, the UNC will not work either, that's why I mapped the drive.



Re: The Device is not ready error when Executing package on the server

Phil Brammer

Jennifer LaMacchia wrote:
Yes, the UNC will not work either, that's why I mapped the drive.


What user is the SQL Server running as Likely, that user does not have access to the network drive.





Re: The Device is not ready error when Executing package on the server

Phil Brammer

Have you tried using SQL Server Agent





Re: The Device is not ready error when Executing package on the server

Jennifer LaMacchia

sql agent is running as a domain user with admin privs to the file share. The drive is mapped with explicit credentials for the same user.



Re: The Device is not ready error when Executing package on the server

Phil Brammer

 Jennifer LaMacchia wrote:
sql agent is running as a domain user with admin privs to the file share. The drive is mapped with explicit credentials for the same user.


When you say SQL agent, are you referring to the SQL Server service, or the SQL Server Agent service   xp_cmdshell inherits the SQL Server service credentials, I believe.





Re: The Device is not ready error when Executing package on the server

Jennifer LaMacchia

I was referring to the SQL Agent Service. The SQL service is running under local system and I had forgotten about the xp_cmdshell credentials, thanks for the reminder! Without my making any changes this is now working. I think it may have been a network issue with DNS or Active Directory (external locus of control for a DBA) my network admin tweaked it this morning and it must have just taken a bit to replicate correctly. Thanks for your help!



Re: The Device is not ready error when Executing package on the server

Phil Brammer

Jennifer LaMacchia wrote:
Thanks for your help!


Anytime!