I have the following stored proc which uses a temp table to bulk import the data. I understand the temp tables are unique for every session, however i'm wondering if my application uses threads and makes multiple concurrent request to the stored proc, using the same sql connection from the application pool, will they end up referencing the same temp table?
CREATE PROCEDURE [dbo].[Mytestproc]
AS
BEGIN
BEGIN TRANSACTION
CREATE TABLE #Hold
(
ID INT,
VAL NVARCHAR(255)
)
BULK INSERT #Hold
FROM 'C:\data.txt'
WITH
(
FieldTermInAtOr ='|',
RowTermInAtOr ='\n'
)
SELECT *
FROM #Hold
DROP TABLE #Hold
COMMIT TRANSACTION
END