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 2005 Forums
 SQL Server Administration (2005)
 Remote connection error

Author  Topic 

robert693
Starting Member

42 Posts

Posted - 2010-10-05 : 11:46:34
Hello,

I am trying to use a BCP command to export data from a query to a CSV file. When I run the command I get an error that says that "under the default settings SQL Server does not allow remote connections." I am not trying to set up a remote connection, I am running the command from the same server that the database is on. Here is the syntax of the command:

BCP "SELECT CONVERT(CHAR(8), [vw_Schedule].[App_DtTm],1) as Date, CONVERT(CHAR(8), [vw_Schedule].[App_DtTm],8) as Time, [vw_Schedule].[Activity], [vw_Schedule].[STF_INITIALS], [vw_Schedule].[Notes], [vw_Schedule].[LOC_INITIALS], [vw_Schedule].[Duration_time] FROM [MOSAIQ].[dbo].[vw_Schedule] [vw_Schedule] WHERE CONVERT( Varchar(12), [vw_Schedule].[App_DtTm],1) = CONVERT( Varchar(12), GetDate(),1) AND [vw_Schedule].[Activity]='MTG'" queryout Scheduletext.txt
-c -SMy Server -UMyUserNamer -Pmypassword

I cannot figure out why I would get this message from the same server. If there is anybody who can help with this I would greatly appreciate it!

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-10-05 : 12:18:45
Can you connect locally with Management Studio? If you can, right-click server in object explorer, click properties, go to the connections tab and make sure "Allow Remote Connections to this Server" is checked.
Go to Top of Page
   

- Advertisement -