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.
2 Answers 2
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.
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.
Explore related questions
See similar questions with these tags.