Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7907539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T11:29:35+00:00 2026-06-03T11:29:35+00:00

We have several SQL Server 2008 R2 environments (dev, QA, Production) with databases for

  • 0

We have several SQL Server 2008 R2 environments (dev, QA, Production) with databases for an ASP.NET application.

This applicaton uses ASP.NET membership and SQL Server session providers, thus we have an ASPState database.

The functionality of these providers were extended to restrict one active session per login. Our implementation added tables to TempDB, a stored proc ASPState.dbo.CreateTempTables to create these tables, and another stored proc Master.dbo.ASPState_Startup which calls the SP in ASPState.

On my dev machine and in production, when SQL Server is started Master.dbo.ASPState_Startup is executed and the tables are created.

I am setting up a new QA environment and cannot figure out how that happens (so in QA, the tables are not added to TempDB on startup). I have compared schema and permissions manually and via Red Gate’s compare tool and find no differences there.

I checked the jobs and none call either of these stored procs.

Any ideas of where the magic is hiding?

Thanks,
Scott

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T11:29:37+00:00Added an answer on June 3, 2026 at 11:29 am

    sp_procoption is the “magic”:

    Sets or clears a stored procedure for automatic execution. A stored procedure that is set to automatic execution runs every time an instance of SQL Server is started.

    EXEC sp_procoption @ProcName = 'ASPState_Startup' 
    , @OptionName = 'startup' 
    , @OptionValue = 'on'; 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a SQL Server database which is shared between several ASP.NET (VB.NET) websites,
I have a SQL Server 2008 instance with several databases and I'm currently writing
I have a SQL Server 2008 R2 Instance with several databases on it. I'm
This is on SQL Server 2008. I have several columns I want to convert
At work, we have several applications with databases in a centralized SQL server. Whenever
I have a view in SQL Server 2008 with several columns that are expressions
We have several databases on SQL server. We would like to create 1 new
I'm helping implement a SQL Server 2008 database and I have several columns that
I run an in-house application, programmed with visual studio 2008, that uses SQL Server
In my SQL Server 2008 Enterprise I have a database that contains several tables:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.