SQLState = S0002, NativeError = 208 RRS feed

  • Question

  • Im Executing bcp <databasename.schema.tablename> out <destination file> -T -c but the result is always to export data from a table to a flat txt file

    SQLState = S0002, NativeError = 208 Error =[Microsoft][Sql server native client 10.0][sql sevrer]Invalid object name 'database.schema.table'

    Inspite of the fact that I provide an exact full table name that exists effectively within my server instance

    Im running sql server 2008 32 bit in a windows server 2008 32 bit machine



    The complexity resides in the simplicity
    Sunday, August 8, 2010 1:13 PM


  • Ok friends,

    I fortunately discovred whats wrong, and I want to share this experience may it help other people in the forum

    In fact, if you  have more than an sql server  instance within your server or box or machine and you dont specify the server name then the bcp connect to the default instance by default, then if your data table stored procedure or what ever it is, is stored within one of the named instances and Of Corse if you dont specify that server named instance  full name, then the Native error = 208 will be raised and this is obviously logic because the data source that you are handling exists within the named instance and not on the default one, hence the command must be

    bcp <databasename.schema.tablename> in|out  <complete target path where data will be imported|exported> -S<Full server named instance name> -T |or specify credentials through -P/-U    -c|-n

    Try to execute that and it will work

    The complexity resides in the simplicity
    Sunday, August 8, 2010 1:38 PM