#Temp tables question

  • Hello,

    I have a web server with asp.net applications running on it. The applications call Stored Procs on my SQL server, but before I put this one into production I want to know what effects it will have.

    When I call a stored Proc that creates #temp tables. What will happen if 2+ users calls the same SP at the same time, will it clash on the tablenames and when I drop them at the end of the proc?

    Cheers,

    Ryk

  • No, they will not clash, since each temp table is created for the specific session in which it is created. If you are not using global temp tables (prefixed with ##) of course.

  • Just for 100% clarity. There is aconstant connection to the sql server which is open most of the times and all users using the site uses that particular connection, so every user does not come in on a different connection, is this still the case if it is the same connection?

    I just have to make sure, becase I dont want to get kicked for this if I screw up our business core on the production server.

    Cheers,

    Ryk

  • > I just have to make sure, becase I dont want to get kicked for this if I screw up our business core on the production server.

    You could always test in a less critical environment first.

    Two users cannot execute something using the same connection at the same time. That is impossible. If your site truly uses just 1 connection all the time then all your access to the database server is serialized. That does not seem very normal.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply