Skip to content

SQL Server: Migrate/Introspection engine doesn't return P1001 error for unreachable url #11407

Closed
prisma/prisma-engines
#4651

Description

@Jolg42

db pull for SQL Server

npx prisma@dev db pull --url="sqlserver://doesnotexist:1433;database=tests-migrate;user=SA;password=Pr1sm4_Pr1sm4;trustServerCertificate=true;"

Introspecting …

Error: Error in connector: Failed to connect to the database at `doesnotexist`.

db pull for MySQL

npx prisma@dev db pull --url="mysql://johndoe:randompassword@doesnotexist:3306/mydb"

Introspecting …

Error: P1001

Can't reach database server at `doesnotexist`:`3306`

Please make sure your database server is running at `doesnotexist`:`3306`.

Here we should be returning a P1001 error code for SQL Server.

For db execute it errors differently but still no error code

echo "-- empty" | npx prisma@dev db execute --preview-feature --stdin --url=sqlserver://doesnotexist:1433;database=tests-migrate;user=SA;password=Pr1sm4_Pr1sm4;trustServerCertificate=true;

Error creating a database connection.

Activity

  1. added
    bug/1-unconfirmed
    kind/bug
    tech/engines
    topic: sql server
    on Jan 26, 2022
  2. self-assigned this
    on Jan 17, 2024
  3. added
    bug/2-confirmed
    and removed
    bug/1-unconfirmed
    on Jan 17, 2024
  4. added this to the 5.9.0 milestone on Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug/2-confirmedkind/bugtech/enginestopic: errortopic: sql server

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions