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:
- Create an empty SQL Server 2022 database.
- Configure a Prisma SQL Server datasource with valid SQL authentication credentials.
- Use Prisma 7.10.0.
- Run:
npx prisma migrate status
- 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.
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
mssqldriver with the same database credentials and connection settings.The issue is reproducible with both
encrypt=trueandencrypt=false, and using both the SQL Server hostname andlocalhost.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 statusto 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
mssqldriver, 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:
Steps to reproduce:
npx prisma migrate status
Connection verification:
mssqldriver.encrypt=trueandencrypt=false.localhost.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
Additional context
Additional diagnostics:
prisma migrate statusconsistently fails with P1011 before any migration is executed._prisma_migrationstable.mssqldriver succeeds with the same SQL Server credentials and connection configuration.encrypt=trueandencrypt=false.localhost.@prisma/clientversions are both 7.10.0..env.local; no credentials are hardcoded in the project.