You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was considering to use Prisma into my project but it doesn't support MSSQL.
Suggested solution
Build support to Microsoft SQL Server and expand supported databases.
Reacted by Jan Piotrowski, Marcus Böhm, Harshit Pant, Andre Light, Tiago Cunha Fernandes, El-Hussein Abdelwahab, Bruno, Onur Guvenc, Daniel, jylin and 24 more
Next up is Query Engine that needs a bit more dramatic changes.
It seems at least in the beginning users can only use TCP for connecting. Named pipes come later when we have a proper crate to support them in the async ecosystem.
Is there a need for the Local Procedure Call protocol? This might get trickier due to there not being any documentation on how the API should work.
Ah no. Talking about how to connect to the SQL Server. We now can support TCP, which means on Windows platforms one must enable TCP communication separately before being able to use Tiberius and therefore Prisma.
There's ongoing work on creating an asynchronous interface for the Windows named pipes protocol. When this crate is done, we can inject it when creating a Tiberius client, allowing Prisma to connect using named pipes. The named pipes protocol also requires one to enable it in the SQL Server settings; it is not enabled by default.
The third, mysterious protocol is the LPC. Or what I'm guessing SQL Server is using by default on Windows for connecting to it in-memory. There's an async version of it called ALPC, but this and LPC are both undocumented, which really sucks if you want to write a client for it. It seems the Windows RPC protocol is using ALPC under the surface when communicating on the same machine, but does the protocol work together with the SQL Server? We don't know yet.
What would happen with the SQL Server and Prisma at least now is we only support TCP, and later this year can support the named pipes too on Windows platforms. For the in-memory protocol, it might require a huge amount of work in an unknown land of undocumented Windows NT API's, and might not be worth it if majority of our users don't need it.
But. The SQL Server Docker image is TCP only. Azure SQL is TCP. These might be the current day uses for the product and there we could make lots of users happy with Prisma. The question is then some enterprise installations and could we use Prisma in those environments.
The connection string chosen now is the JDBC version, compared to the URI format for other databases. This is mainly due to Azure SQL either giving that or the ADO.NET string from their control panel, and we can differentiate the database easier with the JDBC version.
For supported types, in Tiberius everything is covered except the user-defined types that contain CLR assembly. If there's ever a need for those in Prisma, hopefully somebody will write a ticket on the subject.
We support XML also in Tiberius, but might not add support to Prisma yet until, again, somebody writes about it and how would they use the type in their applications. What Tiberius does is just plain stringifying the XML and probably crashing if somebody stores binary data in an XML field.
To be able to support all the features in Prisma, a certain SQL Server version is required. One that I was just looking for is the OFFSET X ROWS FETCH NEXT Y ROWS ONLY construct, that seems to be available from SQL Server 2012 forward. This means if using earlier versions, the windowing would just panic out due to badly formed SQL.
The other construct we need for relation inserts is the MERGE statement. This is also only available in SQL Server 2008 and later.
Do we need to support older SQL Server versions? I guess Azure has always the latest version... So maybe we're not helping that much in some legacy enterprise installations or we should at least provide restrictions in the API regarding the version of the server.
We do not yet support column encryption (CEK) and columns using it will either produce garbage or panic. Do we want to support it, is it a feature our users will need in 2020?
We released a preview of Microsoft SQL Server in 2.10.0 which adds support for introspection and the client.
We'd love to hear your feedback to see what you think!
I've opened a separate issue for the follow-up work to consider to bring it to a GA state.
Reacted by Dung Duc Huynh (Kaka), houfio, Onur Guvenc, Harshit Pant, Brian Dunnette, Yosh, Joël Galeran and Viktor Lazarev
Reacted by Daniel Norman, Julius de Bruijn and Viktor Lazarev
Activity
pimeys commentedon Jun 9, 2020
We now have a crate for Rust (https://github.com/prisma/tiberius/) and Quaint has preliminary support for MSSQL queries.
Next up is Query Engine that needs a bit more dramatic changes.
It seems at least in the beginning users can only use TCP for connecting. Named pipes come later when we have a proper crate to support them in the async ecosystem.
Is there a need for the Local Procedure Call protocol? This might get trickier due to there not being any documentation on how the API should work.
beem812 commentedon Jun 9, 2020
pimeys commentedon Jun 10, 2020
Ah no. Talking about how to connect to the SQL Server. We now can support TCP, which means on Windows platforms one must enable TCP communication separately before being able to use Tiberius and therefore Prisma.
There's ongoing work on creating an asynchronous interface for the Windows named pipes protocol. When this crate is done, we can inject it when creating a Tiberius client, allowing Prisma to connect using named pipes. The named pipes protocol also requires one to enable it in the SQL Server settings; it is not enabled by default.
The third, mysterious protocol is the LPC. Or what I'm guessing SQL Server is using by default on Windows for connecting to it in-memory. There's an async version of it called ALPC, but this and LPC are both undocumented, which really sucks if you want to write a client for it. It seems the Windows RPC protocol is using ALPC under the surface when communicating on the same machine, but does the protocol work together with the SQL Server? We don't know yet.
What would happen with the SQL Server and Prisma at least now is we only support TCP, and later this year can support the named pipes too on Windows platforms. For the in-memory protocol, it might require a huge amount of work in an unknown land of undocumented Windows NT API's, and might not be worth it if majority of our users don't need it.
But. The SQL Server Docker image is TCP only. Azure SQL is TCP. These might be the current day uses for the product and there we could make lots of users happy with Prisma. The question is then some enterprise installations and could we use Prisma in those environments.
pimeys commentedon Jun 10, 2020
The connection string chosen now is the JDBC version, compared to the URI format for other databases. This is mainly due to Azure SQL either giving that or the ADO.NET string from their control panel, and we can differentiate the database easier with the JDBC version.
pimeys commentedon Jun 10, 2020
For supported types, in Tiberius everything is covered except the user-defined types that contain CLR assembly. If there's ever a need for those in Prisma, hopefully somebody will write a ticket on the subject.
We support XML also in Tiberius, but might not add support to Prisma yet until, again, somebody writes about it and how would they use the type in their applications. What Tiberius does is just plain stringifying the XML and probably crashing if somebody stores binary data in an XML field.
pimeys commentedon Jun 10, 2020
To be able to support all the features in Prisma, a certain SQL Server version is required. One that I was just looking for is the
OFFSET X ROWS FETCH NEXT Y ROWS ONLYconstruct, that seems to be available from SQL Server 2012 forward. This means if using earlier versions, the windowing would just panic out due to badly formed SQL.The other construct we need for relation inserts is the
MERGEstatement. This is also only available in SQL Server 2008 and later.Do we need to support older SQL Server versions? I guess Azure has always the latest version... So maybe we're not helping that much in some legacy enterprise installations or we should at least provide restrictions in the API regarding the version of the server.
pimeys commentedon Jun 10, 2020
We do not yet support column encryption (CEK) and columns using it will either produce garbage or panic. Do we want to support it, is it a feature our users will need in 2020?
23 remaining items
[-]MSSQL Support[/-][+]Microsoft SQL Server Support[/+][-]Microsoft SQL Server Support[/-][+]Microsoft SQL Server Support (Preview)[/+]thebiglabasky commentedon Oct 28, 2020
Hi everyone!
We released a preview of Microsoft SQL Server in
2.10.0which adds support for introspection and the client.We'd love to hear your feedback to see what you think!
I've opened a separate issue for the follow-up work to consider to bring it to a GA state.