Skip to content

Prisma 7.10.0 SQL Server P1011 TLS failure on Windows #30200

Description

@deep3412

Package and version

prisma-next@7.10.0

What happened?

Prisma 7.10.0 fails to establish a TLS connection to a local SQL Server 2022 database on Windows when running prisma migrate status.

The failure occurs in the Prisma schema-engine before any migration is applied.

The exact error is:

Error: P1011: Error opening a TLS connection: The TLS settings didn't allow the connection to be established. (error: No credentials are available in the security package; OS error -2146893042)

The same SQL Server connection succeeds using the Node.js mssql driver with the same database credentials and connection settings.

The issue is reproducible with both encrypt=true and encrypt=false, and using both the SQL Server hostname and localhost.

The database is an empty SQL Server 2022 database and no migration has been applied.

What did you expect to happen?

I expected prisma migrate status to successfully connect to the SQL Server database and report the current migration status without a TLS error.

Since the same connection works successfully with the Node.js mssql driver, Prisma should be able to establish the SQL Server connection and inspect the migration history.

No migration should be applied by prisma migrate status; it should only report the migration state.

Minimal reproduction

Environment:

  • Windows 11, AMD64
  • Node.js 24.15.0
  • Prisma CLI 7.10.0
  • @prisma/client 7.10.0
  • SQL Server 2022 Express, version 16.0.1000.6
  • Prisma datasource provider: sqlserver

Steps to reproduce:

  1. Create an empty SQL Server 2022 database.
  2. Configure a Prisma SQL Server datasource with valid SQL authentication credentials.
  3. Use Prisma 7.10.0.
  4. Run:
    npx prisma migrate status
  5. The command fails with P1011 during the Prisma schema-engine TLS connection.

Connection verification:

  • The same SQL Server credentials and connection settings successfully connect using the Node.js mssql driver.
  • Prisma fails with both encrypt=true and encrypt=false.
  • Prisma also fails using both the SQL Server hostname and localhost.
  • No migration is applied; the database remains unchanged.

Observed error:

P1011: Error opening a TLS connection: The TLS settings didn't allow the connection to be established. (error: No credentials are available in the security package; OS error -2146893042)

Environment

  • OS: Windows 11, AMD64
  • Node.js: 24.15.0
  • Package manager: npm
  • Prisma CLI: 7.10.0
  • @prisma/client: 7.10.0
  • Database: Microsoft SQL Server 2022 Express, 16.0.1000.6 (RTM)
  • Prisma datasource provider: sqlserver

Additional context

Additional diagnostics:

  • prisma migrate status consistently fails with P1011 before any migration is executed.
  • The SQL Server database is empty and has no _prisma_migrations table.
  • A read-only connection test using the Node.js mssql driver succeeds with the same SQL Server credentials and connection configuration.
  • A general Windows TLS 1.2 handshake test succeeds.
  • Prisma fails with both encrypt=true and encrypt=false.
  • Prisma fails with both the SQL Server hostname and localhost.
  • Prisma CLI and @prisma/client versions are both 7.10.0.
  • The Prisma configuration explicitly loads .env.local; no credentials are hardcoded in the project.
  • No database schema changes have been made during troubleshooting.
  • No secrets, passwords, connection strings, or private credentials are included in this report.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions