Results 1 to 6 of 6

Thread: Security

  1. #1
    Join Date
    Aug 2005
    Posts
    3

    Security

    hai,
    i am a VB devekoper, and now working on a SQL Query Engine.... the appn. will QUERY the SQL Server(SQL)...i made the appn. to create a USER (say: QueryEngine), and i log in with the same UserName... now i want to set some restrictions for the User(QueryEngine) to provide READ-ONLY access, and that also through some SQL statements, so that i can quey the Server each time the appn is opened...
    i tried out the "GRANT" sql key word but it didn;t work oput...

    anybody has any solutions

    expecting the reply ASAP

    regards,
    abhay

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    The easiest way is to use Enterprise Manager and put the queryengine user in data_reader role in the database. If you want more restricted privileges, then you can grant them on per object basis.

    If you want to use T-SQL then search books online for

    GRANT
    sp_addrolemember

  3. #3
    Join Date
    Aug 2005
    Posts
    3

    re:

    thanks,
    if the appn is installed the ADMIn has to do use the Enterprise Manager to Setup the permission, where as i am thinking of the appn itself will set the restrictions.....

  4. #4
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    Then you have to use GRANT statements.

    GRANT SELECT ON TABLE1 TO USER1;

    etc.

  5. #5
    Join Date
    Sep 2002
    Posts
    5,938
    User needs proper permission to run grant statement.

  6. #6
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    If the appn user is able to create user, it should be able to grant permissions as well. I am assuming appn is a dbo.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •