Rights to create a view

  • Hi,

    I setup user with db_public, db_owner, db_datareader and db_datawriter rights. He sill could not create a view from SQL Analyzer, or created a view under SQL Enterprise but could not save it. Did I miss anything? Thanks.

    Chris

  • If a user has db_owner permission, you shouldn't have any problems. Can you post the SQL and the error message. Are you trying to access a table in another database ?

  • Hi SA24,

    Thanks.

    That's what I thought. No, he was not trying create on different database.

    Server: Msg 262, Level 14, State 1, Procedure v_xxxx, Line 3

    CREATE VIEW permission denied in database 'The database that setup for user'.

    He could create the view under SQL Enterprise database/view. Howver, he could not save the view.

    Chris

  • Can you try creating another user and grant him db_owner permission and try with that user.

    can you verify the registration property my right clicking your SQL server and verify that the user which you have granted permisisons is the same you are connecting to.

  • I used my own workstation. Kick off SQL Analyzer from SQL Enterprise (SA registered/login), I could create the view without any proble. If I diconnect/connect with user's id/passwrod, then I got "...permission denied..." error message. I even asked him to un-register and re-register the SQL before creating the view from his own workstation; but no luck.

    Chris

  • can you run sp_helpuser from query analyzer and see what permissions the user has ?

    Also, if you restored the database from a backup, you might want to run

    sp_change_users-login 'auto_fix',username

  • matuschakb_rwdb_ownermatuschakb_rwmaster120xF6C40F68DEE7EC4BA3BF14B4CF61D29E
    matuschakb_rwdb_datareadermatuschakb_rwmaster120xF6C40F68DEE7EC4BA3BF14B4CF61D29E
    matuschakb_rwdb_datawritermatuschakb_rwmaster120xF6C40F68DEE7EC4BA3BF14B4CF61D29E

    user needs to create a view in database other than master.

  • In SQL Server 2000, create view rights is granted only to db_owner and db_ddladmin database roles.

    Why are you granting db_public, db_datareader, and db_datawriter in addition to db_owner to the user you created? The permissions of database role db_owner span all of the other fixed database roles.

  • Except db_owner, all other rights were granted to user by our DBA. I was told to grant user rights to create view. db_owner was granted to user much later.

    Thanks, Chris

  • Did this get resolved ?

  • No. Our DBA told me he opened an ticket with MS. I will find out the status later.

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply