NEWS: Cheap viagra in the uk Saturday delivery cheapest phentermine? Viagra investigator Buy lvivhostcom online viagra viagra. Buy cialis in canada Comparison levivia viagra, Online doctors perscriptions xanax steroids Cheapest viagra online! Long term effects of phentermine use Tomorrow, Suicide xanax Picture viagra: Viagra patent infringement reexam Xanax online cheap. Taking phentermine Tramadol online pharmacy! Cialis generic canada Herbal viagra uk: Cheapest price phentermine online pharmacy Viagra 50mg Phentermine uses Buy cialis online Per day buy phentermine Cheap tramadol prescriptions online Online pharmacies with doctor consultation for viagra Viagra price Is there a phentermine shortage 0 buy by popl powered viagra wordpress Blindness cialis Cialis injury lawyer ohio Where to buy viagra online 90 cod count day phentermine Cialis levivia viagra vs vs Viagra pharmacy Viagra prescription drug Xanax 2mg Viagra substitute 5mg tablet Dangers of taking phentermine Tramadol overdose: Buy viagra woman Cialis tablet, Buy herbal viagra Female viagra? Buy phentermine shipped usps Physical symptoms of high blood pressure and xanax Low cost phentermine Buy get online prescription viagra: Berman sister female viagra study Phentermine 30mg: How does viagra work Where to buy viagra on line Phentermine 37 5mg and mastercard Female viagra alternative Xanax withdrawel symptoms Cialis levitra viagra vs vs: Ativan vs xanax Xanax withdrawel. Viagra lowest prices Order cialis. India generic viagra Adipexdrug addiction order phentermine online On line prescription viagra Picture of xanax _achetez le viagra de levivia Loss phentermine story weight Phentermine without rx How long does viagra last 120 tramadol Viagra dangers Phentermine 6 pm order Phentermine for sale with out perscription Wholesale pfizer viagra Order tramadol online Generic sample viagra Canadian viagra Cialis levitra sales viagra Phentermine lortab online Alternatives to viagra Herbal phentermine forum Cheap pharmacy viagra No prescription phentermine free shipping Low dose xanax prosexual Order viagra without prescription Dangers of phentermine heart Link myblogde online order viagra Xanax overnight delivery Does viagra work Order buy phentermine online Buy consultation free hydrocodone online tramadol Buy online purchase viagra Cheap phentermine diet pills Viagra online canada Comparison viagra cialis levivia! Buy phentermine on line Phentermine diet pills, Phentermine faqs Cialis online sales Fda approved phentermine Cialis doseage Phentermine withdrawal symptoms Xanax and depression Drug screen xanax Viagra samples free Cheap diet phentermine pill Dangers of phentermine heart? Uk online pharmacy phentermine Low dose xanax prosexual? Phentermine success stories Cheap tramadol without prescription Difference between cialis and viagra Online tramadol. Cialis injury lawyer ohio Phentermine chemical enhancement Canada cialis Adipex meridia phentermine xenical Generic cialis overnight Can i take xanax with zocor and procardia Phentermine airborne express+cod Buy cheap viagra online uk! 5 free shipping Natural supplement for viagra? Get viagra online Buy cheap online viagra: Natural viagra substitutes Phentermine without prescription? Phentermine priority mail Lethal doses of klonopin and xanax Nitroglycerin and viagra Cheap phentermine online Generic viagra cialis Cheap quality viagra Alternative herbal supplement viagra Purchase viagra No perscription viagra Viagra price comparison: Valium vs xanax Online viagra sales Cheap generic viagra Natural phentermine Buy phentermine online cheap Cod xanax Mexican pharmacies online+xanax Natural viagra for woman Generic sales viagra Phentermine raleigh, Generic viagra no perscription needed Phentermine free prescription Oxycontin xanax bars perclesept and lortab wha Buy tramadol How to get xanax Purchase tramadol without a prescription Free sample viagra Diet pill addiction phentermine Taking xanax while pregnant Does phentermine help weight loss. Discount viagra online Generic sample viagra Viagra success story Phentermine for weight loss: Viagra like pill Tramadol medication: Viagra online cheap Generic viagra cialis levitra buy cheap Herbal viagra alternatives Cod phentermine shipped 00 phentermine Cialis for sale uk Ionamin phentermine yellow Cialis western open, Symptom tramadol withdrawal Tramadol hydrochloride Phentermine adipex Buy cheap uk viagra Phentermine feedback Xanax withdrawals Phentermine medical insert Cialis generic online Buy phentermine online without prescription Xanax photo! Viagra uk sales Didrex vs phentermine Cialis experience Xanax anxiety relief pills order here Safe internet shopping generic viagraeng Macular degeneration caused by viagra Buy cheap phentermine Phentermine from the uk. Buy online viagra where Drug information picture identification tramadol er bvf! What happens when women take viagra What does xanax do Diet loss phentermine pill weight Anxiety disorder xanax Viagra use What is xanax used for Xanax drug prescription What does phentermine do to your heart! Luvox and xanax Cheap phentermine no prescription Cyber pharmacy viagra Order phentermine c o d Does it viagra work Xanax and grapefruit Xanax online cheap Viagra discount sale? Tramadol 50 mg Viagra alternative herbal supplement Link myblogde online order viagra Valium vs xanax 5 mg free shipping Generic viagra fast shipping: Viagra anxiety Buy locally viagra Xanax long term effects Phentermine online without prescription: Tramadol heath solutions network Phentermine generic Best price on phentermine Side effect of viagra How to get a xanax prescription Best price on phentermine Withdraw xanax Viagra canada prescription Tramadol online discount cheap Is phentermine dangerous Xanax effect Female spray viagra I need to find cheap phentermine delivered to fl Effects of viagra on woman Fioricet phentermine shipping Mixing viagra and cialis Phentermine no rx Buy online purchase viagra Xanax long term use Caverta veega generic viagra Generic viagra pill Takin prozac and xanax? Xanax online no prescription 120 tramadol Phentermine and urine drug screen Drug loss phentermine weight Phentermine on sale Buy in phentermine uk! Free shipping with phentermine order Phentermine and birth defects Phentermine xenical diet pill Iv sample viagra Viagra and pulmonary hypertension Best price for viagra in the uk Tramadol hydrochloride tablet Buy cialis soft tabs Cialis drug prescription Can woman take viagra Phentermine 30mg cap Pictures of xanax bars Cialis story Tramadol without prescription Best viagra prices online Xanax next day, Xanax without a perscription 5 90 How much xanax is a lethal dose Phentermine prescribed online Phentermine and sibutramine be combined Canada generic viagra Phenytoin interaction with xanax Phentermine cash on delivery Phentermine with no prescription Diet drug loss phentermine weight Fastin phentermine Buy in online uk viagra How long does phentermine stay in your system Effects long phentermine side term Buy viagra 1 Compare viagra prices Viagra price online Buy phentermine pay cod Cod xanax 20mg cialis Lose weight with phentermine and 5 htp No prescription phentermine Cialis dosage Generic viagra canada Phentermine info Taking viagra or levitra as a booster for cialis Phentermine buy cheap Phenytoin interaction with xanax Online tramadol Phentermine wholesale? Uk viagra Filing income tax buy tramadol, Phentermine versus meridia Buy online prescription viagra without Discount online phentermine Get online viagra Phentermine pills Information on the drug xanax Discount viagra sales Generic cialis online Lowest cost phentermine Phentermine free delivery Cialis online discount Phentermine pharmacy cod? Related drugs to phentermine Natural viagra type alternatives. Drug interactions with cocaine and viagra Cheap diet online phentermine pill. What does xanax do Phentermine ionamin, Will xanax help me sleep while on adderall Viagra online order guide: Phentermine florida Free viagra without prescription Buspar xanax Viagra use Cheap viagra uk Cialis testimonials Genaric viagra Cheap tramadol, Discount online viagra Viagra online ordering Compare generic viagra prices Generic cialis price Tramadol without prescription Prozac drug interaction with xanax? Viagra prescription online Xanax lethal dose: Phentermine money order Levivia versus viagra 50 mg tramadol 50mg viagra Viagra lawsuits Taking phentermine Buy lvivhostcom online viagra viagra Discount phentermine no prescription Buy phentermine mastercard Saturday delivery phentermine Buy tramadol online Phentermine works? Viagra samples free Phentermine success stories, Viagra cost Phentermine 90 day Black market costa rica pharmacy phentermine no imprint code Cialis free sample: Xanax ambien Order xanax on line Diet phentermine Invia nasal viagra Why phentermine Phentermine and carbs: Phentermine ship to florida Tramadol hcl 50 mg 25mg viagra Tramadol without a prescription Cheap phentermine no prescription Buy viagra internet Buy cheap tramadol Cheap tramadol no prescription: Pain medication tramadol Phentermine pillstore. Phentermine wholesale Diet no phentermine pill prescription Detection drug in phentermine screen urine Xanax effects Better than viagra Phentermine versus meridia Xanax information Viagra picture: 5 mg diet pill Information phentermine Low dose of viagra Overnight phentermine no prescription? Purchase tramadol online Viagra on line. Viagra testimonial 5 phentermine Cheap viagra online prescription Xanax dosing! Mail order viagra online Phentermine ingredients Phentermine next day delivery Best cialis price: Viagra for woman information Viagra information. Buy xanax overnight Phentermine incrediants Cialis dysfunction erectile levivia viagra Viagra cialis levitra comparison Cheapest phentermine diet pills Cialis generic india. Viagra from canada Phentermine online prescriptions. How long does xanax stay in the system Order phentermine cod

Java Interview Questions for Entry Level Position

Find More Question in Category: Java Interview Questions

  1. If Runnable interface is better than Thread class, than why we are using Thread class? What is the need for Thread class?
  2. Why we are calling System.gc() method to garbage collection of unused object, if garbage collection is automatically done in Java by daemon thread in background process with regular interval?
  3. What is the significance of Marker interface? Why are we using, even though it has no method?
  4. Why we are always doing rs.next() in first line of while loop in retrieving data from database through result set?
  5. Please give me the details of synchronization? And which are the methods and elements used in it and why only that methods and variables?
  6. Why we are not using Java in real time based application, but instead we are using C or C++?
  7. Detail difference between 4 types of driver and their use in different different applications?
  8. Is Java code with native methods platform-independent?
  9. Why is the compiler platform-independent, while JVM is platform-dependent?\
  10. Mention different type of compilers and interpreters in Java?

Networking Interview Questions

Find More Question in Category: Networking Interview Questions

 Networking Interview Questions

 Networking Interview Questions

 Networking Interview Questions

NET Interview Questions - ASP.NET

Find More Question in Category: NET Interview Questions, ASP.NET Interview Questions
  1. Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process.
    inetinfo.exe is theMicrosoft 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 tothe actual worker process aspnet_wp.exe.
     
  2. What’s the difference between Response.Write() andResponse.Output.Write()?
    Response.Output.Write() allows you to write formatted output. 
     
  3. What methods are fired during the page load?
    Init() - when the page is instantiated
    Load() - when the page is loaded into server memory
    PreRender() - the brief moment before the page is displayed to the user as HTML
    Unload() - when page finishes loading. 
     
  4. When during the page processing cycle is ViewState available?
    After the Init() and before the Page_Load(), or OnLoad() for a control. 
     
  5. What namespace does the Web page belong in the .NET Framework class hierarchy?
    System.Web.UI.Page 
     
  6. Where do you store the information about the user’s locale?
    System.Web.UI.Page.Culture 
     
  7. What’s the difference between Codebehind="MyCode.aspx.cs" andSrc="MyCode.aspx.cs"?
    CodeBehind is relevant to Visual Studio.NET only. 
     
  8. What’s a bubbled event?
    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. 
     
  9. Suppose you want a certain ASP.NET function executed on MouseOver for a certain button.  Where do you add an event handler?
    Add an OnMouseOver attribute to the button.  Example: btnSubmit.Attributes.Add("onmouseover","someClientCodeHere();"); 
     
  10. What data types do the RangeValidator control support?
    Integer, String, and Date. 
     
  11. Explain the differences between Server-side and Client-side code?
    Server-side code executes on the server.  Client-side code executes in the client's browser. 
     
  12. What type of code (server or client) is found in a Code-Behind class?
    The answer is server-side code since code-behind is executed on the server.  However, during the code-behind's execution on the server, it can render client-side code such as JavaScript to be processed in the clients browser.  But just to be clear, code-behind executes on the server, thus making it server-side code. 
     
  13. Should user input data validation occur server-side or client-side?  Why?
    All user input data validation should occur on the server at a minimum.  Additionally, client-side validation can be performed where deemed appropriate and feasable to provide a richer, more responsive experience for the user. 
     
  14. What is the difference between Server.Transfer and Response.Redirect?  Why would I choose one over the other?
    Server.Transfer transfers page processing from one page directly to the next page without making a round-trip back to the client's browser.  This provides a faster response with a little less overhead on the server.  Server.Transfer does not update the clients url history list or current url.  Response.Redirect is used to redirect the user's browser to another page or site.  This performas a trip back to the client where the client's browser is redirected to the new page.  The user's browser history list is updated to reflect the new address. 
     
  15. Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?
    Valid answers are:
    · 
    A DataSet can represent an entire relational database in memory, complete with tables, relations, and views.
    ·  A DataSet is designed to work without any continuing connection to the original data source.
    ·  Data in a DataSet is bulk-loaded, rather than being loaded on demand.
    ·  There's no concept of cursor types in a DataSet.
    ·  DataSets have no current record pointer You can use For Each loops to move through the data.
    ·  You can store many edits in a DataSet, and write them to the original data source in a single operation.
    ·  Though the DataSet is universal, other objects in ADO.NET come in different versions for different data sources. 
     
  16. What is the Global.asax used for?
    The Global.asax (including the Global.asax.cs file) is used to implement application and session level events. 
     
  17. What are the Application_Start and Session_Start subroutines used for?
    This is where you can set the specific variables for the Application and Session objects. 
     
  18. Can you explain what inheritance is and an example of when you might use it?
    When you want to inherit (use the functionality of) another class.  Example: With a base class named Employee, a Manager class could be derived from the Employee base class. 
     
  19. Whats an assembly?
    Assemblies are the building blocks of the .NET framework. Overview of assemblies from MSDN 
     
  20. Describe the difference between inline and code behind.
    Inline code written along side the html in a page. Code-behind is code written in a separate file and referenced by the .aspx page. 
     
  21. Explain what a diffgram is, and a good use for one?
    The DiffGram is one of the two XML formats that you can use to render DataSet object contents to XML.  A good use is reading database data to an XML file to be sent to a Web Service. 
     
  22. Whats MSIL, and why should my developers need an appreciation of it if at all?
    MSIL is the Microsoft Intermediate Language. All .NET compatible languages will get converted to MSIL.  MSIL also allows the .NET Framework to JIT compile the assembly on the installed computer. 
     
  23. Which method do you invoke on the DataAdapter control to load your generated dataset with data?
    The Fill() method. 
     
  24. Can you edit data in the Repeater control?
    No, it just reads the information from its data source. 
     
  25. Which template must you provide, in order to display data in a Repeater control?
    ItemTemplate. 
     
  26. How can you provide an alternating color scheme in a Repeater control?
    Use the AlternatingItemTemplate. 
     
  27. What property must you set, and what method must you call in your code, in order to bind the data from a data source to the Repeater control?
    You must set the DataSource property and call the DataBind method. 
     
  28. What base class do all Web Forms inherit from?
    The Page class. 
     
  29. Name two properties common in every validation control?
    ControlToValidate property and Text property. 
     
  30. Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?
    DataTextField property. 
     
  31. Which control would you use if you needed to make sure the values in two different controls matched?
    CompareValidator control. 
     
  32. How many classes can a single .NET DLL contain?
    It can contain many classes.

Oracle Interview Questions

What’s the command to see the current user name?
Sql> show user; 

Explain the difference between a hot backup and a cold backup and the benefits associated with each.
A hot backup is basically taking a backup of the database while it is still up and running and it must be in archive log mode. A cold backup is taking a backup of the database while it is shut down and does not require being in archive log mode. The benefit of taking a hot backup is that the database is still available for use while the backup is occurring and you can recover the database to any ball in time. The benefit of taking a cold backup is that it is typically easier to administer the backup and recovery process. In addition, since you are taking cold backups the database does not require being in archive log mode and thus there will be a slight performance gain as the database is not cutting archive logs to disk.
 
You have just had to restore from backup and do not have any control files. How would you go about bringing up this database?
I would create a text based backup control file, stipulating where on disk all the data files where and then issue the recover command with the using backup control file clause.

What’s the command to change the SQL prompt name?
SQL> set sqlprompt “database-1 > ”
database-1 >
database-1 >

How do you switch to DOS prompt from SQL prompt?
SQL> host
 
How do I eliminate duplicate rows in an Oracle database?
SQL> delete from table_name where rowid not in (select max(rowid) from table group by duplicate_values_field_name);
or
SQL> delete duplicate_values_field_name dv from table_name ta where rowid < (select min(rowid) from table_name tb where ta.dv=tb.dv);

How do I display row number with records?

Use the row-num pseudocolumn with query, like
SQL> select rownum, ename from emp;
 
How do you switch from an init.ora file to a spfile?
Issue the create spfile from pfile command.
 
Explain the difference between a data block, an extent and a segment.
A data block is the smallest unit of logical storage for a database object. As objects grow they take chunks of additional storage that are composed of contiguous data blocks. These groupings of contiguous data blocks are called extents. All the extents that an object takes when grouped together are considered the segment of the database object.
 

Explain explicit cursor attributes.
There are four cursor attributes used in Oracle: cursor_name%Found, cursor_name%NOTFOUND, cursor_name%ROWCOUNT, cursor_name%ISOPEN

Give two examples of how you might determine the structure of the table DEPT.
Use the describe command or use the dbms_metadata.get_ddl package.

How do you view version information in Oracle?
SQL> select banner from $version;
 
Where would you look for errors from the database engine?
In the alert log.

Compare and contrast TRUNCATE and DELETE for a table.
Both the truncate and delete command have the desired outcome of getting rid of all the rows in a table. The difference between the two is that the truncate command is a DDL operation and just moves the high water mark and produces a now rollback. The delete command, on the other hand, is a DML operation, which will produce a rollback and thus take longer to complete.

Explain implicit cursor attributes.
Same as explicit cursor but prefixed by the word SQL: SQL%Found, SQL%NOTFOUND, SQL%ROWCOUNT, SQL%ISOPEN  
Give the reasoning behind using an index.
Faster access to data blocks in a table.
 
Give the two types of tables involved in producing a star schema and the type of data they hold.
Fact tables and dimension tables. A fact table contains measurements while dimension tables will contain data that will help describe the fact tables.
 
What type of index should you use on a fact table?
A Bitmap index.

The NVL function only allows the same data type. But here’s the task: if the commission field is null, then the text “Not Applicable” should be displayed, instead of blank space. How do you write the query?
SQL> select nvl(to_char(comm.),’Not Applicable’) from emp;
 
Give two examples of referential integrity constraints.
A primary key and a foreign key.
 

How do you display the records within a given range?
select rownum, empno, ename from emp where rowid in
(select rowid from emp where rownum < =&rangeend
minus
select rowid from emp where rownum<&rangebegin);
A table is classified as a parent table and you want to drop and re-create it. How would you do this without affecting the children tables?
Disable the foreign key constraint to the parent, drop the table, re-create the table, enable the foreign key constraint.
 
Explain the difference between ARCHIVELOG mode and NOARCHIVELOG mode and the benefits and disadvantages to each.
ARCHIVELOG mode is a mode that you can put the database in for creating a backup of all transactions that have occurred in the database so that you can recover to any ball in time. NOARCHIVELOG mode is basically the absence of ARCHIVELOG mode and has the disadvantage of not being able to recover to any ball in time. NOARCHIVELOG mode does have the advantage of not having to write transactions to an archive log and thus increases the performance of the database slightly.
 
What command would you use to create a backup control file?
Alter database backup control file to trace.
 
Give the stages of instance startup to a usable state where normal users may access it.
STARTUP NOMOUNT - Instance startup
STARTUP MOUNT - The database is mounted
STARTUP OPEN - The database is opened
16.    What column differentiates the V$ views to the GV$ views and how?
The INST_ID column which indicates the instance in a RAC environment the information came from.
 
How would you go about generating an EXPLAIN plan?
Create a plan table with utlxplan.sql.
Use the explain plan set statement_id = 'tst1' into plan_table for a SQL statement
Look at the explain plan with utlxplp.sql or utlxpls.sql
 
How would you go about increasing the buffer cache hit ratio?
Use the buffer cache advisory over a given workload and then query the v$db_cache_advice table. If a change was necessary then I would use the alter system set db_cache_size command.
 
Explain an ORA-01555
You get this error when you get a snapshot too old within rollback. It can usually be solved by increasing the undo retention or increasing the size of rollbacks. You should also look at the logic involved in the application getting the error message.
 
Explain the difference between $ORACLE_HOME and $ORACLE_BASE.
ORACLE_BASE is the root directory for oracle. ORACLE_HOME located beneath ORACLE_BASE is where the oracle products reside.

MS SQL Server Database Interview Interview Questions

1. What is normalization?
2. What is a Stored Procedure?
3. Can you give an example of Stored Procedure?
4. What is a trigger?
5. What is a view?
6. What is an Index?
7. What are the types of indexes available with SQL Server?
8. What is the basic difference between clustered and a non-clustered index?
9. What are cursors?
10. When do we use the UPDATE_STATISTICS command?
11. Which TCP/IP port does SQL Server run on? 
12. From where can you change the default port?
13. Can you tell me the difference between DELETE & TRUNCATE commands?
14. Can we use Truncate command on a table which is referenced by FOREIGN KEY?
15. What is the use of DBCC commands?
16. Can you give me some DBCC command options?
17. What command do we use to rename a db?
18. Well sometimes sp_reanmedb may not work you know because if some one is using the db it will not accept this command so what do you think you can do in such cases?
19. What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?
20. What do you mean by COLLATION?
21. What is a Join in SQL Server?
22. Can you explain the types of Joins that we can have with Sql Server?
23. When do you use SQL Profiler?
24. What is a Linked Server?
25. Can you link only other SQL Servers or any database servers such as Oracle?
26. Which stored procedure will you be running to add a linked server?
27. What are the OS services that the SQL Server installation adds?
28. Can you explain the role of each service?
29. How do you troubleshoot SQL Server if its running very slow?
30. Lets say due to N/W or Security issues client is not able to connect to server or vice versa. How do you troubleshoot?
31. What are the authentication modes in SQL Server? - Windows mode and mixed mode (SQL & Windows).
32. Where do you think the users names and passwords will be stored in sql server?
33. What is log shipping?
34. Let us say the SQL Server crashed and you are rebuilding the databases including the master database what procedure to you follow?
35. Let us say master db itself has no backup. Now you have to rebuild the db so what kind of action do you take?
36. What is BCP? When do we use it?
37. What should we do to copy the tables, schema and views from one SQL Server to another?
38. What are the different types of joins and what dies each do?
39. What are the four main query statements?
40. What is a sub-query? When would you use one?
41. What is a NOLOCK?
42. What are three SQL keywords used to change or set someone’s permissions?
43. What is the difference between HAVING clause and the WHERE clause?
44. What is referential integrity? What are the advantages of it?
45. What is database normalization?
46. Which command using Query Analyzer will give you the version of SQL server and operating system?
47. Using query analyzer, name 3 ways you can get an accurate count of the number of records in a table?
48. What is the purpose of using COLLATE in a query?
49. What is a trigger?
50. What is one of the first things you would do to increase performance of a query? For example, a boss tells you that “a query that ran yesterday took 30 seconds, but today it takes 6 minutes”
51. What is an execution plan? When would you use it? How would you view the execution plan?
52. What is the STUFF function and how does it differ from the REPLACE function?
53. What does it mean to have quoted_identifier on? What are the implications of having it off?
54. What are the different types of replication? How are they used?
55. What is the difference between a local and a global variable?
56. What is the difference between a Local temporary table and a Global temporary table? How is each one used?
57. What are cursors? Name four types of cursors and when each one would be applied?
58. What is the purpose of UPDATE STATISTICS?
59. How do you use DBCC statements to monitor various aspects of a SQL server installation?
60. How do you load large data to the SQL server database?
61. How do you check the performance of a query and how do you optimize it?
62. How do SQL server 2000 and XML linked? Can XML be used to access data?
63. What is SQL server agent?
64. What is referential integrity and how is it achieved?
65. What is indexing?
66. What is normalization and what are the different forms of normalizations?
67. Difference between server.transfer and server.execute method?
68. What id de-normalization and when do you do it?
69. What is better - 2nd Normal form or 3rd normal form? Why?
70. Can we rewrite subqueries into simple select statements or with joins? Example?
71. What is a function? Give some example?
72. What is a stored procedure?
73. Difference between Function and Procedure-in general?
74. Difference between Function and Stored Procedure?
75. Can a stored procedure call another stored procedure. If yes what level and can it be controlled?
76. Can a stored procedure call itself(recursive). If yes what level and can it be controlled.?
77. How do you find the number of rows in a table?
78. Difference between Cluster and Non-cluster index?
79. What is a table called, if it does not have neither Cluster nor Non-cluster Index?
80. Explain DBMS, RDBMS?
81. Explain basic SQL queries with SELECT from where Order By, Group By-Having?
82. Explain the basic concepts of SQL server architecture?
83. Explain couple pf features of SQL server
84. Scalability, Availability, Integration with internet, etc.)?
85. Explain fundamentals of Data ware housing & OLAP?
86. Explain the new features of SQL server 2000?
87. How do we upgrade from SQL Server 6.5 to 7.0 and 7.0 to 2000?
88. What is data integrity? Explain constraints?
89. Explain some DBCC commands?
90. Explain sp_configure commands, set commands?
91. Explain what are db_options used for?
92. What is the basic functions for master, msdb, tempdb databases?
93. What is a job?
94. What are tasks?
95. What are primary keys and foreign keys?
96. How would you Update the rows which are divisible by 10, given a set of numbers in column?
97. If a stored procedure is taking a table data type, how it looks?
98. How m-m relationships are implemented?
99. How do you know which index a table is using?
100. How will oyu test the stored procedure taking two parameters namely first name and last name returning full name?
101. How do you find the error, how can you know the number of rows effected by last SQL statement?
102. How can you get @@error and @@rowcount at the same time?
103. What are sub-queries? Give example? In which case sub-queries are not feasible?
104. What are the type of joins? When do we use Outer and Self joins?
105. Which virtual table does a trigger use?
106. How do you measure the performance of a stored procedure?
107. Questions regarding Raiseerror?
108. Questions on identity?
109. If there is failure during updation of certain rows, what will be the state?

Here is some of the answers


If you know answer of above question please reply using “Leave a comment” option.
Also if you like to contribute to this website, you can e-mail us:
info@jobinterviewquestions.info

DB2 Interview Questions

Find More Question in Category: Database Interview Questions, DB2 Interview Questions

 1) How would you find out the total number of rows in a DB2 table?

Use SELECT COUNT(*) … in db2 query

2) How do you eliminate duplicate values in DB2 SELECT ?

Use SELECT DISTINCT … in db2 query

3) How do you select a row using indexes in DB2?

Specify the indexed columns in the WHERE clause of db2 query.

4) How do you find the maximum value in a column in db2?

Use SELECT MAX(…) .. in db2 query  
DB2 INTERVIEW QUESTIONS - advertisement 

5) How do you retrieve the first 5 characters of FIRSTNAME column of DB2 table EMP ?

SQL Query : SELECT SUBSTR(FIRSTNAME,1,5) FROM EMP;

6) What are aggregate functions?

Bulit-in mathematical functions for use in SELECT clause.

7) Can you use MAX on a CHAR column?

YES.

8 .  My SQL statement SELECT AVG(SALARY) FROM EMP yields inaccurate results. Why?

Because SALARY is not declared to have NULLs and the employees for whom the salary is not known are also counted.

9) How do you concatenate the FIRSTNAME and LASTNAME from EMP table to give a complete name?

SELECT FIRSTNAME || ‘ ‘ || LASTNAME FROM EMP;

10) What is the use of VALUE function?

1. Avoid -ve SQLCODEs by handling nulls and zeroes in computations

2. Substitute a numeric value for any nulls used in computation

11) What is UNION,UNION ALL? –

UNION : eliminates duplicates

UNION ALL: retains duplicates

Both these are used to combine the results of different SELECT statements.

Suppose I have five SQL SELECT statements connected by UNION/UNION ALL, how many times should I specify UNION to eliminate the duplicate rows? - Once.

12) What is the restriction on using UNION in embedded SQL?

It has to be in a CURSOR.

13) In the WHERE clause what is BETWEEN and IN? –

BETWEEN supplies a range of values while IN supplies a list of values.

14) Is BETWEEN inclusive of the range values specified? –

Yes.

15) What is 'LIKE' used for in WHERE clause? What are the wildcard characters? –

LIKE is used for partial string matches. ‘%’ ( for a string of any character ) and ‘_’ (for any single character ) are the two wild card characters.

16) When do you use a LIKE statement?

To do partial search e.g. to search employee by name, you need not specify the complete name; using LIKE, you can search for partial string matches.

17) What is the meaning of underscore ( ‘_’ ) in the LIKE statement? –

Match for any single character.

18) What do you accomplish by GROUP BY … HAVING clause? –

GROUP BY partitions the selected rows on the distinct values of the column on which you group by.

HAVING selects GROUPs which match the criteria specified

19) Consider the employee table with column PROJECT nullable. How can you get a list of employees who are not assigned to any project?

SELECT EMPNO

FROM EMP

WHERE PROJECT IS NULL;

20) What is the result of this query if no rows are selected:

SELECT SUM(SALARY)

FROM EMP

WHERE QUAL=‘MSC’;

NULL

21) Why SELECT * is not preferred in embedded SQL programs?

For three reasons:

If the table structure is changed ( a field is added ), the program will have to be modified

Program might retrieve the columns which it might not use, leading on I/O over head.

The chance of an index only scan is lost.

What are correlated subqueries? -

A subquery in which the inner ( nested ) query refers back to the table in the outer query. Correlated subqueries must be evaluated for each qualified row of the outer query that is referred to.

22) What are the issues related with correlated subqueries? –

???

23) What is a cursor? why should it be used? –

Cursor is a programming device that allows the SELECT to find a set of rows but return them one at a time.

Cursor should be used because the host language can deal with only one row at a time.

24) How would you retrieve rows from a DB2 table in embedded SQL? –

Either by using the single row SELECT statements, or by using the CURSOR.

Apart from cursor, what other ways are available to you to retrieve a row from a table in embedded SQL? -

Single row SELECTs.

25) Where would you specify the DECLARE CURSOR statement? –

See answer to next question.

26) How do you specify and use a cursor in a COBOL program? –

Use DECLARE CURSOR statement either in working storage or in procedure division(before open cursor), to specify the SELECT statement. Then use OPEN, FETCH rows in a loop and finally CLOSE.

27) What happens when you say OPEN CURSOR?

If there is an ORDER BY clause, rows are fetched, sorted and made available for the FETCH statement. Other wise simply the cursor is placed on the first row.

28) Is DECLARE CURSOR executable?

No.

29) Can you have more than one cursor open at any one time in a program ? –

Yes.

30) When you COMMIT, is the cursor closed? - drona questions

Yes.

31) How do you leave the cursor open after issuing a COMMIT? ( for DB2 2.3 or above only )

Use WITH HOLD option in DECLARE CURSOR statement. But, it has not effect in psuedo-conversational CICS programs.

32) Give the COBOL definition of a VARCHAR field.

A VARCHAR column REMARKS would be defined as follows:

10 REMARKS.

49 REMARKS-LEN PIC S9(4) USAGE COMP.

49 REMARKS-TEXT PIC X(1920).

33) What is the physical storage length of each of the following DB2 data types:

DATE, TIME, TIMESTAMP?

DATE: 4bytes

TIME: 3bytes

TIMESTAMP: 10bytes

34) What is the COBOL picture clause of the following DB2 data types:

DATE, TIME, TIMESTAMP?

DATE: PIC X(10)

TIME : PIC X(08)

TIMESTAMP: PIC X(26)

35) What is the COBOL picture clause for a DB2 column defined as DECIMAL(11,2)?

PIC S9(9)V99 COMP-3.

Note: In DECIMAL(11,2), 11 indicates the size of the data type and 2 indicates the precision.

36) What is DCLGEN ? -

DeCLarations GENerator: used to create the host language copy books for the table definitions. Also creates the DECLARE table.

37) What are the contents of a DCLGEN? -

1. EXEC SQL DECLARE TABLE statement which gives the layout of the table/view in terms of DB2 datatypes.

2. A host language copy book that gives the host variable definitions for the column names.

38) Is it mandatory to use DCLGEN? If not, why would you use it at all? -

It is not mandatory to use DCLGEN.

Using DCLGEN, helps detect wrongly spelt column names etc. during the pre-compile stage itself ( because of the DECLARE TABLE ). DCLGEN being a tool, would generate accurate host variable definitions for the table reducing chances of error.

39) Is DECLARE TABLE in DCLGEN necessary? Why it used?

It not necessary to have DECLARE TABLE statement in DCLGEN. This is used by the pre-compiler to validate the table-name, view-name, column name etc., during pre-compile.

40) Will precompile of an DB2-COBOL program bomb, if DB2 is down?

No. Because the precompiler does not refer to the DB2 catalogue tables.

41) How is a typical DB2 batch pgm executed ?

1. Use DSN utility to run a DB2 batch program from native TSO. An example is shown:

DSN SYSTEM(DSP3)

RUN PROGRAM(EDD470BD) PLAN(EDD470BD) LIB('ED 01T.OBJ.LOADLIB')

END

2. Use IKJEFT01 utility program to run the above DSN command in a JCL.

Assuming that a site’s standard is that pgm name = plan name, what is the easiest way to find out which pgms are affected by change in a table’s structure ?

Query the catalogue tables SYSPLANDEP and SYSPACKDEP.

42) Name some fields from SQLCA.

SQLCODE, SQLERRM, SQLERRD

43) How can you quickly find out the # of rows updated after an update statement?

Check the value stored in SQLERRD(3).

44) What is EXPLAIN?

EXPLAIN is used to display the access path as determined by the optimizer for a SQL statement. It can be used in SPUFI (for single SQL statement ) or in BIND step (for embedded SQL ).

45) What do you need to do before you do EXPLAIN?

Make sure that the PLAN_TABLE is created under the AUTHID.

46) Where is the output of EXPLAIN stored? –

In userid.PLAN_TABLE

47) EXPLAIN has output with MATCHCOLS = 0. What does it mean? –

a nonmatching index scan if ACCESSTYPE = I.

48) How do you do the EXPLAIN of a dynamic SQL statement?

1. Use SPUFI or QMF to EXPLAIN the dynamic SQL statement

2. Include EXPLAIN command in the embedded dynamic SQL statements

49) How do you simulate the EXPLAIN of an embedded SQL statement in SPUFI/QMF? Give an example with a host variable in WHERE clause.)

Use a question mark in place of a host variable ( or an unknown value ). e.g.

SELECT EMP_NAME

FROM EMP

WHERE EMP_SALARY > ?

50) What are the isolation levels possible ? –

CS: Cursor Stability

RR: Repeatable Read

51) What is the difference between CS and RR isolation levels?

CS: Releases the lock on a page after use

RR: Retains all locks acquired till end of transaction

52) Where do you specify them ?

ISOLATION LEVEL is a parameter for the bind process.

53) When do you specify the isolation level? How?

During the BIND process. ISOLATION ( CS/RR )…

I use CS and update a page. Will the lock be released after I am done with that page?

No.

54) What are the various locking levels available?

PAGE, TABLE, TABLESPACE

55) How does DB2 determine what lock-size to use?

1. Based on the lock-size given while creating the tablespace

2. Programmer can direct the DB2 what lock-size to use

3. If lock-size ANY is specified, DB2 usually chooses a lock-size of PAGE

56) What are the disadvantages of PAGE level lock?

High resource utilization if large updates are to be done

57) What is lock escalation?

Promoting a PAGE lock-size to table or tablespace lock-size when a transaction has acquired more locks than specified in NUMLKTS. Locks should be taken on objects in single tablespace for escalation to occur.
 
 58) What are the various locks available?

SHARE, EXCLUSIVE, UPDATE

59) Can I use LOCK TABLE on a view?

No. To lock a view, take lock on the underlying tables.

60) What is ALTER ? –

SQL command used to change the definition of DB2 objects.
  
DB2 INTERVIEW QUESTIONS - advertisement 
61) What is a DBRM, PLAN ?

DBRM: DataBase Request Module, has the SQL statements extracted from the host language program by the pre-compiler.

PLAN: A result of the BIND process. It has the executable code for the SQL statements in the DBRM.

62) What is ACQUIRE/RELEASE in BIND?

Determine the point at which DB2 acquires or releases locks against table and tablespaces, including intent locks.

63) What else is there in the PLAN apart from the access path? –

PLAN has the executable code for the SQL statements in the host program

64) What happens to the PLAN if index used by it is dropped?

Plan is marked as invalid. The next time the plan is accessed, it is rebound.

65) What are PACKAGES ? –

They contain executable code for SQL statements for one DBRM.

66) What are the advantages of using a PACKAGE?

1. Avoid having to bind a large number of DBRM members into a plan

2. Avoid cost of a large bind

3. Avoid the entire transaction being unavailable during bind and automatic rebind of a plan

4. Minimize fallback complexities if changes result in an error.

67) What is a collection?

a user defined name that is the anchor for packages. It has not physical existence. Main usage is to group packages.

In SPUFI suppose you want to select max. of 1000 rows , but the select returns only 200 rows.

68) What are the 2 sqlcodes that are returned? –

100 ( for successful completion of the query ), 0 (for successful COMMIT if AUTOCOMMIT is set to Yes).

69) How would you print the output of an SQL statement from SPUFI? –

Print the output dataset.

70) How do you pull up a query which was previously saved in QMF ? –

??

71) Lot of updates have been done on a table due to which indexes have gone haywire. What do you do? –

Looks like index page split has occurred. DO a REORG of the indexes.

72) What is dynamic SQL? –

Dynamic SQL is a SQL statement created at program execution time.

73) When is the access path determined for dynamic SQL? –

At run time, when the PREPARE statement is issued.

74) Suppose I have a program which uses a dynamic SQL and it has been performing well till now. Off late, I find that the performance has deteriorated. What happened? –

Probably RUN STATS is not done and the program is using a wrong index due to incorrect stats.

Probably RUNSTATS is done and optimizer has chosen a wrong access path based on the latest statistics.

75) How does DB2 store NULL physically?

as an extra-byte prefix to the column value. physically, the nul prefix is Hex ’00’ if the value is present and Hex ‘FF’ if it is not.

76) How do you retrieve the data from a nullable column? –

Use null indicators. Syntax … INTO :HOSTVAR:NULLIND

77) What is the picture clause of the null indicator variable? –

S9(4) COMP.

78) What does it mean if the null indicator has -1, 0, -2? –

-1 : the field is null

0 : the field is not null

-2 : the field value is truncated

79) How do you insert a record with a nullable column?

To insert a NULL, move -1 to the null indicator

To insert a valid value, move 0 to the null indicator

80) What is RUNSTATS? –

A DB2 utility used to collect statistics about the data values in tables which can be used by the optimizer to decide the access path. It also collects statistics used for space management. These statistics are stored in DB2 catalog tables.

81) When will you chose to run RUNSTATS?

After a load, or after mass updates, inserts, deletes, or after REORG.

82) Give some example of statistics collected during RUNSTATS?

# of rows in the table

Percent of rows in clustering sequence

# of distinct values of indexed column

# of rows moved to a nearby/farway page due to row length increase

83) What is REORG? When is it used?

REORG reorganizes data on physical storage to reclutser rows, positioning overflowed rows in their proper sequence, to reclaim space, to restore free space. It is used after heavy updates, inserts and delete activity and after segments of a segmented tablespace have become fragmented.

84) What is IMAGECOPY ? –

It is full backup of a DB2 table which can be used in recovery.

85) When do you use the IMAGECOPY? –

To take routine backup of tables

After a LOAD with LOG NO

After REORG with LOG NO

86) What is COPY PENDING status?

A state in which, an image copy on a table needs to be taken, In this status, the table is available only for queries. You cannot update this table. To remove the COPY PENDING status, you take an image copy or use REPAIR utility.

87) What is CHECK PENDING ?

When a table is LOADed with ENFORCE NO option, then the table is left in CHECK PENDING status. It means that the LOAD utility did not perform constraint checking.

88) What is QUIESCE?

A QUIESCE flushes all DB2 buffers on to the disk. This gives a correct snapshot of the database and should be used before and after any IMAGECOPY to maintain consistency.

89) What is a clustering index ? –

Causes the data rows to be stored in the order specified in the index. A mandatory index defined on a partitioned table space.

90) How many clustering indexes can be defined for a table?

Only one.

91) What is the difference between primary key & unique index ?

Primary : a relational database constraint. Primary key consists of one or more columns that uniquely identify a row in the table. For a normalized relation, there is one designated primary key.

Unique index: a physical object that stores only unique values. There can be one or more unique indexes on a table.

92) What is sqlcode -922 ?

Authorization failure

93) What is sqlcode -811?

SELECT statement has resulted in retrieval of more than one row.

94) What does the sqlcode of -818 pertain to? –

This is generated when the consistency tokens in the DBRM and the load module are different.

95) Are views updateable ?

Not all of them. Some views are updateable e.g. single table view with all the fields or mandatory fields. Examples of non-updateable views are views which are joins, views that contain aggregate functions(such as MIN), and views that have GROUP BY clause.

96) If I have a view which is a join of two or more tables, can this view be updateable? –

No.

97) What are the 4 environments which can access DB2 ?

TSO, CICS, IMS and BATCH

98) What is an inner join, and an outer join ?

Inner Join: combine information from two or more tables by comparing all values that meet the search criteria in the designated column or columns of on e table with all the clause in corresponding columns of the other table or tables. This kind of join which involve a match in both columns are called inner joins.

Outer join is one in which you want both matching and non matching rows to be returned. DB2 has no specific operator for outer joins, it can be simulated by combining a join and a correlated sub query with a UNION.

99) What is FREEPAGE and PCTFREE in TABLESPACE creation?

PCTFREE: percentage of each page to be left free

FREEPAGE: Number of pages to be loaded with data between each free page

100) What are simple, segmented and partitioned table spaces ?

Simple Tablespace:

Can contain one or more tables

Rows from multiple tables can be interleaved on a page under the DBAs control and maintenance

Segmented Tablespace:

Can contain one or more tables

Tablespace is divided into segments of 4 to 64 pages in increments of 4 pages. Each segment is dedicated to single table. A table can occupy multiple segments

Partitioned Tablespace:

Can contain one table

Tablespace is divided into parts and each part is put in a separate VSAM dataset.

101) What is filter factor?

one divided by the number of distinct values of a column.

102) What is index cardinality? –

The number of distinct values a column or columns contain.

103) What is a synonym ?

Synonym is an alternate name for a table or view used mainly to hide the leading qualifier of a table or view.. A synonym is accessible only by the creator.

104) What is the difference between SYNONYM and ALIAS?

SYNONYM: is dropped when the table or tablespace is dropped. Synonym is available only to the creator.

ALIAS: is retained even if table or tablespace is dropped. ALIAS can be created even if the table does not exist. It is used mainly in distributed environment to hide the location info from programs. Alias is a global object & is available to all.

105) What do you mean by NOT NULL WITH DEFAULT? When will you use it?

This column cannot have nulls and while insertion, if no value is supplied then it wil have zeroes, spaces or date/time depending on whether it is numeric, character or date/time.

Use it when you do not want to have nulls but at the same time cannot give values all the time you insert this row.

106) What do you mean by NOT NULL? When will you use it?

The column cannot have nulls. Use it for key fields.

107) When would you prefer to use VARCHAR?

When a column which contains long text, e.g. remarks, notes, may have in most cases less than 50% of the maximum length.

108) What are the disadvantages of using VARCHAR?

1. Can lead to high space utilization if most of the values are close to maximum.

2. Positioning of VARCHAR column has to be done carefully as it has performance implications.

3. Relocation of rows to different pages can lead to more I/Os on retrieval.

109) How do I create a table MANAGER ( EMP#, MANAGER) where MANAGER is a foreign key which references to EMP# in the same table? Give the exact DDL.

First CREATE MANAGER table with EMP# as the primary key. Then ALTER it to define the foreign key.

When is the authorization check on DB2 objects done - at BIND time or run time?

At run time.

110) What is auditing?

Recording SQL statements that access a table. Specified at table creation time or through alter.
 

Powered by WordPress. Theme by H P Nadig