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
 Import/Export (DTS) and Replication (2000)
 Problems executing bcp on remote server

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-06-16 : 08:14:25
SangeetaP writes "I want to export the output of a sql query to a text file on a remote server. But on the remote server, there is no permission for accessing the procedure, xp_cmdshell of the master db. Can I do this from the command prompt by executing a .bat file. Also I don't know the sql server name which is to be specified in the bcp command. Can it be done anyway using a DSN? Plese suggest."

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-06-16 : 14:02:45
Yes you can run bcp from a bat file. You can also run bcp from a cmd window on the actual server or from your own machine.

If you don't know the server name, then how would the DSN know? The DSN has to be configured with the server name (or an alias). Why are you working on a system where you don't even know what server you are working on?

Tara
Go to Top of Page
   

- Advertisement -