DBA > Interview Resource

Microsoft SQL Server FAQs

Part:   1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41 

(Continued from previous part...)

You have a relatively new SQL Server 2005 and msdb is corrupt. How can you fix this database without a restore? (data loss is acceptable)

Answer
Stop the server and restart it with a trace flag to allow system databases to be detached. Then copy a new version from the /INSTALL folder.
Explanation
By starting SQL Server with trace flag 3608 you can detach the msdb database. You can copy a new initial version from the installation CD.


In SQL Server 2005 Integration Services, if you want to import a flat file very quickly that contains only integer data, what type of parsing should you use?

Answer
Fast Parse
Explanation
The fast parse mode that is set on columns for a flat file source connection can import a limited set of data types extremely quickly.


In a new default SQL Server 2005 installation, what is the status of the dedicated administrator connection?

Answer
Enabled for local connections only.
Explanation
The dedicated adminstrator connection is enabled for local connections only by default.


In the REPEATABLE READ isolation level, what phenomena is still possible?

Answer
Phantom rows

Explanation
The answer is Phantoms rows. A phantom row refers to the situation where you execute a DML statement that retrieves data, and another process may add new rows the result set. For example:
SET ISOLATION LEVEL REPEATABLE READ
BEGIN TRANSACTION
SELECT * FROM table
We return the following rows:
ColumnName
-----------
row1
row2

You are guaranteed to get back at least these rows, and no other user may delete these rows (the rows are locked with a shared lock) This is what is referred to as a repeatable read. However, a user might add another row:
SELECT * FROM table
ColumnName
-----------
row1
row2
row3

To prevent phantoms, use the SERIALIZABLE isolation level.


(Continued on next part...)

Part:   1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41