Manoj Pandey investigates an interesting issue with BCP:
I observed one thing here with BCP (Bulk Copy Program), when you have 2 versions of SQL Server installed on you PC or Server. I had SQL Server 2014 & 2016 installed on one of my DEV server.
So if you are executing Query from SQL 2016 instance, it was inserting records in SQL 2014 instance:exec master..xp_cmdshell ‘BCP AdventureWorks2014.Person.Address2 IN d:\PersonAddressByQuery.txt -T -c’
But even if you use BCP 2016 version, it was still inserting in SQL 2014 instance:
Read on for the reason as well as how to specify which instance you want to use.