26.02.2015 Views

DOT NET Interview Questions - DotNetSpider

DOT NET Interview Questions - DotNetSpider

DOT NET Interview Questions - DotNetSpider

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

prudent to do so is another story; what will happen if your UPDATE affects 95% of rows<br />

in the affected table? If the table contains 1000 rows, then SQL Server will have to<br />

acquire 950 individual locks, which is likely to cost a lot more in terms of memory than<br />

acquiring a single table lock. So think twice before you bombard your code with<br />

ROWLOCKS.<br />

(I)What is LOCK escalation?<br />

Lock escalation is the process of converting a lot of low level locks (like row locks, page<br />

locks) into higher level locks (like table locks). Every lock is a memory structure too<br />

many locks would mean, more memory being occupied by locks. To prevent this from<br />

happening, SQL Server escalates the many fine-grain locks to fewer coarse-grain locks.<br />

Lock escalation threshold was definable in SQL Server 6.5, but from SQL Server 7.0<br />

onwards it's dynamically managed by SQL Server.<br />

(B)What are the different ways of moving data/<br />

databases between servers and databases in SQL<br />

Server?<br />

There are lots of options available, you have to choose your option depending upon your<br />

requirements. Some of the options you have are: BACKUP/RESTORE, detaching and<br />

attaching databases, replication, DTS, BCP, logshipping, INSERT...SELECT,<br />

SELECT...INTO, creating INSERT scripts to generate data.<br />

(I)What are advantages of SQL 2000 over SQl 7.0 ?<br />

√<br />

√<br />

User-Defined Functions: User-Defined Functions (UDFs) -- one or more<br />

Transact-SQL statements can be used to encapsulate code for reuse. Userdefined<br />

functions cannot make a permanent changes to the data or modify<br />

database tables. UDF can change only local objects for a UDF, such as local<br />

cursors or variables.<br />

Distributed Partitioned Views: Distributed partitioned views allow you to<br />

partition tables horizontally across multiple servers. So, you can scale out one<br />

database server to a group of database servers that cooperate to provide the<br />

same performance levels as a cluster of database servers. Due to distributed<br />

partitioned views, SQL Server 2000 now on the first place in the tpc-c tests.<br />

205

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!