44

How to restore backup database into SQL server 2000?

 
RESTORE FILELISTONLY
FROM DISK = 'c:\BackDatabaseName'
RESTORE DATABASE TestDB
FROM DISK = 'c:\BackDatabaseName'
WITH MOVE 'BackDatabaseNameh_data' TO 'c:\BackDatabaseName_data.mdf',
MOVE 'BackDatabaseName_log' TO 'c:\BackDatabaseName_log.ldf'
GO
45

What Is an Object?

An object is merely a collection of related information and functionality. Or
An object is composed of the data that describes the object and the operations that can be performed on the object
46

What is Assemblies?

 

In the .NET Runtime, the mechanism of packaging is the assembly. When code is compiled by one of the .NET compilers, it is converted to an intermediate form known as “IL”. The assembly contains all the IL, metadata, and other files required for a package to run, in one complete package. Each assembly
contains a manifest that enumerates the files that are contained in the assembly, controls what types and resources are exposed outside the assembly, and maps references from those types and resources to the files that contain the types and resources. The manifest also lists the other assemblies that an
assembly depends upon.

Assemblies are self-contained; there is enough information in the assembly for it to be self-describing. When defining an assembly, the assembly can be contained in a single file or it can be split amongst several files. Using several files will enable a scenario where sections of the assembly are downloaded only as needed.

47
What is Namespaces and Using in .NET?
 
Namespaces in the .NET Runtime are used to organize classes and other types into a single hierarchical structure. The proper use of namespaces will make classes easy to use and prevent collisions with classes written by other authors.

Using is merely a shortcut that reduces the amount of typing that is required when referring to elements.

48

What is Enums in C#?

 

Enumerators are used to declare a set of related constants—such as the colors that a control can take—in a clear and type-safe manner. For example:
enum Colors
{
red,
green,
blue
}

49

What is Delegates?

 
Delegates are a type-safe, object-oriented implementation of function pointers and are used in many situations where a component needs to call back to the component that is using it. They are used most heavily as the basis for events, which allow a delegate to easily be registered for an event.
50

What is Overloading?

 
Sometimes it may be useful to have two functions that do the same thing but take different parameters.
51

What is Virtual Functions?

 
To make this work cleanly, object-oriented languages allow a function to be specified as virtual. Virtual means that when a call to a member function is made, the compiler should look at the real type of the object (not just the type of the reference), and call the appropriate function based on that type.
52

Can constructors has parameter?

 
No, constructors is parameterless
53

How to know how many tables contains clientID as a column in a database?

 
SELECT COUNT(*) AS Total FROM syscolumns WHERE (name = 'clientID')
54

How to delete the rows which are duplicate (don't delete both duplicate records).

 
-- it is used for deletion applied only on first row
SET ROWCOUNT 1

-- first dublicate record deleted
DELETE yourtable FROM yourtable a WHERE (SELECT COUNT(*) FROM yourtable b WHERE b.name1 = a.name1 AND b.age1 = a.age1) > 1

--Looping start to remove first row of dublicate record
WHILE @@rowcount > 0
DELETE yourtable FROM yourtable a WHERE (SELECT COUNT(*) FROM yourtable b WHERE b.name1 = a.name1 AND b.age1 = a.age1) > 1

SET ROWCOUNT 0
55

Write a SQL Query to find first day of month?

 
SELECT DATENAME(dw, DATEADD(dd, - DATEPART(dd, GETDATE()) + 1, GETDATE())) AS FirstDay
56

What's the advantage of using System.Text.StringBuilder over System.String?

 
StringBuilder is more efficient in the cases, where a lot of manipulation is done to the text. Strings are immutable, so each time it's being operated on, a new instance is created.
57

Describe the role of inetinfo.exe, aspnet_isapi.dll and aspnet_wp.exe in the page loading process

 
 
inetinfo.exe is the Microsoft IIS server running, handling ASP.NET requests among other things. When an ASP.NET request is received (usually a file with .aspx extension),the ISAPI filter aspnet_isapi.dll takes care of it by passing the request to the actual worker process aspnet_wp.exe.
 
58

What's the difference between Response.Write() and Response.Output.Write() in ASP.NET?

 
 
The letter one allows you to write formattedoutput.
 
59

What methods are fired during the page load in ASP.NET?

 
 
Init() - when the pageis instantiated,
Load() - when the page is loaded into server memory,
PreRender() - the brief moment before the page is displayed to the user asHTML,
Unload() - when page finishes loading.
 
60

What's a bubbled event?

 
 
1. When you have a complex control, like DataGrid, writing an event processing routine for each object (cell, button, row, etc.) is quite tedious. The controls can bubble up their eventhandlers, allowing the main DataGrid event handler to take care of its constituents.
 
61

What's is the difference between web service and remoting?

 
 
  ASP.NET Web Services .NET Remoting
Protocol Can be accessed only over HTTP Can be accessed over any protocol (including TCP, HTTP, SMTP and so on)
State Management Web services work in a stateless environment Provide support for both stateful and stateless environments through Singleton and SingleCall objects
Type System Web services support only the datatypes defined in the XSD type system, limiting the number of objects that can be serialized. Using binary communication, .NET Remoting can provide support for rich type system
Interoperability Web services support interoperability across platforms, and are ideal for heterogeneous environments. .NET remoting requires the client be built using .NET, enforcing homogenous environment.
Reliability Highly reliable due to the fact that Web services are always hosted in IIS Can also take advantage of IIS for fault isolation. If IIS is not used, application needs to provide plumbing for ensuring the reliability of the application.
Extensibility
Provides extensibility by allowing us to intercept the SOAP messages during the serialization and deserialization stages.

Very extensible by allowing us to customize the different components of the .NET remoting framework.
Ease-of-Programming Easy-to-create and deploy. Complex to program.
 
62

IIS Isolation Levels?

 
 
Internet Information Server introduced the notion "Isolation Level", which is also present in IIS4 under a different name. IIS5 supports three isolation levels, that you can set from the Home Directory tab of the site's Properties dialog:
Low (IIS Process): ASP pages run in INetInfo.Exe, the main IIS process, therefore they are executed in-process. This is the fastest setting, and is the default under IIS4. The problem is that if ASP crashes, IIS crashes as well and must be restarted (IIS5 has a reliable restart feature that automatically restarts a server when a fatal error occurs).
Medium (Pooled): In this case ASP runs in a different process, which makes this setting more reliable: if ASP crashes IIS won't. All the ASP applications at the Medium isolation level share the same process, so you can have a web site running with just two processes (IIS and ASP process). IIS5 is the first Internet Information Server version that supports this setting, which is also the default setting when you create an IIS5 application. Note that an ASP application that runs at this level is run under COM+, so it's hosted in DLLHOST.EXE (and you can see this executable in the Task Manager).
High (Isolated): Each ASP application runs out-process in its own process space, therefore if an ASP application crashes, neither IIS nor any other ASP application will be affected. The downside is that you consume more memory and resources if the server hosts many ASP applications. Both IIS4 and IIS5 supports this setting: under IIS4 this process runs inside MTS.EXE, while under IIS5 it runs inside DLLHOST.EXE.
 
63

What does assert() do?

 
 
In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is false. The program proceeds without any interruption if the condition is true.
 
64

What’s a satellite assembly?

 
 
When you write a multilingual or multi-cultural application in .NET, and want to distribute the core application separately from the localized modules, the localized assemblies that modify the core application are called satellite assemblies.
 
65

What does Option Explicit refer to in Visual Basic?

 
 
All variables must be declared before use. Their type is not required.
 
66

Name the four different cursor types in ADO and describe them briefly of Visual Basic?

 
 
The cursor types are listed from least to most resource intensive.
Forward Only - Fastest, can only move forward in recordset
Static - Can move to any record in the recordset. Data is static and never changes.
KeySet - Changes are detectable, records that are deleted by other users are unavailable, and records created by other users are not detected
Dynamic - All changes are visible.
 
67

Name the four different locking type in ADO and describe them briefly in Visual Basic.

 
 
LockPessimistic - Locks the row once after any edits occur.
LockOptimistic - Locks the row only when Update is called.
LockBatchOptimistic - Allows Batch Updates.
LockReadOnly - Read only. Can not alter the data.
 
68

What are some benefits of using MTS?

 
 
Database Pooling, Transactional operations, Deployment, Security, Remote Execution
 
69

Describe and In Process vs. Out of Process component. Which is faster?

 
 
An in-process component is implemented as a DLL, and runs in the same process space as its client app, enabling the most efficient communication between client and component.Each client app that uses the component starts a new instance of it.
An out of process component is implemented as an EXE, and unlike a dll, runs in its own process space. As a result, exe’s are slower then dll’s because communications between client and component must be marshalled across process boundaries. A single instance of an out of process component can service many clients.

 
70

Name the Seven layers in the OSI Model

 
 
Appication, Presentation, Session, Transport, Network, Data Link, Phyiscal
 
71

What is HTTP Tunneling

 
 
HTTP Tunneling is a security method that encryptes packets traveling throught the internet. Only the intended reciepent should be able to decrypt the packets. Can be used to Create Virtual Private Networks. (VPN)
 
72

What is denormalization and when would you go for it?

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

 
73

Define candidate key, alternate key, composite key.

 
 
A candidate key is one that can identify each row of a table uniquely. Generally a candidate key becomes the primary key of the table. If the table has more than one candidate key, one of them will become the primary key, and the rest are called alternate keys. A key formed by combining at least two or more columns is called composite key.
 
74

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

 
 
Replication is the process of copying/moving data between databases on the same or different servers. SQL Server supports the following types of replication scenarios:
• Snapshot replication
• Transactional replication (with immediate updating subscribers, with queued updating subscribers)
• Merge replication
 
75

When do I have to use CreateObject and when CreateInstance?

 
 
You have to use CreateInstance if:
- You are in a component running under MTS AND the object you want to create is registered under MTS AND you want that the transaction (the activity in the most general case when no transactional objects are involved) flows from the father object to the child object.

You have to use CreateObject if:
- The caller hasn't got a TransactionContext, that is, you want to instantiate the root object of a transaction from the base-client
OR
- The caller has got a TransactionContext but you want that the child object lives in a new different transaction (read activity in the most general case). Note that you would have achieved the same effect if you had used CreateInstance but the child object had been declared under MTS as "Requires New Transaction".
 
76

What is Connection Pooling?

 
 
Connection pooling is an essential feature for distributed scalable applications. Note that database connection pooling is provided by the ODBC or OLEDB drivers not by MTS/COM+, still it's in MTS or COM+ that connection pooling shows its greatest benefits. Connection pooling reduces overall overhead that appears due to rather often open/close operations on database connections. But, to ensure that an application (read - component) is "pooling compliant", design and implementation of the application should consider following restrictions:

1) Connections should be opened using the same identity (UserName/Password).
A connection opened with one identity cannot be reused for a request with another identity. Opening connections with different identities increases pool size and makes its usage worthless.
2) Connection can not be reused across processes. Hence each MTS package holds it own pool of connections.
3) Underlying database should be "MTS compatible".
4) ODBC driver(s) or OLE DB Provider(s) being used should support MTS.

 
77

What is main difference between Global.asax and Web.Config?

 
 
ASP.NET uses the global.asax to establish any global objects that your Web application uses. The .asax extension denotes an application file rather than .aspx for a page file. Each ASP.NET application can contain at most one global.asax file. The file is compiled on the first page hit to your Web application. ASP.NET is also configured so that any attempts to browse to the global.asax page directly are rejected. However, you can specify application-wide settings in the web.config file. The web.config is an XML-formatted text file that resides in the Web site’s root directory. Through Web.config you can specify settings like custom 404 error pages, authentication and authorization settings for the Web site, compilation options for the ASP.NET Web pages, if tracing should be enabled, etc.
 
78

How do you turn off SessionState in the web.config file?

 
 
In the system.web section of web.config, you should locate the httpmodule tag and you simply disable session by doing a remove tag with attribute name set to session.

<httpModules>
<remove name="Session” />
</httpModules>
 
79

How to find dead lock in SQL Server 2000 and how to remove exists deadlock?

 
 

In SQL Server 2000,
sp_lock is used to find dead lock inside the database.
if any dead lock occur then using "Kill spid" is to remove the dead lock.

Handle Dead Lock in SQL Server 2000

 
80

What is HTTP Channel?

 
 
The HTTP channel transports messages to and from remote objects using the SOAP protocol. All messages are passed through the SOAP formatter, where the message is changed into XML and serialized, and the required SOAP headers are added to the stream. It is also possible to configure the HTTP Channel to use the binary formatter. The resulting data stream is then transported to the target URI using the HTTP protocol.
TCP Channel

The TCP channel uses a binary formatter to serialize all messages to a binary stream and transport the stream to the target URI using the TCP protocol. It is also possible to configure the TCP channel to the SOAP formatter.
 
     
  Interview Page : 1 2 3