1

I have a session state management implementation using SQL Server. There is an ASPState database, and ASPStateTempApplications & ASPStateTempSessions tables in the tempdb database.

When I restart the SQL Service, tempdb database recreates, but these tables recreate too. I want to know: how do these tables recreate automatically each time?

I looked for start-up parameters and jobs, but did not find any.

Paul White
95.4k30 gold badges440 silver badges689 bronze badges
asked Dec 13, 2014 at 10:21

2 Answers 2

1

Thanks for your input. Actually, I found the answer:

Those tables were created by a stored procedure that is set to execute on startup of the database engine service, configured via the sp_procoption system stored procedure.

Paul White
95.4k30 gold badges440 silver badges689 bronze badges
answered Dec 17, 2014 at 10:20
0
0

They must have also been created in the model database. Anything in model gets created in any new database that's created (but not restored or attached), including tempdb on restart.

answered Dec 13, 2014 at 13:03

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.