SQL Server Indexing Interview Question and Answers - Part 1

Tuesday, June 19, 2012

1. What is a Covering Index ?
An index that is constructed such that SQL Server can completely satisfy queries by reading only the index is called a covering index.
2. What is a Filtered Index ?
A fi ltered index is simply an index with a WHERE clause.
3. What is a Fillfactor ?
To control the rate at which page splits occur, you can specify a fi ll factor for the index. FILLFACTOR specifies the percentage of free space that should be left on the leaf level of an index during creation or rebuild.
4. What happens when an Index is created with ONLINE = ON?
When an index is created using the ONLINE = ON option, SQL Server allows changes to the table during the creation of the index by using the version store within the tempdb database.
5. How much of Data an XML datatype can hold ?
An XML data type can contain up to 2 gigabytes (GB) of data in a single column.
6. What is an XML Index ?
To improve the performance of queries against XML data, you can create a special type of index called an XML index. There are 2 types of indexs : primary and secondary. Primary: A primary XML index is built against all the nodes within the XML column. Secondary : Secondary indexes are created on PATH, VALUE, or PROPERTY.
7. What are Spatial indexes ?
Indexes created on geometry or geography are called Spatial indexes.

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What is an Covering Index ?

Thursday, June 7, 2012

An index that is constructed such that SQL Server can completely satisfy queries by reading only the index is called a covering index.

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What is the maximum no of NonClustered indexes for a table?

1000

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What is a Forwarding Pointer ?

If SQL Server must move the row by subsequent modifi cations, such as a page split or the row no longer fi ts on the data page, SQL Server does not update the nonclustered index with the new location of the row. Instead, SQL Server creates a forwarding pointer on the data page pointing to the new location of the row.

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What is the maxium size of the Index Key?

900 bytes

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What is the maximum columns you can create an Index with ?

16

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What is a torn page in SQL Server ?

Tuesday, June 5, 2012

Data pages are 8 kilobytes (KB) in size, but SQL Server divides a page into 16 blocks of 512 bytes apiece when performing write operations. If SQL Server begins writing blocks on a page and the disk system fails in the middle of the write process, only a portion of the page is written successfully, producing a problem called a torn page.

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

How will you track and log damaged pages ?

by enabling the PAGE_VERIFY CHECKSUM option.

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What is the purpose of the transaction log?

Sunday, June 3, 2012

The transaction log records every change that occurs within a database to persist all transactions to disk.

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What are the types of files that you create for databases and what are the commonly used

You can create data and log files for a database. Data files commonly have either an .mdf or .ndf extension, whereas log files have an .ldf extension

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What is Check pointing in SQL Server ?

If you are adding new data to a database, the new data is first written to a memory buffer, then written to the transaction log, and finally persisted to a data file via a background process called check pointing.

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What are the various types of backups in sql server ?

Wednesday, May 16, 2012

1•Full backups 2•Differential backups 3•File backups 4•Filegroup backups 5.Partial backups 6•Copy-Only backups 7•Mirror backups 8•Transaction log backups

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What is a failover cluster?

Sunday, May 6, 2012

A group of servers that are in one location and that are networked together for the purpose of providing live backup in case one of the servers fails.

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What is Failover ?

To switch processing from a failed component to its backup component.

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What is Mirroring in SQL Server 2005 ?

Database mirroring is a primarily software solution for increasing the probability that a database is available. Mirroring is implemented on a per database basis and works only with databases that use the full recovery model.

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What is the expansion of RMO ?

Replication Management Objects.

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What is Replication ?

It is copying and distributing data and database objects from one database to another and then synchronizing between databases to maintain consistency.

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

what are the Database files in sql server ?

1. Primary data files (.mdf) 2. Secondary data files (.ndf) 3. Log files (.ldf)

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What are the 3 types of Server instances in SQL Server Mirroring ?

Saturday, May 5, 2012

1.Principal Server 2. Mirror Server 3. Witness Server

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What are the 3 recovery models in SQL Server?

Friday, May 4, 2012

1. Simple 2. Bulk-logged 3. Full

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What are the 3 Matrix structures mentioned in PMP ?

Monday, April 30, 2012

1. Weak Matrix 2. Balanced Matrix 3. Strong Matrix

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What are the various ways to host a WCF Service ?

Monday, March 5, 2012

1. IIS
2. Self Hosting
3. WAS

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What are the various address format in WCF?

Sunday, March 4, 2012

a)HTTP Address Format : http://localhost:
b)TCP Address Format : net.tcp://localhost:
c)MSMQ Address Format : net.msmq://localhost:

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

Explain Address,Binding and contract for a WCF Service?

Address: Where is the serivce available.
Binding: How to communicate with the service.
Contract: What will the service do.

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

How to define a service as REST based in WCF ?

By adding the WebGet attribute, we can define a service as REST based service that can be accessible using HTTP GET operation.
[ServiceContract]
interface IStock
{
[OperationContract]
[WebGet]
int GetStock(string StockId);
}

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What are the differencec between Web Services and WCF ?


Sno
WebServices
WCF
1 Can send/receive messages using SOAP over HTTP Can send/receive using SOAP and any transport protocol like HTTP,
TCP, named pipes, and Microsoft Message Queuing (MSMQ), etc.
2 Can only be hosted in IIS and the security is limited. Can be hosted in IIS, self-host servers with console applications or Win NT
services or any other server.
3
Doesnt support

supports binary .NET – .NET communications, distributed transactions, WS-*
specifications, queued messaging and Restful communications.
4
Simple when compared to WCF
Little more work is needed


www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What is ASP.NET Health Monitoring ?

Monday, February 27, 2012

Web Administrators use it to monitor deployed web applications.

ASP.NET health monitoring enables you to do the following tasks:

Monitor the performance of an application to make sure that it is healthy.
Rapidly diagnose applications or systems that are failing.
Appraise significant events during the life cycle of an application.
Monitor live ASP.NET applications, individually or across a Web farm.
Log events that do not necessarily relate to errors in an ASP.NET application.

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

Daily Tips- Tip #88 - How will you find 64-Bit Operating Systems and Processes ?

Sunday, January 8, 2012

You can identify 64-bit operating systems and processes with the Environment.Is64BitOperatingSystem and Environment.Is64BitProcess properties.

You can specify a 32-bit or 64-bit view of the registry with the Microsoft.Win32.RegistryView enumeration when you open base keys.

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

LinkWithin

Blog Widget by LinkWithin

Recommended Books