Sample Questions Best site for GRE, LSAT, SAT, GMAT, TOEFL, CCNA, CCSA and interview sample questions  

Technical Sample Questions : C |  C++ |  Oracle |  Java | Unix |  Operating Systems |  Data Structure

Oracle Sample Questions ›› Oracle Webserver

Technical Sample Questions

Oracle Sample Questions : Oracle WebServer

  1. How does one start and stop the Oracle Web Listener?

    Answer: V1:wlctlstart ‹ port_number ›eg.wlctlstart 8888

    wlctlstop ‹ port_number ›

    V2.0: wlctl2 start ‹ listener_name › eg.wlctl2 start admin

    wlctl2 stop ‹ listener_name ›

    V2.1: wlctl21 start ‹ listener_name › eg.wlctl21 start admin

    wlctl21 stop ‹ listener_name ›

  2. How does one program using the PL/SQL Web Agent?

    Answer: The Oracle Web Agent extends the Common Gateway Interface (CGI) to Oracle PL/SQL stored procedures.Programming is done in PL/SQL using the following set of packaged procedures:

    • HTP - Hypertext Procedures
    • HTF - Hypertext Functions
    • OWA_UTIL - Oracle Web Agent Utilities
    Example PL/SQL procedure:



    htp.htitle('My first dynamic Web page');

    htp.print('Hello world');


    END HelloWorld;


    To run this example you would typically provide an URL like this to your Web Browser:

  3. How to do multi-user updates using the Oracle WebServer?

    Answer: Because the Web is stateless, there is no way to lock data between a SELECT and an UPDATE initiated from a Web Browser.One workaround is to let the procedure that display the data for updating also store the data values in hidden fields

    for c1 in (select rowid, a.* from emp a) loop

    htp.FormHidden('the_rowid', c1.rowid);

    htp.Print('Enter new Employee Name:');

    htp.FormHidden('old_ename', c1.ename);

    htp.FormText('new_ename', c1.ename);

    end loop;

    The update procedure can now compare the hidden values in the form with the current table values before allowing the update to continue.

    UPDATE emp SET ename = new_ename

    WHERE rowid = the_rowid

    AND ename = old_ename;

    if (SQL%ROWCOUNT = 0) then

    htp.print('Someone else changed this row, please re-query before updating.');


    htp.print('1 row updated.');

    end if;

  4. Can one use Designer/2000 to generate Web applications?

    Answer: Yes.

    From Designer/2000 1.3W one can generate applications that can do Insert, Update and Delete operations.

  5. Should I access Oracle via the CGI interface or the WRB?

    Answer: The Oracle Web Request Broker (WRB) is faster and more scalable than the CGI-BIN program OWA, but can only be used with certain Web servers.CGI programs are spawned off each time a HTTP request is made to it while the WRB will only start new brokers if the workload increases.

    Note that the OWS-BIN OWA program's configuration parameters are stored in the SV*.CFG file while the WRB OWA is configured from SV*.APP.

  6. Can I store and retrieve images from an Oracle table?

    Answer: Sure you can, consider the following:

    • Oracle freely distributes a few unsupported CGI utilities that can do just that.Ask them for their IMGLOAD/ OWAI/ OWAUP utilities.
    • If you want to stream multiple IMAGES concurrently from a database table to Web Browsers look at OWA2.

  7. How does one use HTTP COOKIEs?

    Answer: Cookies allow any site to store information on a WEB Browser's hard disk (cookie.txt file).This information is sent back to the originating site whenever you access it again.

    Look at this code example:

    owa_util.mime_header ('text/html', FALSE);

    owa_cookie.send (cuid, xsession_id, sysdate);


  8. I've lost the Web Server Administrator's password.What can I do?

    Answer: The Oracle WebServer Administrator's userid and password can be found in your $ORACLE_HOME/ows21/admin/svadmin.cfg file.The password is not encrypted!!!

  9. Can a Web page be refreshed/reloaded after a given interval?

    Answer: Yes,

  10. Why do I get "Requested URL was not found on this server"?

    Answer: Symptom:

    When attempting to access URLs such as:


    the server responds with "Requested URL was not found on this server".


    • This is due to there not being a mapping in the service listener's Virtual Directory Mappings configuration, of the form: /home/oracle/ows2/bin/ CN /ows-bin/service/ so the "owa" program isn't found.
    • You're accessing a directory, /xxxx/, and the directory isn't readable by the Web Server process.
    • The Web Server is configured to not generate directory listings automatically, and there isn't an index.html file (or whatever you've picked as your index file name).


    • Create the virtual directory mapping, halt the listener, and restart it.
    • Check and fix the directory permissions.Note also the directory rescanning issue below.
    • Make sure that either the Web Server will create indices itself, or that there is a readable index file under the name you've specified.If altering the server configuration, halt and restart the server.

  11. Why do I get "Request failed.We were unable to process your request at this time.Please try again later"?


    Symptom: When attempting to access URLs such as:


    the server responds with "Request failed.We were unable to process your request at this time.Please try again later."


    • The listener can't read the configuration file owa.cfg.
    • The listener is attempting to invoke the PL/SQL procedure named, but can't, for some reason.


    • Make sure that the file /home/oracle/owa2/admin/owa.cfg is readable by the user running the Web Server.
      • Check that the user for the listener has the permissions to invoke such functions: do "exec" in sqlplus.There won't be any output, but it should say that it ran ok.If necessary, try reloading the stored procedures into the database.
      • Make sure that the names of the input fields in the form match up exactly with the names of the parameters in the script.There must be a one-to-one mapping.
      • If you've got multiple-value fields, such as SELECTs, make sure they're of the right type (defined in the OWA_UTIL package), and that there's an extra value supplied by a hidden field to force at least one value to be selected.
    • If all else fails, the procedure is probably raising an exception.Put OTHERS exception handlers around everything and call barf(errstr('procedure name')), or the moral equivalent on your system.
Sample Test Questions
GRE Sample Questions
CAT Sample Questions
GMAT Sample Questions
TOEFL Sample Questions
ACT Sample Questions
SAT Sample Questions
LSAT Sample Questions
PSAT Sample Questions
MCAT Sample Questions
PMP Sample Questions
GED Sample Questions
ECDL Sample Questions
DMV Sample Questions
CCNA Sample Questions
MCSE Sample Questions
Network+ Sample Questions
A+ Sample Questions
Technical Sample Questions
WASL Sample Questions
CISA Sample Questions

Other Sample Questions
Sample Interview Questions
Sample Teacher Interview Questions
Sample Citizenship Questions
Accuplacer Sample Questions
Science Bowl sample Questions
Driving Test Sample Questions
Sample Survey Questions Sample Essay Questions
Sample Behavioral Interview Questions

Copyright © 2004-2013, Best BSQ. All Rights Reserved.