Home > Software design >  Query another database using Prisma
Query another database using Prisma

Time:11-17

I am already using Prisma as an ORM for a Postgres DB. I need to run a simple raw query on a SQL Server DB. I do not need to use any of the ORM features like the Prisma schema, migrations, etc. Is it possible to do with Prisma? I am trying to minimize dependencies.

CodePudding user response:

Look at this part of the documentation and see if it meets your request.

https://www.prisma.io/client prima raw query

CodePudding user response:

You would need to create two PrismaClient Instances, one for the PostgresDB and other for SQL Server.

Here's a GitHub Issue on how you can implement it: #2443

  • Related