Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Win2003 problem?

Author  Topic 

CanadaDBA

583 Posts

Posted - 2005-03-16 : 10:42:50
One of my stored procedures writes a log text file into Log folder on my server. I tested it in my local computer (Win2000 Pro) and also in our Dev Server (Win2000 Server) and it works without any error. But it doesn't work on our Test server (Win2003).

Here is what I did:
1. Mapped a drive on the server's consol, i.e. MAP S: E:\Shared
2. From a TS session I can "see" the S: drive and write or create in it.
3. Run the following code in QA (I am using sysadmin user id to connect QA):


DECLARE @CommandStr VarChar(8000), @FileName VarChar(20)

SET @FileName = 'S:\Test'

SET @CommandStr = 'Echo This is a TEST! >> ' + @FileName

exec master..xp_cmdshell @CommandStr
GO


It says "Path not found" which is the S:\ . There should be something wrong with Win2003. Have you had any experience on this issue?


Canada DBA

mr_mist
Grunnio

1870 Posts

Posted - 2005-03-16 : 10:48:36
Use the full UNC path instead of the drive letter. You should do that anyway in case jobs need to be scheduled.

-------
Moo. :)
Go to Top of Page
   

- Advertisement -