dimitri / pgloader

Migrate to PostgreSQL in a single command!

Home Page:http://pgloader.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getting error ERROR sqlite: Failed to open sqlite file

mangeshongit opened this issue · comments

Is it possible migrate mssql onprem database to postgresql database with below scenario:-

suppose we have table name "employee_name" in source database can we migrate that table into "employee_ID" into the target database ?

Tried simple scenario, but that is giving below error.
+++++++++++++++++++++++++++++++
cat migrate_sample_table.load
LOAD DATABASE
FROM mssql://dbuser:dbuserpassword@mssqldatabasehost:2023/sourcedbname
INTO postgresql://dbuser:dbuserpassword@postgresqldatabasehost:3306/targetdbname
WITH include drop, create tables
;
++++++++++++++
root@ubuntuserver:# pgloader --debug migrate_sample_table.load
pgloader version 3.6.3devel
compiled with SBCL 2.1.11.debian
sb-impl::default-external-format :UTF-8
tmpdir: #P"/tmp/pgloader/"
2024-04-29T12:16:40.004000Z NOTICE Starting pgloader, log system is ready.
2024-04-29T12:16:40.024000Z INFO Starting monitor
2024-04-29T12:16:40.032000Z LOG pgloader version "3.6.3
devel"
2024-04-29T12:16:40.044000Z INFO Parsed command:
LOAD DATABASE
FROM mssql://dbuser:dbuserpassword@mssqldatabasehost:2023/sourcedbname
INTO postgresql://dbuser:dbuserpassword@postgresqldatabasehost:3306/targetdbname
--LOAD TABLE tt3
--FROM dbo.tt3
--INTO tt3_migrated
WITH include drop, create tables
;

2024-04-29T12:16:40.096000Z DEBUG CONNECTED TO #<PGLOADER.PGSQL:PGSQL-CONNECTION pgsql://dbuser@postgresqldatabasehost:3306/targetdbname {1007F80A83}>
2024-04-29T12:16:40.096000Z DEBUG SET client_encoding TO 'utf8'
2024-04-29T12:16:40.096000Z DEBUG SET application_name TO 'pgloader'
2024-04-29T12:16:40.116000Z LOG Migrating from #<SQLITE-CONNECTION sqlite:///home/mangesh/test/mssql:/dbuser:dbuserpassword@mssqldatabasehost:2023/sourcedbname.load {1007F7EE83}>
2024-04-29T12:16:40.116000Z LOG Migrating into #<PGSQL-CONNECTION pgsql://dbuser@postgresqldatabasehost:3306/targetdbname {1007F80A83}>
2024-04-29T12:16:40.132000Z ERROR sqlite: Failed to open sqlite file #P"/home/mangesh/test/mssql:/dbuser:dbuserpassword@mssqldatabasehost:2023/sourcedbname.load": Could not open sqlite3 database /home/mangesh/test/mssql:/dbuser:dbuserpassword@mssqldatabasehost:2023/sourcedbname.load
Code CANTOPEN: no message.
2024-04-29T12:16:40.132000Z LOG report summary reset
table name errors read imported bytes total time read write


        fetch          0          0          0                     0.000s

fetch meta data 0 0 0 0.000s



2024-04-29T12:16:40.172001Z INFO Stopping monitor
+++++++++++

I am encountering the same issue.
Snipaste_2024-05-29_09-54-09