SQL Server Interview Questions and Answers (11-20)
SQL Server Interview Questions and Answers (11-20)
A. Since TempDB stores temporary objects Backup and restore operations are not allowed on
tempdb.
TempDB Contents:
Temporary user objects that are explicitly created. They include global or local temporary
tables and indexes, temporary stored procedures
table variables, tables returned in table-valued functions, and cursors.
Internal objects that the database engine creates. They include: Work tables to store
intermediate results for spools, cursors, sorts, and temporary large object (LOB) storage.
12. In which SQL Server edition SQL Server Agent is not available?
a. Standard edition
b. Express edition
c. Enterprise edition
d. Developer edition
A. No. SQL Server Express Edition is a free version that does not include the SQL Agent (because it is
free).
13. How many non-clustered indexes can we create per a table in SQL server?
a. 1
b. 999
c. 1024
d. Unlimited
A. We can create up to 1000 indexes per table (one clustered index+999 clustered indexes)
14. From which SQL Server version service packs are not available?
a. 2012
b. 2014
c. 2016
d. 2017
A. SPs will no longer be available from SQL Server 2017 version. Only Cumulative Updates (CUs) and
critical updates (GDRs) will be provided.
CU’s will be released for every one month for the first year and then every quarter for the
final four years of the five-year.
15. In which SQL Server version Always On Automatic seeding was introduced?
a. 2019
b. 2017
c. 2012
d. 2016
When you create an availability group with automatic seeding, SQL Server automatically
creates the secondary replicas for every database in the group.
You no longer have to manually back up and restore secondary replicas.
16. In which log Shipping mode the TUF File will create?
a. Log shipping with no recovery
b. Log shipping with standby
A. The Transaction Undo File (TUF) is used in log shipping as a mechanism to store uncommitted
transactions that are present in the transaction log backup being shipped to the secondary server.
The secondary server applies these transaction log backups in sequence to bring the
database to the same state as the primary server.
However, if the secondary server were to apply a transaction log backup that contained
uncommitted transactions, it could lead to data inconsistency.
To prevent this from happening, the uncommitted transactions are stored in the TUF file on
the primary server and shipped to the secondary server along with the transaction log
backups.
17. Can we create a cluster and non-clustered index on the same table(column)?
a. Yes
b. No
A. Yes, We can create clustered and non-clustered index on the same table and same column as well.
18. Can we take database differential backup without taking full backup in SQL Server?
a. Yes
b. No
A. Since full backup is foundational backup, we can’t take differential backup without taking the full
backup
Differential Backup checks for the recent full backup, if full backup is not available the
differential backup will fail with the following error.
19. In which SQL Server page the different changes are stored?
a. Data Page
b. BCM
c. DCM
d. PFS
A. A differential backup captures only the data that has changed since that full backup
A differential backup records only the data that has changed since the full backup upon the
differential backup is based.
20. Can we access the database which is in emergency mode?
a. Yes
b. No
A. Yes, we can access the database in emergency mode with some limitations