Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2009
    Posts
    1

    Unanswered: 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)?

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Why on earth would you need db_owner within tempdb? What possible purpose can that serve?

    SQL Server's architecture makes it challenging to do this because it represents a serious security problem. It can be done, but the app will cause the server to fail most SOX and all JSOX audits.

    SQL Agent jobs can be made to run when a SQL Server service starts. There are many other unsafe ways to achieve the same effect.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Tags for this Thread

Posting Permissions

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