SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software

Kodyaz Development Forums for Programmer, Administrators and Users

Development resources, articles, tutorials, samples, codes and tools for .Net, SQL Server, Windows, Windows Phone, SAP and ABAP, like SAP UI5, Screen Personas, etc.

Error = [Microsoft][SQL Server Native Client 11.0]Unable to resolve column level collations

Last post 11-07-2016, 5:47 AM by eralper. 1 replies.
Sort Posts:
  •  11-07-2016, 3:49 AM 42775

    Error = [Microsoft][SQL Server Native Client 11.0]Unable to resolve column level collations

    Hello SQL developers,

    During SQL Server BCP command execution to export data from database table to text file, I got following error


    Starting copy...
    SQLState = S0002, NativeError = 208
    Error = [Microsoft][SQL Server Native Client 11.0][SQL Server]Invalid object name 'Person.Person'.
    SQLState = S1000, NativeError = 0
    Error = [Microsoft][SQL Server Native Client 11.0]Unable to resolve column level collations
    BCP copy out failed


    I used the sample SQL codes from SQL tutorial export SQL database data to text file using SQL Server BCP command


    I know the error is a simple one to solve, maybe syntax...
  •  11-07-2016, 5:47 AM 42776 in reply to 42775

    Re: Error = [Microsoft][SQL Server Native Client 11.0]Unable to resolve column level collations

    The error has a very simple solution in fact as I guessed.

    The main error is related with the first message that SQL Engine reported.

    Invalid object name

    When I use the full-qualified name of the database table, the error is fixed
    So instead of using schemaname.tablename, using databasename.schemaname.tablename is OK

    Here is the correct way of using BCP command


    DECLARE @cmd varchar(1000)
    SET @cmd = 'bcp "SELECT FirstName, LastName FROM AdventureWorks2014.Person.Person" queryout "c:\temp\PersonList.txt" -c -UTF8 -T -Slocalhost'
    EXEC master..xp_cmdshell @cmd

View as RSS news feed in XML
Copyright © 2004 - 2017 Eralper YILMAZ. All rights reserved.
Community Server by Telligent Systems