Interview questions important

34
http://oracleapplicationsstudymaterial.blogspot.com/ search?q=reports AOL 2. Where do concurrent request logfiles and output files go? The concurrent manager first looks for the environment variable $APPLCSF If this is set, it creates a path using two other environment variables: $APPLLOG and $APPLOUT It places log files in $APPLCSF/$APPLLOG Output files go in $APPLCSF/$APPLOUT So for 3. What are the logfile and output file naming conventions? Logfiles: l.req Output files: If $APPCPNAM is not set: . If $APPCPNAM = REQID: o.out If $APPCPNAM = USER: .out Where: = The request id of the concurrent request And: = The id of the user that submitted the request 4. How do I check if Multi-org is installed? SELECT multi_org_flag FROM fnd_product_groups; 5. How do I find out what the currently installed release of Applications is? SELECT release_name FROM fnd_product_groups 6. How do I find the name of a form? GUI: Use Help->About Oracle Applications Scroll down to find the form name Character: Use Help->Version 7. How do I lookup ORA errors? (and TNS errors) Use: oerr ora XXXX or: oerr tns XXXX where XXXX is the error number (This also supports a number of other error types. Use the 3-letter error prefix in place of 'ora') 8. How do I generate a message file (usaeng.msb)?

Transcript of Interview questions important

Page 1: Interview questions important

http://oracleapplicationsstudymaterial.blogspot.com/search?q=reports

AOL

     2.  Where do concurrent request logfiles and output files go?  The concurrent manager first looks for the environment variable $APPLCSF If this is set, it creates a path using two other environment variables: $APPLLOG and $APPLOUT It places log files in $APPLCSF/$APPLLOG Output files go in $APPLCSF/$APPLOUT So for

3.  What are the logfile and output file naming conventions?  Logfiles: l.req Output files: If $APPCPNAM is not set: . If $APPCPNAM = REQID: o.out If $APPCPNAM = USER: .out Where: = The request id of the concurrent request And: = The id of the user that submitted the request

4.  How do I check if Multi-org is installed?  SELECT multi_org_flag FROM fnd_product_groups;

5.  How do I find out what the currently installed release of Applications is?  SELECT release_name FROM fnd_product_groups

6.  How do I find the name of a form?  GUI: Use Help->About Oracle Applications Scroll down to find the form name Character: Use Help->Version

7.  How do I lookup ORA errors? (and TNS errors)  Use: oerr ora XXXX or: oerr tns XXXX where XXXX is the error number (This also supports a number of other error types. Use the 3-letter error prefix in place of 'ora')

8.  How do I generate a message file (usaeng.msb)?  Use: FNDMDCMF applsys/pwd 0 Y APP usaeng where: applsys/pwd is the APPLSYS user and password and APP is the short name of the application (like PO or INV)

9.  How do I submit a concurrent request from PL/SQL?  Use FND_REQUEST.SUBMIT_REQUEST Example: req_id := FND_REQUEST.SUBMIT_REQUEST('FND', 'FNDSCARU'); Note that this can only be called from a concurrent program See the Coding Standards for parameter details

Page 2: Interview questions important

10.  How do I cancel a running concurrent request?  Navigate to the Concurrent Request Summary form Select a request In character, do a Quickpick on the Status column You can select Cancel or Hold In GUI, use the Cancel or Hold buttons The Sysadmin responsibility can cancel or hold any running request

11.  Why does Help->Tools->Examine ask for a password?  The profile option Utilities:Diagnostics is set to NO This profile option controls whether users can use the Examine utility. The password should be the APPS password.

12.  How do I open a form in query-only mode?  Navigate to the Form Functions form (Application->Function) Query the particular form and add the parameter QUERY_ONLY=YES Not all forms will accept this parameter however.

13.  How do I find the version of an installed product? (such as Reports, SQL*Net etc.)  One of the easiest ways is to run the product if you can. Running Reports designer will give you the Reports version, running SQL*Plus will give you its version etc. Another easy way is to launch the Oracle Installer and look in the installed products

14.  How do I generate one single form? (As opposed to using adadmin to generate them all)  Character mode forms: Use adfrmgen Usage : adfrmgen filelist= or : adfrmgen product="product shortname(s)" [filepath="dir-path/filename"] For example : adfrmgen filelist=filelist.txt adfrmgen product="gl" filepath="forms/GLXSSMTY.inp" (one file) adfrmgen

15.  What do I do if I am missing an executable from my APPL_TOP?  Binary executables are created with adrelink. For example, if addmimp is missing use: adrelink force=y ranlib=y "ad addmimp" Posted by tom at 14:17 0 comments Labels: AOL

Friday, 18 July 2008

Oracle Applications 11i Technical FAQ’s

What is Concurrent Programming?Concurrent Processing in Oracle Apps simultaneously executes programs running in the Background with on line operations to fully

Page 3: Interview questions important

utilize your hardware capacity.Use Concurrent Programming forLong Running – Data intensive tasks such as Posting a Journal or generating a report.

What is the Role of Concurrent Managers?A Concurrent Manager is a component of Concurrent processing that monitors and runs tasks without tying up your computer.

What is AOL?Oracle Applications are constructed and maintained using the Application Object Library (AOL).The Three main areas of AOL are· Applications Security· Operating Profile· Concurrent Processing

Define Interfaces. What are the different types of Interfaces?

Interfaces are used to integrate external systems and data conversion in Oracle Applications.These can be used to either transfer data from Oracle Applications to a Flat File or Data from Legacy System to Oracle Applications.

There are two types of Interfaces. Inbound and Outbound Interfaces.

Inbound Interfaces are used to transfer data from external system to Oracle Applications.Outbound Interfaces are used to transfer data from Oracle Applications to External System.

Open Interface is the interface whose interface logic is provided by Oracle.Custom Interface is an Interface whose logic is developed by implementation team.

What are alerts? What are the different types of alerts? Explain.

Alerts

· Immediately inform you of the database activity as it happens.· Can Periodically trigger off events as and when required· Can take predefined actions· Allow you to define distribution list

Page 4: Interview questions important

· Can keep history of the exceptions and actions taken against them.

There are two types of alerts.· Event Alerts· Periodic Alerts

What is the Flex field? What are the types of Flex field?· Flex Field is “Flexible Field”· A Flexfield is made up of Segments.· Each segment has a name that can be assigned and has set of valid values.· There are two types of Flex field Key Flex Field and Descriptive Flex Fields.

What are the tables related to flex field?

· FND_FLEX_VALUES· FND_FLEX_VALUE_SETS· FND_FLEX_VALUES_TL

What is AD_DD package?

AD_DD Package is used to register the Table, Columns, and Primary Key in Oracle Applications.

PROCEDURE REGISTER_TABLE

Arguments: · P_APPL_SHORT_NAME · P_TAB_NAME · P_TAB_TYPE · P_NEXT_EXTENT · P_PCT_FREE · P_PCT_USED

PROCEDURE REGISTER_COLUMN

Arguments

P_APPL_SHORT_NAME P_TAB_NAME P_COL_NAME P_COL_SEQ P_COL_TYPE P_COL_WIDTH P_NULLABLE

Page 5: Interview questions important

P_TRANSLATE P_PRECISION P_SCALE

What are the types of Value sets?

NoneTableSpecialPairDependentIndependentTranslatable DependentTranslatable Independent

What are the Special and Pair Flex Field?

Special – Value Sets uses FlexField itselfPair – Two Flex Fields together specifies a range of valid values.

What are the Translatable Dependent and Independent Flex Fields?

Translatable Independent – Input must exist on previously defined set List of Values. Translated value can be used.

Translatable Dependent means Input is checked against a subset of values Based on a prior value. Translated value can be used.

What is FND_REQUEST.SUBMIT_REQUEST?

Submits a Concurrent Request for Processing by a Concurrent Manager.

Arguments – Application,program,description,start_time,sub_request,arg1..

What is Client Info?

By calling this Program in SQL*PLUS or reports with correct parameters user can achieve concurrent program environment for testing.

FND_CLIENT_INFO.setup_client_info(application_id Number,

Page 6: Interview questions important

Responsibility_id Number,User_id Number,Security_Group_id Number);

Give the Directory structure in apps?

$APPL_TOP - Product Directory- Version-

What are the steps in Registering Concurrent Program?

· Go to Programs and Define Executables.· Go to Programs and Define Concurrent Program· Go to Responsibility and attach the Request group you want.

What are the different types of executable available in Concurrent Programming?

· Host· Oracle Reports· PL/SQL Stored Procedures· SQL*LOADER· SQL*PLUS· Spawned· JSP

What are Request Sets?Request set is a collection of Reports/Programs that you group together and can be submitted to run is a single interaction.

What is Standard Request Submission (SRS Feature)?SRS provides you with a set of windows for running reports and Programs and a set of windows for creating groups of reports and programs to run together.Features· Specify whether reports or programs in a request set run sequentially or simultaneously· Specify whether to continue with a request set if a report or program in a sequential set fails· View a log file · Specify alternative requests based on completion status of previously run requests in a request set.

What are the different API’s for Concurrent Programming?

Page 7: Interview questions important

· FND_CONCURRENT· FND_FILE· FND_PROGRAM· FND_SET· FND_REQUEST· FND_REQUEST_INFO· FND_SUBMIT

What are the Different PLL’s Used in Forms?· CUSTOM.pll· FNDSQF.pll· APPCORE.pll· APPCORE2.pll· appdaypk.pll· APPSTAND.pll

What are the Steps in Forms Customization?

· Define the Form Name in FORM Screen· Define Form Functions· Attach to Menu/Attach to Request group

What are the triggers that can be modified during Forms Customization?

· Pre-Forms· When-New-Form-Instance· Query_Find· Post-Form· Key-Clrfrm· Accept

What are the triggers that cannot be modified during Forms Customization?

· STANDARD_ATTACHMENT· ZOOM· FOLDER_ACTION· KEY-HELP· KEY-EXIT· KEY-COMMIT· WHEN-WINDOW_CLOSED· CLOSE_WINDOW

What are the FlexField Qualifiers?

Page 8: Interview questions important

A Flex field qualifier identifies a particular segment of a key flex field.

What are the Segment Qualifiers?

A Segment Qualifier identifies a particular type of value in a single segment of a key flex field.

What is a Dynamic Insertion?

Dynamic Insertion is the insertion of new valid combination into a Key Flexfields Combinations Table from a form other than the combinations form.All Validation rules still will apply during insertion.

What are the different Level of Profiles?

User Profiles are used· To set options that affect your applications behavior o your preference.· A Collection of changeable options that affect the way your applications run· Modify Product Specific variables· Gives Control over certain Oracle Applications features.

Profile LevelsSite LevelApplication LevelResponsibility LevelUser Level

Site Level is the lowest level.

Explain Multi-Organization Structure?

Set of book

A financial reporting entity that uses a particular chart of accounts, functional currency and accounting calendar.

Business Group

This is highest level in the Organization Structure. The Business group secures HR Information. Multiple set of books can share same business group.

Page 9: Interview questions important

Legal Entity

A legal company for which you prepare fiscal or tax reports.

Balancing Entity

Represents an accounting entity for which you prepare financial statements.This is the segment in Accounting Flexfield.

Operating Unit

An Organization that Uses Oracle Cash Management, Order Management and shipping Execution, Oracle Payables, Oracle Purchasing, Oracle receivables.It may be a Sales office division or a department. An Operating Unit is associated with legal entity.

Inventory Organization

An Organization for which you track Inventory transactions and balances and/or an Organization that manufactures or distributes products.

HR Organization

HR Organization represents the basic work structure of any enterprise. They usually represent Functional Management or reporting groups that exists within a business group.

How can u see Multi-Organization is enabled or not from SQL Prompt?SELECT MULTI_ORG_FLAG FROM fnd_product_groups;

What are the two mandatory parameters required for PL/SQL stored Procedure Concurrent Program?Errbuf and retcode two OUT Parameters are required while defining PL/SQL stored Procedure Concurrent Program.Errbuf Returns any error messageand retcode returns completion status.Retcode returns 0 for success, 1 for warnings and 2 for error.

Oracle Alert FAQ’s--------------------

Page 10: Interview questions important

What are the event alerts?

Triggered off when a particular event occurs in the Database.Event can be Insert or Update.

What are Alert Action Level?

There are two levels of actions that can be performedDetail Action and Summary Action.

What is a Summary Threshold?

Oracle Alerts automatically determine whether to perform a detail action or Summary action based on the number of exceptions in the database.

What are the different actions that can be performed in Alerts?

· Message Actions· Concurrent Program Actions· Operating Script Actions· SQL Statement Script Actions

What are the steps involved in Creating Periodic alerts?

Write a select statementVerify and Run the SQLSpecify Alert InputsDefine Alert OutputsCreate Periodic alert actionsDefine Periodic alert message actionsCreate a periodic alert action setCheck your periodic alert.

What is the Distribution List in Alerts?

A Pre-defined set of electronic mail ids and printer Instructions that you can use on message actions instead of re-entering all the recipient names each time.

What are the Advance features available in alerts?

Distribution ListPeriodic setsSummary ThresholdsAction Set Checks

Page 11: Interview questions important

What are the four implicit Inputs in Alerts?

Mailid, rowid, org_id, date_last_checked Posted by tom at 13:15 0 comments Labels: Technical FAQ’s

What is responsibility

Is collection of menus, request security groups and data groupsMenus: collection of forms is nothing but menusRequest security groups: collection of programs.Data groups: is a group of modules to be made accessible by the user through Responsibility System admin-------->security------------>defineSecurity--------->user----------->define Posted by tom at 13:05 0 comments Labels: responsibility

What is template

a) The TEMPLATE form is the required starting point for all development of new Forms. b) The TEMPLATE form includes platform–independent attachments of several Libraries. APPSCORE :- It contains package and procedures that are required of all forms to support the MENUS ,TOOLBARS.APPSDAYPK :- It contains packages that control the oracle applications CALENDER FEATURES.FNDSQF :- it contains packages and procedures for MESSAGE DICTONARY, FLEX FIELDS, PROFILES AND CONCURRENT PROCESSING.CUSTOM :- it allows extension of oracle applications forms with out modification of oracle application code, you can use the custom library for customization such as zoom ( such as moving to another form and querying up specific records) Posted by tom at 13:04 0 comments Labels: template

Thursday, 17 July 2008

AOL

Page 12: Interview questions important

a) Registering tables. b) Registering views c) Registering db sequencesd) Registering profile options e) Registering lookups and lookup codesf) Registering forms g) Registering Form and Non-Form functions i) registering Menus and sub-menus. j) Registering DFF and KFF. k) Libraries Posted by tom at 23:42 0 comments Labels: AOL

Report names and their table names in GL, AP, AR, and PO

1) ra_customer_trx_all customer_trx_idtrx_number (invoice no, debit memo no, credit memo no)cust_trx_type_id

2) ra_customer_lines_all (details of invoice)cutomer_trx_id

3) ar_payment_schdules_allcheck_idThis table stores all transactions except adjustments and miscellaneous cash receipts. Oracle Receivables updates this table when activity occurs against an invoice, debit memo, chargeback, credit memo, on account credit, or receipt.

4) ra_cust_trx_types_all (invoice types)cust_trx_type_id

5) ra_batches_allBatch_idThis table stores information about each receipt batch that you create inOracle Receivables. Each row includes information about a specific batch such as batch source, status, batch type, control count, and control amount

6) ra_receivable_application_all

7) ra_adjustments_allThis table stores information about your invoice adjustments. Each row includes general information about the adjustment you are making such as activity name, amount, accounting information, reason, and type of adjustment. You need one row for each adjustment you are making to an invoice.

Page 13: Interview questions important

8) ra_cash_receiots_allCash_receipt_idThis table stores one record for each receipt that you enter. Oracle Receivables creates records concurrently in the AR_CASH_RECEIPT_HISTORY_ALL, AR_PAYMENT_SCHEDULES_ALL, and AR_RECEIVABLE_APPLICATIONS tables for invoice–related receipts.

1) ap_invoice_allinvoice_amount, base_amount, payment_status_flag(‘y’ –fully paid‘n’—unpaid‘p’ –partially paid)2) ap_invoice_payments_allinvoice_id,3) ap_invoice_distibutions_Allamount, base_amount, dist_code_combination_id, line_type_lookup_code4) ap_payment_schdulespayment_status_flag(“ ‘’’’’”)5) ap_payment_dustributions_all6) ap_checks_allcheck_id,AP_CHECKS_ALL stores information about payments issued to suppliers or refunds received from suppliers. You need one row for each payment you issue to a supplier or refund received from a supplier. Your Oracle Payables application uses this information to record payments you make to suppliers or refunds you receive from suppliers.

7) ap_accounting_events_all

8) ap_bank_accounts_allAP_BANK_ACCOUNTS_ALL contains information about your bank accounts. You need one row for each bank account you define. Each bank account must be affiliated with one bank branch. When you initiate an automatic payment batch, enter a manual check, or create a Quick payment, you can select a bank account that you define in this table.

9) ap_bank_accounts_uses_allAP_BANK_ACCOUNT_USES_ALL stores information for the internal and external bank accounts you define in Oracle Payables and OracleReceivables applications.

Page 14: Interview questions important

1) po_vendors_all2) po_vendors_sites_all3) po_headers_allpo_header_id4) po_lines_allpo_line_id5) po_line_locations_All6) po_distributions_allpo_distribution_id,

1) Gl_code_combinationsGL_CODE_COMBINATIONS stores valid account combinations for each Accounting Flexfield structure within your Oracle General Ledger application. Associated with each account are certain codes and flags, including whether the account is enabled, whether detail posting or detail budgeting is allowed, and others.

2) Gl_je_batches.GL_JE_BATCHES stores journal entry batches.

3) Gl_je_headersGL_JE_HEADERS stores journal entries. There is a one–to–many relationship between journal entry batches and journal entries. Each row in this table includes the associated batch ID, the journal entry name and description, and other information about the journal entry. This table corresponds to the Journals window of the Enter Journals form. STATUS is ’U’ for unposted, ’P’ for posted. Other statuses indicate that an error condition was found. A complete list is below.

4) Gl_je_lines.GL_JE_LINES stores the journal entry lines that you enter in the Enter Journals form. There is a one–to–many relationship between journal entries and journal entry lines. Each row in this table stores the associated journal entry header ID, the line number, the associated code combination ID, and the debits or credits associated with the journal line. STATUS is ’U’ for unposted or ’P’ for posted

5) Gl_set of booksGL_SETS_OF_BOOKS stores information about the sets of books you define in your Oracle General Ledger application. Each row includes the set of books name, description, functional currency, and other information. This table corresponds to the Set of Books form.

6) Gl_periods

Page 15: Interview questions important

GL_PERIODS stores information about the accounting periods you define using the Accounting Calendar form. Each row includes the start date and end date of the period, the period type, the fiscal year, the period number, and other information. There is a one–to–many relationship between a row in the GL_PERIOD_SETS table and rows in this table. Posted by tom at 10:17 0 comments Labels: api, GL, PO

Explain Form development process

a) open template formb) Save as .fmbc) Change the form module name as form name.d) Delete the default blocks, window, and canvase) Create a window.f) Assign the window property class to windowg) Create a canvas (subclass info)h) Assign canvas property class to the canvasI) assign the window to the canvas and canvas to the windowj) Create a data block k) Modify the form level properties. (sub class item -------> Text item) l) Modify the app_cusom package. In the program unit.m) Modify the pre-form trigger (form level)n) Modify the module level properties ((console window, First navigation p) Save and compile the form.Place the .fmx in the server directory.Q) Register in the AOL APPLICATION-----------> FORMAPPLICATION----------> FUNCTIONAPPLICATION----------> MENU Posted by tom at 09:48 0 comments

Thursday, 10 July 2008

oracle interview questions

Oracle interview questions

1. What are the built-in functions used for sending Parameters to forms?2. Can you have more than one content canvas view attached with a window?3. Is the After report trigger fired if the report execution fails?

Page 16: Interview questions important

4. Does a Before form trigger fire when the parameter form is suppressed?5. Is it possible to split the print reviewer into more than one region?

6. Is it possible to center an object horizontally in a repeating frame that has a variable horizontal size?7. For a field in a repeating frame, can the source come from the column which does not exist in the data group which forms the base for the frame?8. Can a field be used in a report without it appearing in any data group?9. The join defined by the default data link is an outer join yes or no?10. Can a formula column referred to columns in higher group?11. Can a formula column be obtained through a select statement?12. Is it possible to insert comments into sql statements return in the data model editor?13. Is it possible to disable the parameter from while running the report?14. When a form is invoked with call_form, Does oracle forms issues a save point?15. Can a property clause itself be based on a property clause?16. If a parameter is used in a query without being previously defined, what diff. exist betw. report 2.0 and 2.5 when the query is applied?17. What are the sql clauses supported in the link property sheet?18. What is trigger associated with the timer?19. What are the trigger associated with image items?20. What are the different windows events activated at runtime?

21. Can you have more than one content canvas view attached with awindow?

Yes. Each window you create must have atleast one content canvasview assigned to it. You can also create a window that hasmanipulated content canvas view. At run time only one of the contentcanvas views assign to a window is displayed at a time.

22. Is the After report trigger fired if the report executionfails?

Yes.

23. Does a Before form trigger fire when the parameter form issuppressed?

Yes.

Page 17: Interview questions important

24. Is it possible to split the print reviewer into more than oneregion?

Yes

25. Is it possible to center an object horizontally in a repeatingframe that has a variable horizontal size?

Yes

26. For a field in a repeating frame, can the source come from thecolumn which does not exist in the data group which forms the basefor the frame?

Yes

119. Can a field be used in a report without it appearing in anydata group?

Yes

27. The join defined by the default data link is an outer join yesor no?

Yes

28. Can a formula column referred to columns in higher group?

Yes

29. Can a formula column be obtained through a select statement?

Yes

30. Is it possible to insert comments into sql statements return inthe data model editor?

Yes

31. Is it possible to disable the parameter from while running thereport?

Yes32. When a form is invoked with call_form, Does oracle forms issuesa save point?

Page 18: Interview questions important

Yes

33. Can a property clause itself be based on a property clause?

Yes

34. If a parameter is used in a query without being previouslydefined, what diff. exist betw. report 2.0 and 2.5 when the query isapplied?

While both reports 2.0 and 2.5 create the parameter, report 2.5gives a message that a bind parameter has been created.

35. What are the sql clauses supported in the link property sheet?

Where start with having.

36. What is trigger associated with the timer?

When-timer-expired.

37. What are the trigger associated with image items?

When-image-activated fires when the operators double clicks on animage itemwhen-image-pressed fires when an operator clicks or doubleclicks on an image item

38. What are the different windows events activated at runtime?

When_window_activatedWhen_window_closedWhen_window_deactivatedWhen_window_resized Posted by tom at 14:55 0 comments

Wednesday, 9 July 2008

oracle interview questions with out answers part-1

Java on Oracle interview questions

1. What is JServer and what is it used for?

Page 19: Interview questions important

Oracle JServer Option is a Java Virtual Machine (Java VM) which runs within the Oracle database server’s address space. Oracle also provides a JServer Accelerator to compile Java code natively. This speeds up the execution of Java code by eliminating interpreter overhead.

2. How does one install the Oracle JServer Option?

Follow these steps to activate the Oracle JServer/ JVM option:

1. Make sure your database is started with large java_pool_size (>20M) and shared_pool_size (>50M) INIT.ORA parameter values.2. Run the $ORACLE_HOME/javavm/install/initjvm.sql script from SYS AS SYSDBA to install the Oracle JServer Option on a database.3. Grant JAVAUSERPRIV to users that wants to use Java:SQL> GRANT JAVAUSERPRIV TO SCOTT;4. The rmjvm.sql script can be used to deinstall the JServer option from your database.5. Follow the steps in the Oracle Migrations Guide to upgrade or downgrade the JServer option from one release toanother.

3. ce code into the database?

Use the “CREATE OR REPLACE JAVA SOURCE” command or “loadjava” utility. Loaded code can be viewed by selecting from the USER_SOURCE view.

4. Why does one need to publish Java in the database?

Publishing Java classes on the database makes it visible on a SQL and PL/SQL level. It is important to publish your code before calling it from SQL statements or PL/SQL code.

5. What is JDBC and what is it used for?

JDBC is a set of classes and interfaces written in Java to allow other Java programs to send SQL statements to a relational database management system. Oracle provides three categories of JDBC drivers: (a) JDBC Thin Driver (No local Net8 installation required/ handy for applets), (b) JDBC OCI for writing stand-alone Java applications, (c) JDBC KPRB driver (default connection) for Java Stored Procedures and

Page 20: Interview questions important

Database JSP’s.

6. How does one connect with the JDBC Thin Driver?The the JDBC thin driver provides the only way to access Oracle from the Web (applets). It is smaller and faster than the OCI drivers, and doesn’t require a pre-installed version of the JDBC drivers.

import java.sql.*;class dbAccess {public static void main (String args []) throws SQLException{DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());

Connection conn = DriverManager.getConnection(”jdbc:oracle:thin:@hostname:1526:orcl”, “scott”, “tiger”);// @machineName:port:SID, userid, password

Statement stmt = conn.createStatement();ResultSet rset = stmt.executeQuery(”select BANNER from SYS.V_$VERSION”);while (rset.next())System.out.println (rset.getString(1)); // Print col 1stmt.close();}}

7. How does one connect with the JDBC OCI Driver? One must have Net8 (SQL*Net) installed and working before attempting to use one of the OCI drivers.

import java.sql.*;class dbAccess {public static void main (String args []) throws SQLException{try {Class.forName (”oracle.jdbc.driver.OracleDriver”);} catch (ClassNotFoundException e) {e.printStackTrace();}

Connection conn = DriverManager.getConnection(”jdbc:oracle:oci8:@hostname_orcl”, “scott”, “tiger”);// or oci7 @TNSNames_Entry, userid, password

Statement stmt = conn.createStatement();

Page 21: Interview questions important

ResultSet rset = stmt.executeQuery(”select BANNER from SYS.V_$VERSION”);while (rset.next())System.out.println (rset.getString(1)); // Print col 1stmt.close();}}

8. How does one connect with the JDBC KPRB Driver? One can obtain a handle to the default or current connection (KPRB driver) by calling the OracleDriver.defaultConenction() method. Please note that you do not need to specify a database URL, username or password as you are already connected to a database session. Remember not to close the default connection. Closing the default connection might throw an exception in future releases of Oracle.

import java.sql.*;class dbAccess {public static void main (String args []) throws SQLException{Connection conn = (new oracle.jdbc.driver.OracleDriver()).defaultConnection();

Statement stmt = conn.createStatement();ResultSet rset = stmt.executeQuery(”select BANNER from SYS.V_$VERSION”);while (rset.next())System.out.println (rset.getString(1)); // Print col 1stmt.close();}}

9. What is SQLJ and what is it used for?

SQLJ is an ANSI standard way of coding SQL access in Java. It provides a Java precompiler that translates SQLJ call to JDBC calls. The idea is similar to that of other Oracle Precompilers.

10. How does one deploy SQLJ programs? Use the sqlj compiler to compile your *.sqlj files to *.java and *.ser files. The *.ser files contain vendor specific database code. Thereafter one invokes the javac compiler to compile the .java files to *.class files. The *.class and *.ser files needs to be deployed.

Page 22: Interview questions important

11. What is JDeveloper and what is it used for? JDeveloper is the Oracle IDE (Integrated Development Environment) for developing SQLJ and JDBC programs, applets, stored procedures, EJB’s, JSP’s etc.

12. What is InfoBus DAC and what is it used for? InfoBus DAC (Data Aware Controls) is a standard Java extension used in JDeveloper to create data aware forms. It replaced the JBCL interface that were used in JDeveloper V1 and V2.

13. What is a JSP and what is it used for? Java Server Pages (JSP) is a platform independent presentation layer technology that comes with SUN’s J2EE platform. JSPs are normal HTML pages with Java code pieces embedded in them. JSP pages are saved to *.jsp files. A JSP compiler is used in the background to generate a Servlet from the JSP page.

14. What is the difference between ASP and JSP? Active Server Pages (ASP) is a Microsoft standard, which is easier to develop than Java Server Pages (JSP). However ASP is a proprietary technology and is less flexible than JSP. For more information about ASP, see the Oracle ASP FAQ.

15. How does one invoke a JSP? A JSP gets invoked when you call a *.jsp file from your Web Server like you would call a normal *.html file. Obviously your web server need to support JSP pages and must be configured properly to handle them.

16. How does a JSP gets executed? The first time you call a JSP, a servlet (*.java) will be created and compiled to a .class file. The class file is then executed on the server. Output produced by the servlet is returned to the web browser. Output will typically be HTML or XML code.

17. What is a Java Stored Procedure/ Trigger? A Java Stored Procedure is a procedure coded in Java (as opposed to PL/SQL) and stored in the

Page 23: Interview questions important

Oracle database. Java Stored procedures are executed by the database JVM in database memory space. Java Stored Procedures can be developed in JDBC or SQLJ. Interfacing between PL/SQL and Java are extremely easy. Please note that Java Stored procedures are by default executed with invokers rights. PL/SQL procedures are by default executed with defines rights.

Oracle interview questions-------------------------------------

1. What’s the command to see the current user name?

Sql> show user;

2. What’s the command to change the SQL prompt name?

SQL> set sqlprompt “database-1 > ”database-1 >database-1 >

3. How do you switch to DOS prompt from SQL prompt?

SQL> host

4. 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); 5. How do I display row number with records? Use the row-num pseudocolumn with query, like SQL> select rownum, ename from emp;

6. 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); 7. 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

Page 24: Interview questions important

nvl(to_char(comm.),’Not Applicable’) from emp;

8. Explain explicit cursor attributes.

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

9. Explain implicit cursor attributes.

Same as explicit cursor but prefixed by the word SQL: SQL%Found, SQL%NOTFOUND, SQL%ROWCOUNT, SQL%ISOPEN

10. How do you view version information in Oracle?

SQL> select banner from $version;

Oracle interview questions

1. What is an oracle instance?2. What is a view?3. What is referential integrity?

4. Name the data dictionary that stores user-defined constraints?5. What is a collection of privileges?6. What is a snapshot?7. What is a synonym?8. What is a cursor?9. What is a sequence?10. What is a trigger?11. What is an exception?12. What is a partition of table?13. What are pseudo-columns in SQL? Provide examples.14. What are the Data Control statements?15. What is a schema?16. What is a type?17. What is a data model?18. What is a relation?19. Advantages of redo log files?20. What is an Archiver?21. What is a database buffer cache?22. What are the background processes in Oracle?23. %type and %rowtype are attributes for…?24. What are the steps in a two-phase commit?

Page 25: Interview questions important

25. What is a union, intersect, minus?26. What is a join, explain the types of joins?27. What is a co-related sub-query?28. ODBC stands for…?29. Data-type used to work with integers is?30. Describe data models?31. Describe the Normalization principles?32. What are the types of Normalization?33. What is de-normalization?

Interview questions for Oracle database administrator

1. Differentiate between TRUNCATE and DELETE2. What is the maximum buffer size that can be specified using the DBMS_OUTPUT.ENABLE function?3. Can you use a commit statement within a database trigger?4. What is an UTL_FILE.What are different procedures and functions associated with it?

5. Difference between database triggers and form triggers?6. What is OCI. What are its uses?7. What are ORACLE PRECOMPILERS?8. What is syntax for dropping a procedure and a function? Are these operations possible?9. Can a function take OUT parameters. If not why?10. Can the default values be assigned to actual parameters?11. What is difference between a formal and an actual parameter?12. What are different modes of parameters used in functions and procedures?13. Difference between procedure and function.14. Can cursor variables be stored in PL/SQL tables.If yes how. If not why?15. How do you pass cursor variables in PL/SQL?16. How do you open and close a cursor variable.Why it is required?17. What should be the return type for a cursor variable.Can we use a scalar data type as return type?18. What is use of a cursor variable? How it is defined?19. What WHERE CURRENT OF clause does in a cursor?20. Difference between NO DATA FOUND and %NOTFOUND21. What is a cursor for loop?22. What are cursor attributes?23. Difference between an implicit & an explicit cursor.24. What is a cursor?25. What is the purpose of a cluster?

Page 26: Interview questions important

26. How do you find the numbert of rows in a Table ?27. Display the number value in Words?28. What is a pseudo column. Give some examples?29. How you will avoid your query from using indexes?30. What is a OUTER JOIN?31. Which is more faster - IN or EXISTS?32. When do you use WHERE clause and when do you use HAVING clause?33. There is a % sign in one field of a column. What will be the query to find it?34. What is difference between SUBSTR and INSTR?35. Which datatype is used for storing graphics and images?36. What is difference between SQL and SQL*PLUS?37. What is difference between UNIQUE and PRIMARY KEY constraints?38. What is difference between Rename and Alias?39. What are various joins used while writing SUBQUERIES?

Typical Oracle questions

1. Tell us about yourself, your background.2. What are the three major characteristics that you bring to this company?3. What version of Oracle were you running?4. How many databases did the organization have and what sizes?5. What motivates you to do a good job?6. What two or three things are most important to you at work?

7. What qualities do you think are essential to be successful in this kind of work?8. What courses did you attend? What job certifications do you hold?9. What subjects/courses did you excel in? Why?10. What subjects/courses gave you trouble? Why?11. How does your previous work experience prepare you for this position?12. How do you define ’success’?13. What has been your most significant accomplishment to date?14. Describe a challenge you encountered and how you dealt with it.15. Describe a failure and how you dealt with it.16. Describe the ‘ideal’ job… the ‘ideal’ supervisor.17. What leadership roles have you held?18. What prejudices do you hold?19. What do you like to do in your spare time?20. What are your career goals (a) 3 years from now; (b) 10 years from now?

Page 27: Interview questions important

21. How does this position match your career goals?22. What have you done in the past year to improve yourself?23. In what areas do you feel you need further education and training to be successful?24. What do you know about our company?25. Why do you want to work for this company. Why should we hire you?26. Where do you see yourself fitting in to this organization initially? How about in 5 years?27. Why are you looking for a new job?28. How do you feel about re-locating?29. Are you willing to travel?30. What are your salary requirements?31. When would you be available to start if you were selected?32. Did you use online or off-line backups?33. If you have to advise a backup strategy for a new application, how would you approach it and what questions will you ask?34. If a customer calls you about a hanging database session, what will you do to resolve it?35. Compare Oracle to any other database that you know. Why would you prefer to work on one and not on the other?