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 Development (2000)
 xp_cmdshell

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-05-23 : 09:00:04
Srini writes "Hi,

Can an xp_cmdshell be used to create a text file in a different server/workstation which is connected to the local sql server through a mapped drive ? For example in the statement below:

SET @FileName = REPLACE('c:\authors_'+CONVERT(char(8),GETDATE(),1)+'.txt','/','-')

Can I replace the c:\ by e:\ (which is a server/workstation mapped to the Sql server).

Pls let me know if this is possible in Sql server 2000.

Thanks,
Srini
Melbourne"

dsdeming

479 Posts

Posted - 2002-05-23 : 09:38:27
You should be able to use xp_cmdshell to access any drive that the server has mapped.

Go to Top of Page
   

- Advertisement -