question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[v2.0.0-alpha.6] SQL Server dbo schema not loaded

See original GitHub issue

Hi,

I’m connecting Hasura v2.0.0-alpha.6 to an on-premises SQL Server 2016 (version 13.0.5865.1) using authentication mode (user/password).

The connection string is: Driver={ODBC Driver 17 for SQL Server};Server=myServerIPAddress;Database=UtiCaro;UID=hasurauser;PWD=thepassword;

The SQL Server user “hasurauser” has default schema: dbo

image

Under the dbo schema I have created a table named Cargos:

image

What happens is, when the connection to SQL Server is added in the Hasura Console, the dbo schema and tables under it are not loaded. A “public” schema is loaded instead, and it does not contain my table:

image

image

I’m confused because in the Hasura 2.0 launch demo, Tanmai Gopal adds a connection to a SQL Server instance, and the dbo schema is loaded inmediately, with all the tables under the schema available to be tracked:

image

Could someone help me identify what might be missing?

Thank you.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
0x777commented, May 7, 2021

On second thought, I think we should just simplify the above query to this:

 SELECT
   s.name AS schema_name
 FROM
   sys.schemas s
 WHERE
   s.name NOT IN (
     'guest', 'INFORMATION_SCHEMA', 'sys',
     'db_owner', 'db_securityadmin', 'db_accessadmin',
     'db_backupoperator', 'db_ddladmin', 'db_datawriter',
     'db_datareader', 'db_denydatawriter', 'db_denydatareader'
   )
Read more comments on GitHub >

github_iconTop Results From Across the Web

sql server - Table not getting created under dbo schema
When creating tables in SSMS, I've realized that if you execute the following statement: CREATE TABLE [tableName]; the table will be created ...
Read more >
Fixing a non-dbo. SQL Server schema when restoring a ...
This article provides information on how to fix the database schema of a Sitefinity database to be dbo.
Read more >
Why do table names in SQL Server start with "dbo"?
dbo is the default schema in SQL Server. You can create your own schemas to allow you to better manage your object namespace....
Read more >
Database Engine events and errors - SQL Server
Consult this MSSQL error code list to find explanations for error messages for SQL Server database engine events.
Read more >
How do I resolve issues with missing or incorrect schema ...
The database version check SQL is SELECT PROPVALUE FROM LSW_SYSTEM_SCHEMA WHERE upper(PROPNAME) = upper('DatabaseSchemaVersion') Please ensure the database is ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found