dimitri / pgloader

Migrate to PostgreSQL in a single command!
http://pgloader.io
Other
5.45k stars 548 forks source link

Illegal :UTF-8 character starting at position 1 #1528

Open frannfuri opened 1 year ago

frannfuri commented 1 year ago

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

robert-sjoblom commented 1 year ago

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

[global]
    client charset = UTF-8