SELECT @sMysql = 'bcp "SELECT sOutput FROM SQLSVR07.MYDATABASE.dbo.VPOSITIVEPAY" queryout ' + @sFilePath + @sFileName + ' -T -c'
SELECT @sMysql = 'bcp "SELECT sOutput FROM SQLSVR04.MYDATABASE.dbo.VPOSITIVEPAY" queryout ' + @sFilePath + @sFileName + ' -T -c'
SQLState = 08001, NativeError = 2Error = [Microsoft][SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [2]. SQLState = 08001, NativeError = 2Error = [Microsoft][SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.SQLState = S1T00, NativeError = 0Error = [Microsoft][SQL Native Client]Login timeout expiredNULL
DECLARE @sMysql VARCHAR(8000)DECLARE @sFileName VARCHAR(256)DECLARE @sFilePath VARCHAR(256)/*Set the File Path and name to use for export file*/SELECT @sFilePath = '\\SVR10\exports\Positive_Pay\', @sFileName = 'PP_MyBank.prn' /*Build command text to pass to BCP Utility*/ SELECT @sMysql = 'bcp "SELECT sOutput FROM SQLSVR07.MYDATABASE.dbo.VPOSITIVEPAY" queryout ' + @sFilePath + @sFileName + ' -T -c'EXECUTE sp_configure 'show advanced options', 1RECONFIGUREEXECUTE sp_configure 'xp_cmdshell', 1RECONFIGURE/*Call the BCP Utility via the Master database's xp_CmdShell XP*/EXECUTE master..xp_cmdshell @sMysqlEXECUTE sp_configure 'xp_cmdshell', 0RECONFIGUREEXECUTE sp_configure 'show advanced options', 0RECONFIGURE
SELECT @sMysql = 'bcp "SELECT sOutput FROM MYDATABASE.dbo.VPOSITIVEPAY" queryout ' + @sFilePath + @sFileName + ' -T -c'
SELECT @sMysql = 'bcp "SELECT sOutput FROM [SQLSVR04\SS2005].MYDATABASE.dbo.VPOSITIVEPAY" queryout ' + @sFilePath + @sFileName + ' -T -c'
SELECT @sMysql = 'bcp "SELECT sOutput FROM MYDATABASE.dbo.VPOSITIVEPAY" queryout ' + @sFilePath + @sFileName + ' -S [SQLSVR04\SS2005] -T -c'
DECLARE @sMysql VARCHAR(8000)DECLARE @sFileName VARCHAR(256)DECLARE @sFilePath VARCHAR(256)/*Set the File Path and name to use for export file*/SELECT @sFilePath = '\\SVR10\exports\Positive_Pay\', @sFileName = 'PP_MyBank.prn' /*Build command text to pass to BCP Utility*/ SELECT @sMysql = 'bcp "SELECT sOutput FROM [SQLSVR04\SS2005].MYDATABASE.dbo.VPOSITIVEPAY" queryout ' + @sFilePath + @sFileName + ' -T -c'EXECUTE sp_configure 'show advanced options', 1RECONFIGUREEXECUTE sp_configure 'xp_cmdshell', 1RECONFIGURE/*Call the BCP Utility via the Master database's xp_CmdShell XP*/EXECUTE master..xp_cmdshell @sMysqlEXECUTE sp_configure 'xp_cmdshell', 0RECONFIGUREEXECUTE sp_configure 'show advanced options', 0RECONFIGURE