Access another database table within APPLICATION ROLE

Answered Access another database table within APPLICATION ROLE

  • 12 iulie 2012 07:12
     
      Are cod

    I've created APPLICATION ROLE like this

    CREATE APPLICATION ROLE [AppRole1] WITH DEFAULT_SCHEMA = [dbo], PASSWORD = N'1'

    Then I granted all the rights to this APPLICATION ROLE:

    GRANT EXECUTE,SELECT,INSERT,UPDATE,DELETE,REFERENCES,ALTER,CONTROL TO [AppRole1]

    Everything (SELECT, INSERT, UPDATE, DELETE ... on all tables,views ...) works great except for getting some data from another database (on the same server) that throws this error:

    The SELECT permission was denied on the object 'MySynonym', database 'OtherDatabaseName', schema 'dbo'.

    Note that I'm using SYNONYM to access table from other database



    Ilya

    • Mutat de Tom Phillips 12 iulie 2012 19:41 Security question (From:SQL Server Database Engine)
    •  

Toate mesajele

  • 12 iulie 2012 13:50
     
     Răspuns

    I'm not sure if that applies to this problem, but try this :

    http://msdn.microsoft.com/en-us/library/ms188694%28v=sql.90%29.aspx

    be aware of the security issue you open with this one.

  • 12 iulie 2012 19:02
     
     

    Hi,

    Thanks a lot, you saved life.

    Kind regards,

    Ilia

    Tbilisi, Georgia


    Ilya