SQL Server 2005 New Features Interview Questions

By:   |   Comments (2)   |   Related: More > Professional Development Interview Questions DBA

Staying up on the latest SQL Server technologies is a huge benefit to employers.  Many seek only the best and brightest to build solutions for the organization.  The general premise is the more knowledgeable their team is the more opportunities the organization will have to succeed.  With the release of SQL Server 2005 many new features were introduced, but not taken advantage of across the industry for one reason or another.  Break out of your SQL Server 2000 shell and test your knowledge on the SQL Server 2005 new feature set.


In this tip, the questions are there to read, but the answers are intentionally hidden to really test your skills. Once you read the question and have determined your answer, then highlight the answer below the question to see how you did. Good luck!

Question Difficulty = Easy

Question Difficulty = Moderate

  • Question 1: What are the two new commands to flip rows to columns and vice versa?  As a follow-up, before these commands were introduced what was a technique to meet this need?
    • Pivot and Unpivot were released with SQL Server 2005 to meet this need of flipping rows to columns and vice versa.
    • A previous technique was to use a temp table to match the format and then insert the data into the new format.
    • Additional information: Crosstab queries using PIVOT in SQL Server 2005
  • Question 2: With SQL Server 2005, what is the new technique to manage errors in Integration Services?
    • With SQL Server 2005 Integration Services, Event Handlers were introduced.  These can be setup to capture errors and perform a specific operation such as writing the errors to a table.  Additionally, custom logging can be setup at the Control Flow level and perform custom logging as well.
    • Additional information:  Custom Logging in SQL Server Integration Services Packages
  • Question 3: What was the new replication architecture introduced with SQL Server 2005 and can you explain how it works?
    • Peer to Peer replication was introduced with SQL Server 2005.
    • Peer to Peer replication consists of two or more peer nodes.  Every node acts as both a publisher and subscriber with the ability to change data on any node with the changes replicated to the remainder of the nodes.
    • Additional information: SQL Server 2005 Peer to Peer Replication
  • Question 4: Can you explain the difference between the INTERSECT and EXCEPT operators?  What is the value of these commands over other techniques?
    • INTERSECT - gives you the final result set where values in both of the tables match
    • EXCEPT - gives you the final result set where data exists in the first dataset and not in the second dataset
    • The advantage of these commands is that it allows you to get a distinct listing across all of the columns such as the UNION and UNION ALL operators do without having to do a group by or do a comparison of every single column.
    • Additional information: Comparing Multiple SQL Server Datasets with the INTERSECT and EXCEPT operators
  • Question 5: What is the new error handling technique in SQL Server 2005?  What technique does it replace?  What are the 3 of the new functions associated with this command?
    • The TRY and CATCH commands.  The TRY command has the T-SQL code with the business logic in the code block.  The CATCH command has the error handling logic.
    • The TRY and CATCH commands replace the RAISERROR command.
    • The TRY and CATCH functions are:
      • ERROR_NUMBER() - returns the number of the error.
      • ERROR_SEVERITY() - returns the severity.
      • ERROR_STATE() - returns the error state number.
      • ERROR_PROCEDURE() - returns the name of the stored procedure or trigger where the error occurred.
      • ERROR_LINE() - returns the line number inside the routine that caused the error.
      • ERROR_MESSAGE() - returns the complete text of the error message.
    • Additional information: SQL Server 2005 Try and Catch Exception Handling

Question Difficulty =  Difficult

  • Question 1: Name 5 of the new Dynamic Management Views (DMV's) and the value that they provide to developers or DBAs.
    • sys.dm_tran_locks - Locking and blocking
    • sys.dm_clr_loaded_assemblies - Assemblies in available in SQL Server
    • sys.dm_db_file_space_usage - Database file usage to determine if databases are getting low on space and need immediate attention
    • sys.dm_exec_cached_plans - Cached query plans available to SQL Server
    • sys.dm_exec_sessions - Sessions in SQL Server
    • sys.dm_exec_connections - Connections to SQL Server
    • sys.dm_db_index_usage_stats - Seeks, scans, lookups per index
    • sys.dm_io_virtual_file_stats - IO statistics for databases and log files
    • sys.dm_broker_connections - Service Broker connections to the network
    • sys.dm_os_memory_objects - SQL Server memory usage sys.dm_tran_active_transactions - Transaction state for an instance of SQL Server
    • Additional information: Locking and Blocking Scripts in SQL Server 2000 vs SQL Server 2005, Dynamic Management Views and Functions in SQL Server 2005 and Dynamic Management Views Category
  • Question 2: What was the service oriented architecture (SOA) technology introduced with SQL Server 2005 and what are some of the components of the technology?
    • Service Broker is the service oriented architecture (SOA) technology introduced with SQL Server 2005.
    • Service Broker components include:
      • Endpoint - Communication point in the database for Service Broker. In addition, ability to specify the authentication, encryption and message forwarding. A single Service Broker endpoint can be created for each database, however the HTTP and Database Mirroring can be created as well.
      • Message Type - Format for the message that is being sent and received. The format could be simply well formed XML or be bound to a schema.
      • Contract - Which message types are sent by either the initiator or the target.
      • Route - For the specific Service Broker Service (see below) which SQL Server instance and database the messages will be routed to during the Conversation (see below).
      • Queue - At a high level, this is the logical container in the Service Broker application. The queues serve as a storage mechanism in Service Broker. All data is RECEIVED (see below) from the queue for processing. Although the queues are all named differently, they are actually all of the same format with both relational and binary columns that can be converted to an XML format.
      • Service - The Service correlates the queue and the contract.
      • Remote Binding Service - Defines the Service Broker user to with the Service.
    • Additional information:  What exactly is SQL Server 2005 Service Broker?
  • Question 3: What is the OUTPUT clause and what sorts of options does it provide to applications?
    • The OUTPUT clause is new to SQL Server 2005 and has the ability to access the INSERTED and DELETED tables as is the case with a trigger. The OUTPUT command can be added to your stored procedures or T-SQL scripts in order to write the data out to an auditing table or return the data back to the front end client.
    • The OUTPUT clause has the ability to mimic and/or replace some of the functionality typically addressed by triggers.
    • Additional information: Trigger Alternatives in SQL Server - OUTPUT Clause
  • Question 4: To tune SQL Server Integration Services Packages, what are some of the techniques that you use?
    • Review the query plans of any T-SQL commands to determine if they can be further tuned.
    • Review the scripting language code to determine if they can be further tuned.
    • Determine if any SSIS processing can be consolidated into any T-SQL commands.
    • Review the data flow Performance Monitor counters.
    • Additional information: Perfmon Counters for the Data Flow Engine in SQL Server Integration Services
  • Question 5: Can you explain the new Disaster Recovery (DR)\High Availability (HA) solution introduced with SQL Server 2005?  Can you outline some of the benefits of this technology?
    • Database mirroring was introduced in SQL Server 2005 as a new means to protect against data loss.
    • From an architecture perspective, Database Mirroring consists of two mandatory roles and an optional third role. The Principal Role and the Mirror Role are mandatory.  These roles would be installed on the Enterprise and Standard editions of SQL Server 2005. The third and optional role is the Witness role which can be installed on an any version of SQL Server including Express Edition.
    • In terms of data protection, Database Mirroring has three different options.  First is High Availability Operating Mode.  High Availability Operating Mode provides durable, synchronous transfer of data between the principal and mirror instances including automatic failure detection and failover.  Second is High Performance Operating Mode.  With the High Performance Operating Mode the overall architecture acts as a warm standby and does not support automatic failure detection or failover. Third is High Protection Operating Mode.  The High Protection Operating Mode operates very similar to the High Availability Mode except the failover and promotion (mirror to principal) process is manual.
    • Additional information: Digging into Database Mirroring in SQL Server 2005
Next Steps
  • As you prepare for an upcoming SQL Server Developer or DBA technical interview, review the SQL Server interview questions in this tip as a means to prepare for the technical portion of the interview.  As you continue to prepare for the interview, check out all of the MSSQLTips.com Interview Question tips.
  • Stay tuned for future SQL Server interview questions related to new SQL Server 2008 features.
  • If you have some key interview questions related to SQL Server 2005 that you always include in your interview process, please share your knowledge with the community by posting the questions in the forum below.

sql server categories

sql server webinars

subscribe to mssqltips

sql server tutorials

sql server white papers

next tip

About the author
MSSQLTips author Jeremy Kadlec Jeremy Kadlec is a Co-Founder, Editor and Author at MSSQLTips.com with more than 300 contributions. He is also the CTO @ Edgewood Solutions and a six-time SQL Server MVP. Jeremy brings 20+ years of SQL Server DBA and Developer experience to the community after earning a bachelor's degree from SSU and master's from UMBC.

This author pledges the content of this article is based on professional experience and not AI generated.

View all my tips

Comments For This Article

Tuesday, August 10, 2010 - 12:08:57 PM - Admin Back To Top (10029)

Thanks so much.  Highlight the questions and answers with your mouse.  You will see them.

Thank you,
The MSSQLTips Team

Tuesday, August 10, 2010 - 11:08:07 AM - Fred Back To Top (10028)
Nice article, but where is the link to the answers?

get free sql tips
agree to terms