11-14-09, 01:22 #1Registered User
- Join Date
- Nov 2009
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)?
11-14-09, 03:22 #2Resident Curmudgeon
Provided Answers: 54
- Join Date
- Feb 2004
- In front of the computer
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.
-PatPIn theory, theory and practice are identical. In practice, theory and practice are unrelated.