Welcome, Guest Ohm namah shivoy
www.faqpanel.com
Home | ASP.Net | C-Sharp | Winforms | MS SQL | AJAX | XML | .Net Training*** | Search
Invite friends 
Extras 
VS Tips & Tricks
Top 10 .Net Tools
Special folders in ASP.Net
VS Find Combobox
 MS SQL Server Interview Questions / FAQs
What are the steps you will take to improve performance of a poor performing query in SQL Server?
This is a very open ended question and there could be a lot of reasons behind the poor performance of a query. But some general issues that you could talk about would be: No indexes, table scans, missing or out of date statistics, blocking, excess recompilations of stored procedures, procedures and triggers without SET NOCOUNT ON, poorly written query with unnecessarily complicated joins, too much normalization, excess usage of cursors and temporary tables.

Some of the tools/ways that help you troubleshooting performance problems are: SET SHOWPLAN_ALL ON, SET STATISTICS IO ON, SQL Server Profiler, Windows NT /2000 Performance monitor, Graphical execution plan in Query Analyzer.

How to determine the service pack currently installed on SQL Server?
The global variable @@Version stores the build number of the sqlserver.exe, which is used to determine the service pack installed. eg: Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on Windows NT 5.0 (Build 2195: Service Pack 3)
What is an execution plan? When would you use it? How would you view the execution plan?
An execution plan is basically a road map that graphically or textually shows the data retrieval methods chosen by the SQL Server query optimizer for a stored procedure or ad-hoc query and is a very useful tool for a developer to understand the performance characteristics of a query or stored procedure since the plan is the one that SQL Server will place in its cache and use to execute the stored procedure or query. From within Query Analyzer is an option called “Show Execution Plan” (located on the Query drop-down menu). If this option is turned on it will display query execution plan in separate window when query is ran again.
What is the difference between TRUNCATE and DELETE commands ?
What is the difference between a primary key and a unique key?
How do I create primary keys in SQL Server?
Define candidate key, alternate key, composite key.
What is a deadlock and what is a live lock? How will you go about resolving deadlocks?
Describe Microsoft SQL Server 2000 ?
How to SELECT TOP N records from mytable without using TOP keyword?
What are the pros and cons of creating extended stored procedures?
What is the REPLACE function in SQL?
What is the full form of .mdf in sql server data files?