Machine-translated by Google. Questions are authored in English.
Top

SQL Server 2000 Questions and Answers

21.

With SQL Server, parameters and variables in T-SQL start with the "%" sign.

Answer: B

Correct answer: False

Parameters and local variables begin with a single at sign, and system globals with two. The per cent sign is the wildcard in a LIKE pattern and has nothing to do with variables, so a declaration using it will not compile.

Please log in or register to report this question.

22.

SQL Server program code that is executed instead of an SQL command that needs to be processed is called a(n):

Answer: A

Correct answer: INSTEAD OF trigger.

An INSTEAD OF trigger replaces the statement that fired it, so the code in the trigger runs and the original insert, update or delete does not. Its principal use is on views that are not otherwise updatable: the trigger receives the intended change and writes it to the underlying tables itself.

Please log in or register to report this question.

23.

The strictest transaction isolation level provided by SQL Server is called:

Answer: B

Correct answer: SERIALIZABLE.

Serializable is the strictest of the four, permitting neither dirty reads, nor nonrepeatable reads, nor phantoms, and giving a result equivalent to running the transactions one after another. The cost is the concurrency given up: locks are held on ranges as well as rows, so other transactions are blocked from inserting into them.

Please log in or register to report this question.

24.

SERIALIZABLE is the strictest isolation level.

Answer: A

Correct answer: True

Serializable permits none of the three anomalies - no dirty reads, no nonrepeatable reads and no phantoms - and gives a result equivalent to running the transactions one at a time. It achieves the last of these by locking key ranges as well as rows, which is what blocks the insertion that would otherwise produce a phantom.

Please log in or register to report this question.

25.

SQL Server supports INSTEAD OF, AFTER and BEFORE triggers.

Answer: B

Correct answer: False

SQL Server supports INSTEAD OF and AFTER triggers only; there is no BEFORE trigger. Much of what a BEFORE trigger does elsewhere is achieved with an INSTEAD OF trigger, which replaces the statement entirely and can perform whatever checks are wanted before writing the change itself.

Please log in or register to report this question.

26.

There is only one way to create and modify tables in SQL Server. Write SQL code using either the CREATE or ALTER statements.

Answer: B

Correct answer: False

There are two ways: writing CREATE TABLE or ALTER TABLE statements, or using the graphical designer in Enterprise Manager. Both end in the same SQL being executed, and the choice is practical - the graphical route for a quick change, the script for anything that must be repeated on another server or kept under version control.

Please log in or register to report this question.

27.

Which type of SQL Server cursor concurrency places an update lock on a row when the row is read?

Answer: D

Correct answer: SCROLL_LOCK

SCROLL_LOCK is the pessimistic setting: an update lock is taken as each row is read and held while the cursor is positioned there, so no one else can change the row before the application decides what to do with it. OPTIMISTIC takes no lock until the update is attempted, and READ_ONLY takes none at all.

Please log in or register to report this question.

28.

SQL Server supports three recovery modes: simple, full and Bulk.

Answer: A

SQL Server provides three different recovery models that allow you to specify the way SQL Server manages log files and prepares your enterprise for a disaster. Each of these models represents a different approach to balancing the tradeoff between conserving disk space and providing for granular disaster recovery options. The three disaster recovery models offered by SQL Server are:

1. Simple Recovery Model
2. Full Recovery Model
3. Bulk-logged Recovery Model

Please log in or register to report this question.

29.

With which type of SQL Server recovery model, is no logging done?

Answer: D

Correct answer: Simple recovery

Under the simple model the log is truncated at each checkpoint, so no log is retained for recovery purposes and the database can only be restored to the last full or differential backup. Everything since is lost. It suits a development or read-mostly database, and is unsuitable for anything where the day’s transactions matter.

Please log in or register to report this question.

30.

With which type of SQL Server recovery model are all database changes logged except those that cause large log entries?

Answer: D

Correct answer: Bulk-logged recovery

Bulk-logged recovery logs everything except the bulk operations - bulk inserts, index creation, text and image writes - which are recorded minimally rather than row by row. It is a compromise: the log stays small during a bulk load, at the price of losing point-in-time recovery within the interval in which one occurred.

Please log in or register to report this question.

Loading…
Tags: SQL Server 2000 Questions and Answers || SQL Server 2000 MCQ Questions and Answers || SQL Server 2000 GK Questions and Answers || SQL Server 2000 GK MCQ Questions || SQL Server 2000 Multiple Choice Questions and Answers || SQL Server 2000 GK || GK on SQL Server 2000 || Database Questions and Answers || Database MCQ Questions and Answers || Database GK Questions and Answers || GK on Database