ALTER PROCEDURE [dbo].[AdminSectionFactLinkSave]
        @RegXML AS XML
AS
BEGIN   

    BEGIN TRY
       
    BEGIN TRANSACTION   

    DECLARE @SectionFact AS INT
       

            DELETE FROM SectionFactKnowFactLink WHERE SFKF_SFID IN (
            SELECT SectionFactLink.ITEM.query('./SFKF_SFID').value('.','INT')
            FROM @RegXML.nodes('/DocumentElement/SectionFactLink') AS SectionFactLink(ITEM))


            INSERT INTO SectionFactKnowFactLink(SFKF_SFID,SFKF_KFMasterID)
            SELECT SectionFactLink.ITEM.query('./SFKF_SFID').value('.','INT'),
            SectionFactLink.ITEM.query('./SFKF_KFMasterID').value('.','INT')
            FROM @RegXML.nodes('/DocumentElement/SectionFactLink') AS SectionFactLink(ITEM)           
            WHERE SectionFactLink.ITEM.query('./SFKF_KFMasterID').value('.','INT') > 0
   
        COMMIT
        RETURN 0

    END TRY

    BEGIN CATCH
        EXEC CatchError
        IF @@TRANCOUNT > 0 ROLLBACK
        RETURN -1
    END CATCH

END


****************************************************************************
Catch Error:


CREATE PROCEDURE [dbo].[CatchError]   
AS

BEGIN
   
    --To keep the error message
    Declare @ErrMsg as varchar(1000)
   
    BEGIN TRY 
       
        INSERT INTO dbo.Error_Log(Error_Date,Error_Msg,Error_Number,Error_Source )
        SELECT DATEADD(HOUR, 20, GETDATE()), ERROR_MESSAGE() ,ERROR_NUMBER(), ERROR_PROCEDURE()


    END TRY 
 
    BEGIN CATCH 
    
    END CATCH
   
    set @ErrMsg = ERROR_MESSAGE()
   
    Raiserror(@ErrMsg -- Error Message
        , 16 --Severity Level
        , 1 --State
        )

END

WebRequest request;
        WebResponse response;
        String strMSG = string.Empty;
        request = WebRequest.Create(new Uri(“http://www.tradeget.com/images/topimg.jpg”));
        request.Method = “HEAD”;
        try
        {
            response = request.GetResponse();
            strMSG = string.Format(“{0} {1}”, response.ContentLength, response.ContentType);
        }
        catch (Exception ex)
        {
            //In case of File not Exist Server return the (404) Error
            strMSG = ex.Message;
        }

        lblMSG.Text = strMSG;

What is normalization? Explain different levels of normalization?

Check out the article Q100139 from Microsoft knowledge base and of course, there's much more information available in the net. It will be a good idea to get a hold of any RDBMS fundamentals text book, especially the one by C. J. Date. Most of the times, it will be okay if you can explain till third normal form.

What is de-normalization and when would you go for it?

As the name indicates, de-normalization is the reverse process of normalization. It is the controlled introduction of redundancy in to the database design. It helps improve the query performance as the number of joins could be reduced.

How do you implement one-to-one, one-to-many and many-to-many relationships while designing tables?

One-to-One relationship can be implemented as a single table and rarely as two tables with primary and foreign key relationships. One-to-Many relationships are implemented by splitting the data into two tables with primary key and foreign key relationships. Many-to-Many relationships are implemented using a junction table with the keys from both the tables forming the composite primary key of the junction table.

It will be a good idea to read up a database designing fundamentals text book.

What's the difference between a primary key and a unique key?

Both primary key and unique enforce uniqueness of the column on which they are defined. But by default primary key creates a clustered index on the column, where are unique creates a non-clustered index by default. Another major difference is that, primary key does not allow NULLs, but unique key allows one NULL only.

What are user defined data types and when you should go for them?

User defined data types let you extend the base SQL Server data types by providing a descriptive name, and format to the database. Take for example, in your database, there is a column called Flight_Num which appears in many tables. In all these tables it should be varchar(8). In this case you could create a user defined data type called Flight_num_type of varchar(8) and use it across all your tables.

See sp_addtype, sp_droptype in books online.

What is bit data type and what's the information that can be stored inside a bit column?

Bit data type is used to store Boolean information like 1 or 0 (true or false). Until SQL Server 6.5 bit data type could hold either a 1 or 0 and there was no support for NULL. But from SQL Server 7.0 onwards, bit data type can represent a third state, which is NULL.

Define candidate key, alternate key, composite key.

A candidate key is one that can identify each row of a table uniquely. Generally a candidate key becomes the primary key of the table. If the table has more than one candidate key, one of them will become the primary key, and the rest are called alternate keys.

A key formed by combining at least two or more columns is called composite key.

What are defaults? Is there a column to which a default cannot be bound?

A default is a value that will be used by a column, if no value is supplied to that column while inserting data. IDENTITY columns and timestamp columns can't have defaults bound to them. See CREATE DEFAULT in books online.

What is a transaction and what are ACID properties?

A transaction is a logical unit of work in which, all the steps must be performed or none. ACID stands for Atomicity, Consistency, Isolation, Durability. These are the properties of a transaction. For more information and explanation of these properties, see SQL Server books online or any RDBMS fundamentals text book.

Explain different isolation levels

An isolation level determines the degree of isolation of data between concurrent transactions. The default SQL Server isolation level is Read Committed. Here are the other isolation levels (in the ascending order of isolation): Read Uncommitted, Read Committed, Repeatable Read, Serializable. See SQL Server books online for an explanation of the isolation levels. Be sure to read about SET TRANSACTION ISOLATION LEVEL, which lets you customize the isolation level at the connection level.

CREATE INDEX myIndex ON myTable (myColumn)

What type of Index will get created after executing the above statement?

Non-clustered index. Important thing to note: By default a clustered index gets created on the primary key, unless specified otherwise.

What is the maximum size of a row?

8060 bytes. Do not be surprised with questions like 'What is the maximum number of columns per table'. Check out SQL Server books online for the page titled: "Maximum Capacity Specifications".

Explain Active/Active and Active/Passive cluster configurations

Hopefully you have experience setting up cluster servers. But if you do not, at least be familiar with the way clustering works and the two clustering configurations Active/Active and Active/Passive. SQL Server books online has enough information on this topic and there is a good white paper available on Microsoft site.

Explain the architecture of SQL Server

This is a very important question and you better be able to answer it if consider yourself a DBA. SQL Server books online is the best place to read about SQL Server architecture. Read up the chapter dedicated to SQL Server Architecture.

What is Lock Escalation?

Lock escalation is the process of converting a lot of low level locks (like row locks, page locks) into higher level locks (like table locks). Every lock is a memory structure too many locks would mean, more memory being occupied by locks. To prevent this from happening, SQL Server escalates the many fine-grain locks to fewer coarse-grain locks. Lock escalation threshold was definable in SQL Server 6.5, but from SQL Server 7.0 onwards it's dynamically managed by SQL Server.

What's the difference between DELETE TABLE and TRUNCATE TABLE commands?

DELETE TABLE is a logged operation, so the deletion of each row gets logged in the transaction log, which makes it slow. TRUNCATE TABLE also deletes all the rows in a table, but it will not log the deletion of each row, instead it logs the de-allocation of the data pages of the table, which makes it faster. Of course, TRUNCATE TABLE can be rolled back.

Explain the storage models of OLAP

Check out MOLAP, ROLAP and HOLAP in SQL Server books online for more information.

What are the new features introduced in SQL Server 2000 (or the latest release of SQL Server at the time of your interview)? What changed between the previous version of SQL Server and the current version?

This question is generally asked to see how current is your knowledge. Generally there is a section in the beginning of the books online titled "What's New", which has all such information. Of course, reading just that is not enough, you should have tried those things to better answer the questions. Also check out the section titled "Backward Compatibility" in books online which talks about the changes that have taken place in the new version.

What are constraints? Explain different types of constraints.

Constraints enable the RDBMS enforce the integrity of the database automatically, without needing you to create triggers, rule or defaults.

Types of constraints: NOT NULL, CHECK, UNIQUE, PRIMARY KEY, FOREIGN KEY

For an explanation of these constraints see books online for the pages titled: "Constraints" and "CREATE TABLE", "ALTER TABLE"

What is an index? What are the types of indexes? How many clustered indexes can be created on a table? I create a separate index on each column of a table. what are the advantages and disadvantages of this approach?

Indexes in SQL Server are similar to the indexes in books. They help SQL Server retrieve the data quicker.

Indexes are of two types. Clustered indexes and non-clustered indexes. When you create a clustered index on a table, all the rows in the table are stored in the order of the clustered index key. So, there can be only one clustered index per table. Non-clustered indexes have their own storage separate from the table data storage. Non-clustered indexes are stored as B-tree structures (so do clustered indexes), with the leaf level nodes having the index key and it's row locater. The row located could be the RID or the Clustered index key, depending up on the absence or presence of clustered index on the table.

If you create an index on each column of a table, it improves the query performance, as the query optimizer can choose from all the existing indexes to come up with an efficient execution plan. At the same time, data modification operations (such as INSERT, UPDATE, DELETE) will become slow, as every time data changes in the table, all the indexes need to be updated. Another disadvantage is that, indexes need disk space, the more indexes you have, more disk space is used.

What is RAID and what are different types of RAID configurations?

RAID stands for Redundant Array of Inexpensive Disks, used to provide fault tolerance to database servers. There are six RAID levels 0 through 5 offering different levels of performance, fault tolerance. MSDN has some information about RAID levels and for detailed information, check out the RAID advisory board's homepage

What are the steps you will take to improve performance of a poor performing query?

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 SHOWPLAN_TEXT ON,
  • SET STATISTICS IO ON,
  • SQL Server Profiler,
  • Windows NT /2000 Performance monitor,
  • Graphical execution plan in Query Analyzer.
Download the white paper on performance tuning SQL Server from Microsoft web site.

What are the steps you will take, if you are tasked with securing an SQL Server?

Again this is another open ended question. Here are some things you could talk about: Preferring NT authentication, using server, database and application roles to control access to the data, securing the physical database files using NTFS permissions, using an unguessable SA password, restricting physical access to the SQL Server, renaming the Administrator account on the SQL Server computer, disabling the Guest account, enabling auditing, using multi-protocol encryption, setting up SSL, setting up firewalls, isolating SQL Server from the web server etc.

Read the white paper on SQL Server security from Microsoft website. Also check out My SQL Server security best practices

What is a deadlock and what is a live lock? How will you go about resolving deadlocks?

Deadlock is a situation when two processes, each having a lock on one piece of data, attempt to acquire a lock on the other's piece. Each process  would wait indefinitely for the other to release the lock, unless one of the user processes is terminated. SQL Server detects deadlocks and terminates one user's process.

A livelock is one, where a  request for an exclusive lock is repeatedly denied because a series of overlapping shared locks keeps interfering. SQL Server detects the situation after four denials and refuses further shared locks. A livelock also occurs when read transactions monopolize a table or page, forcing a write transaction to wait indefinitely.

Check out SET DEADLOCK_PRIORITY and "Minimizing Deadlocks"  in SQL Server books online. Also check out the article Q169960 from Microsoft knowledge base.

What is blocking and how would you troubleshoot it?

Blocking happens when one connection from an application holds a lock and a second connection requires a conflicting lock type. This forces the second connection to wait, blocked on the first.

Read up the following topics in SQL Server books online: Understanding and avoiding blocking, Coding efficient transactions.

Explain CREATE DATABASE syntax

Many of us are used to creating databases from the Enterprise Manager or by just issuing the command:

CREATE DATABASE MyDB.

But what if you have to create a database with two file groups, one on drive C and the other on drive D with log on drive E with an initial size of 600 MB and with a growth factor of 15%? That's why being a DBA you should be familiar with the CREATE DATABASE syntax. Check out SQL Server books online for more information.

How to restart SQL Server in single user mode? How to start SQL Server in minimal configuration mode?

SQL Server can be started from command line, using the SQLSERVR.EXE. This EXE has some very important parameters with which a DBA should be familiar with. -m is used for starting SQL Server in single user mode and -f is used to start the SQL Server in minimal configuration mode. Check out SQL Server books online for more parameters and their explanations.

As a part of your job, what are the DBCC commands that you commonly use for database maintenance?

DBCC CHECKDB,
DBCC CHECKTABLE,
DBCC CHECKCATALOG,
DBCC CHECKALLOC,
DBCC SHOWCONTIG,
DBCC SHRINKDATABASE,
DBCC SHRINKFILE etc
.

But there are a whole load of DBCC commands which are very useful for DBAs. Check out SQL Server books online for more information.

What are statistics, under what circumstances they go out of date, how do you update them?

Statistics determine the selectivity of the indexes. If an indexed column has unique values then the selectivity of that index is more, as opposed to an index with non-unique values. Query optimizer uses these indexes in determining whether to choose an index or not while executing a query.

Some situations under which you should update statistics:

  1. If there is significant change in the key values in the index
  2. If a large amount of data in an indexed column has been added, changed, or removed (that is, if the distribution of key values has changed), or the table has been truncated using the TRUNCATE TABLE statement and then repopulated
  3. Database is upgraded from a previous version
Look up SQL Server books online for the following commands:

UPDATE STATISTICS,
STATS_DATE,
DBCC SHOW_STATISTICS,
CREATE STATISTICS,
DROP STATISTICS,
sp_autostats,
sp_createstats,
sp_updatestats


What are the different ways of moving data/databases between servers and databases in SQL Server?

There are lots of options available, you have to choose your option depending upon your requirements. Some of the options you have are:

BACKUP/RESTORE,
Detaching and attaching databases,
Replication,
DTS,
BCP,
logshipping
,
INSERT...SELECT,
SELECT...INTO
,
creating INSERT scripts to generate data.

Explain different types of BACKUPs available in SQL Server? Given a particular scenario, how would you go about choosing a backup plan?

Types of backups you can create in SQL Sever 7.0+ are Full database backup, differential database backup, transaction log backup, filegroup backup. Check out the BACKUP and RESTORE commands in SQL Server books online. Be prepared to write the commands in your interview. Books online also has information on detailed backup/restore architecture and when one should go for a particular kind of backup.

What is database replication? What are the different types of replication you can set up in SQL Server?

Replication is the process of copying/moving data between databases on the same or different servers. SQL Server supports the following types of replication scenarios:

    * Snapshot replication
    * Transactional replication (with immediate updating subscribers, with queued updating subscribers)
    * Merge replication

See SQL Server books online for in-depth coverage on replication. Be prepared to explain how different replication agents function, what are the main system tables used in replication etc.

How to determine the service pack currently installed on SQL Server?

The global variable @@Version stores the build number of the sqlservr.exe, which is used to determine the service pack installed. To know more about this process visit SQL Server service packs and versions.

What are cursors? Explain different types of cursors. What are the disadvantages of cursors? How can you avoid cursors?

Cursors allow row-by-row processing of the resultsets.

Types of cursors:

Static,
Dynamic,
Forward-only,
Keyset-driven.


See books online for more information.

Disadvantages of cursors: Each time you fetch a row from the cursor, it results in a network roundtrip, where as a normal SELECT query makes only one round trip, however large the resultset is. Cursors are also costly because they require more resources and temporary storage (results in more IO operations). Further, there are restrictions on the SELECT statements that can be used with some types of cursors.

Most of the times, set based operations can be used instead of cursors. Here is an example:

If you have to give a flat hike to your employees using the following criteria:

Salary between 30000 and 40000 -- 5000 hike
Salary between 40000 and 55000 -- 7000 hike
Salary between 55000 and 65000 -- 9000 hike


In this situation many developers tend to use a cursor, determine each employee's salary and update his salary according to the above formula. But the same can be achieved by multiple update statements or can be combined in a single UPDATE statement as shown below:

UPDATE tbl_emp SET salary =
CASE WHEN salary BETWEEN 30000 AND 40000 THEN salary + 5000
WHEN salary BETWEEN 40000 AND 55000 THEN salary + 7000
WHEN salary BETWEEN 55000 AND 65000 THEN salary + 10000
END


Another situation in which developers tend to use cursors: You need to call a stored procedure when a column in a particular row meets certain condition. You don't have to use cursors for this. This can be achieved using WHILE loop, as long as there is a unique key to identify each row.

Write down the general syntax for a SELECT statements covering all the options.

Here's the basic syntax: (Also checkout SELECT in books online for advanced syntax).

SELECT select_list
[INTO new_table_]
FROM table_source
[WHERE search_condition]
[GROUP BY group_by__expression]
[HAVING search_condition]
[ORDER BY order__expression [ASC | DESC] ]


What is a join and explain different types of joins?

Joins are used in queries to explain how different tables are related. Joins also let you select data from a table depending upon data from another table.

Types of joins:

INNER JOINs,
OUTER JOINs,
CROSS JOINs


OUTER JOINs are further classified as

LEFT OUTER JOINS,
RIGHT OUTER JOINS
and
FULL OUTER JOINS.


For more information see pages from books online titled: "Join Fundamentals" and "Using Joins".

Can you have a nested transaction?

Yes, very much. Check out BEGIN TRAN, COMMIT, ROLLBACK, SAVE TRAN and @@TRANCOUNT

What is an extended stored procedure? Can you instantiate a COM object by using T-SQL?

An extended stored procedure is a function within a DLL (written in a programming language like C, C++ using Open Data Services (ODS) API) that can be called from T-SQL, just the way we call normal stored procedures using the EXEC statement. See books online to learn how to create extended stored procedures and how to add them to SQL Server.

Yes, you can instantiate a COM (written in languages like VB, VC++) object from T-SQL by using sp_OACreate stored procedure.

Also see books online for sp_OAMethod, sp_OAGetProperty, sp_OASetProperty, sp_OADestroy.

What is the system function to get the current user's user id?

USER_ID(). Also check out other system functions like

USER_NAME(),
SYSTEM_USER,
SESSION_USER,
CURRENT_USER,
USER,
SUSER_SID(),
HOST_NAME().


What are triggers? How many triggers you can have on a table? How to invoke a trigger on demand?

Triggers are special kind of stored procedures that get executed automatically when an INSERT, UPDATE or DELETE operation takes place on a table.

In SQL Server 6.5 you could define only 3 triggers per table, one for INSERT, one for UPDATE and one for DELETE. From SQL Server 7.0 onwards, this restriction is gone, and you could create multiple triggers per each action. But in 7.0 there's no way to control the order in which the triggers fire. In SQL Server 2000 you could specify which trigger fires first or fires last using sp_settriggerorder

Triggers cannot be invoked on demand. They get triggered only when an associated action (INSERT, UPDATE, DELETE) happens on the table on which they are defined.

Triggers are generally used to implement business rules, auditing. Triggers can also be used to extend the referential integrity checks, but wherever possible, use constraints for this purpose, instead of triggers, as constraints are much faster.

Till SQL Server 7.0, triggers fire only after the data modification operation happens. So in a way, they are called post triggers. But in SQL Server 2000 you could create pre triggers also. Search SQL Server 2000 books online for INSTEAD OF triggers.

Also check out books online for 'inserted table', 'deleted table' and COLUMNS_UPDATED()

There is a trigger defined for INSERT operations on a table, in an OLTP system. The trigger is written to instantiate a COM object and pass the newly inserted rows to it for some custom processing.

What do you think of this implementation? Can this be implemented better?

Instantiating COM objects is a time consuming process and since you are doing it from within a trigger, it slows down the data insertion process. Same is the case with sending emails from triggers. This scenario can be better implemented by logging all the necessary data into a separate table, and have a job which periodically checks this table and does the needful.

In Database Systems What Is Meant By Referential Integrity?

Referential integrity is a rule that also helps in maintaining the organized form of data. It preserves the relationships defined between the data entities during the data updates. In the case of relational data model, relations/tables are the data entities. All these entities in a database are connected with on another via one or more attributes. These attributes are normally called 'primary key 'of the table.

By applying the rules of referential integrity, you ensures that no any update can be effective that destroy the relations defined between tables , i.e. no any value of foreign key can be entered that does not has a corresponding primary key value in the related table.
In a database, data is stored in more than one relation, thus complete information about an entity may be stored in more than one tables. When two relations/tables are linked with each other through a relationship, one is called a master table and other is called child table.

The referential integrity rules are used in such cases to provide the following advantages:
1. If the record does not exist in master table, it can not be stored in child table.
2. A record can not be deleted from master table unless that record is deleted first from relevant child table

What Is The Scope Of Good Database Design?

A good database is one that is simple to understand and well planned. The database doesn't have redundant tables. One can use ERD's (Entity-Relationship Diagrams) or EER's (Enhanced-Entity Relationship Diagrams) in order to make a good database.

Now about the scope; well if you have good database then
  1. Easy to locate the data or information in no time.
  2. No redundant data.
  3. No repetition.
  4. More security. Like if one is accessing or changing the data other can not change the same data at that time.
  5. Table references (keys like : Primary and foreign keys) are easy to maintain.

What Is A Key? Describe Different Types Of Keys Used In Database?

Key
A key is a single or combination of multiple fields. Its purpose is to access or retrieve data rows from table according to the requirement. The keys are defined in tables to access or sequence the stored data quickly and smoothly. They are also used to create links between different tables.

Types of Keys
The following tables or relations will be used to define different types of keys.

Primary Key
The attribute or combination of attributes that uniquely identifies a row or record in a relation is known as primary key.

Secondary key
A field or combination of fields that is basis for retrieval is known as secondary key. Secondary key is a non-unique field. One secondary key value may refer to many records.

Candidate Key or Alternate key
A relation can have only one primary key. It may contain many fields or combination of fields that can be used as primary key. One field or combination of fields is used as primary key. The fields or combination of fields that are not used as primary key are known as candidate key or alternate key.
Composite key or concatenate key
A primary key that consists of two or more attributes is known as composite key.

Sort Or control key
A field or combination of fields that is used to physically sequence the stored data called sort key. It is also known s control key.

Foreign Key
A foreign key is an attribute or combination of attribute in a relation whose value match a primary key in another relation. The table in which foreign key is created is called as dependent table. The table to which foreign key is refers is known as parent table

Discuss Different Types Of Queries Use In Any Database?



MS SQL Server interview questions

This one always gets asked. For a while the database interview questions were limited to Oracle and generic database design questions. This is a set of more than a hundred Microsoft SQL Server interview questions. Some questions are open-ended, and some do not have answers.
  1. What is normalization? - Well a relational database is basically composed of tables that contain related data. So the Process of organizing this data into tables is actually referred to as normalization.
  2. What is a Stored Procedure? - Its nothing but a set of T-SQL statements combined to perform a single task of several tasks. Its basically like a Macro so when you invoke the Stored procedure, you actually run a set of statements.
  3. Can you give an example of Stored Procedure? - sp_helpdb , sp_who2, sp_renamedb are a set of system defined stored procedures. We can also have user defined stored procedures which can be called in similar way.
  4. What is a trigger? - Triggers are basically used to implement business rules. Triggers is also similar to stored procedures. The difference is that it can be activated when data is added or edited or deleted from a table in a database.
  5. What is a view? - If we have several tables in a db and we want to view only specific columns from specific tables we can go for views. It would also suffice the needs of security some times allowing specfic users to see only specific columns based on the permission that we can configure on the view. Views also reduce the effort that is required for writing queries to access specific columns every time.
  6. What is an Index? - When queries are run against a db, an index on that db basically helps in the way the data is sorted to process the query for faster and data retrievals are much faster when we have an index.
  7. What are the types of indexes available with SQL Server? - There are basically two types of indexes that we use with the SQL Server. Clustered and the Non-Clustered.
  8. What is the basic difference between clustered and a non-clustered index? - The difference is that, Clustered index is unique for any given table and we can have only one clustered index on a table. The leaf level of a clustered index is the actual data and the data is resorted in case of clustered index. Whereas in case of non-clustered index the leaf level is actually a pointer to the data in rows so we can have as many non-clustered indexes as we can on the db.
  9. What are cursors? - Well cursors help us to do an operation on a set of data that we retreive by commands such as Select columns from table. For example : If we have duplicate records in a table we can remove it by declaring a cursor which would check the records during retreival one by one and remove rows which have duplicate values.
  10. When do we use the UPDATE_STATISTICS command? - This command is basically used when we do a large processing of data. If we do a large amount of deletions any modification or Bulk Copy into the tables, we need to basically update the indexes to take these changes into account. UPDATE_STATISTICS updates the indexes on these tables accordingly.
  11. Which TCP/IP port does SQL Server run on? - SQL Server runs on port 1433 but we can also change it for better security.
  12. From where can you change the default port? - From the Network Utility TCP/IP properties –> Port number.both on client and the server.
  13. Can you tell me the difference between DELETE & TRUNCATE commands? - Delete command removes the rows from a table based on the condition that we provide with a WHERE clause. Truncate will actually remove all the rows from a table and there will be no data in the table after we run the truncate command.
  14. Can we use Truncate command on a table which is referenced by FOREIGN KEY? - No. We cannot use Truncate command on a table with Foreign Key because of referential integrity.
  15. What is the use of DBCC commands? - DBCC stands for database consistency checker. We use these commands to check the consistency of the databases, i.e., maintenance, validation task and status checks.
  16. Can you give me some DBCC command options?(Database consistency check) - DBCC CHECKDB - Ensures that tables in the db and the indexes are correctly linked.and DBCC CHECKALLOC - To check that all pages in a db are correctly allocated. DBCC SQLPERF - It gives report on current usage of transaction log in percentage. DBCC CHECKFILEGROUP - Checks all tables file group for any damage.
  17. What command do we use to rename a db? - sp_renamedb ‘oldname’ , ‘newname’
  18. Well sometimes sp_reanmedb may not work you know because if some one is using the db it will not accept this command so what do you think you can do in such cases? - In such cases we can first bring to db to single user using sp_dboptions and then we can rename that db and then we can rerun the sp_dboptions command to remove the single user mode.
  19. What is the difference between a HAVING CLAUSE and a WHERE CLAUSE? - Having Clause is basically used only with the GROUP BY function in a query. WHERE Clause is applied to each row before they are part of the GROUP BY function in a query.
  20. What do you mean by COLLATION? - Collation is basically the sort order. There are three types of sort order Dictionary case sensitive, Dictonary - case insensitive and Binary.
  21. What is a Join in SQL Server? - Join actually puts data from two or more tables into a single result set.
  22. Can you explain the types of Joins that we can have with Sql Server? - There are three types of joins: Inner Join, Outer Join, Cross Join
  23. When do you use SQL Profiler? - SQL Profiler utility allows us to basically track connections to the SQL Server and also determine activities such as which SQL Scripts are running, failed jobs etc..
  24. What is a Linked Server? - Linked Servers is a concept in SQL Server by which we can add other SQL Server to a Group and query both the SQL Server dbs using T-SQL Statements.
  25. Can you link only other SQL Servers or any database servers such as Oracle? - We can link any server provided we have the OLE-DB provider from Microsoft to allow a link. For Oracle we have a OLE-DB provider for oracle that microsoft provides to add it as a linked server to the sql server group.
  26. Which stored procedure will you be running to add a linked server? - sp_addlinkedserver, sp_addlinkedsrvlogin
  27. What are the OS services that the SQL Server installation adds? - MS SQL SERVER SERVICE, SQL AGENT SERVICE, DTC (Distribution transac co-ordinator)
  28. Can you explain the role of each service? - SQL SERVER - is for running the databases SQL AGENT - is for automation such as Jobs, DB Maintanance, Backups DTC - Is for linking and connecting to other SQL Servers
  29. How do you troubleshoot SQL Server if its running very slow? - First check the processor and memory usage to see that processor is not above 80% utilization and memory not above 40-45% utilization then check the disk utilization using Performance Monitor, Secondly, use SQL Profiler to check for the users and current SQL activities and jobs running which might be a problem. Third would be to run UPDATE_STATISTICS command to update the indexes
  30. Lets say due to N/W or Security issues client is not able to connect to server or vice versa. How do you troubleshoot? - First I will look to ensure that port settings are proper on server and client Network utility for connections. ODBC is properly configured at client end for connection ——Makepipe & readpipe are utilities to check for connection. Makepipe is run on Server and readpipe on client to check for any connection issues.
  31. What are the authentication modes in SQL Server? - Windows mode and mixed mode (SQL & Windows).
  32. Where do you think the users names and passwords will be stored in sql server? - They get stored in master db in the sysxlogins table.
  33. What is log shipping? Can we do logshipping with SQL Server 7.0 - Logshipping is a new feature of SQL Server 2000. We should have two SQL Server - Enterprise Editions. From Enterprise Manager we can configure the logshipping. In logshipping the transactional log file from one server is automatically updated into the backup database on the other server. If one server fails, the other server will have the same db and we can use this as the DR (disaster recovery) plan.
  34. Let us say the SQL Server crashed and you are rebuilding the databases including the master database what procedure to you follow? - For restoring the master db we have to stop the SQL Server first and then from command line we can type SQLSERVER –m which will basically bring it into the maintenance mode after which we can restore the master db.
  35. Let us say master db itself has no backup. Now you have to rebuild the db so what kind of action do you take? - (I am not sure- but I think we have a command to do it).
  36. What is BCP? When do we use it? - BulkCopy is a tool used to copy huge amount of data from tables and views. But it won’t copy the structures of the same.
  37. What should we do to copy the tables, schema and views from one SQL Server to another? - We have to write some DTS packages for it.
  38. What are the different types of joins and what dies each do?
  39. What are the four main query statements?
  40. What is a sub-query? When would you use one?
  41. What is a NOLOCK?
  42. What are three SQL keywords used to change or set someone’s permissions?
  43. What is the difference between HAVING clause and the WHERE clause?
  44. What is referential integrity? What are the advantages of it?
  45. What is database normalization?
  46. Which command using Query Analyzer will give you the version of SQL server and operating system?
  47. Using query analyzer, name 3 ways you can get an accurate count of the number of records in a table?
  48. What is the purpose of using COLLATE in a query?
  49. What is a trigger?
  50. What is one of the first things you would do to increase performance of a query? For example, a boss tells you that “a query that ran yesterday took 30 seconds, but today it takes 6 minutes”
  51. What is an execution plan? When would you use it? How would you view the execution plan?
  52. What is the STUFF function and how does it differ from the REPLACE function?
  53. What does it mean to have quoted_identifier on? What are the implications of having it off?
  54. What are the different types of replication? How are they used?
  55. What is the difference between a local and a global variable?
  56. What is the difference between a Local temporary table and a Global temporary table? How is each one used?
  57. What are cursors? Name four types of cursors and when each one would be applied?
  58. What is the purpose of UPDATE STATISTICS?
  59. How do you use DBCC statements to monitor various aspects of a SQL server installation?
  60. How do you load large data to the SQL server database?
  61. How do you check the performance of a query and how do you optimize it?
  62. How do SQL server 2000 and XML linked? Can XML be used to access data?
  63. What is SQL server agent?
  64. What is referential integrity and how is it achieved?
  65. What is indexing?
  66. What is normalization and what are the different forms of normalizations?
  67. Difference between server.transfer and server.execute method?
  68. What id de-normalization and when do you do it?
  69. What is better - 2nd Normal form or 3rd normal form? Why?
  70. Can we rewrite subqueries into simple select statements or with joins? Example?
  71. What is a function? Give some example?
  72. What is a stored procedure?
  73. Difference between Function and Procedure-in general?
  74. Difference between Function and Stored Procedure?
  75. Can a stored procedure call another stored procedure. If yes what level and can it be controlled?
  76. Can a stored procedure call itself(recursive). If yes what level and can it be controlled.?
  77. How do you find the number of rows in a table?
  78. Difference between Cluster and Non-cluster index?
  79. What is a table called, if it does not have neither Cluster nor Non-cluster Index?
  80. Explain DBMS, RDBMS?
  81. Explain basic SQL queries with SELECT from where Order By, Group By-Having?
  82. Explain the basic concepts of SQL server architecture?
  83. Explain couple pf features of SQL server
  84. Scalability, Availability, Integration with internet, etc.)?
  85. Explain fundamentals of Data ware housing & OLAP?
  86. Explain the new features of SQL server 2000?
  87. How do we upgrade from SQL Server 6.5 to 7.0 and 7.0 to 2000?
  88. What is data integrity? Explain constraints?
  89. Explain some DBCC commands?
  90. Explain sp_configure commands, set commands?
  91. Explain what are db_options used for?
  92. What is the basic functions for master, msdb, tempdb databases?
  93. What is a job?
  94. What are tasks?
  95. What are primary keys and foreign keys?
  96. How would you Update the rows which are divisible by 10, given a set of numbers in column?
  97. If a stored procedure is taking a table data type, how it looks?
  98. How m-m relationships are implemented?
  99. How do you know which index a table is using?
  100. How will oyu test the stored procedure taking two parameters namely first name and last name returning full name?
  101. How do you find the error, how can you know the number of rows effected by last SQL statement?
  102. How can you get @@error and @@rowcount at the same time?
  103. What are sub-queries? Give example? In which case sub-queries are not feasible?
  104. What are the type of joins? When do we use Outer and Self joins?
  105. Which virtual table does a trigger use?
  106. How do you measure the performance of a stored procedure?
  107. Questions regarding Raiseerror?
  108. Questions on identity?
  109. If there is failure during updation of certain rows, what will be the state?
***********************************************************************************
What is normalization?
Normalization is the basic concept used in designing a database. Its nothing but, an advise given to the database to have minimal repetition of data, highly structured, highly secured, easy to retrieve. In high level definition, the Process of organizing data into tables is referred to as normalization.

What is a stored procedure:
Stored procedures are precompiled T-SQL statements combined to perform a single task of several tasks. Its basically like a Macro so when you invoke the Stored procedure, you actually run a set of statements. As, its precompiled statement, execution of Stored procedure is compatatively high when compared to an ordinary T-SQL statement.

What is the difference between UNION ALL Statement and UNION ?
The main difference between UNION ALL statement and UNION is UNION All statement is much faster than UNION,the reason behind this is that because UNION ALL statement does not look for duplicate rows, but on the other hand UNION statement does look for duplicate rows, whether or not they exist.
Example for Stored Procedure?
They are three kinds of stored procedures,1.System stored procedure – Start with sp_2. User defined stored procedure – SP created by the user.3. Extended stored procedure – SP used to invoke a process in the external systems.Example for system stored proceduresp_helpdb - Database and its propertiessp_who2 – Gives details about the current user connected to your system. sp_renamedb – Enable you to rename your database

What is a trigger?
Triggers are precompiled statements similar to Stored Procedure. It will automatically invoke for a particular operation. Triggers are basically used to implement business rules.

What is a view?
If we have several tables in a db and we want to view only specific columns from specific tables we can go for views. It would also suffice the needs of security some times allowing specfic users to see only specific columns based on the permission that we can configure on the view. Views also reduce the effort that is required for writing queries to access specific columns every time.

What is an Index?
When queries are run against a db, an index on that db basically helps in the way the data is sorted to process the query for faster and data retrievals are much faster when we have an index.

    What is Access Modifier?

    Objects in .NET are created from a class, struct, etc.  These definitions, as well as the properties, methods, or events within them, use an access modifer that determines who can access it.  A class or structure outside of the current class definition or even the in different projects have different access rights depending on the type of accessor used.  Take a look at the accessors below:
    Access modifiers determine the extent to which a variable or method can be accessed from another class or object

    The following five accessibility levels can be specified using the access modifiers

        * Private
        * Protected
        * Internal
        * Protected internal
        * Public 
    public
    This makes the member visible globally
    Eg. class Gremlin { public Gremlin spawn() { return new Gremlin(); } }

    protected
    This makes the member visible to the current class and to child classes.  Protected members are only accessible in the same class or through inherited classes.
    Eg. class ParentClass { protected int valueA; }
    class ChildClass { public void doSomething() { valueA = 3; } }

    private
    This makes the member visible only to the current class.
    Eg. class MyCollection { private int lastIndex; }

    internal / Friend
    This makes the member visible within the same assembly.
    Eg. internal class ProprietaryStuff { }

    protected internal / Protected Friend
    A combination of protected and internal.  This makes the member visible within the same assembly and also makes the member visible to an inheriting class. An inheriting class does not need to be in the same assembly to access the member.
    ***********************************************************************************

    Diffrence between SQL Server 2000, 2005 & 2008

    [color=123][color=123][/color]--Reference:
    http://stackoverflow.com/questions/198478/advantages-of-ms-sql-server-2008-over-ms-sql-server-2005

    SQL SERVER 2000:

    1.Query Analyser and Enterprise manager are separate.
    2.No XML datatype is used.
    3.We can create maximum of 65,535 databases.
    4.Nill
    5.Nill
    6.Nill
    7.Nill
    8.Nill
    9.Nill
    10.Nill
    11.Nill
    12.Nill
    13.cant compress the tables and indexes.
    14.Datetime datatype is used for both date and time.
    15.No varchar(max) or varbinary(max) is available.
    16.No table datatype is included.
    17.No SSIS is included.
    18.CMS is not available.
    19.PBM is not available.
    20.PIVOT and UNPIVOT functions are not used.

    SQL SERVER 2005:

    1.Both are combined as SSMS(Sql Server management Studio).
    2.XML datatype is introduced.
    3.We can create 2(pow(20))-1 databases.
    4.Exception Handling
    5.Varchar(Max) data type
    6.DDL Triggers
    7.DataBase Mirroring
    8.RowNumber function for paging
    9.Table fragmentation
    10.Full Text Search
    11.Bulk Copy Update
    12.Cant encrypt
    13.Can Compress tables and indexes.(Introduced in 2005 SP2)
    14.Datetime is used for both date and time.
    15.Varchar(max) and varbinary(max) is used.
    16.No table datatype is included.
    17.SSIS is started using.
    18.CMS is not available.
    19.PBM is not available.
    20.PIVOT and UNPIVOT functions are used.

    [u]SQL SERVER 2008:

    1.Both are combined as SSMS(Sql Server management Studio).
    2.XML datatype is used.
    3.We can create 2(pow(20))-1 databases.
    4.Exception Handling
    5.Varchar(Max) data type
    6.DDL Triggers
    7.DataBase Mirroring
    8.RowNumber function for paging
    9.Table fragmentation
    10.Full Text Search
    11.Bulk Copy Update
    12.Can encrypt the entire database introduced in 2008.
    --check it(http://technet.microsoft.com/en-us/library/cc278098(SQL.100).aspx)
    (http://www.sqlservercentral.com/articles/Administration/implementing_efs/870/)
    (http://www.kodyaz.com/articles/sql-server-2005-database-encryption-step-by-step.aspx)
    (http://www.sql-server-performance.com/articles/dev/encryption_2005_1_p1.aspx)
    (http://geekswithblogs.net/chrisfalter/archive/2008/05/08/encrypt-documents-with-sql-server.aspx)
    13.Can compress tables and indexes.
    -http://www.mssqltips.com/tip.asp?tip=1582
    14.Date and time are seperately used for date and time datatype,geospatial and timestamp with internal timezone
    is used.
    15.Varchar(max) and varbinary(max) is used.
    16.Table datatype introduced.
    17.SSIS avails in this version.
    18.Central Management Server(CMS) is Introduced.
    -http://msdn.microsoft.com/en-us/library/bb934126.aspx
    -http://www.sqlskills.com/BLOGS/KIMBERLY/post/SQL-Server-2008-Central-Management-Servers-have-you-seen-these.aspx
    19.Policy based management(PBM) server is Introduced.
    -http://www.mssqltips.com/tip.asp?tip=1492
    -http://msdn.microsoft.com/en-us/library/bb510667.aspx
    20.PIVOT and UNPIVOT functions are used.
    -http://blog.sqlauthority.com/2008/06/07/sql-server-pivot-and-unpivot-table-examples/
    -N.S.SATHISH
    [/color]
    ***********************************************************************************
    Generic Κλασς

    What are Generic Classes

      Generic classes are classes that can hold objects of any class. Containers such as Lists, Arrays, Bags and Sets are examples of generic classes. Container classes have the property that the type of objects they contain is of little interest to the definer of the container class but of crucial importance to the user of the particular container. Therefore, the type of the contained object is an argument to the container class. The definer specifies the container class in terms of this argument and the user specifies what the type of the contained object is to be for the particular container.




    Dotnet Framework Interview Questions for 1 Year Experience:

    1. What is CLR and it's functions?
    2. How memory is managed in Dotnet applications?
    Hint: Automatically by Garbage collector
    3. What is an assembly?
    4. What is a strong name?
    5. What is MSIL?

    C# Interview Questions for 1 Year Experience:

    1. What are the 4 pillars of Object Oriented Programming?
    2. What is a Class? What is an Object?
    3. What is a partial class?
    4. What is a sealed class?
    5. What is constructor?
    6. What is stringbuilder?

    ADO.Net Interview Questions for 1 Year Experience:

    1. What is connection string?
    2. What is Datareader?
    3. Difference between Dataset and datareader?
    4. What is Ado.Net?
    5. Namespace for using sqlserver database?

    ASP.Net Interview Questions for 1 Year Experience:

    1. What is web.config file and it's use?
    2. What is global.asax?
    3. What is session?
    4. Which all controls you have used in your project?
    5. What is gridview?
    6. What is Authentication in ASP.Net and types of authentication?

    SQL Server Interview Questions for 1 Year Experience:

    1. What is Primary key, unique key and difference between them?
    2. What is index? Types of index?
    3. What is a stored procedure? Why it is better than inline query?
    Hint: Stored Procedure is precompiles and has a execution plan. Hence faster execution.
    4. You might be asked to write simple query
    5. What is inner join

    Basic .NET, ASP.NET, OOPS and SQL Server Interview questions and answers.
    • What is IL code, CLR, CTS, GAC & GC?
    • How can we do Assembly versioning?
    • can you explain how ASP.NET application life cycle and page life cycle events fire?
    • What is the problem with Functional Programming?
    • Can you define OOP and the 4 principles of OOP?
    • What are Classes and Objects?
    • What is Inheritance?
    • What is Polymorphism, overloading, overriding and virtual?
    • Can you explain encapsulation and abstraction?
    • What is an abstract class?
    • Define Interface & What is the diff. between abstract & interface?
    • What problem does Delegate Solve ?
    • What is a Multicast delegate ?
    • What are events and what's the difference between delegates and events?
    • How can we make Asynchronous method calls using delegates ?
    • What is a stack, Heap, Value types and Reference types ?
    • What is boxing and unboxing ?
    • Can you explain ASP.NET application and Page life cycle ?
    • What is Authentication, Authorization, Principal & Identity objects?
    • How can we do Inproc and outProc session management ?
    • How can we windows , forms and passport authentication and authorization in ASP.NET ?
    • In a parent child relationship which constructor fires first ?
    MVC ASP.NET Q & A series
    • How to create a simple "Hello World" using ASP.NET MVC template? - Lab 1
    • How to pass data from controller to views? - Lab 2
    • Can we see a simple sample of model using MVC template? - Lab 3
    • How can we create simple input screens using MVC template? - Lab 4
    • How can we create MVC views faster and make them strong typed by using HTML helper? - Lab 5
    • Can we see how easy it is do unit testing for MVC application? - Lab 6
    • What is MVC routing? - Lab 7
    • How can we set default values & validate MVC routes? - Lab 8
    • How we can define actions & navigate from one page to other page? - Lab 9
    WCF, WPF, Silverlight, LINQ, Azure and EF 4.0 interview question and answers
    • What is SOA, Services and Messages ?
    • What is the difference between Service and Component?
    • What are basic steps to create a WCF service ?
    • What are endpoints, address, contracts and bindings?
    • What are various ways of hosting WCF service?
    • What is the difference of hosting a WCF service on IIS and Self hosting?
    • What is the difference between BasicHttpBinding and WsHttpBinding?
    • How can we do debugging and tracing in WCF?
    • Can you explain transactions in WCF (theory)?
    • How can we self host WCF service ?
    • What are the different ways of implementing WCF Security?
    • How can we implement SSL security on WCF(Transport Security)?
    • How can we implement transport security plus message security in WCF ?
    • How can we do WCF instancing ?
    • How Can we do WCF Concurency and throttling?
    • Can you explain the architecture of Silverlight ?
    • What are the basic things needed to make a silverlight application ?
    • How can we do transformations in SilverLight ?
    • Can you explain animation fundamentals in SilverLight?
    • What are the different layout methodologies in SilverLight?
    • Can you explain one way , two way and one time bindings?
    • How can we consume WCF service in SilverLight?
    • How can we connect databases using SilverLight?
    • What is LINQ and can you explain same with example?
    • Can you explain a simple example of LINQ to SQL?
    • How can we define relationships using LINQ to SQL?
    • How can we optimize LINQ relationships queries using ‘DataLoadOptions’?
    • Can we see a simple example of how we can do CRUD using LINQ to SQL?
    • How can we call a stored procedure using LINQ?
    • What is the need of WPF when we had GDI, GDI+ and DirectX?
    • Can you explain how we can make a simple WPF application?
    • Can you explain the three rendering modes i.e. Tier 0 , Tier 1 and Tier 2?
    • Can you explain the Architecture of WPF?
    • What is Azure?
    • Can you explain Azure Costing?
    • Can we see a simple Azure sample program?
    • What are the different steps to create a simple Worker application?
    • Can we understand Blobs in steps, Tables & Queues ?
    • Can we see a simple example for Azure tables?
    • What is Package and One click deploy(Deployment Part - 1) ?
    • What is Web.config transformation (Deployment Part-2)?
    • What is MEF and how can we implement the same?
    • How is MEF different from DIIOC?
    • Can you show us a simple implementation of MEF in Silverlight ?
    Design pattern, Estimation, VSTS, Project management interview questions and answers

    Design Pattern Training / Interview Questions and Answers
    • Introduction
    • Factory Design Pattern
    • Abstract Factory Design Pattern
    • Builder Design Pattern
    • Prototype Design Pattern
    • Singleton Design Pattern
    • Adapter Design Pattern
    • Bridge Design Pattern
    • Composite Design Pattern
    • Decorator Design Pattern
    • Facade Design Pattern
    • Flyweight Design Pattern
    • Proxy Design Pattern
    • Mediator Design Pattern
    • Memento Design Pattern
    • Interpreter Design Pattern
    • Iterator Design Pattern
    • COR Design Pattern
    • Command Design Pattren
    • State Design Pattern
    • Strategy Design Pattern
    • Observer Design Pattern
    • Template Design Pattern
    • Visitor Design Pattern
    • Dependency IOC Design pattern
    • MVC , MVP , DI IOC and MVVM Training / Interview Questions and Answers

    UML Training / Interview Questions and Answers
    • Introduction
    • Use Case Diagrams
    • Class Digrams
    • Object Diagrams
    • Sequence Digrams
    • Collaboration Diagrams
    • Activity Diagram
    • State chart Diagrams
    • Component Diagrams
    • Deployment Diagrams
    • Stereo Types Diagrams
    • Package Diagram and UML Project Flow.
    Function points Training / Interview Questions and Answers
    • Introduction
    • Application Boundary
    • EI Fundamentals
    • EO Fundamentals
    • EQ Fundamentals
    • EIF
    • Fundamentals
    • ILF Fundamentals
    • GSC Fundamentals
    • Productivity Factor
    • Costing and a complete estimation of customer screen using function points.
    • FXCOP and Stylecop Training / Interview Questions and Answers

    VSTS Training / Interview Questions and Answers
    • VSTS questions and answer videos
    • What is Unit Testing & can we see an example of the same?
    • How can we write data driven test using NUNIT & VS Test?
    • Can we see simple example of a unit test for database operation?
    • How can we do automated testing using Visual Studio Test?
    • How can we do Load Testing using VSTS test?
    • Can you explain database unit testing?
    • How can we do test coverage using VSTS system?
    • How can we do manual Testing using VSTS?
    • What is Ordered Test in VSTS test?


    Enterprise Application Blocks Training
    • Introduction
    • Validation Application Block
    • Logging Application Block
    • Exception error Handling
    • Data Application Block
    • Caching Application Block
    • Security Application Block
    • Policy Injection Application Block and
    • Unity Application Block

    Complete .NET invoicing project end to end
    • Introduction to .NET Projects
    • Different levels of Programming
    • Necessary Tools
    • What should we learn ?
    • The IIS
    • Making UI using .net IDE
    • Database, The SQL Server
    • Connecting ASP.net with Database
    • Loading the Data Grid
    • Update and Delete
    • Validations
    • Issue with the Code
    • Two Tier Architecture
    • Three Tier Architecture
    • Database Normalization
    • Session and State Management
    • Using Enterprise Application Block
    • Aggregation and Composition
    • Implementing Interfaces and Factory
    • Inheritance relationship
    • Abstract Class Implementation

    Share point interview Training / Interview Questions and Answers videos
    • What is SharePoint, WSS and MOSS?
    • How does WSS actually work?
    • What is Site and SiteCollection?
    • What is the use of SQL server in SharePoint & use of Virtual path provider?
    • What is Ghosting and UnGhosting in SharePoint?
    • How can we create a site in SharePoint?
    • How can we Customize a SharePoint Site?
    • What kind of readymade functional modules exists collaboration?
    • Can you display a simple Custom Page in SharePoint?
    • How can we implement behind code ASPX pages in SharePoint?
    • What is the concept of features in SharePoint?
    • I want a feature to be only displayed to admin?
    • How do we debug SharePoint error’s?
    • Why customized pages are parsed using no-compile mode?
    • Can you explain WSS model?
    • How can we use custom controls in SharePoint?
    • How can we display ASCX control in SharePoint pages?
    • What are Web Parts?
    • How can we deploy a simple Webpart in SharePoint?
    • How can we achieve customization and personalization using WebParts?
    • How can we create custom editor for WebPart?
    • SharePoint is about centralizing documents, how similar is to the windows folder?
    • What are custom fields and content types?
    • Can you explain SharePoint Workflows?
    • What is a three-state Workflow in SharePoint?
    • How can we create sharepoint workflow using sharepoint designer?

    .NET best practices and SQL Server Training / Interview Questions and Answers
    • Basics :- Query plan, Logical operators and Logical reads
    • Point 1 :- Unique keys improve table scan performance.
    • Point 2 :- Choose Table scan for small & Seek scan for large records
    • Point 3 :- Use Covering index to reduce RID (Row Identifier) lookup
    • Point4:- Keep index size as small as possible.
    • Point5:- use numeric as compared to text data type.
    • Point6:- use indexed view for aggregated SQL Queries
    • Finding high memory consuming functions
    • Improve garbage collector performance using finalize/dispose pattern
    • How to use performance counters to gather performance data

    ASP.NET interview questions and answers

    1. Describe the difference between a Thread and a Process?
    2. What is a Windows Service and how does its lifecycle differ from a “standard” EXE?
    3. What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?
    4. What is the difference between an EXE and a DLL?
    5. What is strong-typing versus weak-typing? Which is preferred? Why?
    6. What’s wrong with a line like this? DateTime.Parse(myString
    7. What are PDBs? Where must they be located for debugging to work?
    8. What is cyclomatic complexity and why is it important?
    9. Write a standard lock() plus double check to create a critical section around a variable access.
    10. What is FullTrust? Do GAC’ed assemblies have FullTrust?
    11. What benefit does your code receive if you decorate it with attributes demanding specific Security permissions?
    12. What does this do? gacutil /l | find /i “about”
    13. What does this do? sn -t foo.dll
    14. What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
    15. Contrast OOP and SOA. What are tenets of each
    16. How does the XmlSerializer work? What ACL permissions does a process using it require?
    17. Why is catch(Exception) almost always a bad idea?
    18. What is the difference between Debug.Write and Trace.Write? When should each be used?
    19. What is the difference between a Debug and Release build? Is there a significant speed difference? Why or why not?
    20. Does JITting occur per-assembly or per-method? How does this affect the working set?
    21. Contrast the use of an abstract base class against an interface?
    22. What is the difference between a.Equals(b) and a == b?
    23. In the context of a comparison, what is object identity versus object equivalence?
    24. How would one do a deep copy in .NET?
    25. Explain current thinking around IClonable.
    26. What is boxing?
    27. Is string a value type or a reference type?
    Common Questions
    Difference between asp and asp.net
    - How do you do exception management
    - If you are using components in your application, how can you handle exceptions raised in a component
    - Can we throw exception from catch block
    - How do you relate an aspx page with its code behind page
    - What are the types of assemblies and where can u store them and how
    - What is difference between value and reference types
    - Is array reference type / value type
    - Is string reference type / value type
    - What is web.config. How many web.config files can be allowed to use in an application
    - What is differnce between machine.config and web.config
    - What is shared and private assembly
    - What are asynchronous callbacks
    - How to write unmanaged code and how to identify whether the code is managed / unmanaged.
    - How to authenticate users using web.config
    - What is strong name and which tool is used for this
    - What is gacutil.exe. Where do we store assemblies
    - Should sn.exe be used before gacutil.exe
    - What does assemblyinfo.cs file consists of
    - What is boxing and unboxing
    - Types of authentications in ASP.NET
    - difference between Trace and Debug
    - Difference between Dataset and DataReader
    - What is custom tag in web.config
    - How do you define authentication in web.Config
    - What is sequence of code in retrieving data from database
    - About DTS package
    - What provider ADO.net use by default
    - Where does web.config info stored? Will this be stored in the registry?
    - How do you register the dotnet component or assembly?
    - Difference between asp and asp.net
    - Whis is stateless asp or asp.net?
    - Authentication mechanism in dotnet
    - State management in asp.net
    - Types of values mode can hold session state in web.config
    - About WebService
    - What are Http handler
    - What is view state and how this can be done and was this there in asp?
    - Types of optimization and name a few and how do u do?
    - About DataAdapters
    - Features of a dataset
    - How do you do role based security
    - Difference between Response.Expires and Expires.Absolute
    - Types of object in asp
    - About duration in caching technique
    - Types of configuration files and ther differences
    - Difference between ADO and ADO.net
    - About Postback
    - If you are calling three SPs from a window application how do u check for the performance of the SPS

    #61607; Database

    - What is normalization
    - What is an index and types of indexes. How many number of indexes can be used per table
    - What is a constraint. Types of constraints
    - What are code pages
    - What is referential integrity
    - What is a trigger
    - What are different types of joins
    - What is a self join
    - Authentication mechanisms in Sql Server
    - What are user defined stored procedures.
    - What is INSTEAD OF trigger
    - Difference between SQL server 7.0 and 2000
    - How to optimize a query that retrieves data by joining 4 tables
    - Usage of DTS
    - How to disable an index using select query
    - Is non-clustered index faster than clustered index
    - Types of optimization in querries
    - Difference between ISQL and OSQL
    - How you log an exception directly into sql server what is used for this
    - About Replication in Database
    - What is the default optimization done in oracle and sql server
    - How can i make a coulmn as unique
    - How many no of tables can be joined in same sql server
    - How many coulmns can exist per table
    - About Sql Profiler usage

    • HR & Project

    - About yourself
    - About work experience
    - How long you are working on .NET
    - Are you willing to relocate
    - When will you join
    - Why do u what to change from current organization
    - Why do you want to join Accenture
    - What are your weaknesses / areas of improvement
    - What is your current project and your responsibilities
    - Have you done database design / development
    - What is D in ACID

    #61656; Microsoft

    • HR (Screening)
    - Tell about yourself
    - Tell about your work experience
    - Tell about projects
    - Tell about your current project and your role in it
    - What is your current salary p.a.

    • Technical

    #61607; .NET
    - How do you manage session in ASP and ASP.NET
    - How do you handle session management in ASP.NET and how do you implement them. How do you handle in case of SQLServer mode.
    - What are different authentication types. How do you retreive user id in case of windows authentication
    - For a server control, you need to have same properties like color maxlength, size, and allowed character throughout the application. How do you handle this.
    - What is custom control. What is the difference between custom control and user control
    - What is the syntax for datagrid and specifying columns
    - How do you add a javascript function for a link button in a datagrid.
    - Does C# supports multi-dimensional arrays
    - How to transpose rows into columns and columns into rows in a multi-dimensional array
    - What are object oriented concepts
    - How do you create multiple inheritance in C#
    - ADO and ADO.NET differences
    - Features and disadvantages of dataset
    - What is the difference between and ActiveX dll and control
    - How do you perform validations
    - What is reflection and disadvantages of reflection
    - What is boxing and how it is done internally
    - Types of authentications in IIS
    - What are the security issues if we send a query from the application
    - Difference between ByVal and ByRef
    - Disadvantages of COM components

    - How do we invoke queries from the application
    - What is the provider and namespaces being used to access oracle database
    - How do you load XML document and perform validation of the document
    - How do you access elements in XML document
    - What is ODP.NET
    - Types of session management in ASP.NET
    - Difference between datareader and dataset
    - What are the steps in connecting to database
    - How do you register a .NET assembly
    - Usage of web.config
    - About remoting and web services. Difference between them
    - Caching techniques in .NET
    - About CLS and CTS
    - Is overloading possible in web services
    - Difference between .NET and previous version
    - Types of chaching. How to implement caching
    - Features in ASP.NET
    - How do you do validations. Whether client-side or server-side validations are better
    - How do you implement multiple inheritance in .NET
    - Difference between multi-level and multiple inheritance
    - Difference between dataset and datareader
    - What are runtime hosts
    - What is an application domain
    - What is viewstate
    - About CLR, reflection and assemblies
    - Difference between .NET components and COM components
    - What does assemblyinfo.cs consists
    - Types of objects in ASP

    #61607; Database

    - What are the blocks in stored procedure
    - How do you handle exceptions. Give the syntax for it
    - What is normalization and types of normalization
    - When would you denormalize
    - Difference between a query and strored procedure
    - What is clustered and non-clustered indexes
    - Types of joins
    - How do you get all records from 2 tables. Which join do you use
    - Types of optimization
    - Difference between inline query and stored procedure

    #61607; Project related
    - Tell about your current project
    - Tell about your role
    - What is the toughest situation you faced in the development
    - How often you communicate with the client
    - For what purposes, you communicate with the client
    - What is the process followed
    - Explain complete process followed for the development
    - What is the life cycle model used for the development
    - How do communicate with team members
    - How do you say you are having excellent team management skills
    - If your client gives a change and asks for early delivery. How will you manage.
    - How will gather requirements and where do you record. Is it in word / Excel or do you have any tool for that
    - What is the stage when code is delivered to the client and he is testing it.
    - What are the different phases of SDLC
    - How do you handle change requests
    - How do you perform impact analysis
    - How do you write unit test cases.
    - About current project architecture

    #61656; Keane on 12th October 2003

    • Technical

    #61607; .NET
    - Write steps of retrieving data using ado.net
    - Call a stored procedure from ado.net and pass parameter to it
    - Different type of validation controls in asp.net
    - Difference between server.Execute and response.redirect
    - What is Response.Flush method
    - How Response.flush works in server.Execute
    - What is the need of clinet side and server side validation
    - Tell About Global.asax
    - What is application variable and when it is initialized
    - Tell About Web.config
    - Can we write one page in c# and other in vb in one application
    - When web.config is called
    - How many web.config a application can have
    - How do you set language in web.cofig


    #61607; Database
    - How do you rate yourrself in oracle and sql server
    - What is E-R diagram
    - Draw E-R diagram for many to many relationship
    - Design databaseraw er diagram for a certain scenario(many author many books)
    - Diff between primary key and unique key
    - What is Normalization
    - Difference between sub query and nested query
    - Indexes in oracle
    - Querry to retrieve record for a many to many relationship
    - Querry to get max and second max in oracle in one querry
    - Write a simple Store procedure and pass parameter to it

    #61656; Digital Globalsoft

    • Technical

    #61607; .NET
    - Difference between VB dll and assemblies in .NET
    - What is machine.config and web.config
    - Tell about WSDL
    - About web methods and its various attributes
    - What is manifest
    - Types of caching
    - What does connection string consists of
    - Where do you store connection string
    - What is the difference between session state and session variables
    - How do you pass session values from one page to another
    - What are WSDL ports
    - What is dataset and tell about its features. What are equivalent methods of previous, next etc. Of ADO in ADO.NET
    - What is abstract class
    - What is difference between interface inheritance and class inheritance
    - What are the collection classes
    - Which namespace is used for encryption
    - What are the various authentication mechanisms in ASP.NET
    - What is the difference between authentication and autherization
    - What are the types of threading models
    - How do you send an XML document from client to server
    - How do you create dlls in .NET
    - What is inetermediate language in .NET
    - What is CLR and how it generates native code
    - Can we store PROGID informatoin in database and dynamically load the component
    - Is VB.NET object oriented? What are the inheritances does VB.NET support.
    - What is strong name and what is the need of it
    - Any disadvantages in Dataset and in reflection
    - Advantage of vb.net over vb
    - What is runtime host
    - How to send a DataReader as a parameter to a remote client
    - How do you consume a webservice
    - What happens when a reference to webservice is added
    - How do you reference to a private & shared assembly
    - What is the purpose of System.EnterpriseServices namespace
    - About .Net remoting
    - Difference between remoting and webservice
    - Types of statemanagement techniques
    - How to register a shared assembly
    - About stateless and statefull webservice
    - How to invoke .net components from com components,give the sequence
    - How to check null values in dataset
    - About how soap messages are sent and received in webservice
    - Error handling and how this is done
    - Features in .net framework 1.1
    - Any problem found in vs.et
    - Optimization technique description
    - About disco and uddi
    - What providers does ado.net uses internally
    - Oops concepts
    - Disadvantages of vb
    - XML serialization
    - What providers do you use to connect to oracle database?

    #61607; Database
    - Types of joins

    #61607; General
    - What are various life cycle model in S/W development

    #61656; Infosys

    • Technical

    #61607; .NET
    - How do you rate yourself in .NET
    - What is caching and types of caching
    - What does VS.NET contains
    - What is JIT, what are types of JITS and their pupose
    - What is SOAP, UDDI and WSDL
    - What is dataset

    #61607; Database
    - How do you optimize SQL queries

    #61607; General
    - Tell about yourself and job
    - Tell about current project
    - What are sequence diagrams, collaboration diagrams and difference between them
    - What is your role in the current project and what kinds of responsibilites you are handling
    - What is the team size and how do you ensure quality of code
    - What is the S/W model used in the project. What are the optimization techniques used. Give examples.
    - What are the SDLC phases you have invloved

    #61656; Satyam

    • Technical

    #61607; .NET
    - Types of threading models in VB.net
    - Types of compatability in VB and their usage
    - Difference between CDATA and PCDATA in XML
    - What is Assync in XML api which version of XML parser u worked with
    - Types of ASP objects
    - Difference between application and session
    - What is web application virtual directory
    - Can two web application share a session and application variable
    - If i have a page where i create an instance of a dll and without invoking any method can I send values to next page
    - Diffeernce between Active Exe and /Dll
    - Can the dictionary object be created in client’s ccope?
    - About MTS and it’s purpose
    - About writting a query and SP which is better
    - I have a component with 3 parameter and deployed to client side now i changed my dll method which takes 4 parameter.How can i deploy this without affecting the clent’s code
    - How do you do multithreading application in VB
    - About Global .asax
    - Connection pooling in MTS
    - If cookies is disabled in clinet browser will session work
    - About XLST
    - How do you attach an XSL to an XML in presenting output
    - What is XML
    - How do you make your site SSL enabled
    - Did you work on IIS adminisdtration
    -
    #61607; Database
    - dd
    #61607; General
    - dd
    • HR
    - About educational background
    - About work experience
    - About area of work
    - Current salary, why are looking for a change and about notice period
    - About company strength, verticals, clients, domains etc.
    - Rate yourself in different areas of .NET and SQL

    #61656; Cognizent

    • Technical

    #61607; .NET
    - About response.buffer and repsonse.flush
    - About dataset and data mining
    - About SOAP
    - Usage of htmlencode and urlencode
    - Usage of server variables
    - How to find the client browser type
    - How do you trap errors in ASP and how do you invoke a component in ASP
    #61607; Database
    - About types of indexes in SQL server
    - Difference between writing SQL query and stored procedure
    - About DTS usage
    - How do you optimize Sql queries

    #61607; General
    - Dfs
    - Rate yourself in .NET and SQL
    - About 5 processes
    - About current project and your role
    • HR
    - About educational background, work experience, and area of work
    -


    #61656; TCS

    • Technical

    #61607; .NET
    - Define .NET architecture
    - Where does ADO.NET and XML web services come in the architecture
    - What is MSIL code
    - Types of JIT and what is econo-JIT
    - What is CTS, CLS and CLR
    - Uses of CLR
    - Difference between ASP and ASP.NET
    - What are webservices, its attributes. Where they are available
    - What is UDDI and how to register a web service
    - Without UDDI, is it possible to access a remote web service
    - How a web service is exposed to outside world
    - What is boxing and unboxing
    - What is WSDL and disco file
    - What is web.config and machine.config
    - What is difference between ASP and ASP.NET
    - What is dataset and uses of dataset
    - What does ADO.NET consists of?
    - What are various authentication mechanisms in ASP.NET
    - What do you mean by passport authentication and windows authentication
    - What is an assembly and what does manifest consists
    - What is strong name and what is the purpose of strong name
    - What are various types of assemblies
    - Difference between VB.NET and C#. Which is faster
    - Types of caching
    - How WSDL is stored
    - What is the key feature of ADO.NET compared to ADO
    - How does dataset acts in a disconnected fashion
    - Does the following statement executes successfully:
    Response.Write(“value of i = ” + i);
    - What is ODP.NET
    - What are the providers available with VS.NET
    - What is a process
    - What is binding in web service
    - How a proxy is generated for a web service
    - About delegates
    - What are static assemblies and dynamic assemlies. Differences between them

    #61607; Database
    - What are the types of triggers
    - Types of locks in database
    - Types of indexes. What is the default key created when a primary key is created in a table
    - What is clustered, non-clustured and unique index. How many indexes can be created on a table
    - Can we create non-clustured index on a clustered index
    - Types of backups
    - What is INSTEAD OF trigger
    - What is difference between triggers and stored procedures. And advantages of SP over triggers
    - What is DTS and purpose of DTS
    - Write a query to get 2nd maximum salary in an employee table
    - Types of joins.
    - What is currency type in database
    - What are nested triggers
    - What is a heap related to database

    #61607; General

    • HR
    - About yourdelf
    - About procsses followed
    - Notice period
    - Appraisal process
    - What is SOAP and why it is required
    - About effort estimation
    - Whether salary negotiable
    - Why are looking for a change
    - How fo you appraise a person
    - Do you think CMM process takes time
    - About peer reviews
    - How do you communicate with TL / PM / Onsite team

    #61656; DELL
    • Technical

    #61607; .NET
    - Any disadvantages in Dataset and in reflection
    - Difference between Active Exe and Activex dll
    - Can we make activex dll also ti execute in some process as that of client ? How can we do?
    - Types of compatabilities and explain them
    - Types of instancing properties and explain each. Tell the difference between multiuse,singleuse and globalmultiuse and which is default
    - What is assembly?
    - Difference between COM and .NET component
    - What is early binding and Late binding. Difference which is better
    - What happens when we instantiate a COM component
    - What happens when we instantiate a .NET component
    - Are you aware of containment and Aggregation
    - What is UUID and GUID what is the size of this ID?
    - About Iunknown interface Queue ,its methods Querry Interface Addref,Release and Explane each
    - What ‘ll u do in early and late binding
    - In early binding will the method invoked on com component will verify it’s existance in the system or not?
    - Difference between dynamic query and static query
    - About performance issues on retrieving records
    - About ADO and its objects
    - What is unmannaged code and will CLR handle this kind of code or not .
    - Garbage collector’s functionality on unmanaged code
    - If Instancing = Single use for ActiveX Exe, how will this be executed if there are 2 consecutive client requests ?
    - Threading Types.
    - How about the security in Activex DLL and Activex EXE

    #61607; Database
    - Types of cursors and explanation each of them
    - Types of cursor locations and explanation on each of them
    - Types of cursor locks and explanation each of them
    - How do you retrieve set of records from database server.{Set max records = 100 & use paging where pager page no or records = 10 & after displaying 100 records again connect to database retrieve next 100 }

    • HR & Project

    - Rate yourself in vb and com
    - Whether I have any specific technology in mind to work on.


    #61656; MMTTS

    • Technical

    #61607; .NET
    - About .NET Framework
    - About Assembly in .NET, types of assemblies, their difference, How to register into GAC. How to generate the strong names & its use.
    - What is side by side Execution?
    - What is serialization?
    - Life cycle of ASP.NET page when a request is made.
    - If there is submit button in a from tell us the sequence what happens if submit is clicked and in form action is specified as some other page.
    - About a class access specifiers and method access specifiers.
    - What is overloading and how can this be done.
    - How to you declare connection strings and how to you make use of web.config.
    - How many web.copnfig can exists in a web application & which will be used.
    - About .NET Remoting and types of remoting
    - About Virtual functions and their use.
    - How do you implement Inheritance in dot net
    - About ado.net components/objects. Usage of data adapters and tell the steps to retrieve data.
    - What does CLR do as soon as an assembly is created
    - How do you retrieve information from web.config.
    - How do you declare delegates and are delegates and events one and the same and explain how do you declare delegates and invoke them.
    - If I want to override a method 1 of class A and in class b then how do you declare?
    - What does CLR do after the IL is generated and machine language is generated .Will it look for main method
    - About friend and Protected friend
    - About multi level and multiple inheritance how to achieve in .net
    - Sequence to connect and retrieve data from database useig dataset
    - About sn.exe
    - What was the problem in traditional component why side by side execution is supported in .net
    - How .net assemblies are registred as private and shared assembly
    - All kind of access specifiers for a class and for methods
    - On ODP.net
    - Types of assemblies that can be created in dotnet
    - About namespaces
    - OOPs concept
    - More on CLR

    • HR & Project
    - About yourself
    - About the current employer
    - About expertise
    - What type of job you are expecting
    - What is current and expected is it negotiable
    - Can you justify why r you expecting more in professional terms
    - What are you looking for in Dell