Posts

Features in SP 2010 Deployment scope of Features Farm, Web Application, Site Collection, Web Site The Feature scope is determined by the setting of the Scope attribute in the Feature element defined in the feature.xml file A sample Feature element tag is given below: Id = "F62C96CF-79FD-44be-8882-E9BFBD199184" Title = "Feature Title" Description = "Feature Description" Version = "1.0.0.0" Scope = "Site" Hidden = "false" > Web Site scoped Feature (Scope="Web"): A Web Site scoped Feature is one that can be activated only at the individual Web site level. List templates, list instances, custom actions, event receivers, etc are the some common elements for web site scoped features. Web Site scoped features can be activated by using: Run the following STSADM command: stsadm - o installfeature - name FeatureFolderName – url http : //servername/site/subsite Site ...
What is Feature Stapling in SharePoint Development

Interview Questions

MS.NET: Oops A to Z •  How to implement two interfaces when they have a method with the same signature? •  Explain the scenario where you will use Abstract class, Interface? And explain the differences? Differences between stored proc and a function Is sqlconnection managed or unmanaged code? Explain the reasons? Explain about Garbage collection? How will you call explicitly garbage collection? How will you handle unmanaged code with the help of Garbage collection? What namespaces are used in ADO.NET What is the difference between delete() and remove() methods of Datagrid row? How to use unmanaged code in a .net application? Explain about design patterns? What are application blocks? Difference between [Proctected Internal] and Internal? Difference between data reader and dataset? Optimization techniques •  Application level •  Database level •  how to find out the performance bottlenecks in deployed application and what a...

SP, UDF and VIEW

SPs are Databse subroutine used to perform tasks within the database, whether it be to INSERT, UPDATE, DELETE, SELECT, send return values, send output parameters, send e-mail, call command line arguments, encapsulate business logic, enforce data integrity, or any combination thereof. They are compiled when first run, and the query plans are stored and cached by SQL Server's optimizer, and those cached plans are swapped out depending on frequency of usage. View: • To hide the complexity of the underlying database schema, or customize the data and schema for a set of users. • To control access to rows and columns of data. • To aggregate data for performance. UDFS: Set of statements which must return an object considered as function. In general, UDFs can be a serious source of performance issues. Also, UDFs cannot be used for DML operations (INSERT/UPDATE/DELETE), cannot use non-deterministic functions, cannot use dynamic SQL, and cannot have error-handling (e.g. RAISERROR)....

Collections and Generics: .net 2.0

Name Space: System.Collections.Generic When we look at the term "generic", unrelated to the programming world, it simply means something that is not tied to any sort of brand name. For example, if we purchase some generic dish soap, soap that has no brand name on it, we know that we are buying dish soap and expect it to help us clean our dishes, but we really don't know what exact brand (if any) will be inside the bottle itself. We can treat it as dish soap even though we don't really have any idea of its exact contents. Think of Generics in this manner. We can refer to a class, where we don't force it to be related to any specific Type, but we can still perform work with it in a Type-Safe manner. A perfect example of where we would need Generics is in dealing with collections of items (integers, strings, Orders etc.). We can create a generic collection than can handle any Type in a generic and Type-Safe manner. For example, we can have a single array class tha...

MARS - Multiple Active Result Sets

Multiple Active Result Sets - MARS In a nutshell, it is the ability to have more than one pending request under a given SQL Server connection. For most cases this will directly translate to the ability to have more than one default result set (firehose cursor) outstanding while other operations can execute within the same session. It is probably as important to delimit what MARS is not: Parallel execution: Though MARS enables more than one request to be submitted under the same connection, this does not imply that they will be executed in parallel inside the server. MARS will multiplex execution threads between outstanding requests in the connection, interleaving at well defined points. Cursor replacement: As described earlier, there are some scenarios where cursors represented a suitable workaround for a lack of MARS; it may be valid to migrate those scenarios to use MARS. However, this does not imply that all current usages of cursors should be moved to MARS. By default, all o...

Find Nth max/min Salary in SQL server

SELECT * FROM temp1 t1 WHERE n - 1 = ( SELECT COUNT(DISTICNT ( sal )) FROM temp1 t2 WHERE t2.sal < t1.sal ) SELECT TOP 1 * FROM ( SELECT DISTINT TOP n sal FROM temp1 ORDER BY sal DESC) AS t ORDER BY t.sal ASC In sql server 2005 WITH MyCTE AS(  SELECT t_id,   sal,   DENSE_RANK() OVER(ORDER BY sal DESC) as rank1  FROM temp1  ) SELECT TOP 1 t_id, sal, rank1 FROM MyCTE WHERE rank1 = n Any updates/comments are appreciated.