简体   繁体   中英

SQL Server 2008. Calling same stored procedure with different parameters. When two persons call the same proc, will the data overlap?

I am calling same stored procedure with different parameters.

Inside SP, we are filling data into a table and fetching those records as output of the stored procedure. Is there a chance that there will be an overlap when two persons call the same stored procedure and the records might be wrong.

May I know which stored procedure called first . More over, we are not supposed to use any locking mechanism like the first one should finish before starting execution of the second time execution of sp?

Please explain us the execution plan when the same procedure is called by two different users at the same time.

Term "Critical Section" in general is what you would like to research. Also known as Mutexes/Locking. Learning about those you will be able to create stored procedures that are guaranteed to complete execution without overlapping executions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM