Click here to Skip to main content
15,879,348 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have Two sql users
1) Server Role is SystemAdmin
2)Server Role is Public

I am checking in a particular folder whether file exists or not.
When I execute query for 1st User it returns 1 (as FilePath exists) but same file path when I execute for second user it returns 0.

Is there any access level / Permission level issues ?

If you have any ideas then let me know.
Posted
Comments
CHill60 21-Jan-15 9:27am    
Second user does not have access to that file path
RAHUL(10217975) 21-Jan-15 9:31am    
how should I give access to second user?
CHill60 21-Jan-15 9:35am    
That depends on several things - it's to do with the Domain not sql so if the folder where the file lives is on the server talk to your domain administrator other wise grant the permissions yourself - and that bit depends on which operating system you are using e.g. see this query of possible approaches https://www.google.co.uk/?gws_rd=ssl#q=set+user+permissions+windows[^]
RAHUL(10217975) 21-Jan-15 13:04pm    
I put full control to user MSSQLEXPRESS but still the same stuff is happening. Query returns 0
CHill60 21-Jan-15 13:45pm    
As I said - it's not sql permissions that are at play here... it's the logon-to-the-machine id that needs the permissions granted to the relevant folders

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900