Showing posts with label Interview Questions and Answers. Show all posts
Showing posts with label Interview Questions and Answers. Show all posts

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
Blog Widget by LinkWithin