What is TempDb?
Its is system database available to all instances of sql server. It basically holds
- Temporary tables
- Temporary stored procedures
- Internal objects created internally for example work tables to store intermediate results for spools or sorting.
Who can create objects in TempDB?
Any user can create.
Is it possible to restrict user from creating objects in TempDB?
Yes it is possible.
Is it possible to create procedures in TempDB?
Yes, it is possible. All through main purpose of TempDB is to store temporary stored procedure and table we can still create normalS procedures and tables directly into this database.
One specialty about the TempDb database is, it get recreated every time sql server starts. It makes every object in tempdb get removed with every system start.
We are thankful to questpond.com to provide these 4 SQL Server interview questions with answers.
Below are 6 important SQL Server interview questions with answer videos