SQL Server DBA Interview Questions

Top most important SQL Server DBA interview questions and answers by Experts:

Here is a list of Top most important SQL Server DBA interview questions and answers by Experts.If you want to download SQL Server DBA interview questions pdf free ,you can register with RVH techguru. Our experts prepared these SQL Server DBA interview questions to accommodate freshers level to most experienced level technical interviews.

If you want to become an expert in SQL Server DBA ,Register for SQL Server DBA online training here.
1.What purpose does the model database serve?
The model database, as its name implies, serves as the model (or template) for all databases created on the same instance. If the model database is modified, all subsequent databases created on that instance will pick up those changes, but earlier created databases will not. Note that TEMPDB is also created from model every time SQL Server starts up.
2.How do you trace the traffic hitting a SQL Server?
SQL profiler is the SQL Server utility you can use to trace the traffic on the SQL Server instance. Traces can be filtered to narrow down the transactions that are captured and reducing the overhead incurred for the trace. The trace files can be searched, saved off, and even replayed to facilitate troubleshooting.
3.What types of replication are supported in SQL Server?
SQL Server has three types of replication: Snapshot, Merge, and Transaction. Snapshot replication creates a snapshot of the data (point-in-time picture of the data) to deliver to the subscribers. This is a good type to use when the data changes infrequently, there is a small amount of data to replicate, or large changes occur over a small period of time.
Merge replication uses a snapshot to seed the replication. Changes on both sides of the publication are tracked so the subscriber can synchronize with the publisher when connected. A typical use for this type of replication is in a client and server scenario. A server would act as a central repository and multiple clients would independently update their copies of the data until connected. At which time, they would all send up their modifications to the central store.
Transaction replication also begins with a snapshot only this time changes are tracked as transactions (as the name implies). Changes are replicated from publisher to subscriber the same as they occurred on the publisher, in the same order as they occurred, and in near real time. This type of replication is useful when the subscriber needs to know every change that occurred to the data (not point-in-time), when the change volume is high, and when the subscriber needs near real-time access to the changes.
4.Why would you use SQL Agent?
SQL Agent is the job scheduling mechanism in SQL Server. Jobs can be scheduled to run at a set time or when a specific event occurs. Jobs can also be executed on demand. SQL Agent is most often used to schedule administrative jobs such as backups.
5.What happens on checkpoint?
Checkpoints, whether scheduled or manually executed, cause the transaction log to be truncated up to the beginning of the oldest open transaction (the active portion of the log). That is, the dirty pages from the buffer cache are written to disk. Storing committed transactions in the cache provides a performance gain for SQL Server. However, you do not want the transaction log to get too big because it might consume too many resources and, should your database fail, take too long to process to recover the database.
One important thing to note here is that SQL Server can only truncate up to the oldest open transaction. Therefore, if you are not seeing the expected relief from a checkpoint, it could very well be that someone forgot to commit or rollback their transaction. It is very important to finalize all transactions as soon as possible.
6.What is DBCC?
DBCC statements are Database Console Commands and come in four flavors: Maintenance, Informational, Validation, and Miscellaneous. Maintenance commands are those commands that allow the DBA to perform maintenance activities on the database such as shrinking a file. Informational commands provide feedback regarding the database such as providing information about the procedure cache. Validation commands include commands that validate the database such as the ever-popular CHECKDB. Finally, miscellaneous commands are those that obviously don’t fit in the other three categories. This includes statements like DBCC HELP, which provides the syntax for a given DBCC command.
7.How can you control the amount of free space in your index pages?
You can set the fill factor on your indexes. This tells SQL Server how much free space to leave in the index pages when re-indexing. The performance benefit here is fewer page splits (where SQL Server has to copy rows from one index page to another to make room for an inserted row) because there is room for growth built in to the index.
8.Why would you call Update Statistics?
Update Statistics is used to force a recalculation of query optimization statistics for a table or indexed view. Query optimization statistics are automatically recomputed, but in some cases, a query may benefit from updating those statistics more frequently. Beware though that re-computing the query statistics causes queries to be recompiled. This may or may not negate all performance gains you might have achieved by calling update statistics. In fact, it could have a negative impact on performance depending on the characteristics of the system.
9.What is a correlated sub-query?
A correlated sub-query is a nested query that is linked to the outer query. For instance, say I wanted to find all the employees who have not entered their time for the week. I could query the Employee table to get their first and last name, but I need to look at the TimeEntry table to see if they’ve entered their time or not. I can’t do a straight join here because I’m looking for the absence of time data, so I’ll do a correlated sub-query similar to this:
SELECT FirstName, LastName
FROM EMPLOYEE e
WHERE NOT EXISTS (SELECT 1 FROM TimeEntry te
WHERE te.EmpID = e.EmpID
AND te.WeekID = 35)
Notice that the inner query relates to the outer query on the employee ID, thus making it a correlated sub-query. The inner query will be evaluated once per outer query row.
10.What authentication modes does SQL Server support?
SQL Server supports Windows Authentication and mixed-mode. Mixed-mode allows you to use both Windows Authentication and SQL Server Authentication to log into your SQL Server. It’s important to note that if you use Windows Authentication, you will not be able to log in as sa.
11.Explain about your SQL Server DBA Experience?
This is a generic question often asked by many interviewers. Explain what are the different SQL Server Versions you have worked on, what kind of administration of those instances has been done by you. Your role and responsibilities carried out in your earlier projects that would be of significance to the potential employer. This is the answer that lets the interviewer know how suitable are you for the position to which you are being interviewed.
22.What are the different SQL Server Versions you have worked on?
The answer would be depending on the versions you have worked on, I would say I have experience working in SQL Server 7, SQL Server 2000, 2005 and 2008. If you have worked only the some version be honest in saying that, remember, no one would be working on all versions, it varies from individual to individual.[sociallocker]
23.What are the different types of Indexes available in SQL Server?
The simplest answer to this is “Clustered and Non-Clustered Indexes”. There are other types of Indexes what can be mentioned such as Unique, XML, Spatial and Filtered Indexes. More on these Indexes later.
24.What is the difference between Clustered and Non-Clustered Index?
 In a clustered index, the leaf level pages are the actual data pages of the table. When a clustered index is created on a table, the data pages are arranged accordingly based on the clustered index key. There can only be one Clustered index on a table.
In a Non-Clustered index, the leaf level pages does not contain data pages instead it contains pointers to the data pages. There can multiple non-clustered indexes on a single table.
25.What are the new features in SQL Server 2005 when compared to SQL Server 2000?
There are quite a lot of changes and enhancements in SQL Server 2005. Few of them are listed here :
Database Partitioning
Dynamic Management Views
System Catalog Views
Resource Database
Database Snapshots
SQL Server Integration Services
Support for Analysis Services on a a Failover Cluster.
Profiler being able to trace the MDX queries of the Analysis Server.
Peer-toPeer Replication
Database Mirroring
26.What are the High-Availability solutions in SQL Server and differentiate them briefly?
Failover Clustering, Database Mirroring, Log Shipping and Replication are the High-Availability features available in SQL Server. I would recommend reading this blog of mine which explains the differences between these 4 features. Comparing the High Availability Features in SQL Server 2005
27.How do you troubleshoot errors in a SQL Server Agent Job?
Inside SSMS, in Object explorer under SQL Server Agent look for Job Activity Monitor. The job activity monitor displays the current status of all the jobs on the instance. Choose the particular job which failed, right click and choose view history from the drop down menu. The execution history of the job is displayed and you may choose the execution time (if the job failed multiple times during the same day). There would information such as the time it took to execute that Job and details about the error occurred.
28.What is the default Port No on which SQL Server listens?
 433
29.How many files can a Database contain in SQL Server?How many types of data files exists in SQL Server? How many of those files can exist for a single database?
A Database can contain a maximum of 32,767 files.
There are Primarily 2 types of data files Primary data file and Secondary data file(s)
There can be only one Primary data file and multiple secondary data files as long as the total # of files is less than 32,767 files.
30.What is DCL?
DCL stands for Data Control Language.
31.What are the commands used in DCL?
GRANT, DENY and REVOKE.
32.What is Fill Factor?
Fill Factor is a setting that is applicable to Indexes in SQL Server. The fill factor value determines how much data is written to an index page when it is created / rebuilt.
33.What is the default fill factor value?
By default the fill factor value is set to 0.
34.Where do you find the default Index fill factor and how to change it?
The easiest way to find and change the default fill factor value is from Management Studio, right-click the SQL Server and choose properties. In the Server Properties, choose Database Settings, you should see the default fill factor value in the top section. You can change to a desired value there and click OK to save the changes.
The other option of viewing and changing this value is using sp_configure.
35.What is a system database and what is a user database?
 System databases are the default databases that are installed when the SQL Server is installed. Basically there are 4 system databases: Master, MSDB, TempDB and Model. It is highly recommended that these databases are not modified or altered for smooth functioning of the SQL System.
A user database is a database that we create to store data and start working with the data.
36.What are the recovery models for a database?
 There are 3 recovery models available for a database. Full, Bulk-Logged and Simple are the three recovery models available.
37.What is the importance of a recovery model?
Primarily, recovery model is chosen keeping in view the amount of data loss one can afford to. If one expects to have minimal or no data loss, choosing the Full recovery model is a good choice. Depending on the recovery model of a database, the behavior of database log file changes. I would recommend you read more material on log backups and log file behavior and so on to understand in depth.
38.What is Replication?
Replication is a feature in SQL Server that helps us publish database objects and data and copy (replicate) it to one or more destinations. It is often considered as one of the High-Availability options. One of the advantages with Replication is that it can be configured on databases which are in simple recovery model.
39.What the different types of Replication and why are they used?
There are basically 3 types of replication: Snapshot, Transactional and Merge Replication. The type of Replication you choose, depends on the requirements and/or the goals one is trying to achieve. For example Snapshot Replication is useful only when the data inside the tables does not change frequently and the amount of data is not too large, such as a monthly summary table or a product list table etc. Transactional Replication would useful when maintaining a copy of a transactional table such as sales [/sociallocker]

40.What is a Database?
A Database Administrator needs to know what a database is before they can administer it, right? At its most basic, a database is a collection of tables, structured in such a way that it can be navigated like you would any sort of table. If you remember in math class, you may have had a number of tables that allowed you to quickly find a value if you multiplied an x and y value together — or in this case, what it would be if you were looking for a particular row and column value.
41.What is a query?
A query in normal terms is a question, simple enough. It is the statement that is talking to the database in order to Create, Read, Update or Delete (CRUD) data. While many times a query is an actual question asking for an answer, it can also be the statement to modify, insert, or remove data in the database as well.
45.What is SQL?
Structured Query Language is the basic way of asking a database server to talk to you. Whether that is in the context of asking it a question, giving it answers to questions it is asking you, or updating answers that have already been stored in the database. The art of asking the right question is critical to getting back the right data you need, which is incredibly valuable when dealing with databases, as it is very easy to receive far more data than you know what to do with, or nothing at all.
46.What does ‘SELECT’ do?
SELECT in the terms of an SQL query triggers a question to the database. It looks across the specified table(s), finds the data you are looking for and then presents it to the user for consideration. Depending on the query, this can be an awful lot of data, so again, asking the right question is critical.
47.What is a primary key?
A primary key is usually used as the index for a particular table — a value that the table can depend upon to be a reliable unique value in every row. When trying to pull data for a particular row, the primary key will normally be used to pull that information, usually a numeric value. For example, if you are trying to pull up data on a specific person, and that database is using their unencrypted ssn as the primary key (naughty), then that could be used in the query to identify that particular row since there could be other people present in the database with that specific name or other identifying characteristics.
48.What is a Database Management System?
A Database Management System, or DBMS, is essentially the application that handles the heavy lifting between you (the user), and the raw data. The database itself is just that — the database; it cannot alter its own data any more than the average person can re-arrange their genetic code. The DBMS is what you are talking to when you are asking the questions. It is what looks at your question, thinks about it for a while, goes to the database, picks up the data, hands it back to you, and asks you to come again.
49.What is the difference between a Navigational database and a Relational database?
The best way to describe a Navigational DBMS is through that of a tree. Each value was associated with another through the use of a parent, most of the time with no other direct way to access the data. Relational Databases on the other hand use values common to multiple tables to establish a unique key — making sure that they are talking on the same page so that there are many, many ways to get to the same place. To put it another way, if you were trying to get from point A to point B, a navigational database would have one specific path to get there — via a freeway. A relational database on the other hand would have options for taking the freeway, a back road, a boat, a plane, a bus and sometimes a rocket — provided that each of those methods were set up correctly to talk to each other. Most modern databases use the relational database model.
50.Why do most database types not talk to each other?
In a word: money. In three words: a lotttta money. Different database vendors spend a huge amount of research time trying to find ways to give them a leg up on the competition; whether that may be by performance, storage capacity, longevity, reliability, scalability, the list goes on and on. As a result, trying to be compatible and backwards engineer every single feature of a particular database type is difficult in the extreme before you even get to the patent violations. Most databases can be simplified down to filetypes like .csv files, which can be used to transport basic data from vendor to vendor. That being said however, there would be a lot lost in translation without help from higher up.
51.What is a Frontend?
For those that don’t want to see row upon row upon row of data in front of them until they go cross-eyed, a frontend is essential. In essence a management program, a frontend allows admins to be able to view and modify high level database functions without the need to use the command line for every single thing. This can be extremely useful not only for efficiency, but also for safety, as it can prevent accidental data modification. It can also allow users that are more used to a GUI application most of the utility that the CLI permits.
52.What is a ‘join’?
Well when two tables love each other very much…not that much happens actually. However when you need to search across multiple tables simultaneously, a join can help make that happen. For example, if you were searching for information on a particular product and one table has the description while the other has pricing information, you can use a join to search across both tables simultaneously using a single query.
53.What is a foreign key?
When using a join or other type of query that goes across multiple tables, it can sometimes be difficult to make sure they are talking on the same page. A primary key can help with this, but sometimes this is impractical, and thus you need a secondary value that is consistent across multiple tables. For example, say that in a series of tables for product listings you have your primary key assigned to an auto-increment ID based on when the product was entered (a typical setup), and then none of these rows are able to line up with their counterparts in other tables. So if you have one table for product listings, another for price information, another for reviews, etc. — this could be a fairly major problem. However, if you know for a certainty that your part numbers for these products are going to be unique values, you can use that as a foreign key and suddenly everything lines up all nice and neat. This is possible since it exists in more than one table, and since is being referenced from outside its own table; it is designated ‘foreign’. This does not mean it still could not be the primary key for that particular table as well, it just means it has a reference that can be looked to from another point of view.
54.What is SQL Injection?
Also known as asking a question and getting the answer you want, rather than the answer they want to give you (anybody that has tried to navigate certain nameless support phones knows that this isn’t necessarily a bad thing); however in the context of a database application, this can be “a very bad thing”™. For instance, say that you are on an online banking website. You’re at the login screen, and it is waiting for you to enter your login and password so it can display your particular financial information. But what if you want to see the listing of everybody else that banks at this particular location? Depending on how the bank’s site is hardened against such an attack, you could get their personal information, current balances, PIN numbers, or even worse, enter your own data directly into the database — able to create new accounts, set up transaction history, active balances, the list goes on and on.
55.What is input sterilization?
One of the main answers to SQL Injection, input sterilization allows the database to selectively ignore data coming in from an input field and strip out non-required data. For example, if a field is expecting only a numeric value, there is no need for letters or symbols to be present in the user input. Therefore, these values can be safely ignored but still keep the functionality of the form intact. While not an end-all beat-all, it goes a long way to helping mitigate attacks on this vector.
SQL Vs NoSQL
NoSQL (Also called Not Only SQL), is a different form of database than the standard relational type. While it can use a lot of the same kinds of query language, it doesn’t necessarily use the same type of table structure that standard relational databases use, and thus in some cases can be more efficient. That efficiency depends greatly on its application however, and many times you will see NoSQL used in Big Data crunching and analysis applications that require real-time feedback.
56.What is a ‘Flat File’?
A flatfile is a catch-all term used for concepts like Comma Separated Values (.csv). While there are a lot of different ways to create such a file, they all share ideas that they can be created and manipulated easily and without necessarily requiring a standard database application. These can also be used to transfer data from system to system due to their lightweight status. In some cases, these have been replaced by XML files, however XML can when compared to certain kinds of flatfiles, be very large.
57.I have a database that was built in MySQL, and I need the data to be moved over to Microsoft SQL Server. How would I do this?
The easy answer would be to contact Microsoft Tech Support and bring your checkbook. A more difficult answer would be to bring it down to a .csv file and then import it into SQL Server, but without a specialty conversion utility you may lose some program-specific specific tricks, thus requiring some rebuilding once the conversion is complete. This is not saying that this would work in all cases, but it is at least an option.
58.What is the difference between ‘=’ and ‘LIKE’?
When crafting a query, or using programming to display data in certain ways depending on the values being returned, you may want to think that these can be used interchangeably. There is one big difference, however: equal means equal. The value being returned must match the value it is being compared to 100%. LIKE, however, can be used with a number of different wildcard mechanics, allowing you to be a bit more flexible in your rules.
59.What is a Null Value?
A Null Value is an absence of data. This one is a bit misleading sometimes, because depending on who you ask, it can be considered many possible things. “Null equals 0”- Not in this context, because 0 is a value. “Null equals Empty” — closer, but again sometimes an empty value can still be considered a value depending on how the field is structured. If a column allows for null values, and no value is submitted, then it allows it to be Null.
60.What does ‘INSERT’ do?
INSERT submits data into a database as a new row, usually through the use of a form. While forms can take many…forms…, the most common uses are through either a dedicated application or through the use of an HTML form. Clicking on the ‘submit’ button will trigger the built in form reaction to scan the form for particular fields, making sure the required ones are entered correctly, make sure the user isn’t being naughty in what they are trying to enter, then submit the data to the database.
61.What does ‘DROP’ do?
DROP removes a table from a database or a database from a server. A very dangerous command indeed, it is only to be used in situations that absolutely require it, as unless you have a backup of it handy, there is no coming back from this.
62.What is the difference between T-SQL and PL/SQL?
T-SQL or Transact-SQL is Microsoft’s version of SQL. The main additions Microsoft made to the main branch of SQL involve the addition of procedures or routines — scripts essentially — that can be run under certain criteria. PL/SQL, on the other hand, is Oracle’s version of SQL, and conceptually the two are very similar. However, because of the nature in how they were developed, trying to move data from one to the other involves quite a bit of work. The main differences deal with how they multi-task and how they lock elements when they are in use.
63.What does ‘UPDATE’ do?
UPDATE allows values to be modified where they meet specific criteria. For example, say that you were on Amazon and were about to move. As a result, you would want to adjust your mailing address so that you actually got your stuff. You would therefore go into your settings and it would show you your current address. Modifying this address and then submitting the form would update your address based on your particular user profile. If it updated anybody else’s address to match that would be a serious problem — at least for the person doing the paying.
64.Why do database servers benefit from a lot of memory, and why do 64-bit operating systems help in this regard?
Database servers like to cache as much data as possible when they are reading it a lot. Storing this information in active memory is a lot faster than trying to find it again from the hard disk or other media. Therefore more memory = faster response time = better performance. The problem is that for most operating systems the maximum amount of memory that can be used by a 32-bit OS is 4 gigabytes. While in years past this would have been an inconceivable number, today it is a drop in the bucket. 64-bit operating systems resolve this issue by being able to handle memory to 192 gigabytes currently for Windows, while Linux can theoretically go much higher at present, and these numbers will only climb higher and higher.
65.Why is it a bad idea to run a test on a live database?
On a test database, it’s relatively easy to keep the performance variables to a minimum. On a live database however, it needs to be functioning for all users all the time. Running untested code on a production database can not only reduce performance, but also create unforeseen instability in the server itself — potentially causing crashes and data corruption.
66.Why is it difficult to use standard file by file backup methods on an active database server?
This problem is twofold. First, many database servers place locks on database files that are currently in use. Most backup programs that try to do a file-by-file backup will therefore be unable to create a copy of this file, as they cannot get exclusive permissions to it. Second, while some database servers have only a single file to backup a database, others have multiple files that can be stored in different locations across possibly multiple physical hard disks. The problem can be resolved in one of two potential ways. First, using the backup method within the database server itself. Some programs such as Microsoft SQL Server allow you to create a scheduled backup directly within the server application to a location of your choosing. Others require you to use a scheduled task or another on-demand type of backup solution. The second would be to use a backup application that can talk directly to the database server, allowing the database to be backed up using a different technique.
67.When would you use an offline backup method versus an online backup?
If the above methods are unavailable when trying to create a backup solution, another potential method is temporarily taking down the database or database server in order to create a file-by-file backup. The problem with this method is that if the server goes down incorrectly, the backups could be flagged as bad and thus unusable. Periodically testing your backups to make sure they are working properly is strongly recommended, regardless of what method you use to create them.
68.What is Replication?
Database replication allows for real-time automated backups between multiple database servers. This allows for the creation of either a fall-over server, or warm backup for use in case the main server goes down.
Is data in databases encrypted by default?
While most database servers support some form of encryption out of the box, it is not enabled by default due to performance hits and security concerns.
69.How would you store files within a database?
Two common ways to store files for use by a database are either within the operating system’s file system, or within a field of the table itself. Uploading and storing the files outside of the database makes for faster creation of the application, and can be more efficient if the file sizes are larger, but can potentially cause security issues if the files are not secured correctly. On the other hand, the files can also be stored directly within the database using a BLOB-type field. A BLOB is a Binary Large Object, essentially an empty area where a file can be uploaded to but not exceed a specified limit. Like int in the example above, blob has a number of different potential sizes, depending on the type used. Bear in mind there are other methods for storing and accessing files in a database server, these two are merely the most common.
70.When would you use ‘char’ versus ‘varchar’?
This is a bit of a difficult question, mostly because it depends so much on what your application is. For example, if you have a form field that can be nearly any length and changes every single time, then varchar is a much more practical choice, since it gives you much more flexibility. If however you have a field where every value is going to be exactly the same length, then you can get more efficient performance out of a char. Again, it depends on exactly what your application is, and how you plan to cook it — seasoning as you see fit.
71.What is XML?
Extensible Markup Language (XML) is a fast way to display data that not only conforms to a structure that can be read by machines, but is also easily understandable by humans. Because they can be dynamically and manually generated in many different ways, they are easy to produce and map to; and because they retain the same structure despite the data being updated, they can be relied upon for automatic functions such as RSS aggregation.
72.What shows that a database server is running?
<Insert joke about needing to catch it here/> Database servers run as services or daemons, most times in the background without the necessity to see that they are running in order to interact with them. When things go sideways however, being able to verify that the service is in fact up and running can be an excellent place to start troubleshooting. Checking under the services area of your particular operating system, whether that be by GUI or by CLI, can show you that the service is started or not, thus allowing you either to start or restart it as need be.
73.What is WYSIWYG?
What You See Is What You Get. A mouthful of an acronym, it allows for the creation of an application that is consistent regardless of how it is viewed — whether on the design screen, being viewed in a browser or being printed. Creating an interface to a database that is not only functional but also looks nice is a trick in itself, and can take a lot of work to get it just right.
74.Why is it frowned upon to use ‘SELECT * ..’ in a large database?
Picture it like a group of people in line for a bathroom, and every single person that was going in there was going to use the toilet, change their clothes, take a shower, iron their jacket, take another shower, etc. There is only so much area that can be used efficiently before you start to get a queue, slowing down the whole operation that can eventually cause the entire thing to collapse under lack of toilet paper. You can quickly get back more than you can use or understand, so optimization is key when creating queries and asking only what you need to get the question answered.
75.How would you get the quantity of results from a query?
COUNT() is the main supported way to be able to get the number of returned results from a query. While there are many other options such as mysql_num_rows, these are considered obsolete and are being removed.
76.What is a Database Schema?
If you’ve ever seen one of those Visio diagrams with 40 different tables with lines connecting particular columns on one with those on another, that’s a database schema. Essentially a two-dimensional representation of how each table talks to other ones, it is the way to view the design of a database as a single entity and not as a jumble of different tables.
77.What are Nested Queries?
A query within a query, this particular method can be tremendously difficult to troubleshoot and even harder to manage without a lot of overhead. In most cases, a nested query can be replaced with a JOIN, allowing for much more efficient use of resources.
78.What is ODBC?
Open Database Connectivity is a way to make different kinds of frontends talk to different data sources (DSNs) such as Databases. The specifics available depend on the type of application being used, the driver being used and the backend to which it is being applied.
79.For Oracle systems, what is OFA?
Optimal Flexible Architecture (OFA) is the recommended layout for installing and configuring an Oracle database.
80.For Oracle systems, what is error “ORA-01034”?
The full error is “ORA-01034: ORACLE not available”. While there are many potential causes, the most common is that the service is just not running. The resolution is to start the service, then see if the error comes back.
81.What is Normalization?
When most people first start working with databases, the first instinct is to create massive tables for storing data — one place, one query — keeps things simple. However, as they grow to unmanageable levels, it is a good idea to look into Database Normalization. This idea allows for data to be split off into smaller more efficient tables that (hopefully) reduce the amount of duplicate data. In this way, smaller queries can be run on individual tables instead of having everybody always talking to one big one — thus improving performance.
82.For Microsoft SQL Server, what is a DMV?
Dynamic Management Views are functions built into Microsoft SQL Server that allow for troubleshooting, diagnostics and server health monitoring.
83.What are the default ports for MySQL, SQL Server and Oracle, and can/should this be changed?
The default port for MySQL is 3306, and can be changed in Windows as noted in this article or in *nix as noted in this article. The default port for Microsoft SQL Server is 1433, and can be changed as noted in this article. The default port for Oracle is 1521, and can be changed as noted in this article. Depending on your security stance, changing the port that your database server uses can be a good way to lower your profile and reduce the amount of unauthorized access attempts against the server.
84.For Microsoft SQL Server, What is Log Shipping?
A form of backup on Microsoft SQL Server, Log Shipping is similar to replication and allows for rapid failover if the main server goes down. One thing to bear in mind, however, is that a log shipping based failover must be activated manually; it will not switch over automatically.
85.For Microsoft SQL Server, what is DBCC?
Database Console Commands (DBCC) are a series of utilities for SQL Server designed for maintenance and reporting. A full list of the commands can be found here.
86.What is Cloud Computing?
Cloud Computing is usually a catch all term for data being stored “over there”. Placing high-requirement applications onto dedicated hosting services can be beneficial depending on the application, however it can also cause catastrophic security problems and availability issues. It is therefore highly recommended to keep important data in-house, and only outsource in situations that it cannot be avoided. Cloud Computing, Big Data and Data Mining are many times talked about in the same sentence since processing power required for one usually means the others become viable either as a requirement or a side effect.

 

 

SSIS SSRS SSAS Interview Questions

Top most important SSIS SSRS SSAS interview questions and answers by Experts:

Here is a list of Top most important SSIS SSRS SSAS interview questions and answers by Experts.If you want to download SSIS SSRS SSAS interview questions pdf free ,you can register with RVH techguru. Our experts prepared these SSIS SSRS SSAS interview questions to accommodate freshers level to most experienced level technical interviews.

If you want to become an expert in SSIS SSRS SSAS ,Register for SSIS SSRS SSAS online training here.

 

1.What do we mean by dataflow in SSIS?
Data flow is nothing but the flow of data from the corresponding sources to the referred destinations. In this process, the data transformations make changes to the data to make it ready for the data warehouse.
2•What is a breakpoint in SSIS? How is it setup? How do you disable it?
A breakpoint is a stopping point in the code. The breakpoint can give the Developer\DBA an
opportunity to review the status of the data, variables and the overall status of the SSIS package.
10 unique conditions exist for each breakpoint.
Breakpoints are setup in BIDS. In BIDS, navigate to the control flow interface. Right click on the
object where you want to set the breakpoint and select the ‘Edit Breakpoints…’ option.
3•Can you name 5 or more of the native SSIS connection managers?
1) OLEDB connection – Used to connect to any data source requiring an OLEDB connection (i.e.,
SQL Server 2000)
2) Flat file connection – Used to make a connection to a single file in the File System. Required for reading information from a File System flat file
3) ADO.Net connection – Uses the .Net Provider to make a connection to SQL Server 2005 or other
connection exposed through managed code (like C#) in a custom task
4) Analysis Services connection – Used to make a connection to an Analysis Services database or project. Required for the Analysis Services DDL Task and Analysis Services Processing Task
5) File connection – Used to reference a file or folder. The options are to either use or create a file or folder
6) Excel
4• What is the use of Bulk Insert Task in SSIS?
Bulk Insert Task is used to upload large amount of data from flat files into Sql Server. It supports only OLE DB connections for destination database.
5• What is Conditional Split transformation in SSIS?
This is just like IF condition which checks for the given condition and based on the condition evaluation, the output will be sent to the appropriate OUTPUT path. It has ONE input and MANY outputs. Conditional Split transformation is used to send paths to different outputs based on some conditions. For example, we can organize the transform for the students in a class who have marks greater than 40 to one path and the students who score less than 40 to another path.
6• How do you eliminate quotes from being uploaded from a flat file to SQL Server?
This can be done using TEXT QUALIFIER property. In the SSIS package on the Flat File Connection Manager Editor, enter quotes into the Text qualifier field then preview the data to ensure the quotes are not included.
7• Can you explain how to setup a checkpoint file in SSIS?
The following items need to be configured on the properties tab for SSIS package:
CheckpointFileName – Specify the full path to the Checkpoint file that the package uses to save the value of package variables and log completed tasks. Rather than using a hard-coded path as shown above, it’s a good idea to use an expression that concatenates a path defined in a package variable and the package name.
CheckpointUsage – Determines if/how checkpoints are used. Choose from these options: Never(default), IfExists, or Always. Never indicates that you are not using Checkpoints. IfExists is the typical setting and implements the restart at the point of failure behavior. If a Checkpoint file is found it is used to restore package variable values and restart at the point of failure. If a Checkpoint file is not found the package starts execution with the first task. The Always choice raises an error if the Checkpoint file does not exist.
SaveCheckpoints – Choose from these options: True or False (default). You must select True to implement the Checkpoint behavior.
8• What are the different values you can set for CheckpointUsage property ?
There are three values, which describe how a checkpoint file is used during package execution:
1) Never: The package will not use a checkpoint file and therefore will never restart.
2) If Exists: If a checkpoint file exists in the place you specified for the CheckpointFilename property, then it will be used, and the package will restart according to the checkpoints written.
3) Always: The package will always use a checkpoint file to restart, and if one does not exist, the package will fail.
9• What is the ONLY Property you need to set on TASKS in order to configure CHECKPOINTS to RESTART package from failure?
The one property you have to set on the task is FailPackageOnFailure. This must be set for each task or container that you want to be the point for a checkpoint and restart. If you do not set this property to true and the task fails, no file will be written, and the next time you invoke the package, it will start from the beginning again.
10• Where can we set the CHECKPOINTS, in DataFlow or ControlFlow ?
Checkpoints only happen at the Control Flow; it is not possible to checkpoint transformations or restart inside a Data Flow. The Data Flow Task can be a checkpoint, but it is treated as any other task.
11• Can you explain different options for dynamic configurations in SSIS?
1) XML file
2) custom variables
3) Database per environment with the variables
4) Use a centralized database with all variables
12• What is the use of Percentage Sampling transformation in SSIS?
Percentage Sampling transformation is generally used for data mining. This transformation builds a random sample of set of output rows by choosing specified percentage of input rows. For example if the input has 1000 rows and if I specify 10 as percentage sample then the transformation returns 10% of the RANDOM records from the input data.
13• What is the use of Term Extraction transformation in SSIS?
Term Extraction transformation is used to extract nouns or noun phrases or both noun and noun phrases only from English text. It extracts terms from text in a transformation input column and then writes the terms to a transformation output column. It can be also used to find out the content of a dataset.
14• What is Data Viewer and what are the different types of Data Viewers in SSIS?
A Data Viewer allows viewing data at a point of time at runtime. If data viewer is placed before and after the Aggregate transform, we can see data flowing to the transformation at the runtime and how it looks like after the transformation occurred. The different types of data viewers are:
1. Grid
2. Histogram
3. Scatter Plot
4. Column Chart.
15• What is Ignore Failure option in SSIS?
In Ignore Failure option, the error will be ignored and the data row will be directed to continue on the next transformation. Let’s say you have some JUNK data(wrong type of data or JUNK data) flowing from source, then using this option in SSIS we can REDIRECT the junk data records to another transformation instead of FAILING the package. This helps to MOVE only valid data to destination and JUNK can be captured into separate file.
16• Which are the different types of Control Flow components in SSIS?
The different types of Control Flow components are: Data Flow Tasks, SQL Server Tasks, Data Preparation Tasks, Work flow Tasks, Scripting Tasks, Analysis Services Tasks, Maintenance Tasks, Containers.
17• What are containers? What are the different types of containers in SSIS?
Containers are objects that provide structures to packages and extra functionality to tasks. There are four types of containers in SSIS, they are: Foreach Loop Container, For Loop Container, Sequence Container and Task Host Container.
18• What are the different types of Data flow components in SSIS?
There are 3 data flow components in SSIS.
1. Sources
2. Transformations
3. Destinations
19• What are the different types of data sources available in SSIS?
There are 7 types of data sources provided by SSIS: a.) Data Reader source b.) Excel source c.) Flat file source d.) OLEDB source e.) Raw file source f.) XML source g.) Script component
20• What is SSIS Designer?
It is a graphical tool for creating packages. It has 4 tabs: Control Flow, Data Flow, Event Handlers and Package Explorer.
21• What is Control Flow tab?
It is the tab in SSIS designer where various Tasks can be arranged and configured. This is the tab where we provide and control the program flow of the project.
22• What is Data Flow tab?
This is the tab where we do all the work related to ETL job. It is the tab in SSIS Designer where we can extract data from sources, transform the data and then load them into destinations.
23• What is the function of control flow tab in SSIS?
On the control flow tab, the tasks including dataflow task, containers and precedence constraints that connect containers and tasks can be arranged and configured.
24• What is the function of Event handlers tab in SSIS?
On the Event handlers tab, workflows can be configured to respond to package events.
For example, we can configure Work Flow when ANY task Failes or Stops or Starts ..
25• What is the function of Package explorer tab in SSIS?
This tab provides an explorer view of the package. You can see what is happening in the package. The Package is a container at the top of the hierarchy.
26• What is Solution Explorer?
It is a place in SSIS Designer where all the projects, Data Sources, Data Source Views and other miscellaneous files can be viewed and accessed for modification.
27• How do we convert data type in SSIS?
The Data Conversion Transformation in SSIS converts the data type of an input column to a different data type.
28• How are variables useful in ssis package?
Variables can provide communication among objects in the package. Variables can provide communication between parent and child packages. Variables can also be used in expressions and scripts. This helps in providing dynamic values to tasks.
29• Explain Aggregate Transformation in SSIS?
It aggregates data, similar you do in applying TSQL functions like Group By, Min, Max, Avg, and Count. For example you get total quantity and Total line item for each product in Aggregate Transformation Editor. First you determine input columns, then output column name in Output Alias table in datagrid, and also operations for each Output Alias in Operation columns of the same datagrid. Some of operation functions listed below :
• Group By
• Average
• Count
• Count Distinct : count distinct and non null column value
• Min, Max, Sum
In Advanced tab, you can do some optimization here, such as setting up Key Scale option (low, medium, high), Count Distinct scale option (low, medium, high), Auto Extend factor and Warn On Division By Zero. If you check Warn On Division By Zero, the component will give warning instead of error. Key Scale option will optimize transformation cache to certain number of key threshold. If you set it low, optimization will target to 500,000 keys written to cache, medium can handle up to 5 million keys, and high can handle up to 25 million keys, or you can specify particular number of keys here. Default value is unspecified. Similar to number of keys for Count Distinct scale option. It is used to optimize number of distinct value written to memory, default value is unspecified. Auto Extend Factor is used when you want some portion of memory is used for this component. Default value is 25% of memory.
30• Explain Audit Transformation ?
It allows you to add auditing information as required in auditing world specified by HIPPA and Sarbanes-Oxley (SOX). Auditing options that you can add to transformed data through this transformation are :
1. Execution of Instance GUID : ID of execution instance of the package
2. PackageID : ID of the package
3. PackageName
4. VersionID : GUID version of the package
5. Execution StartTime
6. MachineName
7. UserName
8. TaskName
9. TaskID : uniqueidentifier type of the data flow task that contains audit transformation.
31• Explain Character Map Transformation?
It transforms some character. It gives options whether output result will override the existing column or add to new column. If you define it as new column, specify new column name. Operations available here are:
1. Uppercase
2. Lowercase
3. Byte reversal : such as from 0×1234 to 0×4321
4. Full width
5. Half width
6. Hiragana/katakana/traditional Chinese/simplified Chinese
7. Linguistic casing
32• Explain Conditional split Transformation ?
It functions as if…then…else construct. It enables send input data to a satisfied conditional branch. For example you want to split product quantity between less than 500 and greater or equal to 500. You can give the conditional a name that easily identifies its purpose. Else section will be covered in Default Output Column name.
After you configure the component, it connect to subsequent transformation/destination, when connected, it pops up dialog box to let you choose which conditional options will apply to the destination transformation/destination.
33• Explain Copy column Transformation?
This component simply copies a column to another new column. Just like ALIAS Column in T-Sql.
34• Explain Data conversion Transformation?
This component does conversion data type, similar to TSQL function CAST or CONVERT. If you wish to convery the data from one type to another then this is the best bet. But please make sure that you have COMPATABLE data in the column.
35• Explain Data Mining query Transformation?
This component does prediction on the data or fills gap on it. Some good scenarios uses this component is:
1. Take some input columns as number of children, domestic income, and marital income to predict whether someone owns a house or not.
2. Take prediction what a customer would buy based analysis buying pattern on their shopping cart.
3. Filling blank data or default values when customer doesn’t fill some items in the questionnaire.
36• Explain Derived column Transformation?
Derived column creates new column or put manipulation of several columns into new column. You can directly copy existing or create a new column using more than one column also.
37• Explain Merge Transformation?
Merge transformation merges two paths into single path. It is useful when you want to break out data into path that handles errors after the errors are handled, the data are merge back into downstream or you want to merge 2 data sources. It is similar with Union All transformation, but Merge has some restrictions :
1. Data should be in sorted order
2. Data type , data length and other meta data attribute must be similar before merged.
38• Explain Merge Join Transformation?
Merge Join transformation will merge output from 2 inputs and doing INNER or OUTER join on the data. But if you the data come from 1 OLEDB data source, it is better you join through SQL query rather than using Merge Join transformation. Merge Join is intended to join 2 different data source.
39• Explain Multicast Transformation?
This transformation sends output to multiple output paths with no conditional as Conditional Split does. Takes ONE Input and makes the COPY of data and passes the same data through many outputs. In simple Give one input and take many outputs of the same data.
40• Explain Percentage and row sampling Transformations?
This transformation will take data from source and randomly sampling data. It gives you 2 outputs. First is selected data and second one is unselected data. It is used in situation where you train data mining model. These two are used to take the SAMPLE of data from the input data.
41• Explain Sort Transformation?
This component will sort data, similar in TSQL command ORDER BY. Some transformations need sorted data.
42• Explain Union all Transformation?
It works in opposite way to Merge transformation. It can take output from more than 2 input paths and combines into single output path.
43• What r the possible locations to save SSIS package?
You can save a package wherever you want.
SQL Server
Package Store
File System
44• What is a package?
A discrete executable unit of work composed of a collection of control flow and other objects, including data sources, transformations, process sequence, and rules, errors and event handling, and data destinations.
45• What is a workflow in SSIS?
A workflow is a set of instructions on how to execute tasks.
(It is a set of instructions on how to execute tasks such as sessions, emails and shell commands. a workflow is created form work flow mgr.
46• What is the diff between control flow Items and data flow Items?
The control flow is the highest level control process. It allows you to manage the run-time process activities of data flow and other processes within a package.
When we want to extract, transform and load data within a package. You add an SSIS dataflow task to the package control flow.
47• What are the main component of SSIS(project-architecture)?
SSIS archItecture has 4 main components
1.ssis service
2.ssis runtime engine & runtime executables
3.ssis dataflow engine & dataflow components
4.ssis clients
48• Different components in SSIS package?
Control flow
Data flow
Event handler
Package explorer
49• What are Connection Managers?
It is a bridge b/w package object and physical data. It provides logical representation of a connection at design time the properties of the connection mgr describes the physical connection that integration services creates when the package is run.
50• What is environment variable in SSIS?
An environment variable configuration sets a package property equal to the value in an environment variable.
Environmental configurations are useful for configuring properties that are dependent on the computer that is executing the package.
51• How to provide securIty to packages?
We can provide security in two ways
1. Package encryption
2. Password protection.
52• What are Precedence constraints?
Constraints that link executable, container, and tasks wIthin the package control flow and specify condItion that determine the sequence and condItions for determine whether executable run.
53• What is Design time Deployment in SSIS ?
When you run a package from with in BIDS,it is built and temporarily deployed to the folder. By default the package will be deployed to the BIN folder in the Package’s Project folder and you can configure for custom folder for deployment. When the Package’s execution is completed and stopped in BIDS,the deployed package will be deleted and this is called as Design Time Deployment.

54. Explain architecture of SSIS?
SSIS architecture consists of four key parts:
a) Integration Services service: monitors running Integration Services packages and manages the storage of packages.
b) Integration Services object model: includes managed API for accessing Integration Services tools, command-line utilities, and custom applications.
c) Integration Services runtime and run-time executables: it saves the layout of packages, runs packages, and provides support for logging, breakpoints, configuration, connections, and transactions. The Integration Services run-time executables are the package, containers, tasks, and event handlers that Integration Services includes, and custom tasks.
d) Data flow engine: provides the in-memory buffers that move data from source to destination.
55.How would you do Logging in SSIS?
Logging Configuration provides an inbuilt feature which can log the detail of various events like onError, onWarning etc to the various options say a flat file, SqlServer table, XML or SQL Profiler.

56. How would you do Error Handling?
A SSIS package could mainly have two types of errors
a) Procedure Error: Can be handled in Control flow through the precedence control and redirecting the execution flow.
b) Data Error: is handled in DATA FLOW TASK buy redirecting the data flow using Error Output of a component.

57. How to pass property value at Run time? How do you implement Package Configuration?
A property value like connection string for a Connection Manager can be passed to the pkg using package configurations.Package Configuration provides different options like XML File, Environment Variables, SQL Server Table, Registry Value or Parent package variable.

58. How would you deploy a SSIS Package on production?
A) Through Manifest
1. Create deployment utility by setting its propery as true .
2. It will be created in the bin folder of the solution as soon as package is build.
3. Copy all the files in the utility and use manifest file to deply it on the Prod.
B) Using DtsExec.exe utility
C)Import Package directly in MSDB from SSMS by logging in Integration Services.

59. Difference between DTS and SSIS?
Every thing except both are product of Microsoft.

60. What is Execution Tree?

Execution trees demonstrate how package uses buffers and threads. At run time, the data flow engine breaks down Data Flow task operations into execution trees. These execution trees specify how buffers and threads are allocated in the package. Each tree creates a new buffer and may execute on a different thread. When a new buffer is created such as when a partially blocking or blocking transformation is added to the pipeline, additional memory is required to handle the data transformation and each new tree may also give you an additional worker thread.

61. Difference between Unionall and Merge Join?

a) Merge transformation can accept only two inputs whereas Union all can take more than two inputs

b) Data has to be sorted before Merge Transformation whereas Union all doesn’t have any condition like that.

62. May get question regarding what X transformation do?

Lookup, fuzzy lookup, fuzzy grouping transformation are my favorites.
For you.

63.How would you restart package from previous failure point?What are Checkpoints and how can we implement in SSIS?
When a package is configured to use checkpoints, information about package execution is written to a checkpoint file. When the failed package is rerun, the checkpoint file is used to restart the package from the point of failure. If the package runs successfully, the checkpoint file is deleted, and then re-created the next time that the package is run.

64. Where are SSIS package stored in the SQL Server?
MSDB.sysdtspackages90 stores the actual content and ssydtscategories, sysdtslog90, sysdtspackagefolders90, sysdtspackagelog, sysdtssteplog, and sysdtstasklog do the supporting roles.

65.How would you schedule a SSIS packages?
Using SQL Server Agent. Read about Scheduling a job on Sql server Agent

66. Difference between asynchronous and synchronous transformations?
Asynchronous transformation have different Input and Output buffers and it is up to the component designer in an Async component to provide a column structure to the output buffer and hook up the data from the input.

67. How to achieve parallelism in SSIS?
Parallelism is achieved using MaxConcurrentExecutable property of the package. Its default is -1 and is calculated as number of processors + 2.

-More questions added-Sept 2011
68. How do you do incremental load?
Fastest way to do incremental load is by using Timestamp column in source table and then storing last ETL timestamp, In ETL process pick all the rows having Timestamp greater than the stored Timestamp so as to pick only new and updated records

69. How to handle Late Arriving Dimension or Early Arriving Facts.

Late arriving dimensions sometime get unavoidable ‘coz delay or error in Dimension ETL or may be due to logic of ETL. To handle Late Arriving facts, we can create dummy Dimension with natural/business key and keep rest of the attributes as null or default. And as soon as Actual dimension arrives, the dummy dimension is updated with Type 1 change. These are also known as Inferred Dimensions.

70. WHAT is SQL Server Reporting Services(SSRS)?
SQL Server Reporting Services is a server-based reporting platform that you can use to create and manage tabular, matrix, graphical, and free-form reports that contain data from relational and multidimensional data sources. The reports that you create can be viewed and managed over a World Wide Web-based connection
71. What are the three stages of Enterprise Reporting Life Cycle ?
a. Authoring
b. Management
c. Access and Delivery

72. What are the components included in SSRS?
1. A Complete set of Tools that can be used to create, manage and view reports
2. A Report Server component that hosts and processes reports in a variety of formats. Output formats include HTML, PDF, TIFF, Excel, CSV, and more.
3.An API that allows developers to integrate or extend data and report processing in custom applications, or create custom tools to build and manage reports.

73. What is the benefit of using embedded code in a report?
1. Reuseability of Code: function created in embedded code to perform a logic can be then used in multiple expressions
2. Centralized code: helps in better manageability of code.
74. Which programming language can be used to code embedded functions in SSRS?
Visual Basic .NET Code.

75. Important terms used in the reporting services?

1. Report definition: The blueprint for a report before the report is processed or rendered. A report definition contains information about the query and layout for the report.

2. Report snapshot: A report that contains data captured at a specific point in time. A report snapshot is actually a report definition that contains a dataset instead of query instructions.

3. Rendered report: A fully processed report that contains both data and layout information, in a format suitable for viewing (such as HTML).

4. Parameterized report: A published report that accepts input values through parameters.

5. Shared data source: A predefined, standalone item that contains data source connection information.

6. Shared schedule: A predefined, standalone item that contains schedule information.

7. Report-specific data source: Data source information that is defined within a report definition.

8. Report model: A semantic description of business data, used for ac hoc reports created in Report Builder.

9. Linked report: A report that derives its definition through a link to another report.

10. Report server administrator: This term is used in the documentation to describe a user with elevated privileges who can access all settings and content of a report server. If you are using the default roles, a report server administrator is typically a user who is assigned to both the Content Manager role and the System Administrator role. Local administrators can have elevated permission even if role assignments are not defined for them.

11. Folder hierarchy: A bounded namespace that uniquely identifies all reports, folders, report models, shared data source items, and resources that are stored in and managed by a report server.
12. Report Server: Describes the Report Server component, which provides data and report processing, and report delivery. The Report Server component includes several subcomponents that perform specific functions.

13. Report Manager: Describes the Web application tool used to access and manage the contents of a report server database.

14. Report Builder: Report authoring tool used to create ad hoc reports.

15. Report Designer: Report creation tool included with Reporting Services.

16. Model Designer: Report model creation tool used to build models for ad hoc reporting.

17. Report Server Command Prompt Utilities: Command line utilities that you can use to administer a report server.
a) RsConfig.exe, b) RsKeymgmt.exe, c) Rs.exe

76. what are the Command Line Utilities available In Reporting Services?
• Rsconfig Utility (Rsconfig.exe): encrypts and stores connection and account values in the RSReportServer.config file. Encrypted values include report server database connection information and account values used for unattended report processing
• RsKeymgmt Utility: Extracts, restores, creates, and deletes the symmetric key used to protect sensitive report server data against unauthorized access
• RS Utility: this utility is mainly used to automate report server deployment and administration tasks.Processes script you provide in an input file.

77. What is difference between Tablular and Matrix report?

Tablular report: A tabular report is the most basic type of report. Each column corresponds to a column selected from the database.

Matrix report: A matrix (cross-product) report is a cross-tabulation of four groups of data:
a. One group of data is displayed across the page.
b. One group of data is displayed down the page.
c. One group of data is the cross-product, which determines all possible locations where the across and down data relate and places a cell in those locations.
d. One group of data is displayed as the “filler” of the cells.
Martix reports can be considered more of a Pivot table.

78. How to create Drill-through reports?
Using Navigation property of a cell and setting child report and its parameters in it.

79. How to create Drill-Down reports?
To cut the story short:
– By grouping data on required fields
-Then toggle visibility based on the grouped filed

80. What is Query parameter in SSRS?
Query parameters is mentioned in the query of the datasources that are to be included into the SQL script’s WHERE clause of the SQL that can accept parameters. Query parameters begin with the symbol @.The name should not contain spaces and can not begin with numeral. For clarity, we use only letters.
81. What are the Reporting Service Components in SSRS?
Report Designer: A place where we can create report. Report Server: Provides services for implementation and delivery of reports. Report Manager: A Web-based administration tool for managing the Report Server.
82. What is a matrix in SSRS?
 A matrix is a data region linked to a report set. Matrix allows us to create crosstab reports with the report variables displaying on rows and columns. It allows us to drag and drop fields into it.
83. What are sub reports and how to create them?
A sub report is like any other reports which can be called in main report and can be generate through main report. Parameters can be passed from main report to sub report and basis of that report can be generated.
84. What is the report model project?
Report model project is for creating Adhoc reporting. You can create the adhoc reports through report builder. Report model project can be created on bids or report server. This model can have simple view. And using
85. What is report server project?
Report Server Project contains the RDL file and it need to be deployed on report server to view the report files to application and user. It a solution where we design our reports. You can add it by going into BIDS clicking on new item and then selecting reports server project. Once the solution is created you can start creating reports.
86. What is the report builder?
Report builder is used to create small reports and it a define interface. You can’t change the report interface in report builder it pre designed. You can just drag columns in the report. Report builder creates reports on database objects available with report model project.
87.In which SQL Server version report builder introduced?
Report builder introduced in SQL Server 2005. While creating or deploying report model project on report server you can get error or it might not get created. For this you need to check whether the service pack 22 is installed or not.

88. How to deploy the Report?
Report can be deployed in three ways.
1. Using visual studio: In visual studio you can directly deploy the report through solution explorer by providing the report server URL in project properties at Target Server URL. This will deploy entire project or single report as per you selection.
2. Using report server: Can directly go to the report server and deploy the report by browsing the report from the disk location on server.
3. Creating the utility: SQL server provides the utility using that which can be used to create a customize utility for your report deployment in bulk.
89. What is RS.exe utility?
Rs.exe utility is used for deploying the report on report server. It comes with the report server and can be customize accordingly.
90. What is the name of reporting services config file and what’s it’s used for?
Reporting service config file is used for report configuration details. It contains the report format and also the report import types. Report service config reside at ISS.
91.What are the three different part of RDL file explain them?
In visual studio RDL files has three parts.
1. Data: It contains the dataset on which we write the query. Data set is connected with data source.
2. Design: In design you can design report. Can create tables and matrix reports. Drag columns values from source.
3. Preview: to check the preview after the report run.
92. Which language rdl files made of?
RDL files are written in XML.
93.What is the chart in report?
 Chart reports are for graphical representation. You can get pie charts columns harts and various other options. 3d charts are also available in reporting services.
94. What is Data Set in report?
Data set are the set of data which we want to show in report. Data creates on data source. Data source is the source of data from where we are getting this data i.e. database server and database name connection string.
95. What are the different types of data sources in SSRS?
SSRS use different data source. Some of them are listed below.
1. Microsoft SQL Server
2. OLEDB
3. Oracle
4. ODBC
5. SQL Server Analysis Service
6. Report Server Model
7. SAP Net weaver BI
8. Hyperion
9. Teradata
10. XML
96. What is the web service used for reporting services?
Reporting Service Web Service used in SSRS. By accessing this web service you can access all report server component and also get the report deployed on report server.
97. How to add the custom code in Report?
To add the custom codes in report go to report tab on top then properties and there you will find the options for custom code.
98. What is a cache in SSRS?
Report server can lay up a copy of processed report in a memory and return the copy when a user opens the report. This server memory is known as cache and the process is called caching.

 

 

ASP .NET Interview Questions

Top most important ASP.Net interview questions and answers by Experts:

Here is a list of Top most important ASP.Net interview questions and answers by Experts.If you want to download ASP.Net interview questions pdf free ,you can register with RVH techguru. Our experts prepared these ASP.Net interview questions to accommodate freshers level to most experienced level technical interviews.

If you want to become an expert in ASP.Net ,Register for ASP.Net online training here.

 
1. What is ASP?
Active Server Pages (ASP), also known as Classic ASP, is a Microsoft’s server-side technology, which helps in creating dynamic and user-friendly Web pages. It uses different scripting languages to create dynamic Web pages, which can be run on any type of browser. The Web pages are built by using either VBScript or JavaScript and these Web pages have access to the same services as Windows application, including ADO (ActiveX Data Objects) for database access, SMTP (Simple Mail Transfer Protocol) for e-mail, and the entire COM (Component Object Model) structure used in the Windows environment. ASP is implemented through a dynamic-link library (asp.dll) that is called by the IIS server when a Web page is requested from the server.
2. What is ASP.NET?
ASP.NET is a specification developed by Microsoft to create dynamic Web applications, Web sites, and Web services. It is a part of .NET Framework. You can create ASP.NET applications in most of the .NET compatible languages, such as Visual Basic, C#, and J#. The ASP.NET compiles the Web pages and provides much better performance than scripting languages, such as VBScript. The Web Forms support to create powerful forms-based Web pages. You can use ASP.NET Web server controls to create interactive Web applications. With the help of Web server controls, you can easily create a Web application.
3. What is the basic difference between ASP and ASP.NET?
The basic difference between ASP and ASP.NET is that ASP is interpreted; whereas, ASP.NET is compiled. This implies that since ASP uses VBScript; therefore, when an ASP page is executed, it is interpreted. On the other hand, ASP.NET uses .NET languages, such as C# and VB.NET, which are compiled to Microsoft Intermediate Language (MSIL).
4. In which event are the controls fully loaded?
Page load event guarantees that all controls are fully loaded. Controls are also accessed in Page_Init events but you will see that view state is not fully loaded during this event
5. How can we identify that the Page is Post Back?
Page object has an “IsPostBack” property, which can be checked to know that is the page posted back.
6. What is the lifespan for items stored in ViewState?
The items stored in ViewState live until the lifetime of the current page expires including the postbacks to the same page.
7. How information about the user’s locale can be accessed?
The information regarding a user’s locale can be accessed by using the System.Web.UI.Page.Culture property.
8. What is the difference between SQL notification and SQL invalidation?
The SQL cache notification generates notifications when the data of a database changes, on which your cache item depends. The SQL cache invalidation makes a cached item invalid when the data stored in a SQL server database changes.
9. Which is the parent class of the Web server control?
The System.Web.UI.Control class is the parent class for all Web server controls.
10. Can you set which type of comparison you want to perform by the CompareValidator control?
Yes, by setting the Operator property of the CompareValidator control.
11. What is the behavior of a Web browser when it receives an invalid element?
The behavior of a Web browser when it receives an invalid element depends on the browser that you use to browse your application. Most of the browsers ignore the invalid element; whereas, some of them display the invalid elements on the page.
12. What are the advantages of the code-behind feature?
The code-behind feature of ASP.NET offers a number of advantages:
• Makes code easy to understand and debug by separating application logic from HTML tags
• Provides the isolation of effort between graphic designers and software engineers
• Removes the problems of browser incompatibility by providing code files to exist on the Web server and supporting Web pages to be compiled on demand.
13. How do you sign out from forms authentication?
• The FormsAuthentication.Signout() method is used to sign out from the forms authentication.
14. What is AutoPostBack?
• If you want a control to postback automatically when an event is raised, you need to set the AutoPostBack property of the control to True.
15. What is the function of the ViewState property?
• The ASP.NET 4.0 introduced a new property called ViewStateMode for the Control class. Now you can enable the view state to an individual control even if the view state for an ASP.NET page is disabled.
16. Why do you use the App_Code folder in ASP.NET?
• The App_Code folder is automatically present in the project. It stores the files, such as classes, typed data set, text files, and reports. If this folder is not available in the application, you can add this folder. One of the important features of the App_Code folder is that only one dll is created for the complete folder, irrespective of how many files it contains.
17. Define a multilingual Web site.
• A multilingual Web site serves content in a number of languages. It contains multiple copies for its content and other resources, such as date and time, in different languages.
18. What is an ASP.NET Web Form?
• ASP.NET Web forms are designed to use controls and features that are almost as powerful as the ones used with Windows forms, and so they are called as Web forms. The Web form uses a server-side object model that allows you to create functional controls, which are executed on the server and are rendered as HTML on the client. The attribute,runat=”server”, associated with a server control indicates that the Web form must be processed on the server.
19. What is the difference between a default skin and a named skin?
The default skin is applied to all the Web server controls in a Web form, which are of similar type, and it does not provide a Skin ID attribute. The named skin provides a Skin ID attribute and users have to set the Skin ID property to apply it.
20. What is IIS? Why is it used?
Internet Information Services (IIS) is created by Microsoft to provide Internet-based services to ASP.NET Web applications. It makes your computer to work as a Web server and provides the functionality to develop and deploy Web applications on the server. IIS handles the request and response cycle on the Web server. It also offers the services of SMTP and FrontPage server extensions. The SMTP is used to send emails and use FrontPage server extensions to get the dynamic features of IIS, such as form handler.
21. What is Query String? What are its advantages and limitations?
The Query String helps in sending the page information to the server.

The Query String has the following advantages:
• Every browser works with Query Strings.
• It does not require server resources and so does not exert any kind of burden on the server.

The following are the limitations of Query String:
• Information must be within the limit because URL does not support many characters.
• Information is clearly visible to the user, which leads to security threats.
22. What is actually returned from server to the browser when a browser requests an .aspx file and the file is displayed?
When a browser requests an .aspx file then the server returns a response, which is rendered into a HTML string.
23. How can you display all validation messages in one control?
The ValidationSummary control displays all validation messages in one control.
24. Which two new properties are added in ASP.NET 4.0 Page class?
The two new properties added in the Page class are MetaKeyword and MetaDescription.
25. What is tracing? Where is it used?
Tracing displays the details about how the code was executed. It refers to collecting information about the application while it is running. Tracing information can help you to troubleshoot an application. It enables you to record information in various log files about the errors that might occur at run time. You can analyze these log files to find the cause of the errors.

In .NET, we have objects called Trace Listeners. A listener is an object that gets the trace output and stores it to different places, such as a window, a file on your locale drive, or a SQL Server.

The System.Diagnostics namespace contains the predefined interfaces, classes, and structures that are used for tracing. It supplies two classes, Trace and Debug, which allow you to write errors and logs related to the application execution. Trace listeners are objects that collect the output of tracing processes.
26. What is the difference between authentication and authorization?
Authentication verifies the identity of a user and authorization is a process where you can check whether or not the identity has access rights to the system. In other words, you can say that authentication is a procedure of getting some credentials from the users and verify the user’s identity against those credentials. Authorization is a procedure of granting access of particular resources to an authenticated user. You should note that authentication always takes place before authorization.
27. How can you register a custom server control to a Web page?
You can register a custom server control to a Web page using the @Register directive.
28. Which ASP.NET objects encapsulate the state of the client and the browser?
The Session object encapsulates the state of the client and browser.
29. Differentiate globalization and localization.
The globalization is a technique to identify the specific part of a Web application that is different for different languages and make separate that portion from the core of the Web application. The localization is a procedure of configuring a Web application to be supported for a specific language or locale.

30. What is ViewState?
The ViewState is a feature used by ASP.NET Web page to store the value of a page and its controls just before posting the page. Once the page is posted, the first task by the page processing is to restore the ViewState to get the values of the controls.
31. Which method is used to force all the validation controls to run?
The Page.Validate() method is used to force all the validation controls to run and to perform validation.
32. Which method has been introduced in ASP.NET 4.0 to redirect a page permanently?
The RedirectPermanent() method added in ASP.NET 4.0 to redirect a page permanently. The following code snippet is an example of the RedirectPermanent() method:

RedirectPermanent(“/path/Aboutus.aspx”);
33. How can you send an email message from an ASP.NET Web page?
You can use the System.Net.Mail.MailMessage and the System.Net.Mail.SmtpMail classes to send an email in your Web pages. In order to send an email through your mail server, you need to create an object of theSmtpClient class and set the server name, port, and credentials.
34. What is the difference between the Response.Write() and Response.Output.Write() methods?
The Response.Write() method allows you to write the normal output; whereas, the Response.Output.Write()method allows you to write the formatted output.
35. What does the Orientation property do in a Menu control?
Orientation property of the Menu control sets the horizontal or vertical display of a menu on a Web page. By default, the orientation is vertical.
36. Differentiate between client-side and server-side validations in Web pages.
Client-side validations take place at the client end with the help of JavaScript and VBScript before the Web page is sent to the server. On the other hand, server-side validations take place at the server end.
37. How does a content page differ from a master page?
A content page does not have complete HTML source code; whereas a master page has complete HTML source code inside its source file.
38. Suppose you want an ASP.NET function (client side) executed on the MouseOver event of a button. Where do you add an event handler?
The event handler is added to the Add() method of the Attributes property.
39. What is the default timeout for a Cookie?
The default time duration for a Cookie is 30 minutes.
40. What are HTTP handlers in ASP.NET?
HTTP handlers, as the name suggests, are used to handle user requests for Web application resources. They are the backbone of the request-response model of Web applications. There is a specific event handler to handle the request for each user request type and send back the corresponding response object.

Each user requests to the IIS Web server flows through the HTTP pipeline, which refers to a series of components (HTTP modules and HTTP handlers) to process the request. HTTP modules act as filters to process the request as it passes through the HTTP pipeline. The request, after passing through the HTTP modules, is assigned to an HTTP handler that determines the response of the server to the user request. The response then passes through the HTTP modules once again and is then sent back to the user.

You can define HTTP handlers in the <httpHandlers> element of a configuration file. The <add> element tag is used to add new handlers and the <remove> element tag is used to remove existing handlers. To create an HTTP handler, you need to define a class that implements the IHttpHandler interface.
41. What are the events that happen when a client requests an ASP.NET page from IIS server?
The following events happen when a client requests an ASP.NET page from the IIS server:
1. User requests for an application resource.
2. The integrated request-processing pipeline receives the first user request.
3. Response objects are created for each user request.
4. An object of the HttpApplication class is created and allocated to the Request object.
5. The HttpApplication class processes the user request.
42. Explain file-based dependency and key-based dependency.
In file-based dependency, you have to depend on a file that is saved in a disk. In key-based dependency, you have to depend on another cached item.
43. How can you implement the postback property of an ASP.NET control?
You need to set the AutoPostBack property to True to implement the PostBack property of controls.
44. Explain how Cookies work. Give an example of Cookie abuse.
The server tells the browser to put some files in a cookie, and the client then sends all the cookies for the domain in each request. An example of cookie abuse is large cookies affecting the network traffic.

45. Explain login controls.
Login controls are built-in controls in ASP.Net for providing a login solution to ASP.NET application. The login controls use the membership system to authenticate a user credentials for a Web site.

There are many controls in login controls.
• ChangePassword control – Allows users to change their password.
• CreateUserWizard control – Provides an interface to the user to register for that Web site.
• Login control – Provides an interface for user authentication. It consists of a set of controls, such asTextBox, Label, Button, CheckBox, HyperLink.
• LoginView control – Displays appropriate information to different users according to the user’s status.
• LoginStatus control – Shows a login link to users, who are not authenticated and logout link, who are authenticated
• LoginName control – Displays a user name, if the user logs in.
• PasswordRecovery control – Allows users to get back the password through an e-mail, if they forget.
46. What is the use of PlaceHolder control? Can we see it at runtime?
The PlaceHolder control acts as a container for those controls that are dynamically generated at runtime. We cannot see it at runtime because it does not produce any visible output. It used only as a container.
47. What setting must be added in the configuration file to deny a particular user from accessing the secured resources?
To deny a particular user form accessing the secured resources, the web.config file must contain the following code:

<authorization >
<deny users=”username” />
</authorization>
48. What are the event handlers that can be included in the Global.asax file?
The Global.asax file contains some of the following important event handlers:
• Application_Error
• Application_Start
• Application_End
• Session_Start
• Session_End
49. What is the difference between page-level caching and fragment caching?
In the page-level caching, an entire Web page is cached; whereas, in the fragment caching, a part of the Web page, such as a user control added to the Web page, is cached.

50. Make a list of all templates of the Repeater control.
The Repeater control contains the following templates:
• ItemTemplate
• AlternatingltemTemplate
• SeparatorTemplate
• HeaderTemplate
• FooterTemplate
51. Describe the complete lifecycle of a Web page.
When we execute a Web page, it passes from the following stages, which are collectively known as Web page lifecycle:
• Page request – During this stage, ASP.NET makes sure the page either parsed or compiled and a cached version of the page can be sent in response
• Start – During this stage sets the Request and Response page properties and the page check the page request is either a postback or a new request
• Page Initialization – During this stage, the page initialize and the control’s Unique Id property are set
• Load – During this stage, if the request is postback, the control properties are loaded without loading the view state and control state otherwise loads the view state
• Validation – During this stage, the controls are validated
• Postback event handling – During this stage, if the request is a postback, handles the event
• Rendering – During this stage, the page invokes the Render method to each control for return the output
• Unload – During this stage, when the page is completely rendered and sent to the client, the page is unloaded.
52. How can you assign page specific attributes in an ASP.NET application?
The @Page directive is responsible for this.
53. Which method is used to post a Web page to another Web page?
The Respose.Redirect method is used to post a page to another page, as shown in the following code snippet:Response.Redirect(“DestinationPageName.aspx”);
54. What is a Cookie? Where is it used in ASP.NET?
Cookie is a lightweight executable program, which the server posts to client machines. Cookies store the identity of a user at the first visit of the Web site and validate them later on the next visits for their authenticity. The values of a cookie can be transferred between the user’s request and the server’s response.
55. What are Custom User Controls in ASP.NET?
The custom user controls are the controls that are defined by developers. These controls are a mixture of custom behavior and predefined behavior. These controls work similar to other Web server controls.
56. What does the .WebPart file do?
The .WebPart file explains the settings of a Web Parts control that can be included to a specified zone on a Web page.
57. How can you enable impersonation in the web.config file?
To enable impersonation in the web.confing file, you need to include the <identity> element in the web.configfile and set the impersonate attribute to true as shown in the following code snippet:
<identity impersonate = “true” />
58. How can you identify that the page is PostBack?
The Page object uses the IsPostBack property to check whether the page is posted back or not. If the page is postback, this property is set to true.
59. In which database is the information, such as membership, role management, profile, and Web parts personalization, stored?
The aspnetdb database stores all information.
60. What is State Management? How many ways are there to maintain a state in .NET?
State management is used to store information requests. The state management is used to trace the information or data that affect the state of the applications.

There are two ways to maintain a state in .NET, Client-Based state management and Server-Based state management.

The following techniques can be used to implement the Client-Based state management:
• View State
• Hidden Fields
• Cookies
• Query Strings
• Control State

The following techniques can be used to implement Server-Based state management:
• Application State
• Session State
• Profile Properties
67. Where should the data validations be performed-at the client side or at the server side and why?
• Data validations should be done primarily at the client side and the server-side validation should be avoided because it makes server task overloaded. If the client-side validation is not available, you can use server-side validation. When a user sends a request to the server, the validation controls are invoked to check the user input one by one.
68. Why do we need nested master pages in a Web site?
• When we have several hierarchical levels in a Web site, then we use nested master pages in the Web site.
69. How can you dynamically add user controls to a page?
• User controls can be dynamically loaded by adding a Web User Control page in the application and adding the control on this page.
70. What is the appSettings Section in the web.config file?
• The web.config file sets the configuration for a Web project. The appSettings block in configuration file sets the user-defined values for the whole application.

For example, in the following code snippet, the specified ConnectionString section is used throughout the project for database connection:

<configuration>
<appSettings>
<add key=”ConnectionString” value=”server=indiabixserver; pwd=dbpassword; database=indiabix” />
</appSettings>

71. What type of code, client-side or server-side, is found in a code-behind file of a Web page?
• A code-behind file contains the server-side code, which means that the code contained in a code-behind file is executed at the server.
72. To which class a Web form belongs to in the .NET Framework class hierarchy?
• A Web form belongs to the System.Web.UI.Page class.
73. What does the “EnableViewState” property do? Why do we want it On or Off?
The EnableViewState property enables the ViewState property on the page. It is set to On to allow the page to save the users input between postback requests of a Web page; that is, between the Request and correspondingResponse objects. When this property is set to Off, the page does not store the users input during postback.
74. Which event determines that all the controls are completely loaded into memory?
The Page_Load event determines that all the controls on the page are fully loaded. You can also access the controls in the Page_Init event; however, the ViewState property does not load completely during this event.
75. What is the function of the CustomValidator control?
It provides the customize validation code to perform both client-side and server-side validation.
76. What is Role-based security?
In the Role-based security, you can assign a role to every user and grant the privilege according to that role. A role is a group of principal that restricts a user’s privileges. Therefore, all the organization and applications use role-based security model to determine whether a user has enough privileges to perform a requested task.
77. Which data type does the RangeValidator control support?
The data types supported by the RangeValidator control are Integer, Double, String, Currency, and Date.
78. What are the HTML server controls in ASP.NET?
HTML server controls are similar to the standard HTML elements, which are normally used in HTML pages. They expose properties and events that can be used programmatically. To make these controls programmatically accessible, you need to specify that the HTML controls act as a server control by adding the runat=”server” attribute.
79. Why a SiteMapPath control is referred to as breadcrumb or eyebrow navigation control?
The SiteMapPath control displays a hierarchical path to the root Web page of the Web site. Therefore, it is known as the breadcrumb or eyebrow navigation control.
80. Where is the ViewState information stored?
The ViewState information is stored in the HTML hidden fields.
81. Which namespaces are necessary to create a localized application?
The System.Globalization and System.Resources namespaces are essential to develop a localized application.
82. What is the difference between an HtmlInputCheckBox control and an HtmlInputRadioButton control?
You can select more than one HtmlInputCheckBox control from a group of HtmlInputCheckBox controls; whereas, you can select only a single HtmllnputRadioButton control from a group of HtmlInputRadioButtoncontrols.
83. What is the difference between HTML and Web server controls?
HTML controls are client-side controls; therefore, all the validations for HTML controls are performed at the client side. On the other hand, Web server controls are server-side controls; therefore, all the validations for Web server controls are performed at the server side.
84. Explain the AdRotator Control.
The AdRotator is an ASP.NET control that is used to provide advertisements to Web pages. The AdRotator control associates with one or many advertisements, which randomly displays one by one at a time when the Web page is refreshed. The AdRotator control advertisements are associated with links; therefore, when you click on an advertisement, it redirects you to other pages.

The AdRotator control is associated with a data source, which is normally an xml file or a database table. A data source contains all the information, such as advertisement graphics reference, link, and alternate text. Therefore, when you use the AdRotator control, you should first create a data source and then associate it with theAdRotator control.
85. What do you understand by the culture?
The culture denotes a combination of a language and optionally a region or a country. The contents of a Web page of a multilingual Web site are changed according to the culture defined in the operating system of the user accessing the Web page.
86. What is the difference between absolute expiration and sliding-time expiration?
The absolute expiration expires a cached item after the provided expiration time. The sliding time does not expire the cached items because it increments the specified time.
87. What is the code-behind feature in ASP.NET?
The code-behind feature of ASP.NET enables you to divide an ASP.NET page into two files – one consisting of the presentation data, and the second, which is also called the code-behind file, consisting of all the business logic. The presentation data contains the interface elements, such as HTML controls and Web server controls, and the code-behind contains the event-handling process to handle the events that are fired by these controls. The file that contains the presentation data has the .aspx extension. The code behind file has either the .cs extension (if you are using the programming language C#) or the .vb (if you are using the programming language Visual Basic .NET) extension.
88. How can you check if all the validation controls on a Web page are valid and proper?
You can determine that all the validation controls on a Web page are properly working by writing code in the source file of the Web page using a scripting language, such as VBScript or JavaScript. To do this task, you have to loop across validators collection of pages and check the IsValid property of each validation control on the Web page to check whether or not the validation test is successful.
89. Explain the validation controls. How many validation controls in ASP.NET 4.0?
Validation controls are responsible to validate the data of an input control. Whenever you provide any input to an application, it performs the validation and displays an error message to user, in case the validation fails.

ASP.NET 4.0 contains the following six types of validation controls:
• CompareValidator – Performs a comparison between the values contained in two controls.
• CustomValidator – Writes your own method to perform extra validation.
• RangeValidator- Checks value according to the range of value.
• RegularExpressionValidator – Ensures that input is according to the specified pattern or not.
• RequiredFieldValidator – Checks either a control is empty or not.
• ValidationSummary – Displays a summary of all validation error in a central location.
90. What is difference between a Label control and a Literal control?
The Label control’s final html code has an HTML tag; whereas, the Literal control’s final html code contains only text, which is not surrounded by any HTML tag.
91. How many types of Cookies are available in ASP.NET?
There are two types of Cookies available in ASP.NET:
• Session Cookie – Resides on the client machine for a single session until the user does not log out.
• Persistent Cookie – Resides on a user’s machine for a period specified for its expiry, such as 10 days, one month, and never.The user can set this period manually.
92. What is the use of the Global.asax file?
The Global.asax file executes application-level events and sets application-level variables.
93. What are the Culture and UICulture values?
The Culture value determines the functions, such as Date and Currency, which are used to format data and numbers in a Web page. The UICulture value determines the resources, such as strings or images, which are loaded for a Web page in a Web application.
94. What is the difference between ASP session and ASP.NET session?
ASP does not support cookie-less sessions; whereas, ASP.NET does. In addition, the ASP.NET session can span across multiple servers.
95. Which control will you use to ensure that the values in two different controls match?
You should use the CompareValidator control to ensure that the values in two different controls match.
96. What is the difference between a page theme and a global theme?
A page theme is stored inside a subfolder of the App_Themes folder of a project and applied to individual Web pages of that project. Global themes are stored inside the Themes folder on a Web server and apply to all the Web applications on the Web server.
97. What do you mean by a neutral culture?
When you specify a language but do not specify the associated country through a culture, the culture is called as a neutral culture.

98. What is the use of the <sessionState> tag in the web.config file?
The <sessionState> tag is used to configure the session state features. To change the default timeout, which is 20 minutes, you have to add the following code snippet to the web.config file of an application: <sessionState timeout=”40″/>
99. Can you post and access view state in another application?
Yes, you can post and access a view state in other applications. However, while posting a view state in another application, the PreviousPage property returns null.
100. Which method do you use to kill explicitly a users session?
The Session.Abandon() method kills the user session explicitly.
101. Which class is inherited when an ASP.NET server control is added to a Web form?
The System.Web.UI.WebControls class is inherited when an ASP.NET server control is added to a Web form.
102. What events are fired when a page loads?
The following events fire when a page loads:
• Init() – Fires when the page is initializing.
• LoadViewState() – Fires when the view state is loading.
• LoadPostData() – Fires when the postback data is processing.
• Load() – Fires when the page is loading.
• PreRender() – Fires at the brief moment before the page is displayed to the user as HTML.
• Unload() – Fires when the page is destroying the instances of server controls.
103. Write three common properties of all validation controls.
Three common properties of validation controls are as follows:
• ControlToValidate – Provides a control to validate
• ErrorMessage – Displays an error message
• IsValid – Specifies if the control’s validation has succeeded or not
• Text – Displays a text for validation control before validation
104. What are navigation controls? How many navigation controls are there in ASP.NET 4.0?
Navigation controls help you to navigate in a Web application easily. These controls store all the links in a hierarchical or drop-down structure; thereby facilitating easy navigation in a Web application.

There are three navigation controls in ASP.Net 4.0.
• SiteMapPath
• Menu
• TreeView
105. What happens if an ASP.NET server control with event-handling routines is missing from its definition?
The compilation of the application fails.
106. What are server-side comments?
Server-side comments are included in an ASP.NET page for the purpose of documentations as shown in the following code snippet:

<%–This is an example of server-side comments –%>

The server-side comments begin with <%– and end with –%>.
107. How can we provide the WebParts control functionality to a server control?
We can provide the WebParts controls functionality to a server control by setting the CreateWebPart property ofWebPartManger.
108. How do you prevent a validation control from validating data at the client end?
You can prohibit a validation control to validate data at the client side by setting the EnableClientScript property to False.
109. What is cross-page posting in ASP.NET?
The Server.Transfer() method is used to post data from one page to another. In this case, the URL remains the same. However, in cross page posting, data is collected from different Web pages and is displayed on a single page. To do so, you need to set the PostBackUrl property of the control, which specifies the target page. In the target page, you can access the PreviousPage property. For this, you need to use the @PreviousPageType directive. You can access the controls of previous page by using the FindControl() method.
110. Which ASP.NET configuration options are supported in the ASP.NET implementation on the shared Web hosting platform?
There are many ASP.NET configuration choices, which are not able to configure at the site, application, or child directory level on the shared hosting environment. Some options can produce security, performance, and stability problem to the server and therefore cannot be changed.

The following settings are the only ones that can be changed in the web.config file(s) of your Web site:
• browserCaps
• clientTarget
• pages
• customErrors
• globalization
• authorization
• authentication
• webControls
• webServices
111. Explain the Application and Session objects in ASP.NET.
Application state is used to store data corresponding to all the variables of an ASP.NET Web application. The data in an application state is stored once and read several times. Application state uses the HttpApplicationState class to store and share the data throughout the application. You can access the information stored in an application state by using the HttpApplication class property. Data stored in the application state is accessible to all the pages of the application and is the same for all the users accessing the application. The HttpApplicationState class provides a lock method, which you can use to ensure that only one user is able to access and modify the data of an application at any instant of time.

Each client accessing a Web application maintains a distinct session with the Web server, and there is also some specific information associated with each of these sessions. Session state is defined in the <sessionState> element of the web.config file. It also stores the data specific to a user session in session variables. Different session variables are created for each user session. In addition, session variables can be accessed from any page of the application. When a user accesses a page, a session ID for the user is created. The session ID is transferred between the server and the client over the HTTP protocol using cookies.
112. How will you differentiate a submaster page from a top-level master page?
Similar to a content page, a submaster page also does not have complete HTML source code; whereas, a top-level master page has complete HTML source code inside its source file.
113. What are Web server controls in ASP.NET?
The ASP.NET Web server controls are objects on the ASP.NET pages that run when the Web page is requested. Many Web server controls, such as button and text box, are similar to the HTML controls. In addition to the HTML controls, there are many controls, which include complex behavior, such as the controls used to connect to data sources and display data.
114. What is the difference between a HyperLink control and a LinkButton control?
A HyperLink control does not have the Click and Command events; whereas, the LinkButton control has these events, which can be handled in the code-behind file of the Web page.
115. What are the various ways of authentication techniques in ASP.NET?
There are various techniques in ASP.NET to authenticate a user. You can use one of the following ways of authentication to select a built-in authentication provider:
• Windows Authentication – This mode works as the default authentication technique. It can work with any form of Microsoft Internet Information Services (IIS) authentication, such as Basic, Integrated Windows authentication (NTLM/Kerberos), Digest, and certificates. The syntax of Windows authentication mode is given as follows: <authentication mode=”windows” />
• Forms Authentication – You can specify this mode as a default authentication mode by using the following code snippet: <authentication mode=”Forms”/>
• Passport – This mode works with Microsoft Passport authentication, as shown in the following code snippet:<authentication mode = “Passport”/>
116. What are the different ways to send data across pages in ASP.NET?
The following two ways are used to send data across pages in ASP.NET:
• Session
• Public properties
117. What does the WebpartListUserControlPath property of a DeclarativeCatalogPart control do?
The WebpartListUserControlPath property sets the route of the user defined control to aDeclarativeCatalogPart control.
118. What do you mean by the Web Part controls in ASP.NET?
The Web Part controls are the integrated controls, which are used to create a Web site. These controls allow the users to change the content, outlook, and state of Web pages in a Web browser.
119. What type of the CatalogPart control enables users to restore the Web Parts that have been removed earlier by the user?
The PageCatalogPart control.
120. What is the use of web.config? What is the difference between machine.config and web.config?
ASP.NET configuration files are XML-based text files for application-level settings and are saved with the name web.config. These files are present in multiple directories on an ASP.NET Web application server. The web.config file sets the configuration settings to the directory it is placed in and to all the virtual sub folders under it. The settings in sub directories can optionally override or change the settings specified in the base directory.

The difference between the web.config and machine.config files is given as follows:
• <WinDir>\Microsoft.NET\Framework\<version>\config\machine.config provides default configuration settings for the entire machine. ASP.NET configures IIS to prohibit the browser directly from accessing the web.config files to make sure that their values cannot be public. Attempts to access those files cause ASP.NET to return the 403: Access Forbidden error.
• ASP.NET uses these web.config configuration files at runtime to compute hierarchically a sole collection of settings for every URL target request. These settings compute only once and cached across further requests. ASP.NET automatically checks for changing file settings and do not validate the cache if any of the configuration changes made.

121. Explain the concept of states in ASP.NET.
State is quite an innovative concept in Web development because it eliminates the drawback of losing state data due to reloading of a Web page. By using states in a Web application, you can preserve the state of the application either at the server or client end. The state of a Web application helps you to store the runtime changes that have been made to the Web application. For example, as already described earlier, a change in the data source of the Web application might be initiated by a user when he/she selects and saves some products in the shopping cart.

If you are not using states, these changes are discarded and are not saved. You may think that the whole concept of storing states is optional. However, under certain circumstances, using states with applications is imperative. For example, it is necessary to store states for Web applications, such as an e-commerce shopping site or an Intranet site of a company, to keep track of the requests of the users for the items they have selected on the shopping site or the days requested for vacation on the Intranet site.
122. Can we validate a DropDownList by RequiredFieldValidator?
Yes, we can validate a DropDownList by RequiredFieldValidator. To perform this validation, we have to set theInitialValue property of RequiredFieldValidator control.
123. List the features of the Chart control.
The following are the features of the Chart control:
• Bounds a chart with any data source.
• Simple manipulation of chart data, such as copying, merging, grouping, sorting, searching, and filtering.
• Support many statistical and financial formulas for data analysis.
• Provide advanced chart outlook, such as 2-D, 3-D, lighting, and perspective.
• Support events and customizations.
• Includes interactivity with Microsoft AJAX.
• Supports AJAX Content Delivery Network (CDN).

 

 

.NET Interview Questions

Top most important .Net interview questions and answers by Experts:

Here is a list of Top most important .Net interview questions and answers by Experts.If you want to download .Net interview questions pdf free ,you can register with RVH techguru. Our experts prepared these .Net interview questions to accommodate freshers level to most experienced level technical interviews.

If you want to become an expert in .Net ,Register for .Net online training here.

 

 

1) What are the advantages of .Net?
• Good Design
• Object-Oriented Programming – Using C# and .NET which are based on object-oriented Concepts.
• Language Independence – All the languages which are supported by .Net (VB.NET, C#, J#, and managed C++) are compiled into common Intermediate Language (IL). So IL makes sure that languages are interoperable.
• Efficient Data Access – ADO.NET provides fast and efficient way to access RDBMS, file system etc.
• Code Sharing – To share code between applications, a new concept called assembly is introduced. Assemblies supports versioning.
• Improved Security
• Support Dynamic Web Pages – Using ASP.NET
• Support for Web Services

2) What is .Net Framework ?
The .NET framework is a programming framework from Microsoft. Developers can use .Net Framework to develop applications, install and run the application on Windows operating systems.
3) What is MS-IL (Microsoft Intermediate Language) ?
When a program is complied in .Net, the source code will be converted into an intermediate language called Microsoft Intermediate Language (MS-IL). This is done by Just-In time Compiler (JIT). The dot net framework is built in such a way that the code is Just-In time complied, which means that it get complied when it is called rather than compiling entire code at the start up. A portion of the code will get complied only once and it will exist till the application exit. This will have a significant improvement in performance since the entire section of the code won’t get executed in most cases.
4) What is Common Language Runtime (CLR) ?
Common Language Runtime or CLR is the run-time execution environment of .Net Framework. Converting MS-IL into platform or OS specific code is done by the CLR. Currently, .Net programs will run only on windows.

5) What is Common Type System (CTS) ?
.Net uses Common Type System (CTS) for Language Interoperability. CTS defines the predefined data types that are available in IL, so that all languages that target the .NET framework will produce the compiled code that is ultimately based on these types. CTS ensures that a data type defined in a VB.net will be understood by C#. For example, VB.Net uses “Integer” to define the data type Integer. C# uses “int” to define the data type Integer. When VB.Net code is compiled, it will convert the Integer to Int32. Since C# refers Int to Int32, VB.Net code will be understood by C#.
6) What is Common Language Specification (CLS) ?
Common Language Specification (CLS) is used for Language Interoperability in tandem with CTS to ensure the interoperability of the languages. CLS defines a set of minimum standards that all compilers targeting dot net must support. For example, VB.Net is not case sensitive. So attribute “EmployeeName” and “employeename” is considered same. But C# is case sensitive. So for language interoperability, C# doesn’t allow two variables which differ only in case.
7) What is Garbage Collector ?
Garbage Collector is used in dot net Framework for memory management. While running an application, applications make a request for memory for its internal use. Framework allocates memory from the heap. Once the process is completed, allocated memory needs to be reclaimed for future use. The process of reclaiming unused memory is taken care by the Garbage Collector.
8) How to invoke garbage collector programmatically ?
To call garbage collector from a program, use code “ GC.Collect(); “
9) What is a Managed Code ?
Managed code is code that can be executed and managed by .NET Framework Common Language Runtime. All codes based on the intermediate language(EL) executes as managed code.
10) What is an Assembly ?
Assemblies are self-describing logical unit which consists of one or more files targeted at dot net. An assembly can be stored across single file such as a single DLL or EXE that includes metadata, or it can be stored in multiple files. For example, resource files like meta data, DLL’s, and an EXE. Assemblies support versioning.
11) What is Assembly Manifest ?
Part of the assembly which contains assembly meta data that describes the assembly itself is known as manifest. Assembly manifest contains Assembly Name, Version Number, Culture, Strong name, List of files inside the assembly and Reference information.
12) What are the different types of Assembly ?
The two types of Assemblies are Shared and Private.

13) What is a Private Assembly ?
Private Assemblies are intended to be used by the program for which it is made for. Reason behind this is that, the application will only load private assemblies that are located in the same folder or in the sub folder of the main executable.
14) What is Shared Assembly ?
Shared Assemblies contain Common Libraries which are intended to be used by multiple applications. While making shared assemblies, name collisions and overwriting existing assemblies need to be taken care. Name Collisions can be taken care by strong name. Global assembly cache can be used to avoid assembly overwriting.

15) How to view Assembly information ?
By using Ildasm.exe, which is an MSIL Disassembler one can view attributes, references to other modules and assemblies.

16) Where is the assembly version information stored ?
In the Manifest.
17) What is NameSpace ?
A namespace is a logical grouping of related classes and types. Every class should have a NameSpace.
18) What is the Difference between NameSpace and Assembly ?
Namespace:
• Forms the logical boundary for a Group of classes.
• It is a Collection of names where each name is Unique.
• The namespace must be specified in Project Properties.
Assembly:
• Assemblies are Self-Describing
• It is an Output Unit. It is a unit of deployment and is used for versioning. Assemblies contain MSIL code.
19) What is Global Assembly Cache (GAC) ?
While using shared assemblies, to avoid Assembly being overwritten by a different version of the same assembly, shared assemblies are placed in a special directory subtree of the file system known as the global assembly cache (GAC). Placing shared assemblies can only be done by a special .Net Utilities.
20) Explain the concept of strong names ?
While using shared assemblies, in order to avoid name collisions strong names are used. Strong Names are based on private key cryptography, ie. private assemblies are simply given the same name as their main file name.

21) How to add and remove a assembly from GAC?
To install assembly in Cache, use Gacutil. To run Gacutil, goto “Visual Studio Command Prompt” and type “gacutil -i <assembly_name>”, where (assembly_name) is the DLL name of the project. To uninstall assembly, type gacutil –u <assembly name> in Visual Studio Command Prompt.

22) What is Reflection?
Reflection is used to dynamically load a class, create object and invoke methods at runtime. It can also be used to read its own meta data to find assemblies, modules and type information at runtime.

23) What is Delay signing ?
To create a strong named assembly and to make sure that this assembly can used by someone else, we partially build this assembly by providing a Public Key. We write this Public Key in the AssemblyInfo.vb OR .cs file. We also add an attribute by the name <Assembly:AssemblyDelaySignAttribute(true)> to the assembly info file. This makes it sure that when we build the assembly, it would be containing the information only about the public key before we deliver it to our clients. This is a partial strong named assembly that we have created, and hence it is called Delayed Assembly.

24) What are the different type of JIT’s ?
Different Types of JIT are
1) Pre-JIT – Complies complete source code into native code at the time of deployment.
2) Econo-JIT – Complies methods that are called at runtime.
3) Normal-JIT – Complies methods that are called at runtime and get stored in cache. Next time when the same method is called, it will be taken from cache.
25) What are Value types and Reference types ?
There are two types of data types in .Net, Value types and Reference types. Value types are stored in stack part of the memory. Reference type are stored in managed heap. Let have a look at the example for better understanding.
Int iCount = 0; \\ Value Type
int NewiCount = iCount; \\ Reference Type

26) Explain the concept of Boxing and Unboxing ?
Converting a value type to reference type is called Boxing. Converting a reference type to value type is called Unboxing.
27) What’s the difference between System exceptions and Application exceptions?
System exceptions are common exceptions thrown by the CLR of .Net Framework. Application exceptions can be user defined exceptions thrown by the application.
28) What is CODE Access security?
CODE Access security is a security model that let us grant or deny execution permissions to an assembly according to its “properties,” called evidence, such as its strong name or publisher

29) What is a satellite assembly?
A satellite assembly are used when multilingual (UI) application are created. Satellite assembly is a compiled library that contains localized resources which provides us with the capability of designing and deploying solutions to multiple cultures, rather than hard coding texts, bitmaps etc

30) How to prevent my .NET DLL to be decompiled ?
We can prevent .NET DLL to be decompiled upto an extent by Obfuscate Source code, asymmetric encryption and encrypted w32 wrapper application.

31) What is Native Image Generator (Ngen.exe) ?
Ngen.exe creates compiled processor-specific machine code called native images which are files and installs them into the native image cache on the local computer. The runtime will use native images from the cache rather than using the JIT compiler to compile the original assembly.

32) What is Code Document Object Model (CodeDom) ?
Code Document Object Model are code generators which are used to minimize repetitive coding tasks, and to minimize the number of human-generated source code lines.
33) What is the difference between custom controls and user controls?
Custom controls are basically compiled code i.e. DLLs. These can be easily added to toolbox, so it can be easily used across multiple projects using drag and drop approach. These controls are comparatively hard to create.
But User Controls (.ascx) are just like pages (.aspx). These are comparatively easy to create but tightly couple with respect to User Interface and code. In order to use across multiple projects, we need to copy and paste to the other project as well.
34) What are the different types of Validation controls in ASP.NET?
In order to validate user input, ASP.NET provides validation server controls. All validation controls inherits from BaseValidator class which contains the common validation properties and methods like ControlToValidate,Enabled, IsValid, EnableClientScript, ValidationGroup,Validate() etc.
ASP.NET provides a range of validation controls:
• RequiredFieldValidator validates compulsory/required input.
• RangeValidator validates the range. Validates that input falls between the given range values.
• CompareValidator validates or compares the input of a control with another control value or with a fixed value.
• RegularExpressionValidator validates input value against a defined regular expression pattern.
• CustomValidator allows to customize the validation logic with respect to our application logic.
• ValidationSummary displays all errors on page collectively.
35) What are the types of Authentication in ASP.NET?
There are three types of authentication available in ASP.NET:
• Windows Authentication: This authentication method uses built-in windows security features to authenticate user.
• Forms Authentication: authenticate against a customized list of users or users in a database.
• Passport Authentication: validates against Microsoft Passport service which is basically a centralized authentication service.

36) What are the benefits of .NET Framework?
.NET Framework offers many benefits to application developers. Some of these benefits are as follows:
Consistent programming model —.NET Framework provides a consistent object-oriented programming model across various languages. You on we this model to create programs for performing different tasks, such as connecting to and retrieving data from databases and reading from and writing to files.
Language interoperability —Language interoperability is a feature that enables a piece of code written in one language to be used in another language. This facilities the reuse of code and therefore improves the efficiency of the development process.
Automatic management of resources —Wink developing .NET. applications, you may use various resources, such as files, memory, and database connecters. With MET Framework, you do not need to manually free these resources when they are no longer required.
Ease of deployment- .NET framework makes the deployment of applications easier. To install an application that is not based on NET Framework you need to copy It and its components on target computers. However, with MET Framework, you can quickly Install or deploy the applications such that Installation of new applications or components does not affect the existing applications.
37) Mention the core components of .NET Framework.
The two core components of .NET Framework are:
Common Language Runtime
.NET Framework Class Library.[sociallocker]
38) Briefly describe MSIL.
.NET Framework is shipped with compilers of all Programming languages to develop Programs. There are separate compilers for the Visual Basic, CS, and Visual C++ programming Languages in .NET Framework Each .NET compiler produces an intermediate aide after Compiling the source code. The Intermediate code is common for all languages and Is understandable only to NET environment. This intermediate code IS known as MSIL. MSIL file Is an executable file that can be transferred across various machines.
39) Briefly describe the roles of CLR in .NET Framework.
CLR provides an environment to execute MET applications on target machines.
CLR-is also a common runtime environment for all MET code irrespective of their programming language, because the compilers of MET Framework convert every source code into a common language known as MSIL .
CLR also provides various services to execute processes, such as memory management service and security services..CLR performs various tasks to manage the execution process of MET applications. The responsibilities of as are listed below:
Automatic memory management–CLR invokes venous built-in functions of MET Framework to allocate and de-allocate the memory of MET objects. Therefore, programmers need not write the code to explicitly allocate and de-allocate memory to programs.
Garbage Collection —Garbage collection Is the major role of CUR, with prevents memory leaks during execution of programs. The Garbage collector of CLR automatically determines the best time to free the memory, which is reserved by an object for execution.
Code Access Security —Code Access Security (CAS) model is used in MET Framework to impose restrictions and security during execution of programs. CLR uses security objects to manage access to code during execution of MET applications. as allows an executing code to perform only those tasks for which it has permission.
40) What is the role of the /IT complier In .NET Framework?
The MT complier is an important element of as, with loads 14.511 on target machine for execution. The MSIL is stored in MET assemblies after the developer has compiled the code written in any .NET. compliant programming language, such as Visual Basic and C#.
41) What is CTS?
CTS is the component of CUL through which WET Framework provides support for multiple languages because it contains a type system that is common across ate languages. Two CIS-compliant languages do not require type conversion when calling the cede written in one language from within the code written in another language. CTS provides a base set of data types for al the languages supported by.NET Framework. This means that the size of integer and long variables is the Same across ah .NET compliant programming languages. However, each language uses aliases for the base data types provided by CTS. For example, CTS uses the data type system. Int32 to represent a 4 byte integer value; however, Visual Basic uses the alias Integer for the same, whereas Cl uses the alias int. This is done for the sake of clarity and simplicity.
42) What Is CLS?
Common Language Specification (CLS) is a set of basic rules, which enables interoperability between two .NET-complaint languages. CIS is a subset of CTS; therefore, the languages supported by CLS can use each other’s c lass libraries similar to their own. Application programming interfaces (APIS), which we designed by following the rules defined In CLS, can be used by W .NET-compliant languages.
43) What Is managed code?
 Managed code is the code that Is executed directly by the CLR. The applications created by using managed code automatically have CLR services such as type Checking, security, and automatic garbage collection. These services Help provide platform and language independence for managed code applications. The CLR compiles the source code to MSIL, not machine code. This MSIL along with the metadata that describes the attributes, classes and methods of the code resides an assembly.
44)  What is an assembly?
An assembly is the primary building block of .NET Framework applications. In .NET, every application is compiled into an assembly, which refers to a portable executable (PE) file. The PE file can be either a dynamic Link library of an executable (.exe file).that contains the MSIL code of the compiled application. In addition to the MS11, an assembly also contains the files and resources necessary for the application, assembly metadata, and’ type metadata. An assembly stores the information about itself such as the name, version number of the assembly, and security information, which Is called metadata. Ibis also o ceded the assembly metadata. The type metadata is the information about the types (classes, structures, interfaces, and enumerations) required for the assembly.
45) Explain the different types of assemblies.
Assemblies are of two types, private and shared assemblies. A private assembly is used by the clients of the same application directory structure as the assembly. A shared assembly is stored in the global assembly cache (GAC), which is a repository of assemblies maintained by the runtime. A Shared assembly can be referenced by more than one application.
46) Can one DLL file contains the compiled code of more than one .NET language?
No, a DLL file can contain the complied code of only one programming language.
47) What Is the maximum number of classes that can be contained In one DLL file?
There is no limit to the number of classes that can be curtained In a DLL file.
48) Explain the differences between managed and unmanaged code?
Managed code is the code that is executed chatty by the QR Instead of the operating system. Unmanaged code is the code that is executed directly by the operating system outside the OR environment. In managed code, since the execution of the code Is governed by CLR, the runtime provides different services such as garbage collection, type checking, exception handling, and safety and support These sat help provide uniformly in platform and language-Independent behavior of managed code applications. In unmanaged code, the allocation of memory, type safety, and security is required to be taken are of by the developer. If the unmanaged code is not Properly handles, may result In memory leak. Examples of unmanaged code are ActiveX components and Wm32 AM that execute beyond the scope of native CLR.
49) Mention the execution process for managed code.
A piece of managed code is executed as follows:
1. Chasing a language compiler
2. Compiling the code to MSIL
3. Compiling MSIL to native code
I. Creating the code
50) Difference between int and int32?
Both are the same. system. int32 is a .NET class and int is an alias name for System. Int32.
51) What is side-by-side execution? Can two applications, one using a private assembly and other using a shared assembly, be stated as side-by-side executables?
Side-by-side execution Is the ability to run multiple versions of an application or component on the same computer. You can have multiple versions of the CLR and multiple versions of applications and components Mat use a version of the runtime on the same computer at the same time. As versioning is only applied to shared assemblies and not to private assemblies, two applications, one using a private assembly and other using a shared assembly, cannot be stated as side-by-side executables.

52) Why Is string called Immutable data type?
A sting represents text and stores a sequential collection of characters in the memory. A string object is said to be immutable (read only), because a value once assigned to a string object cannot be changed after the acting object has been created. When the value In the string object is modified, a new string object is created with a new value assigned to the string object therefore, keeping the old string In memory for garbage collector to be disposed.
53) What is code access security?
Code access security (CAS) is part of the .NET security mode that determines whether or not a piece of code is allowed to run and what resources it can use while running.
54) What are the advantages of ASP.NET MVC?
1. Extensive support for TDD. With asp.net MVC, views can also be very easily unit tested.
2. Complex applications can be easily managed
3. Separation of concerns. Different aspects of the application can be divided into Model, View and Controller.
4. ASP.NET MVC views are light weight, as they donot use viewstate. [/sociallocker]