0

I have a problem with permissions on a database in SQL Server 2014.

Group G has select permission on schema S1, which contains a lot of views. When I connect as a user I can see all the views but when selecting 'top 1000 rows' I get the error 'access to path is denied'.

Schema S1 uses tables from S2 and I have also added select permissions to that schema.

I have tried removing all access and give the Group G select permission on a table, then I also receive the same message.

I also noticed that even though I did not grant 'view definition' rights, I can see what columns it has etc..

I also tried giving all possible grants and 'with grant' but was unsuccessful so far.

This is the error description when doing select on the table.

Anyone encountered this before or has anyone any idea what I'm doing wrong?

Access to the path is denied. (mscorlib)

Program Location:

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.__Error.WinIOError() at System.IO.Path.InternalGetTempFileName(Boolean checkHost) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.LaunchFormHost.CreateScriptWindow(String text, String scriptType, String dbName) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.LaunchFormHost.Microsoft.SqlServer.Management.SqlMgmt.ILaunchFormHost3.ScriptToNewWindowAndExecute(String text, String scriptType) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.OpenTableHelperClass.SelectTopNRows(NodeContext parentContext, Int32 topNValue) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.SelectTopNRows.Invoke() at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ToolsMenuItemBase.MenuInvokedHandler(Object sender, EventArgs args)

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Aswin
  • 1
  • 2
  • Can you start SSMS as administrator and see if that works. – Sean Pearce Apr 20 '16 at 08:04
  • that did not seem to work neither – Aswin Apr 20 '16 at 08:26
  • That's not a SQL server error, that's an issue with Management Studio by the looks of it, seems like it's having issues accessing or creating temp files. Try clearing out some .tmp files from the temp directory on the machine and see if that works. – steoleary Apr 20 '16 at 09:16

1 Answers1

0

Clearing temp did not help unfortunately

Turned out the permissions are ok, I was testing using SSMS 'run as different user' which seems to be the problem. When I login on a test laptop as that user and try it there, I encounter no problems. As I can continue with this test laptop for testing permissions, Its unfortunate the 'run as' is not that trustworthy.

Anyhow I thank you for your responses.

Aswin
  • 1
  • 2