SQL Permissions

Please support our MS SQL advertiser: Intel Parallel Studio Home
Reply

Join Date: Apr 2007
Posts: 1
Reputation: jwhelan is an unknown quantity at this point 
Solved Threads: 0
jwhelan jwhelan is offline Offline
Newbie Poster

SQL Permissions

 
0
  #1
Apr 19th, 2007
Hi all,

I am writing a web interface which uses a MSSQL Server 2000 database. I have checked and double checked all permissions and can't find any problems but when I run a

  1. SELECT * FROM sales
I get the 'Permission denied for `sales` database `dbasename` database owner `sqluser`

I connect with the string

  1. mssql_connect("server","sqluser","passwd");
and this connects fine, so I am attempting to select all the components from a table that the user I connect with owns. As a sideline, I can create tables, but cannot read them in any way.

Any advice would be appreciated.
Thanks
Reply With Quote Quick reply to this message  
Join Date: Oct 2005
Posts: 523
Reputation: pty is on a distinguished road 
Solved Threads: 37
pty's Avatar
pty pty is offline Offline
Posting Pro

Re: SQL Permissions

 
0
  #2
Apr 19th, 2007
Originally Posted by jwhelan View Post
Hi all,

I am writing a web interface which uses a MSSQL Server 2000 database. I have checked and double checked all permissions and can't find any problems but when I run a

  1. SELECT * FROM sales
I get the 'Permission denied for `sales` database `dbasename` database owner `sqluser`

I connect with the string

  1. mssql_connect("server","sqluser","passwd");
and this connects fine, so I am attempting to select all the components from a table that the user I connect with owns. As a sideline, I can create tables, but cannot read them in any way.

Any advice would be appreciated.
Thanks
try
  1. GRANT SELECT on sales to sqluser

If you look up the grant function on msdn you can finely tune the privileges for each table/database/user/whatever.
Note to self... pocket cup
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 2570 | Replies: 1
Thread Tools Search this Thread



Tag cloud for MS SQL
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC