February 22, 2008 at 1:28 pm
Hello Everyone,
I am new to sql server or new supporting clients on sql. One of my clients has a strange problem, when he uses the shell cmd copying a prn file to text one character is changed. This does not always happen and it can be reproduced. Also, it's not always the same character that chances. He using this command on our sql server. Has anyone every encountered this, the file is a large file. I thought it was a sql problem but it very well be a windows 2003 issue. But it happens on 2 servers. The older server is running windows 2000 with sql 2000 sp3a, the new server is running windows 2003 with sql 2005. We just find it strange to be happening on both servers. Any ideas would be good. I have also scanned for viruses too.
Someone please help.
Thanks
Doreen
February 22, 2008 at 2:51 pm
Hard to be helpful. Not much to go on...
Are we using shell or xp_cmdshell?
What DOS-based command is being used to "convert" this PRN file?
What is the character that gets wiped? is it the same kind of character each time?
More importantly - what's the ultimate goal for sdoing all of this? What happens to this file after it's been changed to a TXT file?
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
March 25, 2008 at 12:18 pm
Matt,
I'm so sorry in my delayed response, so much has been going on here. Management wanted me to open a ticket with Microsoft and this is what they said:
Brief summary of the issue
=====================
<> You have a job - which uses xp_cmdshell to copy a file from one folder to another (on the same server). The job uses UNC paths and not relative paths ie xp_cmdshell copy \\server\folder \\server\folder
<> Intermittently you see some characters in the file are changed - no junk characters but for some records '.' becomes '/'. You have also seen instances of some number being partially modified (2156 became 8156).
<> Issue is intermittent - not reproducible at will.
<> You have used ‘move’ instead of ‘copy’ and haven’t seen any issues thereafter.
Action plan
==========
If you remember one thing that we discussed was to use relative paths instead of UNC paths and see if that makes any difference ie ie xp_cmdshell copy c:\folder_name\abc.txt D:\folder_name\xyz.txt
Additionally I would like to run the copy command without xp_cmdshell (creating a job /batch file and schedule it using Windows task scheduler) – just to be sure that xp_cmdshell is not changing the behavior.
This file once created is sent to one of our vendors for processing and they state that we are sending this corrupt files. We have seen the corrupt files but are not sure why this is happening. The files are always encrypted before we send them, the vendor decrypts the file on their end and destroys the original file. We have changed the network media from fibre to copper (cat 5) on this particular server but I really don't believe that is the case. We have ran diagnostics, etc... The file will be good for 10 days or so and then will send one bad file. Right now it's like looking for a needle in the haystack. We haven't sent a bad file for about a week now, but I'm pretty sure it's coming. If you have some suggestions, please let me know.
Thanks
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply