While conducting Interview for my outsourcing project, I asked one question to interviewer that what are the restrictions on TempDB? The candidate was not able to answer the question. I thought it would be good for all my readers to know the answer to this question so if you face this question in an interview or if you meet me in the interview you will be able to answer this question.
- Adding filegroups.
- Backing up or restoring the database.
- Changing collation. The default collation is the server collation.
- Changing the database owner. tempdb is owned by dbo.
- Creating a database snapshot.
- Dropping the database.
- Dropping the guest user from the database.
- Participating in database mirroring.
- Removing the primary filegroup, primary data file, or log file.
- Renaming the database or primary filegroup.
- Running DBCC CHECKALLOC.
- Running DBCC CHECKCATALOG.
- Setting the database to OFFLINE.
- Setting the database or primary filegroup to READ_ONLY.
Please leave a comment in the comment section with your thoughts. I will be happy to read them and learn along with you about TempDB. Â Trust me TempDB has some restriction but it is indeed very helpful and key element in the SQL Server.
Reference: Pinal Dave (https://blog.sqlauthority.com)
4 Comments. Leave new
Hi,
In this article you mention Adding filegroups. is a restriction in TEMP DB. Recently in an interview some one asked me question on TEMP db is
1. What is the Maximum no of files can be added in temp db?
2. What is the minimum no of files can be added in temp db?
I search a lot but I got some where as many as possible, somewhere 8, somewhere two…..I fully confused.
Request you to clarify my doubt?
Regards,
Munia
I can see I have 8 temp dbs. That could be the correct answer.
Good.
Sir as i checked, We can’t changed recovery (Simple to any other) model as well . Default is simple