ERROR: '' You do not have permissions to run native ad-hoc queries against database 3. ''

Thanks @flamber!
I tried to provide you all the screen shots but I am only allowed one image?
7) Error:
image

@wtomlinson Try again, otherwise post one image in each comment.

Here are the steps:

  1. Click ask question
    image
  2. Click simple question
    image
  3. Click database and table
    image
  4. Click to Save
    image
  5. Click Save
    image
  6. Error
    image

Permissions:
image
image

@wtomlinson I’ve tried several times to reproduce this, but without success. There must be some setting or a step that isn’t included.
I’m unsure if it is specific to the database type of the source, or data permission thing I’m not seeing. Or perhaps something completely different, that I’m not seeing.

How can I help further? I am happy to do a screen share and show you the needed aspects of our setup. Thanks

@wtomlinson I’m essentially trying to see if I can reproduce this on a new setup only with Sample Dataset, since it makes it a lot easier for me to write up the steps and then we can easily create tests for this, once it’s fixed, so this problem never occurs again.

Which database type is “Bolt” ?
Does “Inside sales” group only have access to specific tables or the entire Bolt database ?
Does the group have access to other databases?

I know there has been several fixes to other permission problems in 0.36, so it might be worth trying that. Remember to backup before upgrading, since you have to revert to the backup if you want to downgrade. Latest release is 0.36.2

Thanks @flamber. I will work to update to the latest release.
Bolt is a SQL Server
Inside Sales group has access to specific tables. In my example, they DO have access to the table the question was looking at. They do NOT have access to run ad-hoc queries. I have tested turning that on but it doesn’t make a difference for this error.
Inside Sales has limited access to one other SQL Server database.

@wtomlinson Now I’ve just tested with SQL Server on 0.35.4 as well, but I cannot get it to fail.
If it works on 0.36.2, then great, otherwise it would be extremely helpful if you could setup a test instance, where you only add the minimum groups, users, databases, etc to reproduce this problem.

Hello,

I have the same issue on version 0.35.4

Regards,
Haim

@shigah Try latest release 0.36.4
If it doesn’t work, then please provide enough information, so it’s possible to reproduce the issue.
As you can see, it has been reported a couple of times, but there’s not enough details to figure out what is causing this.

I found this error in the logs:
“FATAL: terminating connection due to conflict with recovery\n Detail: User was holding shared buffer pin for too long.\n Hint: In a moment you should be able to reconnect to the database and repeat your command.”,

@shigah Post “Diagnostic Info” from Admin > Troubleshooting.
The error is related to Postgres, but you’re giving no context to when this error occurs, so it might be totally unrelated to this topic.

It’s happened when the user try to save a question and he got the error:
You do not have permissions to run ad-hoc native queries against Database 15.

Diagnostic Info:

{
“browser-info”: {
“language”: “en-US”,
“platform”: “MacIntel”,
“userAgent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36”,
“vendor”: “Google Inc.”
},
“system-info”: {
“file.encoding”: “UTF-8”,
“java.runtime.name”: “OpenJDK Runtime Environment”,
“java.runtime.version”: “11.0.7+10”,
“java.vendor”: “AdoptOpenJDK”,
“java.vendor.url”: “https://adoptopenjdk.net/”,
“java.version”: “11.0.7”,
“java.vm.name”: “OpenJDK 64-Bit Server VM”,
“java.vm.version”: “11.0.7+10”,
“os.name”: “Linux”,
“os.version”: “5.3.0-1023-aws”,
“user.language”: “en”,
“user.timezone”: “GMT”
},
“metabase-info”: {
“databases”: [
“postgres”,
“mysql”,
“presto”
],
“hosting-env”: “unknown”,
“application-database”: “postgres”,
“application-database-details”: {
“database”: {
“name”: “PostgreSQL”,
“version”: “9.6.16”
},
“jdbc-driver”: {
“name”: “PostgreSQL JDBC Driver”,
“version”: “42.2.8”
}
},
“run-mode”: “prod”,
“version”: {
“date”: “2020-05-28”,
“tag”: “v0.35.4”,
“branch”: “release-0.35.x”,
“hash”: “b3080fa”
},
“settings”: {
“report-timezone”: “Europe/Istanbul”
}
}
}

@shigah Try latest release 0.36.4.
I understand when the issue happens, but I have spend multiple hours trying to reproduce this issue without success, so if you can setup a new Metabase instance and only setup minimal groups, users, databases and provide steps-to-reproduce, then that would be awesome.
Otherwise I don’t think we’ll ever figure out how to fix this problem.

Thanks.

I’ll upgrade to the latest release 0.36.4 and will update here.

Regards,
Haim

@shigah Remember to always backup before upgrading or doing other major changes to Metabase.

Hello,
We are facing the same issue in version 0.35.4. Can someone confirm that upgrading to the latest version solves it?
Thank you :slightly_smiling_face:

Luca

@elleflorio I would recommend that you make a backup and then try upgrading. No one has been able to provide steps-to-reproduce, so without that, it’s hard to tell if it has been fixed or ever will be.

Thank you @flamber, I understand that. I was hoping to get some feedback from @shigah, but we will try to upgrade anyway.

Have a nice day!

Hi,
Is there any update on this error?
Upgrading to the latest version (0.36.6) didn’t solve the issue. Is there already a bug issue created for this topic? If so can some share the link?