Can Another User Execute Your Local Temporary Stored Procedures?
Submitted by: AdministratorCan another user execute your local temporary stored procedures? The answer is no.
To test this out, continue with the exercise from the previous tutorial. Keep that user session running and open a new client session with sqlcmd.exe. Then run the tutorial script below:
-- Executing permanent procedure
-- created by another user session
EXECUTE Hello 'globalguideline.com';
GO
Welcome to globalguideline
-- Executing local temporary procedure
-- created by another user session
EXECUTE #Hello 'globalguideline.com';
GO
Msg 2812, Level 16, State 62, Line 1
Could not find stored procedure '#Hello'.
Submitted by: Administrator
To test this out, continue with the exercise from the previous tutorial. Keep that user session running and open a new client session with sqlcmd.exe. Then run the tutorial script below:
-- Executing permanent procedure
-- created by another user session
EXECUTE Hello 'globalguideline.com';
GO
Welcome to globalguideline
-- Executing local temporary procedure
-- created by another user session
EXECUTE #Hello 'globalguideline.com';
GO
Msg 2812, Level 16, State 62, Line 1
Could not find stored procedure '#Hello'.
Submitted by: Administrator
Read Online MS SQL Server Job Interview Questions And Answers
Top MS SQL Server Questions
☺ | How To Select Some Specific Rows from a Table in MS SQL Server? |
☺ | How To Find Out What Is the Default Collation in a Database? |
☺ | How To Write Character String Constants or Literals in MS SQL Server? |
☺ | How To Use Subqueries with the IN Operators in MS SQL Server? |
☺ | PHP MSSQL - How To Display a Past Time in Days, Hours and Minutes? |
Top Databases Programming Categories
☺ | RDBMS Interview Questions. |
☺ | SQL Interview Questions. |
☺ | SSRS Interview Questions. |
☺ | Sybase Interview Questions. |
☺ | Database Administrator (DBA) Interview Questions. |