pgloader icon indicating copy to clipboard operation
pgloader copied to clipboard

Illegal :UTF-8 character starting at position 1

Open frannfuri opened this issue 1 year ago • 1 comments

When i tried to migrate my SQL server database to Postgresql with: pgloader mssql://SA:mypassword@localhost/mydb pgsql://postgres:password@localhost/mydb2

The next error occurs:

2023-08-31T14:37:30.011999Z LOG pgloader version "3.6.7~devel"
2023-08-31T14:37:30.011999Z LOG Data errors in '/tmp/pgloader/'
2023-08-31T14:37:30.055998Z LOG Migrating from #<MSSQL-CONNECTION mssql://SA@localhost:1433/DatabaseCEDEUS {100730A573}>
2023-08-31T14:37:30.055998Z LOG Migrating into #<PGSQL-CONNECTION pgsql://postgres@localhost:5432/cedeusdb {10074D9A83}>
Max connections reached, increase value of TDS_MAX_CONN
2023-08-31T14:37:30.343992Z ERROR mssql: Illegal :UTF-8 character starting at position 1.
2023-08-31T14:37:30.343992Z LOG report summary reset
       table name     errors       rows      bytes      total time
-----------------  ---------  ---------  ---------  --------------
  fetch meta data          0          0                     0.000s
-----------------  ---------  ---------  ---------  --------------
-----------------  ---------  ---------  ---------  --------------

¿Do you have one idea of what's happening? I don't understand "Illegal :UTF-8 character starting at position 1."

Thanks in advance

frannfuri avatar Aug 31 '23 14:08 frannfuri

You need to add a file .freetds.conf under your $HOME folder, with the following content:

[global]
    client charset = UTF-8

robert-sjoblom avatar Sep 13 '23 05:09 robert-sjoblom