October 28, 2020
Prisma 2.10 Adds Preview Support for Microsoft SQL Server
Today we are excited to expand the range of supported database providers with preview support of Microsoft SQL Server. Try it out and let us know what you think!
- Expanding supported databases in Prisma
- Getting started
- Try Prisma with SQL Server and share your feedback
- Prisma release 2.10.0 adds preview support for Microsoft SQL Server.
- You can use Prisma Client with SQL Server through introspection.
- Check out the Start from scratch guide in the docs.
Expanding supported databases in Prisma
Today we are excited to introduce an initial preview of support for SQL Server! 🎉
Earlier this year we released Prisma Client for general availability with support for PostgreSQL, MySQL, SQLite, and MariaDB. Since then, we've heard from thousands of engineers about how Prisma Client is helping them build apps faster by making database access easy.
This release marks the first milestone since SQL Server was originally requested by a community member. We are now a step closer to providing the same streamlined developer experience, type safety, and productivity to developers using SQL Server
SQL Server support has passed rigorous testing internally, and is now ready for testing by the community, however, as a preview feature, it is not production-ready. To read more about what preview means, check out the maturity levels in the Prisma docs.
Thus, we're inviting the SQL Server community to try it out and give us feedback so we can bring SQL Server support to general availability. 🚀
Your feedback and suggestion will help us shape the future of SQL Server support in Prisma. 🙌
This release allows you to try out Prisma Client with an existing SQL Server database.
With Prima's introspection workflow, you begin by introspecting (
prisma introspect) an existing SQL Server database which populates the Prisma schema with models mirroring the state of your database schema. Then you can generate Prisma Client (
prisma generate) and interact with your database in a type-safe manner with Node.js or TypeScript.
As Prisma Migrate does not yet support SQL Server, if you're starting without an existing database, you will need to define the schema with SQL or using a visual modeling tool, e.g., DBeaver or SQL Server Management Studio.
You can use this guide to get started with Prisma and an SQL Server database.
You can also dig into our ready-to-run example in the
prisma-examples repo which includes the SQL to create a database and instructions on how to introspect and use Prisma Client with SQL Server.
Support for SQL Server comes with some limitations that are detailed in this section.
Prisma Migrate is not supported yet
Prisma Migrate does not support SQL Server yet. This means that you can continue using whichever migration tool to alter the database schema and then use introspection to keep the Prisma schema in sync with the database schema.
To follow progress on this issue, subscribe to issue #4074 on GitHub.
TLS encryption should be disabled when connecting from macOS
TLS encryption needs to be disabled when connecting to an SQL Server database from macOS due to trusted certificate requirements imposed by macOS 10.15. This means that you can't connect to an Azure SQL database directly from a Mac with this release.
To disable encryption, add the
encrypt=DANGER_PLAINTEXT parameter to the connection string.
Note that disabling TLS should only be done during development as it's a security risk otherwise.
To follow progress on this issue, subscribe to issue #4075 on GitHub
TCP required on the service
Your SQL server must support TCP communication. We do not provide any support for the in-memory protocol or named pipes. Things might change in the future, but if using the Windows installation of SQL Server, TCP communication needs to be enabled for Prisma to work.
Try Prisma with SQL Server and share your feedback
We built this for you and are eager to hear your feedback!
☎️ Schedule a call with our Product team to tell us everything about your project, and get an exclusive T-Shirt.
🐜 Tried it out and found that it's missing something or stumbled upon a bug? Please file an issue so we can look into it.
🌍 We also invite you to join our Slack where you can discuss all things Prisma, share feedback in the
#product-feedback channel, and get help from the community.
🏗 We are excited to finally share the preview version of SQL Server support in Prisma and can't wait to see what you all build with it.
Get started with Prisma and SQL Server