Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot connect to mssql if servername has backslash #1628

Closed
3 tasks done
patAtBwalk opened this issue Nov 21, 2024 · 1 comment
Closed
3 tasks done

cannot connect to mssql if servername has backslash #1628

patAtBwalk opened this issue Nov 21, 2024 · 1 comment

Comments

@patAtBwalk
Copy link

patAtBwalk commented Nov 21, 2024

Thanks for contributing to pgloader by reporting an
issue! Reporting an issue is the only way we can solve problems, fix bugs,
and improve both the software and its user experience in general.

The best bug reports follow those 3 simple steps:

  1. show what you did,

run this command (names\secrets obfuscated):
pgloader --verbose --debug --type "mssql mssql://Supabase_User:[MY_SECRET]@[SERVERNAME]\DEV:1433/[DBNAME]" "postgresql://postgres.[MY_SERVER]:[MY_SECRET]@aws-0-ca-central-1.pooler.supabase.com:6543/postgres"

issue appears to be the backslash character in the mssql connection string: [SERVERNAME]\DEV
it keeps stripping out the backslash or failing to parse.

  1. show the result you got,
2024-11-21T00:27:08.010000Z NOTICE Starting pgloader, log system is ready.
2024-11-21T00:27:08.019999Z INFO Starting monitor
2024-11-21T00:27:08.019999Z LOG pgloader version "3.6.7~devel"
2024-11-21T00:27:08.019999Z INFO     SOURCE: "mssql://Supabase_User:[MY_SECRET]@[SERVERNAME]DEV:1433/[DBNAME]"
2024-11-21T00:27:08.019999Z INFO SOURCE URI: #<PGLOADER.SOURCE.MSSQL:MSSQL-CONNECTION mssql://Supabase_User@[SERVERNAME]DEV:1433/[DBNAME] {1005DCA353}>
2024-11-21T00:27:08.019999Z INFO     TARGET: "postgresql://postgres.[MY_SECRET]:[email protected]:6543/postgres"
2024-11-21T00:27:08.019999Z INFO TARGET URI: #<PGLOADER.PGSQL:PGSQL-CONNECTION pgsql://postgres.[MY_SECRET]@aws-0-ca-central-1.pooler.supabase.com:6543/postgres {1005FA8FE3}>
2024-11-21T00:27:08.019999Z DEBUG LOAD DATA FROM #<PGLOADER.SOURCE.MSSQL:MSSQL-CONNECTION mssql://Supabase_User@[SERVERNAME]DEV:1433/[DBNAME] {1005DCA353}>
2024-11-21T00:27:08.399990Z DEBUG CONNECTED TO #<PGLOADER.PGSQL:PGSQL-CONNECTION pgsql://postgres.[MY_SECRET]@aws-0-ca-central-1.pooler.supabase.com:6543/postgres {1005FA8FE3}>
2024-11-21T00:27:08.399990Z DEBUG SET client_encoding TO 'utf8'
2024-11-21T00:27:08.539878Z DEBUG SET application_name TO 'pgloader'
2024-11-21T00:27:08.939555Z LOG Migrating from #<MSSQL-CONNECTION mssql://Supabase_User@[SERVERNAME]DEV:1433/[DBNAME] {1005DCA353}>
2024-11-21T00:27:08.939555Z LOG Migrating into #<PGSQL-CONNECTION pgsql://postgres.[MY_SECRET]@aws-0-ca-central-1.pooler.supabase.com:6543/postgres {1005FA8FE3}>
2024-11-21T00:27:21.105024Z ERROR mssql: Failed to connect to mssql at "[SERVERNAME]DEV" (port 1433) as user "Supabase_User": Connection to the database failed for an unknown reason.
2024-11-21T00:27:21.105024Z LOG report summary reset
2024-11-21T00:27:21.114971Z INFO Stopping monitor

  1. explain how the result is not what you expected.
    expect that I can escape the backslash with one of the following options I tried
  • %5C
  • /\
  • \

pgloader --version
user@LHAAVGHM:~$ pgloader --version pgloader version "3.6.7~devel" compiled with SBCL 2.2.9.debian

  • did you test a fresh compile from the source tree?
    NO, just installed latest

  • did you search for other similar issues?

  • YES, found nothing about escaping the server name other than what was attempted. GPT let me down too :(

  • how can I reproduce the bug?

  • set up a mssql instance with a backslash in the name

@patAtBwalk patAtBwalk closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2024
@patAtBwalk
Copy link
Author

found some similar issues and will attempt those first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant