SQL Server Introspection Error
See original GitHub issueBug description
I seem to be running an error when I run npx prisma introspect
a SQL server db on Azure.
Here’s the error I run into:
Environment variables loaded from .env
Prisma schema loaded from prisma\schema.prisma
Introspecting based on datasource defined in prisma\schema.prisma …
Error: P4002
The schema of the introspected database was inconsistent: Table RhionsUsers not found.
The DB structure is as follows:
Expected behavior
Generate models and add them to schema.prisma
file
Environment & setup
- OS: Windows
- Database: mssql
- Node.js version: 14.15.1
- Prisma version:
Environment variables loaded from .env
@prisma/cli : 2.13.1
@prisma/client : Not found
Current platform : windows
Query Engine : query-engine fcbc4bb2d306c86c28014f596b1e8c7980af8bd4 (at node_modules\@prisma\engines\query-engine-windows.exe)
Migration Engine : migration-engine-cli fcbc4bb2d306c86c28014f596b1e8c7980af8bd4 (at node_modules\@prisma\engines\migration-engine-windows.exe)
Introspection Engine : introspection-core fcbc4bb2d306c86c28014f596b1e8c7980af8bd4 (at node_modules\@prisma\engines\introspection-engine-windows.exe)
Format Binary : prisma-fmt fcbc4bb2d306c86c28014f596b1e8c7980af8bd4 (at node_modules\@prisma\engines\prisma-fmt-windows.exe)
Studio : 0.329.0
Preview Features : microsoftSqlServer
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
MSSQL database introspection failing? Unable to resolve ...
HI, I setup new connection to a MSSQL Azure AG database. I am able to connect fine, and when I sync all the...
Read more >How do I introspect on a SQL Server? - Stack Overflow
I need to make some minor changes to the data in a few tables in the database in an automated fashion. Just INSERTs...
Read more >What is introspection? (Reference) - Prisma
This is most commonly the case when you're not using Prisma Migrate but perform schema migrations using plain SQL or another migration tool....
Read more >Performing Introspection on a Data Source Connection
Introspection is a method of inspecting a physical data source for metadata elements. When you perform introspection, structural information in the data ...
Read more >GraphQL - OWASP Cheat Sheet Series
There are GraphQL servers and clients implemented in various languages. ... default configurations (e.g. excessive errors, introspection, GraphiQL, etc.).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for reporting this, we already have an issue for foreign keys that span schemas: https://github.com/prisma/prisma/issues/1175
I am closing this issue.
Indeed you have a different schemas
Security
anddbo
. Prisma doesn’t support multiple schemas in one app yet. Marking this as a feature request.