SQL Server Advanced Concepts

Advanced SQL Server topics including DCL, system functions, CTEs, configuration settings, triggers, data types, transactions, and error handling.

19 Questions Published

Questions

Question 1 True/False

@@Error returns the sys.messages.message_id column value if an error occurs in the last T-SQL statement executed.True/False?

  1. True
  2. False
Question 2 True/False

A transaction must have ACID properties to be qualified as such.

  1. True
  2. False
Question 3 Multiple Choice (Single Answer)

Which of the Isolation levels causes "Dirty Read"?

  1. Read Uncommitted
  2. Read Committed
  3. Repeatable Read
  4. Snapshot
  5. Serializable
Question 4 Multiple Choice (Single Answer)

Which one of the below functions is Non-Deterministic?

  1. CASE
  2. ISNULL
  3. ISNUMERIC
  4. ISDATE
  5. None
Question 5 Multiple Choice (Single Answer)

The given T-SQL statement is executed. What happens?

  1. A run time error occurs
  2. Returns all the column names in the table but no records
  3. Returns all the records in the table
  4. Returns nothing
  5. Returns NULL
Question 6 Multiple Choice (Single Answer)

COUNT(*) returns the number of items in a group - which of the below is correct?

  1. This includes NULL values and duplicate
  2. This includes NULL values but not the duplicates
  3. This does not include NULL values and duplicates
  4. None of the above
Question 7 True/False

sys.sql_modules system catalog contains a row for each object of type P, RF, V, TR, FN, IF, TF, R, and D.

  1. True
  2. False
Question 8 True/False

We can write triggers for Truncate.

  1. True
  2. False
Question 9 True/False

Extended Stored Procedure master.dbo.xp_fileexist can be used to decide if a file exists.

  1. True
  2. False
Question 10 True/False

If DBCC CHECKDB for a database then DBCC CHECKALLOC has to be run separately.

  1. True
  2. False
Question 11 Multiple Choice (Single Answer)

MARS stands for:

  1. Multiple Active Record Sets
  2. Multiple Active Result Sets
  3. Multiple Account Record Sets
  4. Multiple Account Result Sets
Question 12 True/False

There must be at least one log file for each database.

  1. True
  2. False
Question 13 Multiple Choice (Single Answer)

SQL 2005 XML data type instance storage has a limit. Choose the correct limit:

  1. 1 GB
  2. 1024 KB
  3. 2 GB
  4. 500 MB
Question 14 True/False

A trigger name in SQL 2005 cannot start with #.

  1. True
  2. False
Question 15 Multiple Choice (Single Answer)

Which one of the below, returns the maximum number of simultaneous user connections allowed on an instance of SQL Server?

  1. @@MAX_CONNECTIONS
  2. @@TRANCOUNT
  3. @@CONNECTIONS
  4. None of the above
Question 16 Multiple Choice (Single Answer)

Choose the correct option:

  1. When SET ANSI_NULLS is OFF, comparisons of all data against a null value evaluate to UNKNOWN if the data value is NULL
  2. When SET ANSI_NULLS is OFF, comparisons of all data against a null value evaluate to UNKNOWN if the data value is NOT NULL
  3. When SET ANSI_NULLS is OFF, comparisons of all data against a null value evaluate to FALSE if the data value is NULL
  4. When SET ANSI_NULLS is OFF, comparisons of all data against a null value evaluate to TRUE if the data value is NULL
Question 17 Multiple Choice (Single Answer)

Choose the correct option:

  1. A CTE is created using the WITH statement
  2. A CTE is created using the SELECT statement
  3. A CTE is created using the CREATE statement
  4. None of the above
Question 18 Multiple Choice (Single Answer)

Which of the below is used to get the system lock information?

  1. sp_who
  2. sys.dm_tran_locks
  3. @@lock_timeout
  4. sp_lock
  5. None of the above
Question 19 Multiple Choice (Single Answer)

Which of the below is a part of Data Control Language?

  1. SELECT
  2. DENY
  3. APPLY
  4. UPDATE
  5. None of the above