What is difference between DELETE & TRUNCATE commands?

Delete command removes the rows from a table based on the condition that we provide with a WHERE clause. Truncate will actually remove all the rows from a table and there will be no data in the table after we run the truncate command. TRUNCATE TRUNCATE is faster and uses fewer system and transaction log resources than DELETE. TRUNCATE removes the data by deallocating the data pages used to store the table’s data, and only the page deallocations are recorded in the transaction log. TRUNCATE removes all rows from a table, but the table structure, its columns, constraints, indexes and … Click here to continue…..

What is Boxing and UnBoxing?

Boxing is implicit conversion of ValueTypes to Reference Types (Object). Boxing a value type packages it inside an instance of the Object  reference type. This allows the value type to be stored on the garbage collected heap. Boxing is conversion from value type to object(reference) type. Actually the copy of value type copied from stack to heap memory. Boxing Conversion

Unboxing Conversion UnBoxing is explicit conversion of Reference Types (Object) to its equivalent ValueTypes. It requires type-casting. Unboxing extracts the value type from the object. In this example, the integer variable i is boxed and assigned to object o. … Click here to continue…..

What is Log Shipping in SQL?

Log shipping is the process of automating the backup of database and transaction log files on a production SQL server, and then restoring them onto a standby server. Enterprise Editions only supports log shipping. In log shipping the transactional log file from one server is automatically updated into the backup database on the other server. If one server fails, the other server will have the same db and can be used this as the Disaster Recovery plan. The key feature of log shipping is that it will automatically backup transaction logs throughout the day and automatically restore them on the … Click here to continue…..

Can you inherit a COM class in a .NET application?

The .NET Framework extends the COM model for re-usability by adding implementation inheritance. Managed types can derive directly or indirectly from a COM coclass; more specifically, they can derive from the runtime callable wrapper generated by the runtime. The derived type can expose all the method and properties of the COM object as well as methods and properties implemented in managed code. The resulting object is partly implemented in managed code and partly implemented in unmanaged code.