LearnItFirst User Forum

New SQL Server 2008 DBA Course
Welcome Guest Search | New Posts | Members | Log In | Register

role permission of tempdb due to server restart Options
tatvasoftseo
Posted: Friday, November 13, 2009 11:50:34 PM
Rank: Newbie

Joined: 11/13/2009
Posts: 1
Points: 3
Where do you live?: India
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
www.tatvasoft.com
www.sparsh-technologies.com
Scott Whigham
Posted: Monday, November 23, 2009 12:45:01 PM


Rank: Super Mod

Joined: 3/20/2006
Posts: 438
Points: 930
Where do you live?: Dallas, TX
Hi there -

If you will make them db_owner of the model database, they will be db_owner of tempdb upon restart. However, that seems like overkill to me. Your second option is better:

1) Create a stored proc that runs in the tempdb to assign db_owner to APP

2) Mark it as a startup proc (example here: http://learnitfirst.com/go.aspx?id=XCKY)
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.