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.

dbt run fails with "The specified schema name userid@domain either does not exist or you do not have permission to use it

See original GitHub issue

Hello,

When I create a schema manually, add it to my profiles.yml, and then submit “dbt run”, my model is built successfully. However, if the schema specified in my profiles.yml does not exist, the build fails with:

"The specified schema name 'userid@domain' either does not exist or you do not have permission to use it" "CREATE SCHEMA failed due to previous errors" when active directory integrated authentication is used. This feels like a DB permissions issue but I am able to log into SSMS using active directory integrated and create schemas without issue. I am also not sure why my userid and domain are being concatenated for the schema name when my profiles.yml contains “schema: staging”.

I’m running dbt=0.19.2. What additional information can I provide for troubleshooting?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:14

github_iconTop GitHub Comments

1reaction
dataderscommented, Jul 21, 2021

Edit: I saw your note to move it to tsql-utils. Is that functionality available in GitHub or do you just mean re-post there?

yes, I think so, but let’s have that discussion on the tsql-utls repo Issues page.

as for the main issue, now I’m rather stumped! if you DM me on the dbt Slack, I can give you test Azure SQL to play with (to see if the error persists).

Can you log into the db with SSMS, and execute CREATE SCHEMA new_schema without issue?

You might want to follow up with you cloud team’s set up because in my view, using “Active Directory - Integrated” with Azure SQL must mean that your cloud team has:

@alieus @NandanHegde15 any ideas what might be going on here?

0reactions
dataderscommented, Sep 6, 2022

updating scope bc #277 isn’t working yet

Read more comments on GitHub >

github_iconTop Results From Across the Web

The specified schema name either does not exist or ... - TechNet
I 'm running SQL Server 2012 developer edition on a local machine. When I try to run DDL I just get the error...
Read more >
The specified schema name either does not exist or you do ...
For that I am generating script from original server and trying to run in another server. I've created database manually with the same...
Read more >
Debugging errors - dbt Developer Hub
Inspect the file that was known to cause the issue, and see if there's an immediate fix. Isolate the problem — for example,...
Read more >
grants - dbt Developer Hub
You can manage access to the datasets you're producing with dbt by using grants. To implement these permissions, define grants as resource ...
Read more >
Building a dbt package | dbt Developer Hub
Packages are not a good fit for sharing models that contain ... package is going to store their Mailchimp data in a schema...
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