Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

1. What do you mean by .NET CLR integration in SQL Server 2005?

A.

The SQL Server 2005 database engine hosts the .NET CLR, making it possible to develop database objects
using managed code written in a .NET programming language. The ability to develop database objects
in .NET code provides many advantages, including a managed security model, functionality that is
unavailable or difficult to implement in Transact-SQL, and greater choice of development language.

You can develop the following kinds of database objects in managed code:

 Stored procedures
 User-defined data types
 User-defined functions
 Triggers
 User-defined aggregate functions

Developers can create database objects in the Visual Studio .NET environment and deploy them directly
to the database.

2. Which of the following kinds of database objects can you develop in managed code?

Select all answers that apply.

a) Stored procedures
b) Triggers
c) Notification Instances
d) Service Broker message identifiers
e) User-defined aggregate functions

A, b, e

3. Which of the following statements is correct?

Select the one best answer.

a) You can use Service Broker to create queues for reliable, transactional, message-based
communication between software services.
b) You can use Service Broker to expose stored procedures as Web services.
c) You can use Service Broker to integrate CLR code within the SQL Server 2005 database
engine.
d) You can use Service Broker to build a subscription-based event notification application.

4. What is AWE and what is meant by Dynamic AWE capability in SQL Server 2005?

AWE support allows 32-bit applications to address physical memory beyond the limits of their
configured virtual memory address space. This switch is only needed for 32-bit application and not 64-
bit applications.

SQL Server 2005 has new capability called “Dynamic AWE”. This allows SQL Server 2005 to address
memory as seen by the Operating System.

5. What do you mean by Horizontal Partitioning of table and what are the advantages?

SQL Server 2005 provides support for partitioned tables. This allows a table to be spread across a
number of physical file groups, improving performance and making it easier to manage range-based
archiving procedures.

You can partition a table horizontally so that the rows are spread across multiple file groups. Implement
table partitioning to achieve the following results:

a) Improved performance on multiprocessor systems

Partitioned tables can increase performance when you are querying large tables on a
system with eight or more processors. The SQL Server 2005 query optimizer can execute
queries across multiple partitions in parallel, reducing the processing time required.

b) Easier management of large tables

A partitioned table allows easier management of data subsets, which you can group
together logically—by a date range, for example. A common data requirement is to
work with only the current month’s data.
You can specify the partitioning column, number of partitions, and the range of partitioning column
values for each partition. You can use only one column from the table to distinguish the range partitions.

One benefit of partitioning is that you can move data between partitioned tables very quickly relative to
performing an INSERT INTO SELECT FROM statement. This is because the data is not physically moved;
only the metadata concerning storage location is changed.

6. SQL Server 2005 allows you to partition a table horizontally so that the rows are spread across
multiple file groups. Implementing table partitioning can achieve which of the following results:

Select all answers that apply.

a) Interoperability with legacy databases.


b) Easier management of large tables.
c) Improved performance on multiprocessor systems.
d) Faster database replication.

b, c

7. What is SCC and how does it helps in SQL Server installation?

A.

The System Consistency Checker (SCC) is a feature of the SQL Server setup process. The SCC performs a
number of system checks and compares the settings it detects with those required for a successful SQL
Server 2005 installation. If any incompatibilities are detected, the SCC suggests actions to remedy the
problems. SCC checks are divided into five categories: system configuration, system availability, security
configuration, version configuration, and remote and cluster configuration. Understanding what the SCC
checks for during setup will help you prepare your computer for installation.

SCC does the following checks:

1. System Configuration Checks

Check Item Description Remedy for Failure

Operating System Ensure that the operating system Refer the user to the OS
Minimum Level (OS) is supported. requirement.
Requirement
Operating System Ensure that the required service Refer the user to the
Service Pack Level pack is applied to the operating Windows Update
Requirement system. Components for the
required service pack.

SQL Compatibility Ensure that the operating system Refer the user to the
with Operating is supported for the edition of OS/SQL Server edition
System SQL Server being installed. matrix.

32-bit or 64-bit Ensure that the user is Inform the user about the
Configuration attempting to install the 32-bit incompatibility, and then
Requirement release on a 32-bit platform or exit Setup.
the 64-bit release on a 64-bit
platform.

Windows Check that the WMI is installed. Inform the user that WMI
Management must be installed, and
Interface (WMI) then exit Setup.
Service Requirement

Minimum Hardware Ensure that the hardware meets Refer the user to the
Requirement the minimum requirements. hardware requirements
for the edition being
installed.

System Configuration Checks  

The following table shows


the version configuration
checks that the SCC
performs.

Check Item Description Remedy for Failure

Operating System Ensure that the operating Refer the user to the OS
Minimum Level system (OS) is supported. requirement.
Requirement
Operating System Ensure that the required Refer the user to the
Service Pack Level service pack is applied to the Windows Update
Requirement operating system. Components for the
required service pack.

SQL Compatibility with Ensure that the operating Refer the user to the
Operating System system is supported for the OS/SQL Server edition
edition of SQL Server being matrix.
installed.

32-bit or 64-bit Ensure that the user is Inform the user about the
Configuration attempting to install the 32-bit incompatibility, and then
Requirement release on a 32-bit platform or exit Setup.
the 64-bit release on a 64-bit
platform.

Windows Management Check that the WMI is installed. Inform the user that WMI
Interface (WMI) Service must be installed, and
Requirement then exit Setup.

Minimum Hardware Ensure that the hardware Refer the user to the
Requirement meets the minimum hardware requirements
requirements. for the edition being
installed.

System Availability Checks  

The following table shows


the version configuration
checks that the SCC
performs.

Check Item Description Remedy for Failure

Exclusive Mutex Object Ensure that there are no Inform user that he or she must
other running instances wait for the existing setup
of Setup. process to complete and restart
Setup.
Pending Reboot Ensure that no files List the services, processes, or
Requirement required by Setup are applications that must be
locked by other services stopped. Users may also be
or processes. required to restart the computer
before running Setup.

Performance Monitor Verify proper Prompt user to update the


Counter Requirement incrementing for necessary registry key.
installation of SQL Server
performance monitor
counters.

Feature Availability Determine which Display unavailable features and


features can be installed their dependencies in the SCC
on the current system report.
configuration.

Default Installation Check that the drive is Inform the user of the problem,
Path Permission not unformatted, read- and then exit Setup.
Requirement only, or compressed.

Security Configuration Checks  

The following table shows the


version configuration checks
that the SCC performs.

Check Item Description Remedy for Failure

System Administrator Ensure that the user Inform the user that he or
Privilege running Setup has system she must log in as a
administrator privileges. system administrator.

Version Configuration Checks  

The following table shows the


version configuration checks
that the SCC performs.

Check Item Description Remedy for Failure

Internet Explorer Ensure that Internet Refer the user to the


Requirement Explorer 6.0 Service Pack Windows Update
1 is installed. Component to install the
required browser.

SQL Server Version Check installed versions Refer the user to the
of SQL Server for upgrade service pack installation
eligibility when upgrading. files.

MSXML Requirement Ensure that MSXML is Refer the user to the


installed. Windows Update
Component to install
MSXML.

Remote and Cluster Configuration Checks  

The following table shows the


version configuration checks that
the SCC performs.

Check Item Description Remedy for


Failure

Enable Default Administrative Ensure that the administrative Prompt user and
Share Directory share (admin$) is enabled on the offer to enable
remote computer or cluster node. the share.
8. You have a customer who wants to implement encryption but if they choose Asymmetric
algorithm it may cause performance overhead. What could be other option that you can provide
to the customer

A.

In most real-world systems, the asymmetric algorithms used to encrypt data with a certificate cause
performance overhead, so a better approach that one can use in SQL Server 2005 is to generate a
symmetric key with which to encrypt the data and then encrypt the key with a certificate

9. We have two tables


a) Product Table created under default schema
b) Orders table created under Sales schema

We have 3 users

a) Rahul – no default schema assigned


b) Ramesh – Sales is assigned as default schema

How will these users access the tables? Assume the server name as Server 1 and database as
AdventureWorks.

Scenario 1:

User: Rahul

T-SQL Queries

a) Select * from Products


b) Select * from server1.AdventureWorks.dbo.Products
c) Select * from server1.AdventureWorks.Sales.Orders
d) Select * from Orders

Will throw an error as Fully Qualified Table Name has to be Provided.

Scenario 2:

User: Ramesh

T-SQL queries

a) Select * from Orders


This will work as the default schema is Sales
b) Select * from server1.AdventureWorks.Sales.Orders
c) Select * from Product
This will through error as Product table is in dbo schema and no fully qualified table
name provided so the engine will try to find the table in default schema and willnot be
able to find it.
d) Select * from server1.AdventureWorks.dbo.Products

10. What is “EXECUTE AS” and in what scenario it is used?

This is a new feature available in SQL 2005. This allows you to impersonate another user in order to
validate the necessary permissions that are required to execute the code without having to grant all of
the necessary rights to all the underlying objects and commands.

You can use the EXECUTE AS clause in a stored procedure or function to set the identity used in its
execution context.

With this you can control which user account the Database Engine uses to validate permissions on
objects that are referenced by the module. This provides additional flexibility and control in managing
permissions across the object chain that exists between user-defined modules and the objects
referenced by those modules. Permissions must be granted to users only on the module itself, without
having to grant them explicit permissions on the referenced objects. Only the user that the module is
running as must have permissions on the objects accessed by the module.

11. Which of the following options are valid for the syntax of the EXECUTE AS clause?

Select all answers that apply.

a) CALLER
b) OWNER
c) SELF
d) ADMINISTRATOR

a,b,c
12. When you create a certificate, where is it stored

The certificate is stored in the current user database.

13. A customer wants to move a user database from one server to another. Which all databases you
should also restore apart from user’s database so that certificate it uses can be moved?

You only need to move the user database as if you move a database, any certificates it uses are moved
with it.

You might also like