xp_cmdshell: Old (Cached?) Version of a File

  • For whatever reason, one of our SQL Server machines sees an old (cached?) version of a file when other servers see the current version. You can even see the old contents of the file if you use xp_cmdshell to type the file, but I don't know of any file caches that SQL Server would use.

    I ran the following on my workstation. The time stamp on the current version of the file is 07:51 AM, but the old version is dated 01:43 PM from the prior day. Does anyone have any ideas about why SQL Server would see a cached version of a file?

    Jon

    ------------------------------

    P:\Working\DBA\XPSMTP> dir \\autosyshome.atlanticos.com\AutoSysData\Tmp\SDBA020D_COLLECT_WORK_SPACE5.txt

    Volume in drive \\autosyshome.atlanticos.com\AutoSysData is ATL_RKE_02.D

    Volume Serial Number is FC16-2E62

    Directory of \\autosyshome.atlanticos.com\AutoSysData\Tmp

    07/02/2003 07:51a 402 SDBA02~1.TXT SDBA020D_COLLECT_WORK_SPACE5.txt

    1 File(s) 402 bytes

    0 Dir(s) 11,729,793,024 bytes free

    P:\Working\DBA\XPSMTP> osql -SKE002 -E -n -w4000 -dtempdb -b -Q"exec master.dbo.xp_cmdshell 'dir \\autosyshome.atlanticos.com\AutoSysData\Tmp\SDBA020D_COLLECT_WORK_SPACE5.txt'"

    output

    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Volume in drive \\autosyshome.atlanticos.com\AutoSysData is RKE002.D

    Volume Serial Number is E8D9-7922

    NULL

    Directory of \\autosyshome.atlanticos.com\AutoSysData\Tmp

    NULL

    07/01/2003 01:43p 561 SDBA020D_COLLECT_WORK_SPACE5.txt

    1 File(s) 561 bytes

    0 Dir(s) 9,352,605,696 bytes free

    NULL

    P:\Working\DBA\XPSMTP> osql -SKeDBA -E -n -w4000 -dtempdb -b -Q"exec master.dbo.xp_cmdshell 'dir \\autosyshome.atlanticos.com\AutoSysData\Tmp\SDBA020D_COLLECT_WORK_SPACE5.txt'"

    output

    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Volume in drive \\autosyshome.atlanticos.com\AutoSysData is ATL_RKE_02.D

    Volume Serial Number is FC16-2E62

    NULL

    Directory of \\autosyshome.atlanticos.com\AutoSysData\Tmp

    NULL

    07/02/2003 07:51a 402 SDBA02~1.TXT SDBA020D_COLLECT_WORK_SPACE5.txt

    1 File(s) 402 bytes

    0 Dir(s) 11,729,793,024 bytes free

    NULL

  • Sorry... I think this was caused by a HOSTS file setting. Duh!!!!!!!!!!!!!!!!!!! That's what I get for no being able to finish some testing I started a while back.

    Moderator, please feel free to delete these posts.

    Jon

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply