role permission of tempdb due to server restart

  • in our application that need to create some tables in tempdb. The user

    (call it APP) is not sa. Everytime that the server need to be rebooted, the

    db_owner role on tempdb for user APP disappear. So...

    1. Is there any setting to ensure that the the db_owner role on tempdb for

    user APP will remain after server reboot?

    2. If not,

    Is there any solustion to run a script at server startup?

    And does anybody have a script that will create the db_owner role on tempdb

    for user APP(or some pointer on how)?

    Chirag Vyas

    Project Manager

    Software Outsourcing India

    Web Development Company India

  • chirag.vyas (11/13/2009)


    in our application that need to create some tables in tempdb.

    Why? That's generally a very bad idea

    1. Is there any setting to ensure that the the db_owner role on tempdb for

    user APP will remain after server reboot?

    db_owner? Also a bad idea. Way too high a permission for just creating tables, especially on SQL 2008 where very granular permissions can be give,

    Grant the permissions on Model. Since TempDB is created from model, permissions will come across. They'll also come to every new database created, so be careful.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 2 posts - 1 through 2 (of 2 total)

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