Skip to main content

Export and import records in a table using BCP

Export and import records in a table using BCP

  1. To export records in a table, using below command.
    bcp [databaseName].dbo.tableName
    out <backupLocation> -n -T
  2. To import records to a table, using below command.
    bcp [
    databaseName].dbo.tableName IN <backupLocation> -b 5000 -h "TABLOCK" -m 1 -n -e <errorLogLocation> -o <outputLogLocation> -S -T

Comments

Popular posts from this blog