1.Why do you use Option Explicit.
Using Option Explicit requires that all variables be declared before being used. (It is considered to be good programming practice)
2.What are the data types in VBScript.
VBScript consists of only one data type (Variant)
3.What is a session Object.
Connection, Command, Recordset (There are actually more than 3 (Primary objects are (Connection, Command, Field and Recordset) Secondary objects are (Parameters, Properties and Errors)))
4.What are the three Objects of ADO.
A Session Object holds information relevant to a particular users session.
5.What are the lock-types available in ADO.Explain.
adLockReadOnly (1) - Indicates read-only records. You cannot alter the data.
adLockPessimistic (2) - Indicates pessimistic locking, record by record. The provider does what is necessary to ensure successful editing of the records, usually by locking records at the data source immediately after editing.
adLockOptimistic (3) - Indicates optimistic locking, record by record. The provider uses optimistic locking, locking records only when you call the Update method.
adLockBatchOptimistic (4) - Indicates optimistic batch updates. Required for batch update mode.
adLockUnspecified (-1) - Does not specify a type of lock. For clones, the clone is created with the same lock type as the original.
Example:
Code:
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.LockType = adLockReadOnly
6.What are the cursor types available in ADO.Explain.
adOpenForwardOnly (0) - Default. Uses a forward-only cursor. Identical to a static cursor, except that you can only scroll forward through records. This improves performance when you need to make only one pass through a Recordset.
adOpenKeyset (1) - Uses a keyset cursor. Like a dynamic cursor, except that you can't see records that other users add, although records that other users delete are inaccessible from your Recordset. Data changes by other users are still visible.
adOpenDynamic (2) - Uses a dynamic cursor. Additions, changes, and deletions by other users are visible, and all types of movement through the Recordset are allowed, except for bookmarks, if the provider doesn't support them.
adOpenStatic (3) - Uses a static cursor. A static copy of a set of records that you can use to find data or generate reports. Additions, changes, or deletions by other users are not visible.
adOpenUnspecified (-1) - Does not specify the type of cursor.
Example:
Code:
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.CursorType = adOpenDynamic
7.What is a COM component.
A COM component can be any type of external or internal object that is called to perform an operation (uploading, error handling, etc…)
Example:
Code:
'Call a COM component to create a mailing object
Set objMail = Server.CreateObject("CDONTS.MailSender")
8.How do you register a COM component.
regsvr32 path\componentname
Example: To register a component call Help.dll, located in C:\COMObjects folder
Code:
Regsvr32 "C:\COMObjects\Help.dll"
To unregister
Regsvr32 "C:\COMObjects\Help.dll" /u
9.What is a virtual root and how do you create one?.
Better known as Virtual Directory. Allows you to create multiple website under 1 ip address. Allows you reference another location (folder) to include additional functionality.
To create one
1) Open IIS Manager
2) Right click the default site and "New">"Virtual Directory".
3) Type the name of the virtual directory and then browse to the location you would like to reference.
10.What is a database index, how do you create one, discuss it's pros and cons.
Indexes in SQL Server are similar to the indexes in books. They help SQL Server retrieve the data quicker. Indexes are of two types. Clustered indexes and non-clustered indexes. When you create a clustered index on a table, all the rows in the table are stored in the order of the clustered index key. So, there can be only one clustered index per table. Non-clustered indexes have their own storage separate from the table data storage. Non-clustered indexes are stored as B-tree structures (so do clustered indexes), with the leaf level nodes having the index key and it's row locater. The row located could be the RID or the Clustered index key, depending up on the absence or presence of clustered index on the table. If you create an index on each column of a table, it improves the query performance, as the query optimizer can choose from all the existing indexes to come up with an efficient execution plan. At the same t ime, data modification operations (such as INSERT, UPDATE, DELETE) will become slow, as every time data changes in the table, all the indexes need to be updated. Another disadvantage is that, indexes need disk space, the more indexes you have, more disk space is used.
11.What is the default language of ASP.
VBScript
12.How do you use multiple record sets( rs.NextRecordSet ).
Using rs.NextRecordset
13.As soon as you fetch a record set, what operations would you perform.
Check to make sure records were returned…if so, then manipulate them.
14.Define a transaction. What are acid properties of a transaction.
A transaction is a process where either something completes or it fails depending on its requirements
ACID properties of a transaction
A - Atomicity = The entire sequence of actions must be either completed or aborted. The transaction cannot be partially successful.
C - Consistency = The transaction takes the resources from one consistent state to another.
I - Isolation = A transaction's effect is not visible to other transactions until the transaction is committed.
D - Durability = Changes made by the committed transaction are permanent and must survive system failure.
15.How would you remotely administer IIS.
Administer through the web browser or through the IIS Snap-in (Microsoft Suggestions [http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q308/1/69.ASP&NoWebContent=1])
16.What is RAID? What is it used for.
RAID (Redundant Array of Inexpensive Disks) is used to provide fault tolerance to database servers. (Basically for data protection just in case a hard drive or system fails)
17.What is the disadvantage of creating an index in every column of a database table.
Disadvantage is it slows down the modification of data into those columns because every time data changes in the table, all the indexes need to be updated.
19.You have a query that runs slowly, how would you make it better.
This is a very open ended question and there could be a lot of reasons behind the poor performance of a query. But some general issues that you could talk about would be: No indexes, table scans, missing or out of date statistics, blocking, excess recompilations of stored procedures, procedures and triggers without SET NOCOUNT ON, poorly written query with unnecessarily complicated joins, too much normalization, excess usage of cursors and temporary tables. Some of the tools/ways that help you troubleshooting performance problems are: SET SHOWPLAN_ALL ON, SET SHOWPLAN_TEXT ON, SET STATISTICS IO ON, SQL Server Profiler, Windows NT /2000 Performance monitor, Graphical execution plan in Query Analyzer. Download the white paper on performance tuning SQL Server from Microsoft web site.
19. What is a bit datatype?.What is it used for.
Bit data type consists of either 1 or 0 (on or off) is generally used as a boolean type where the answer is either true/false, on/off, yes/no, etc…
Forgot the famous last words? Access your message archive online. Click here.
No comments:
Post a Comment