Enabling parallellism in oracle sql

Hi All,
I have a question related to parallilism enabling statements .
I have seen that before running a sql statement we may use
alter session enable parallel DDL;
alter session enable parallel query;
alter session enable parallel DML;
What exactly these statement mean ??
If i mention parallel hints like below statement ..
select /*+ parallel(a,8) */ count(1) from customer a;
parallelism won't happen Until session is altered with above statement ??
Is thr any depedency b/w above 'alter session' statement and parallel hint in query .
Thanks

By default parallel execution is enabled for DDL and query statements. Unless you had turn it off somewhere then you need to manually enable it subsequentially.
Overview of Parallel Execution
http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/manproc.htm#sthref688
for example, I login to my DB without issue enable statement.
%sqlplus test/test
SQL*Plus: Release 10.1.0.2.0 - Production on Tue Sep 1 12:15:26 2009
Copyright (c) 1982, 2004, Oracle.  All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
TEST@etest> set autotrace on
TEST@etest> select /*+ parallel(a,8) */ count(1) from test a
  2  /
  COUNT(1)
         4
Execution Plan
   0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=0 Card=1)
   1    0   SORT (AGGREGATE)
   2    1     PX COORDINATOR
   3    2       PX SEND* (QC (RANDOM)) OF ':TQ10000'                   :Q1000
   4    3         SORT* (AGGREGATE)                                    :Q1000
   5    4           PX BLOCK* (ITERATOR) (Cost=0 Card=4)               :Q1000
   6    5             TABLE ACCESS* (FULL) OF 'TEST' (TABLE) (Cost=0 C :Q1000
          ard=4)
   3 PARALLEL_TO_SERIAL
   4 PARALLEL_COMBINED_WITH_PARENT
   5 PARALLEL_COMBINED_WITH_CHILD
   6 PARALLEL_COMBINED_WITH_PARENT

Similar Messages

  • Parallelism in PL/SQL block

    Say I have a anonymous PL/SQL block with insert queries inserting huge data into certain table.
    For faster execution I have added hints in the insert statements and in the select statements on all the tables.
    All the tables involved are partitioned. But when I checked the sessions while execution, I could not find parallel sessions. Why?

    No, you NEED to enable PDML explicitly, documentation is very clear about it, you must meet 3 requirements:
    To run in parallel DML mode, the following requirements must be met:
    You must have Oracle Enterprise Edition installed.
    You must enable parallel DML in your session. To do this, submit the following statement:ALTER SESSION { ENABLE | FORCE } PARALLEL DML;
    You must meet at least one of the following requirements:
    Specify the parallel attribute for the target table, either at create time or subsequently
    Specify the PARALLEL hint for each insert operation
    Set the database initialization parameter PARALLEL_DEGREE_POLICY to AUTO
    So, enclosing:
    Only a hint is not enough...

  • How to enable Parallelism process in 10.1.0.5 database

    Hi All,
    We have oracle database 10.1.0.5 running in windows 2003 server.
    I am trying to enable parallelism process in the database by including the following init parameters
    PARALLEL_AUTOMATIC_TUNING
    PARALLEL_SERVER
    PARALLEL_MIN_SERVERS
    PARALLEL_MAX_SERVERS
    But while i am trying to bring the database i am getting an error message like these parameter has been deprecated.
    Could anyone help me to enable parallel process in 10g database.
    Thanks in advance.
    Regards
    Aruna

    >
    I am trying to enable parallelism process in the database by including the following init parameters
    PARALLEL_AUTOMATIC_TUNING
    PARALLEL_SERVER
    PARALLEL_MIN_SERVERS
    PARALLEL_MAX_SERVERS
    But while i am trying to bring the database i am getting an error message like these parameter has been deprecated.
    >
    PARALLEL_AUTOMATIC_TUNING is deprecated since 10g. It's always true now. PARALLEL_SERVER is related to OPS (prior to RAC) and long time deprecated.
    You enable parallel query with an ALTER TABLE statement like
    SQL> ALTER TABLE SALES PARALLEL;or with a hint like
    SQL> select /*+ parallel(sales) */ * from sales;Kind regards
    Uwe
    http://uhesse.wordpress.com

  • How to see dbms_output on oracle sql developer

    ned immediate help
    how to see dbms_output on oracle sql developer

    Hi,
    In sql developer u have a tab named DBMS Output in your result sheet. In that the first Icon is Enable DBMS Output. turn it on (After on it will give the message set serveroutput on in the sheet) and then run your code.
    In the code u have to use the dbms_output.put_line package.after running the code u have to see the result in DBMS Output tab.
    Regards,
    NTR

  • "Explain Plan" in Oracle SQL Developer is greyed out

    Hi all,
    I know this is not the right place to post this, but I have look around and do not know where to post question about Oracle SQL Developer - I presume this tool is also discussed here in this forum.
    My question is very simple (I presume):
    1. I installed Oracle SQL Developer 3.0.04.
    2. I added a new DB connection to a DB hosted in one of my servers in the LAN.
    3. However, when I am writing some SQL queries, I intend to use the "Explain Plan" feature, but it is being greyed out (disabled).
    4. How can I enable it back?

    Hello,
    {forum:id=260}
    Regards
    Marcus

  • Using DEBUG Mode in Oracle SQL Developer Data Modeler to Log SQL

    Hello,
    I am looking for the possibilty to enable the logging of SQL in Data Modeler.
    Jeff Smith wrote an article how to do this for SQL Developer, for Data Modeler there are other configuration files. Does anyone have an idea?
    Best regards,
    Joop

    Hello Philip,
    the URL to the article of Jeff is: http://www.thatjeffsmith.com/archive/2012/10/using-debug-mode-in-oracle-sql-developer-to-log-sql/
    in the install directory of Data Modeler 3.3.0.734 exists a file datamodeler\datamodeler\bin\datamodeler.conf. This analogue the situation for sql Developer.
    However in this file there is no reference to a (non)debug file.
    In ide/bin directory there is a ide-logging-debug.conf and ide-logging.conf file. But they are not referenced. Should one of them be included?
    Joop

  • Oracle SQL Developer needs some work

    I just downloaded a copy today (1557) for Oracle 9.2i / Windows XP Pro
    Oracle SQL Developer has a few glitches...
    A compiled and working package (compiled in SQL*Plus and TOAD) opens and shows 2 errors in a SQL Query involving a CASE statement. Invalid CASE clause on an ELSE and unexpected token on an alias at the end of the case.
    Compiling a package should display a message saying successfully compiled and the state of a package should always be on display!
    Opened an SQL script but could not execute it as the icon's didn't become active.
    Couldn't then run the script.
    These basic problems would put any serious developer off using Oracle SQL Developer.
    Also background color scheme should be gray and NOT white. White is hard on the eyes. This is just basic UI stuff.
    Oracle, you need more senoir developers!

    Justified to the top left of the sql window, you see the execute buttons. On the top right, you will see a drop down list box. After opening a file, this drop down list box is not selected. Select your connection and the execute buttons on the top left will enable.
    For PL/SQL use a slash / at the end for it to execute.

  • Sp2-0575: Use of oracle SQL feature  not in sql 92 entry level.

    Hi,
    While logging to sqlplus I'm getting the following message
    "sp2-0575: Use of oracle SQL feature not in sql 92 entry level."
    and login is successful, but I'm not able to generate next value from the sequence .
    t says no rows selected when i request
    for nextval a
    EX: select mySeq.nextval from dual; (mySeq is sequence)
    Thanx,
    Ravi.

    What has happened is that someone has enabled the Oracle feature called as FIPS flagger.
    This is a feature that Oracle provides to you if you plan to write SQL code that should be portable
    to other RDBMS systems. IF you enable this flagger and use a feature which is not in the SQL standard,
    Oracle will complain that use of this feature will make your application Oracle dependent, and you may not
    be able to run this application against any other RDBMS.
    To disable this for your SQL*Plus session do this:
    SQL> set flagger off
    SQL>
    Once you do this it will allow you to use all SQL commands including Oracle specific extensions.

  • ClassCastException in oracle.sql.TRANSDUMP with parameterbinding

    We are facing with the following problem when we use Toplink DirectToFieldMapping on a field of java-type java.util.Calendar where the database-type is DATE.
    This exception ONLY occures if we use parameter-binding set to true in sessions.xml
    <should-bind-all-parameters>true</should-bind-all-parameters>
    trace:
    [java] java.lang.ClassCastException
    [java] at oracle.sql.TRANSDUMP.getTransitions(TRANSDUMP.java:41)
    [java] at oracle.sql.TIMEZONETAB.updateTable(TIMEZONETAB.java:456)
    [java] at oracle.sql.TIMESTAMPTZ.toBytes(TIMESTAMPTZ.java:1424)
    [java] at oracle.sql.TIMESTAMPTZ.toBytes(TIMESTAMPTZ.java:1614)
    [java] at oracle.sql.TIMESTAMPTZ.<init>(TIMESTAMPTZ.java:256)
    [java] at oracle.toplink.internal.platform.database.oracle.TIMESTAMPHelper.buildTIMESTAMPTZ(TIMESTAMPHelper.jav
    a:21)
    [java] at oracle.toplink.oraclespecific.Oracle9Platform.setParameterValueInDatabaseCall(Oracle9Platform.java:34
    5)
    [java] at oracle.toplink.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.prepareBatchStatements(P
    arameterizedSQLBatchWritingMechanism.java:171)
    [java] at oracle.toplink.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.executeBatchedStatements
    (ParameterizedSQLBatchWritingMechanism.java:135)
    [java] at oracle.toplink.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.appendCall(Parameterized
    SQLBatchWritingMechanism.java:78)
    [java] at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:621)
    [java] at oracle.toplink.publicinterface.UnitOfWork.executeCall(UnitOfWork.java:1400)
    [java] at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java:131)
    [java] at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java:115)
    [java] at oracle.toplink.internal.queryframework.CallQueryMechanism.insertObject(CallQueryMechanism.java:264)
    [java] at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(StatementQueryMechanism.j
    ava:171)
    [java] at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(StatementQueryMechanism.j
    ava:188)
    [java] at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMecha
    nism.java:433)
    [java] at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(InsertObjectQuery.java:45)
    [java] at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(DatabaseQueryMe
    chanism.java:596)
    [java] at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(DatabaseQueryM
    echanism.java:563)
    [java] at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWriteWithChangeSet(Datab
    aseQueryMechanism.java:465)
    [java] at oracle.toplink.queryframework.WriteObjectQuery.executeCommitWithChangeSet(WriteObjectQuery.java:119)
    [java] at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQuery
    Mechanism.java:258)
    [java] at oracle.toplink.queryframework.WriteObjectQuery.execute(WriteObjectQuery.java:51)
    [java] at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:493)
    [java] at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:1958)
    [java] at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(UnitOfWork.java:2255)
    [java] at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1086)
    [java] at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1038)
    [java] at oracle.toplink.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:177)
    [java] at oracle.toplink.publicinterface.Session.writeAllObjectsWithChangeSet(Session.java:3223)
    [java] at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(UnitOfWork.java:1092)
    [java] at oracle.toplink.publicinterface.UnitOfWork.commitToDatabaseWithChangeSet(UnitOfWork.java:1137)
    [java] at oracle.toplink.publicinterface.UnitOfWork.issueSQLbeforeCompletion(UnitOfWork.java:2492)
    [java] at oracle.toplink.jts.oracle9i.Oracle9iJTSSynchronizationListener.beforeCompletion(Oracle9iJTSSynchroniz
    ationListener.java:75)
    [java] at com.evermind.server.ApplicationServerTransaction.callSynchronizationBeforeCompletion(ApplicationServe
    rTransaction.java:1404)
    [java] at com.evermind.server.ApplicationServerTransaction.beforeCompletion(ApplicationServerTransaction.java:1
    256)
    [java] at com.evermind.server.ApplicationServerTransaction.commit(ApplicationServerTransaction.java:680)
    [java] at com.evermind.server.ApplicationServerTransaction.end(ApplicationServerTransaction.java:1035)
    [java] at StandortFacade_StatelessSessionBeanWrapper28.create(StandortFacade_StatelessSessionBeanWrapper28.java
    :478)
    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [java] at java.lang.reflect.Method.invoke(Method.java:324)
    [java] at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:124)
    [java] at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
    [java] at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java
    :192)
    [java] at java.lang.Thread.run(Thread.java:534)
    [java] at connection to localhost/127.0.0.1
    [java] at com.evermind.server.rmi.OrionRemoteException.receive(OrionRemoteException.java:130)
    [java] at com.evermind.server.rmi.RMIConnection.handleMethodInvocationResponse(RMIConnection.java:1738)
    [java] at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:453)
    [java] at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:333)
    [java] at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java
    :186)
    [java] at java.lang.Thread.run(Thread.java:534)
    [java] 2005-06-28 19:33:03,452 WARN de.dpag.move.stammdaten.cs.StandortDelegate - resetHome
    [java] 2005-06-28 19:33:03,452 ERROR de.dpag.move.client.stammdaten.model.standort.StandortEditDialogModel - Intern
    er Fehler auf dem Server!
    [java] de.dpag.move.infrastructure.exception.InternalException: com.evermind.server.rmi.OrionRemoteException: Trans
    action was rolled back: Error in transaction: java.lang.ClassCastException; nested exception is:
    [java] java.lang.ClassCastException
    [java] at de.dpag.move.stammdaten.cs.StandortDelegate.create(StandortDelegate.java:184)
    [java] at de.dpag.move.client.stammdaten.model.standort.StandortEditDialogModel.createDataAtServer(StandortEdit
    DialogModel.java:235)
    [java] at de.dpag.move.client.stammdaten.model.AbstractEditDialogModel.storeTO(AbstractEditDialogModel.java:124
    [java] at de.dpag.move.client.stammdaten.control.AbstractEditDialogController.okay(AbstractEditDialogController
    .java:127)
    [java] at de.dpag.move.client.common.AbstractDialogController.doApply(AbstractDialogController.java:714)
    [java] at de.dpag.move.client.common.AbstractDialogController$2.apply(AbstractDialogController.java:230)
    [java] at de.dpag.move.client.common.AbstractMDIDialog$4.actionPerformed(AbstractMDIDialog.java:326)
    [java] at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
    [java] at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
    [java] at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
    [java] at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
    [java] at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
    [java] at java.awt.Component.processMouseEvent(Component.java:5100)
    [java] at java.awt.Component.processEvent(Component.java:4897)
    [java] at java.awt.Container.processEvent(Container.java:1569)
    [java] at java.awt.Component.dispatchEventImpl(Component.java:3615)
    [java] at java.awt.Container.dispatchEventImpl(Container.java:1627)
    [java] at java.awt.Component.dispatchEvent(Component.java:3477)
    [java] at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
    [java] at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
    [java] at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
    [java] at java.awt.Container.dispatchEventImpl(Container.java:1613)
    [java] at java.awt.Window.dispatchEventImpl(Window.java:1606)
    [java] at java.awt.Component.dispatchEvent(Component.java:3477)
    [java] at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
    [java] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
    [java] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
    [java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
    [java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
    [java] at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    [java] Caused by: com.evermind.server.rmi.OrionRemoteException: Transaction was rolled back: Error in transaction:
    java.lang.ClassCastException; nested exception is:
    [java] java.lang.ClassCastException
    [java] at com.evermind.server.rmi.RMIConnection.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMIConnection.java:
    1602)
    [java] at com.evermind.server.rmi.RMIConnection.invokeMethod(RMIConnection.java:1553)
    [java] at com.evermind.server.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:55)
    [java] at com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.
    java:22)
    [java] at com.evermind.server.ejb.StatelessSessionRemoteInvocationHandler.invoke(StatelessSessionRemoteInvocati
    onHandler.java:50)
    [java] at __Proxy5.create(Unknown Source)
    [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [java] at java.lang.reflect.Method.invoke(Method.java:324)
    [java] at de.dpag.move.infrastructure.interceptor.MethodCallInterceptor.invoke(MethodCallInterceptor.java:31)
    [java] at de.dpag.move.infrastructure.interceptor.MoveMethodInvocation.proceed(MoveMethodInvocation.java:58)
    [java] at de.dpag.move.infrastructure.interceptor.DelegateAuthentifizierungInterceptor.invoke(DelegateAuthentif
    izierungInterceptor.java:70)
    [java] at de.dpag.move.infrastructure.interceptor.MoveMethodInvocation.proceed(MoveMethodInvocation.java:58)
    [java] at de.dpag.move.infrastructure.interceptor.DelegateExceptionHandlingInterceptor.invoke(DelegateException
    HandlingInterceptor.java:34)
    [java] at de.dpag.move.infrastructure.interceptor.MoveMethodInvocation.proceed(MoveMethodInvocation.java:58)
    [java] at de.dpag.move.infrastructure.interceptor.BadThreadInterceptor.invoke(BadThreadInterceptor.java:27)
    [java] at de.dpag.move.infrastructure.interceptor.MoveMethodInvocation.proceed(MoveMethodInvocation.java:58)
    [java] at de.dpag.move.infrastructure.interceptor.TraceInterceptor.invoke(TraceInterceptor.java:39)
    [java] at de.dpag.move.infrastructure.interceptor.MoveMethodInvocation.proceed(MoveMethodInvocation.java:58)
    [java] at de.dpag.move.stammdaten.cs.StandortDelegate.create(StandortDelegate.java:178)
    [java] ... 29 more
    [java] Caused by: java.lang.ClassCastException
    [java] at com.evermind.server.rmi.OrionRemoteException.receive(OrionRemoteException.java:130)
    [java] at com.evermind.server.rmi.RMIConnection.handleMethodInvocationResponse(RMIConnection.java:1738)
    [java] at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:453)
    [java] at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:333)
    [java] at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java
    :186)
    [java] at java.lang.Thread.run(Thread.java:534)
    we have made a debugging and can see that connection.prepareCall(...) answers an instance of com.evermind.sql.CallableStatementBCELProxy,
    which of course results in the ClassCastException showed above.
    the exception occurs at the class TRANSDUMP in the line where the explicit cast to OracleCallableStatement is done
    oracle.sql.TRANSDUMP is taken from ojdbc14.jar, the recommended one from http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc9201.html
    public class TRANSDUMP
    public TRANSDUMP()
    public static byte[] getTransitions(Connection connection, int i)
    throws SQLException
    OracleCallableStatement oraclecallablestatement = (OracleCallableStatement)connection.prepareCall("begin dbms_utility.get_tz_transitions(?,?); end;");
    NUMBER number = new NUMBER(i);
    oraclecallablestatement.setNUMBER(1, number);
    oraclecallablestatement.registerOutParameter(2, -2);
    oraclecallablestatement.execute();
    byte abyte0[] = oraclecallablestatement.getBytes(2);
    oraclecallablestatement.close();
    return abyte0;
    we use the following settings in our data-sources.xml
    <data-source
              name="FOODS"
              username="scott"
              password="tiger"
              location="jdbc/FOODS"          
              connection-driver="oracle.jdbc.driver.OracleDriver"
              class="com.evermind.sql.OrionCMTDataSource"
              url="jdbc:oracle:thin:@foo-db-1:1545:db1"
              inactivity-timeout="30"/>
    the used sessions.xml
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <!DOCTYPE toplink-configuration PUBLIC "-//Oracle Corp.//DTD TopLink Sessions 9.0.4//EN" "sessions_9_0_4.dtd">
    <toplink-configuration>
    <session>
    <name>datenpool</name>
    <project-xml>datenpool.xml</project-xml>
    <session-type>
    <server-session/>
    </session-type>
    <login>
    <datasource>jdbc/FOODS</datasource>
    <platform-class>oracle.toplink.oraclespecific.Oracle9Platform</platform-class>
    <uses-native-sequencing>true</uses-native-sequencing>
    <should-bind-all-parameters>true</should-bind-all-parameters>
    <uses-streams-for-binding>true</uses-streams-for-binding>
    <should-force-field-names-to-uppercase>true</should-force-field-names-to-uppercase>
    <uses-batch-writing>true</uses-batch-writing>
    <uses-external-connection-pool>true</uses-external-connection-pool>
    <uses-native-sql>true</uses-native-sql>
    <uses-external-transaction-controller>true</uses-external-transaction-controller>
    </login>
    <external-transaction-controller-class>oracle.toplink.jts.oracle9i.Oracle9iJTSExternalTransactionController</external-transaction-controller-class>
    <enable-logging>true</enable-logging>
    <logging-options/>
    </session>
    </toplink-configuration>
    environment:
    OC4J: 10.1.2
    Toplink: 9.0.4.5
    JDBC-Driver: ojdbc14.jar for Oracle9i (9.2.0.5) and the needed classes12dms.jar carried with the oc4j10.1.2.0 installation (jdbc\lib\classes12dms.jar.jar)
    Oracle9i: 9.2.0.5
    Is this a problem in our oc4j with toplink and datasource configuration or perhaps a real BUG ?
    Regards,
    Dirk

    Hi everyone, i'm developing an application based on Spring - TopLink combination, in a test enviroment using JDeveloper embedded OC4J, everything works fine, but when i try to deploy the application on OAS 10.1.3.1 (SOA suite), i get the next Exception
    07/12/13 18:13:39 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ToplinkSessionFactory' defined in class path resource [cu-generarprocesoseleccion-app-context.xml]: Initialization of bean failed; nested exception is java.lang.ClassCastException: oracle.toplink.jts.oracle9i.Oracle9iJTSExternalTransactionController
    07/12/13 18:13:39 java.lang.ClassCastException: oracle.toplink.jts.oracle9i.Oracle9iJTSExternalTransactionController
    07/12/13 18:13:39      at oracle.toplink.platform.server.ServerPlatformBase.initializeExternalTransactionController(ServerPlatformBase.java:194)
    07/12/13 18:13:39      at oracle.toplink.publicinterface.DatabaseSession.login(DatabaseSession.java:498)
    07/12/13 18:13:39      at org.springframework.orm.toplink.LocalSessionFactory.createSessionFactory(LocalSessionFactory.java:292)
    07/12/13 18:13:39      at org.springframework.orm.toplink.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:52)
    07/12/13 18:13:39      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1058)
    07/12/13 18:13:39      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363)
    07/12/13 18:13:39      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
    07/12/13 18:13:39      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
    07/12/13 18:13:39      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:269)
    07/12/13 18:13:39      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318)
    07/12/13 18:13:39      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:81)
    07/12/13 18:13:39      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:66)
    07/12/13 18:13:39      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:57)
    07/12/13 18:13:39      at com.iqsoft.rrhh.cu_generarprocesoseleccion.business.ejb.GenerarProcesoSeleccionBean.ejbCreate(GenerarProcesoSeleccionBean.java:25)
    07/12/13 18:13:39      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    07/12/13 18:13:39      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    07/12/13 18:13:39      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    07/12/13 18:13:39      at java.lang.reflect.Method.invoke(Method.java:585)
    07/12/13 18:13:39      at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
    07/12/13 18:13:39      at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    07/12/13 18:13:39      at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    07/12/13 18:13:39      at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    07/12/13 18:13:39      at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
    07/12/13 18:13:39      at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    07/12/13 18:13:39      at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
    07/12/13 18:13:39      at com.evermind.server.ejb.LifecycleManager.invokeLifecycleMethod(LifecycleManager.java:262)
    07/12/13 18:13:39      at com.evermind.server.ejb.LifecycleManager.invokeLifecycleMethod(LifecycleManager.java:252)
    07/12/13 18:13:39      at com.evermind.server.ejb.LifecycleManager.postConstruct(LifecycleManager.java:113)
    07/12/13 18:13:39      at com.evermind.server.ejb.StatelessSessionBeanPool.createContextImpl(StatelessSessionBeanPool.java:40)
    07/12/13 18:13:39      at com.evermind.server.ejb.BeanPool.createContext(BeanPool.java:418)
    07/12/13 18:13:39      at com.evermind.server.ejb.BeanPool.allocateContext(BeanPool.java:244)
    07/12/13 18:13:39      at com.evermind.server.ejb.StatelessSessionEJBHome.getContextInstance(StatelessSessionEJBHome.java:25)
    07/12/13 18:13:39      at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:86)
    07/12/13 18:13:39      at GenerarProcesoSeleccionEJB_LocalProxy_1heg7kp.registrarProcesoSeleccion(Unknown Source)
    07/12/13 18:13:39      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    07/12/13 18:13:39      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    07/12/13 18:13:39      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    07/12/13 18:13:39      at java.lang.reflect.Method.invoke(Method.java:585)
    07/12/13 18:13:39      at org.springframework.ejb.access.LocalSlsbInvokerInterceptor.invoke(LocalSlsbInvokerInterceptor.java:66)
    07/12/13 18:13:39      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
    07/12/13 18:13:39      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
    07/12/13 18:13:39      at $Proxy0.registrarProcesoSeleccion(Unknown Source)
    07/12/13 18:13:39      at com.iqsoft.rrhh.cu_generarprocesoseleccion.web.bean.RegistrarProcesoJSFBean.registrarProcesoSeleccion(RegistrarProcesoJSFBean.java:129)
    07/12/13 18:13:39      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    07/12/13 18:13:39      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    07/12/13 18:13:39      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    07/12/13 18:13:39      at java.lang.reflect.Method.invoke(Method.java:585)
    07/12/13 18:13:39      at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
    07/12/13 18:13:39      at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
    07/12/13 18:13:39      at javax.faces.component.UICommand.broadcast(UICommand.java:109)
    07/12/13 18:13:39      at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:184)
    07/12/13 18:13:39      at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:162)
    07/12/13 18:13:39      at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:350)
    07/12/13 18:13:39      at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
    07/12/13 18:13:39      at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
    07/12/13 18:13:39      at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
    07/12/13 18:13:39      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
    07/12/13 18:13:39      at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    07/12/13 18:13:39      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
    07/12/13 18:13:39      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
    07/12/13 18:13:39      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
    07/12/13 18:13:39      at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
    07/12/13 18:13:39      at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
    07/12/13 18:13:39      at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
    07/12/13 18:13:39      at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
    07/12/13 18:13:39      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
    07/12/13 18:13:39      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
    07/12/13 18:13:39      at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    07/12/13 18:13:39      at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    07/12/13 18:13:39      at java.lang.Thread.run(Thread.java:595)
    As you can see, the problem seems to be the Oracle9iJTSExternalTransactionController class.
    hte sessions.xml, i'm using, is the next:
    <toplink-configuration>
    <session>
    <name>RRHHadmin</name>
    <project-xml>META-INF/IQSOFTDomain/rrhh-deployment-descriptor.xml</project-xml>
    <session-type>
    <server-session/>
    </session-type>
    <login>
    <datasource>jdbc/HrDS</datasource>
    <sequence-preallocation-size>50</sequence-preallocation-size>
    <sequence-table>SEQUENCE</sequence-table>
    <sequence-name-field>SEQ_NAME</sequence-name-field>
    <sequence-counter-field>SEQ_COUNT</sequence-counter-field>
    <uses-external-connection-pool>true</uses-external-connection-pool>
    <uses-external-transaction-controller>true</uses-external-transaction-controller>
    </login>
    <external-transaction-controller-class>oracle.toplink.jts.oracle9i.Oracle9iJTSExternalTransactionController</external-transaction-controller-class>
    </session>
    </toplink-configuration>
    I'm using TopLink 10, any help would be appreciated

  • Oracle SQL and PL/SQL interview questions.

    Can anyone forward me all Oracle SQL and PL/SQL Interview questions and answers asap.
    Many Thanks.
    Bba

    Dear Pal
    I not sure all the all answers are correct. I got one mail couple yrs back. I am just sharing mail contents. Kindly keep question and compare answers.
    1 Which is more faster - IN or EXISTS?
    EXISTS is more faster than IN because EXISTS returns a Boolean value whereas IN returns a value.
    2 Which datatype is used for storing graphics and images?
    LONG RAW data type is used for storing BLOB's (binary large objects).
    3 When do you use WHERE clause and when do you use HAVING clause?
    HAVING clause is used when you want to specify a condition for a group function and it is written after GROUP BY clause. The WHERE clause is used when you want to specify a condition for columns, single row functions except group functions and it is written before GROUP BY clause if it is used.
    4 What WHERE CURRENT OF clause does in a cursor?
    LOOPSELECT num_credits INTO v_numcredits FROM classesWHERE dept=123 and course=101;UPDATE studentsSET current_credits=current_credits+v_numcreditsWHERE CURRENT OF X;END LOOPCOMMIT;END;
    5 What should be the return type for a cursor variable.Can we use a scalar data type as return type?
    The return type for a cursor must be a record type.It can be declared explicitly as a user-defined or %ROWTYPE can be used. eg TYPE t_studentsref IS REF CURSOR RETURN students%ROWTYPE
    6 What is use of a cursor variable? How it is defined?
    A cursor variable is associated with different statements at run time, which can hold different values at run time. Static cursors can only be associated with one run time query. A cursor variable is reference type (like a pointer in C).Declaring a cursor variable:TYPE type_name IS REF CURSOR RETURN return_type type_name is the name of the reference type,return_type is a record type indicating the types of the select list that will eventually be returned by the cursor variable.
    7 What is the purpose of a cluster?
    Oracle does not allow a user to specifically locate tables, since that is a part of the function of the RDBMS. However, for the purpose of increasing performance, oracle allows a developer to create a CLUSTER. A CLUSTER provides a means for storing data from different tables together for faster retrieval than if the table placement were left to the RDBMS.
    8 What is the maximum buffer size that can be specified using the DBMS_OUTPUT.ENABLE function?
    1,000,00
    9 What is syntax for dropping a procedure and a function .Are these operations possible?
    Drop Procedure procedure_nameDrop Function function_name
    10 What is OCI. What are its uses?
    Oracle Call Interface is a method of accesing database from a 3GL program. Uses--No precompiler is required,PL/SQL blocks are executed like other DML statements. The OCI library provides· -functions to parse SQL statemets· -bind input variables· -bind output variables· -execute statements· -fetch the results
    11 What is difference between UNIQUE and PRIMARY KEY constraints?
    A table can have only one PRIMARY KEY whereas there can be any number of UNIQUE keys. The columns that compose PK are automatically define NOT NULL, whereas a column that compose a UNIQUE is not automatically defined to be mandatory must also specify the column is NOT NULL.
    12 What is difference between SUBSTR and INSTR?
    SUBSTR returns a specified portion of a string eg SUBSTR('BCDEF',4) output BCDEINSTR provides character position in which a pattern is found in a string. eg INSTR('ABC-DC-F','-',2) output 7 (2nd occurence of '-')
    13 What is difference between SQL and SQL*PLUS?
    SQL*PLUS is a command line tool where as SQL and PL/SQL language interface and reporting tool. Its a command line tool that allows user to type SQL commands to be executed directly against an Oracle database. SQL is a language used to query the relational database(DML,DCL,DDL). SQL*PLUS commands are used to format query result, Set options, Edit SQL commands and PL/SQL.
    14 What is difference between Rename and Alias?
    Rename is a permanent name given to a table or column whereas Alias is a temporary name given to a table or column which do not exist once the SQL statement is executed.
    15 What is difference between a formal and an actual parameter?
    The variables declared in the procedure and which are passed, as arguments are called actual, the parameters in the procedure declaration. Actual parameters contain the values that are passed to a procedure and receive results. Formal parameters are the placeholders for the values of actual parameters
    16 What is an UTL_FILE.What are different procedures and functions associated with it?
    UTL_FILE is a package that adds the ability to read and write to operating system files. Procedures associated with it are FCLOSE, FCLOSE_ALL and 5 procedures to output data to a file PUT, PUT_LINE, NEW_LINE, PUTF, FFLUSH.PUT, FFLUSH.PUT_LINE,FFLUSH.NEW_LINE. Functions associated with it are FOPEN, ISOPEN.
    17 What is a view ?
    A view is stored procedure based on one or more tables, it’s a virtual table.
    18 What is a pseudo column. Give some examples?
    It is a column that is not an actual column in the table.eg USER, UID, SYSDATE, ROWNUM, ROWID, NULL, AND LEVEL.
    19 What is a OUTER JOIN?
    Outer Join--Its a join condition used where you can query all the rows of one of the tables in the join condition even though they don’t satisfy the join condition.
    20 What is a cursor?
    Oracle uses work area to execute SQL statements and store processing information PL/SQL construct called a cursor lets you name a work area and access its stored information A cursor is a mechanism used to fetch more than one row in a Pl/SQl block.
    21 What is a cursor for loop?
    Cursor For Loop is a loop where oracle implicitly declares a loop variable, the loop index that of the same record type as the cursor's record.
    22 What are various privileges that a user can grant to another user?
    · SELECT· CONNECT· RESOURCES
    23 What are various constraints used in SQL?
    · NULL· NOT NULL· CHECK· DEFAULT
    24 What are ORACLE PRECOMPILERS?
    Using ORACLE PRECOMPILERS, SQL statements and PL/SQL blocks can be contained inside 3GL programs written in C,C++,COBOL,PASCAL, FORTRAN,PL/1 AND ADA.The Precompilers are known as Pro*C,Pro*Cobol,...This form of PL/SQL is known as embedded pl/sql,the language in which pl/sql is embedded is known as the host language. The prcompiler translates the embedded SQL and pl/sql ststements into calls to the precompiler runtime library.The output must be compiled and linked with this library to creater an executable.
    25 What are different Oracle database objects?
    · TABLES· VIEWS· INDEXES· SYNONYMS· SEQUENCES· TABLESPACES etc
    26 What are different modes of parameters used in functions and procedures?
    · IN· OUT· INOUT
    27 What are cursor attributes?
    · %ROWCOUNT· %NOTFOUND· %FOUND· %ISOPEN
    28 What a SELECT FOR UPDATE cursor represent. [ANSWER]SELECT......FROM......FOR......UPDATE[OF column-reference][NOWAIT] The processing done in a fetch loop modifies the rows that have been retrieved by the cursor. A convenient way of modifying the rows is done by a method with two parts: the FOR UPDATE clause in the cursor declaration, WHERE CURRENT OF CLAUSE in an UPDATE or declaration statement.
    29 There is a string 120000 12 0 .125 , how you will find the position of the decimal place?
    INSTR('120000 12 0 .125',1,'.')output 13
    30 There is a % sign in one field of a column. What will be the query to find it?
    '' Should be used before '%'.
    31 Suppose a customer table is having different columns like customer no, payments.What will be the query to select top three max payments?
    SELECT customer_no, payments from customer C1
    WHERE 3<=(SELECT COUNT(*) from customer C2
    WHERE C1.payment <= C2.payment)
    32 minvalue.sql Select the Nth lowest value from a table
    select level, min('col_name') from my_table where level = '&n' connect by prior ('col_name') <
    'col_name')
    group by level;
    Example:
    Given a table called emp with the following columns:
    -- id number
    -- name varchar2(20)
    -- sal number
    -- For the second lowest salary:
    -- select level, min(sal) from emp
    -- where level=2
    -- connect by prior sal < sal
    -- group by level
    33 maxvalue.sql Select the Nth Highest value from a table
    select level, max('col_name') from my_table where level = '&n' connect by prior ('col_name') >
    'col_name')
    group by level;
    Example:
    Given a table called emp with the following columns:
    -- id number
    -- name varchar2(20)
    -- sal number
    -- For the second highest salary:
    -- select level, max(sal) from emp
    -- where level=2
    -- connect by prior sal > sal
    -- group by level
    34 How you will avoid your query from using indexes?
    SELECT * FROM emp
    Where emp_no+' '=12345;
    i.e you have to concatenate the column name with space within codes in the where condition.
    SELECT /*+ FULL(a) */ ename, emp_no from emp
    where emp_no=1234;
    i.e using HINTS
    35 How you will avoid duplicating records in a query?
    By using DISTINCT
    36 How you were passing cursor variables in PL/SQL 2.2?
    In PL/SQL 2.2 cursor variables cannot be declared in a package.This is because the storage for a cursor variable has to be allocated using Pro*C or OCI with version 2.2, the only means of passing a cursor variable to a PL/SQL block is via bind variable or a procedure parameter.
    37 How you open and close a cursor variable.Why it is required?
    OPEN cursor variable FOR SELECT...Statement
    CLOSE cursor variable In order to associate a cursor variable with a particular SELECT statement OPEN syntax is used. In order to free the resources used for the query CLOSE statement is used.
    38 How will you delete duplicating rows from a base table?
    delete from table_name where rowid not in (select max(rowid) from table group by duplicate_values_field_name); or
    delete duplicate_values_field_name dv from table_name ta where rowid <(select min(rowid) from table_name tb where ta.dv=tb.dv);
    39 How do you find the numbert of rows in a Table ?
    A bad answer is count them (SELECT COUNT(*) FROM table_name)
    A good answer is :-
    'By generating SQL to ANALYZE TABLE table_name COUNT STATISTICS by querying Oracle System Catalogues (e.g. USER_TABLES or ALL_TABLES).
    The best answer is to refer to the utility which Oracle released which makes it unnecessary to do ANALYZE TABLE for each Table individually.
    40 Find out nth highest salary from emp table
    SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.sal)) FROM EMP B WHERE a.sal<=b.sal);
    For Eg:-
    Enter value for n: 2
    SAL
    3700
    41 Display the records between two range?
    select rownum, empno, ename from emp where rowid in (select rowid from emp where rownum <=&upto minus select rowid from emp where rownum<&Start);
    42 Display the number value in Words?
    SQL> select sal, (to_char(to_date(sal,'j'), 'jsp'))
    from emp;
    the output like,
    SAL (TO_CHAR(TO_DATE(SAL,'J'),'JSP'))
    800 eight hundred
    1600 one thousand six hundred
    1250 one thousand two hundred fifty
    If you want to add some text like, Rs. Three Thousand only.
    SQL> select sal "Salary ",
    (' Rs. '|| (to_char(to_date(sal,'j'), 'Jsp'))|| ' only.'))
    "Sal in Words" from emp
    Salary Sal in Words
    800 Rs. Eight Hundred only.
    1600 Rs. One Thousand Six Hundred only.
    1250 Rs. One Thousand Two Hundred Fifty only.
    43 Display Odd/ Even number of records
    Odd number of records:
    select * from emp where (rowid,1) in (select rowid, mod(rownum,2) from emp);
    Output:-
    1
    3
    5
    Even number of records:
    select * from emp where (rowid,0) in (select rowid, mod(rownum,2) from emp)
    Output:-
    2
    4
    6
    44 Difference between procedure and function.
    Functions are named PL/SQL blocks that return a value and can be called with arguments procedure a named block that can be called with parameter. A procedure all is a PL/SQL statement by itself, while a Function call is called as part of an expression.
    45 Difference between NO DATA FOUND and %NOTFOUND
    NO DATA FOUND is an exception raised only for the SELECT....INTO statements when the where clause of the querydoes not match any rows. When the where clause of the explicit cursor does not match any rows the %NOTFOUND attribute is set to TRUE instead.
    46 Difference between database triggers and form triggers?
    Data base trigger(DBT) fires when a DML operation is performed on a data base table. Form trigger(FT) Fires when user presses a key or navigates between fields on the screen
    Can be row level or statement level No distinction between row level and statement level.
    Can manipulate data stored in Oracle tables via SQL Can manipulate data in Oracle tables as well as variables in forms.
    Can be fired from any session executing the triggering DML statements. Can be fired only from the form that define the trigger.
    Can cause other database triggers to fire.Can cause other database triggers to fire, but not other form triggers.
    47 Difference between an implicit & an explicit cursor.
    PL/SQL declares a cursor implicitly for all SQL data manipulation statements, including quries that return only one row. However,queries that return more than one row you must declare an explicit cursor or use a cursor FOR loop.
    Explicit cursor is a cursor in which the cursor name is explicitly assigned to a SELECT statement via the CURSOR...IS statement. An implicit cursor is used for all SQL statements Declare, Open, Fetch, Close. An explicit cursors are used to process multirow SELECT statements An implicit cursor is used to process INSERT, UPDATE, DELETE and single row SELECT. .INTO statements.
    48 Can you use a commit statement within a database trigger?
    No.
    49 Can the default values be assigned to actual parameters?
    Yes
    50 Can cursor variables be stored in PL/SQL tables.If yes how. If not why?
    No, a cursor variable points a row which cannot be stored in a two-dimensional PL/SQL table.
    51 Can a primary key contain more than one columns?
    Yes
    52 Can a function take OUT parameters. If not why?
    No. A function has to return a value,an OUT parameter cannot return a value.
    53 What are various joins used while writing SUBQUERIES?
    Self join-Its a join foreign key of a table references the same table. Outer Join--Its a join condition used where One can query all the rows of one of the tables in the join condition even though they don't satisfy the join condition.
    Equi-join--Its a join condition that retrieves rows from one or more tables in which one or more columns in one table are equal to one or more columns in the second table.
    54 Differentiate between TRUNCATE and DELETE
    TRUNCATE deletes much faster than DELETE
    TRUNCATE
    DELETE
    It is a DDL statement It is a DML statement
    It is a one way trip,cannot ROLLBACK One can Rollback
    Doesn't have selective features (where clause) Has
    Doesn't fire database triggers Does
    It requires disabling of referential constraints. Does not require
    1 What is PL/SQL ?
    PL/SQL is a procedural language that has both interactive SQL and procedural programming language constructs such as iteration, conditional branching.
    2 Write the order of precedence for validation of a column in a table ?
    I. done using Database triggers.
    ii. done using Integarity Constraints.
    I & ii.
    Exception :
    3 Where the Pre_defined_exceptions are stored ?
    In the standard package.
    Procedures, Functions & Packages ;
    4 What are % TYPE and % ROWTYPE ? What are the advantages of using these over datatypes?
    % TYPE provides the data type of a variable or a database column to that variable.
    % ROWTYPE provides the record type that represents a entire row of a table or view or columns selected in the cursor.
    The advantages are : I. Need not know about variable's data type
    ii. If the database definition of a column in a table changes, the data type of a variable changes accordingly.
    5 What will happen after commit statement ?
    Cursor C1 is
    Select empno,
    ename from emp;
    Begin
    open C1; loop
    Fetch C1 into
    eno.ename;
    Exit When
    C1 %notfound;-----
    commit;
    end loop;
    end;
    The cursor having query as SELECT .... FOR UPDATE gets closed after COMMIT/ROLLBACK.
    The cursor having query as SELECT.... does not get closed even after COMMIT/ROLLBACK.
    6 What is the basic structure of PL/SQL ?
    PL/SQL uses block structure as its basic structure. Anonymous blocks or nested blocks can be used in PL/SQL.
    7 What is Raise_application_error ?
    Raise_application_error is a procedure of package DBMS_STANDARD which allows to issue an user_defined error messages from stored sub-program or database trigger.
    8 What is Pragma EXECPTION_INIT ? Explain the usage ?
    The PRAGMA EXECPTION_INIT tells the complier to associate an exception with an oracle error. To get an error message of a specific oracle error.
    e.g. PRAGMA EXCEPTION_INIT (exception name, oracle error number)
    9 What is PL/SQL table ?
    Objects of type TABLE are called "PL/SQL tables", which are modeled as (but not the same as) database tables, PL/SQL tables use a primary PL/SQL tables can have one column and a primary key.
    Cursors
    10 What is Overloading of procedures ?
    The Same procedure name is repeated with parameters of different datatypes and parameters in different positions, varying number of parameters is called overloading of procedures.
    e.g. DBMS_OUTPUT put_line
    What is a package ? What are the advantages of packages ?
    11 What is difference between a PROCEDURE & FUNCTION ?
    A FUNCTION is always returns a value using the return statement.
    A PROCEDURE may return one or more values through parameters or may not return at all.
    12 What is difference between a Cursor declared in a procedure and Cursor declared in a package specification ?
    A cursor declared in a package specification is global and can be accessed by other procedures or procedures in a package.
    A cursor declared in a procedure is local to the procedure that can not be accessed by other procedures.
    13 What is difference between % ROWTYPE and TYPE RECORD ?
    % ROWTYPE is to be used whenever query returns a entire row of a table or view.
    TYPE rec RECORD is to be used whenever query returns columns of different
    table or views and variables.
    E.g. TYPE r_emp is RECORD (eno emp.empno% type,ename emp ename %type
    e_rec emp% ROWTYPE
    cursor c1 is select empno,deptno from emp;
    e_rec c1 %ROWTYPE.
    14 What is an Exception ? What are types of Exception ?
    Exception is the error handling part of PL/SQL block. The types are Predefined and user defined. Some of Predefined exceptions are.
    CURSOR_ALREADY_OPEN
    DUP_VAL_ON_INDEX
    NO_DATA_FOUND
    TOO_MANY_ROWS
    INVALID_CURSOR
    INVALID_NUMBER
    LOGON_DENIED
    NOT_LOGGED_ON
    PROGRAM-ERROR
    STORAGE_ERROR
    TIMEOUT_ON_RESOURCE
    VALUE_ERROR
    ZERO_DIVIDE
    OTHERS.
    15 What is a stored procedure ?
    A stored procedure is a sequence of statements that perform specific function.
    16 What is a database trigger ? Name some usages of database trigger ?
    Database trigger is stored PL/SQL program unit associated with a specific database table. Usages are Audit data modifications, Log events transparently, Enforce complex business rules Derive column values automatically, Implement complex security authorizations. Maintain replicate tables.
    17 What is a cursor for loop ?
    Cursor for loop implicitly declares %ROWTYPE as loop index,opens a cursor, fetches rows of values from active set into fields in the record and closes
    when all the records have been processed.
    eg. FOR emp_rec IN C1 LOOP
    salary_total := salary_total +emp_rec sal;
    END LOOP;
    18 What is a cursor ? Why Cursor is required ?
    Cursor is a named private SQL area from where information can be accessed. Cursors are required to process rows individually for queries returning multiple rows.
    19 What happens if a procedure that updates a column of table X is called in a database trigger of the same table ?
    Mutation of table occurs.
    20 What are two virtual tables available during database trigger execution ?
    The table columns are referred as OLD.column_name and NEW.column_name.
    For triggers related to INSERT only NEW.column_name values only available.
    For triggers related to UPDATE only OLD.column_name NEW.column_name values only available.
    For triggers related to DELETE only OLD.column_name values only available.
    21 What are two parts of package ?
    The two parts of package are PACKAGE SPECIFICATION & PACKAGE BODY.
    Package Specification contains declarations that are global to the packages and local to the schema.
    Package Body contains actual procedures and local declaration of the procedures and cursor declarations.
    22 What are the two parts of a procedure ?
    Procedure Specification and Procedure Body.
    23 What are the return values of functions SQLCODE and SQLERRM ?
    SQLCODE returns the latest code of the error that has occurred.
    SQLERRM returns the relevant error message of the SQLCODE.
    24 What are the PL/SQL Statements used in cursor processing ?
    DECLARE CURSOR cursor name, OPEN cursor name, FETCH cursor name INTO or Record types, CLOSE cursor name.
    25 What are the modes of parameters that can be passed to a procedure ?
    IN,OUT,IN-OUT parameters.
    26 What are the datatypes a available in PL/SQL ?
    Some scalar data types such as NUMBER, VARCHAR2, DATE, CHAR, LONG, BOOLEAN.
    Some composite data types such as RECORD & TABLE.
    27 What are the cursor attributes used in PL/SQL ?
    %ISOPEN - to check whether cursor is open or not
    % ROWCOUNT - number of rows fetched/updated/deleted.
    % FOUND - to check whether cursor has fetched any row. True if rows are fetched.
    % NOT FOUND - to check whether cursor has fetched any row. True if no rows are featched.
    These attributes are proceeded with SQL for Implicit Cursors and with Cursor name for Explicit Cursors.
    28 What are the components of a PL/SQL Block ?
    Declarative part, Executable part and Exception part.
    Datatypes PL/SQL
    29 What are the components of a PL/SQL block ?
    A set of related declarations and procedural statements is called block.
    30 What are advantages fo Stored Procedures /
    Extensibility,Modularity, Reusability, Maintainability and one time compilation.
    1 What is PL/SQL ?
    PL/SQL is a procedural language that has both interactive SQL and procedural programming language constructs such as iteration, conditional branching.
    2 Write the order of precedence for validation of a column in a table ?
    I. done using Database triggers.
    ii. done using Integarity Constraints.
    I & ii.
    Exception :
    3 Where the Pre_defined_exceptions are stored ?
    In the standard package.
    Procedures, Functions & Packages ;
    4 What are % TYPE and % ROWTYPE ? What are the advantages of using these over datatypes?
    % TYPE provides the data type of a variable or a database column to that variable.
    % ROWTYPE provides the record type that represents a entire row of a table or view or columns selected in the cursor.
    The advantages are : I. Need not know about variable's data type
    ii. If the database definition of a column in a table changes, the data type of a variable changes accordingly.
    5 What will happen after commit statement ?
    Cursor C1 is
    Select empno,
    ename from emp;
    Begin
    open C1; loop
    Fetch C1 into
    eno.ename;
    Exit When
    C1 %notfound;-----
    commit;
    end loop;
    end;
    The cursor having query as SELECT .... FOR UPDATE gets closed after COMMIT/ROLLBACK.
    The cursor having query as SELECT.... does not get closed even after COMMIT/ROLLBACK.
    6 What is the basic structure of PL/SQL ?
    PL/SQL uses block structure as its basic structure. Anonymous blocks or nested blocks can be used in PL/SQL.
    7 What is Raise_application_error ?
    Raise_application_error is a procedure of package DBMS_STANDARD which allows to issue an user_defined error messages from stored sub-program or database trigger.
    8 What is Pragma EXECPTION_INIT ? Explain the usage ?
    The PRAGMA EXECPTION_INIT tells the complier to associate an exception with an oracle error. To get an error message of a specific oracle error.
    e.g. PRAGMA EXCEPTION_INIT (exception name, oracle error number)
    9 What is PL/SQL table ?
    Objects of type TABLE are called "PL/SQL tables", which are modeled as (but not the same as) database tables, PL/SQL tables use a primary PL/SQL tables can have one column and a primary key.
    Cursors
    10 What is Overloading of procedures ?
    The Same procedure name is repeated with parameters of different datatypes and parameters in different positions, varying number of parameters is called overloading of procedures.
    e.g. DBMS_OUTPUT put_line
    What is a package ? What are the advantages of packages ?
    11 What is difference between a PROCEDURE & FUNCTION ?
    A FUNCTION is always returns a value using the return statement.
    A PROCEDURE may return one or more values through parameters or may not return at all.
    12 What is difference between a Cursor declared in a procedure and Cursor declared in a package specification ?
    A cursor declared in a package specification is global and can be accessed by other procedures or procedures in a package.
    A cursor declared in a procedure is local to the procedure that can not be accessed by other procedures.
    13 What is difference between % ROWTYPE and TYPE RECORD ?
    % ROWTYPE is to be used whenever query returns a entire row of a table or view.
    TYPE rec RECORD is to be used whenever query returns columns of different
    table or views and variables.
    E.g. TYPE r_emp is RECORD (eno emp.empno% type,ename emp ename %type
    e_rec emp% ROWTYPE
    cursor c1 is select empno,deptno from emp;
    e_rec c1 %ROWTYPE.
    14 What is an Exception ? What are types of Exception ?
    Exception is the error handling part of PL/SQL block. The types are Predefined and user defined. Some of Predefined exceptions are.
    CURSOR_ALREADY_OPEN
    DUP_VAL_ON_INDEX
    NO_DATA_FOUND
    TOO_MANY_ROWS
    INVALID_CURSOR
    INVALID_NUMBER
    LOGON_DENIED
    NOT_LOGGED_ON
    PROGRAM-ERROR
    STORAGE_ERROR
    TIMEOUT_ON_RESOURCE
    VALUE_ERROR
    ZERO_DIVIDE
    OTHERS.
    15 What is a stored procedure ?
    A stored procedure is a sequence of statements that perform specific function.
    16 What is a database trigger ? Name some usages of database trigger ?
    Database trigger is stored PL/SQL program unit associated with a specific database table. Usages are Audit data modifications, Log events transparently, Enforce complex business rules Derive column values automatically, Implement complex security authorizations. Maintain replicate tables.
    17 What is a cursor for loop ?
    Cursor for loop implicitly declares %ROWTYPE as loop index,opens a cursor, fetches rows of values from active set into fields in the record and closes
    when all the records have been processed.
    eg. FOR emp_rec IN C1 LOOP
    salary_total := salary_total +emp_rec sal;
    END LOOP;
    18 What is a cursor ? Why Cursor is required ?
    Cursor is a named private SQL area from where information can be accessed. Cursors are required to process rows individually for queries returning multiple rows.
    19 What happens if a procedure that updates a column of table X is called in a database trigger of the same table ?
    Mutation of table occurs.
    20 What are two virtual tables available during database trigger execution ?
    The table columns are referred as OLD.column_name and NEW.column_name.
    For triggers related to INSERT only NEW.column_name values only available.
    For triggers related to UPDATE only OLD.column_name NEW.column_name values only available.
    For triggers related to DELETE only OLD.column_name values only available.
    21 What are two parts of package ?
    The two parts of package are PACKAGE SPECIFICATION & PACKAGE BODY.
    Package Specification contains declarations that are global to the packages and local to the schema.
    Package Body contains actual procedures and local declaration of the procedures and cursor declarations.
    22 What are the two parts of a procedure ?
    Procedure Specification and Procedure Body.
    23 What are the return values of functions SQLCODE and SQLERRM ?
    SQLCODE returns the latest code of the error that has occurred.
    SQLERRM returns the relevant error message of the SQLCODE.
    24 What are the PL/SQL Statements used in cursor processing ?
    DECLARE CURSOR cursor name, OPEN cursor name, FETCH cursor name INTO or Record types, CLOSE cursor name.
    25 What are the modes of parameters that can be passed to a procedure ?
    IN,OUT,IN-OUT parameters.
    26 What are the datatypes a available in PL/SQL ?
    Some scalar data types such as NUMBER, VARCHAR2, DATE, CHAR, LONG, BOOLEAN.
    Some composite data types such as RECORD & TABLE.
    27 What are the cursor attributes used in PL/SQL ?
    %ISOPEN - to check whether cursor is open or not
    % ROWCOUNT - number of rows fetched/updated/deleted.
    % FOUND - to check whether cursor has fetched any row. True if rows are fetched.
    % NOT FOUND - to check whether cursor has fetched any row. True if no rows are featched.
    These attributes are proceeded with SQL for Implicit Cursors and with Cursor name for Explicit Cursors.
    28 What are the components of a PL/SQL Block ?
    Declarative part, Executable part and Exception part.
    Datatypes PL/SQL
    29 What are the components of a PL/SQL block ?
    A set of related declarations and procedural statements is called block.
    30 What are advantages fo Stored Procedures /
    Extensibility,Modularity, Reusability, Maintainability and one time compilation.
    31 Name the tables where characteristics of Package, procedure and functions are stored ?
    User_objects, User_Source and User_error.
    32 Is it possible to use Transaction control Statements such a ROLLBACK or COMMIT in Database Trigger ? Why ?
    It is not possible. As triggers are defined for each table, if you use COMMIT of ROLLBACK in a trigger, it affects logical transaction processing.
    33 How packaged procedures and functions are called from the following?
    a. Stored procedure or anonymous block
    b. an application program such a PRC C, PRO COBOL
    c. SQL *PLUS
    a. PACKAGE NAME.PROCEDURE NAME (parameters);
    variable := PACKAGE NAME.FUNCTION NAME (arguments);
    EXEC SQL EXECUTE
    b.
    BEGIN
    PACKAGE NAME.PROCEDURE NAME (parameters)
    variable := PACKAGE NAME.FUNCTION NAME (arguments);
    END;
    END EXEC;
    c. EXECUTE PACKAGE NAME.PROCEDURE if the procedures does not have any
    out/in-out parameters. A function can not be called.
    34 How many types of database triggers can be specified on a table ? What are they ?
    Insert Update Delete
    Before Row o.k. o.k. o.k.
    After Row o.k. o.k. o.k.
    Before Statement o.k. o.k. o.k.
    After Statement o.k. o.k. o.k.
    If FOR EACH ROW clause is specified, then the trigger for each Row affected by the statement.
    If WHEN clause is specified, the trigger fires according to the returned Boolean value.
    35 Give the structure of the procedure ?
    PROCEDURE name (parameter list.....)
    is
    local variable declarations
    BEGIN
    Executable statements.
    Exception.
    exception handlers
    end;
    36 Give the structure of the function ?
    FUNCTION name (argument list .....) Return datatype is
    local variable declarations
    Begin
    executable statements
    Exception
    execution handlers
    End;
    37 Explain the usage of WHERE CURRENT OF clause in cursors ?
    WHERE CURRENT OF clause in an UPDATE,DELETE statement refers to the latest row fetched from a cursor.
    Database Triggers
    38 Explain the two type of Cursors ?
    There are two types of cursors, Implicit Cursor and Explicit Cursor.
    PL/SQL uses Implicit Cursors for queries.
    User defined cursors are called Explicit Cursors. They can be declared and used.
    39 Explain how procedures and functions are called in a PL/SQL block ?
    Function is called as part of an expression.
    sal := calculate_sal ('a822');
    procedure is called as a PL/SQL statement
    calculate_bonus ('A822');
    Programmatic Constructs
    Last Update: September 06, 2004
    1 What are the different types of PL/SQL program units that can be defined and stored in ORACLE database ?
    Procedures and Functions,Packages and Database Triggers.
    2 What are the differences between Database Trigger and Integrity constraints ?
    A declarative integrity constraint is a statement about the database that is always true. A constraint applies to existing data in the table and any statement that manipulates the table.
    A trigger does not apply to data loaded before the definition of the trigger, therefore, it does not guarantee all data in a table conforms to the rules established by an associated trigger.
    A trigger can be used to enforce transitional constraints where as a declarative integrity constraint cannot be used.
    3 What is difference between Procedures and Functions ?
    A Function returns a value to the caller where as a Procedure does not.
    4 What is Database Trigger ?
    A Database Trigger is procedure (set of SQL and PL/SQL statements) that is automatically executed as a result of an insert in,update to, or delete from a table.
    5 What is a Procedure ?
    A Procedure consist of a set of SQL and PL/SQL statements that are grouped together as a unit to solve a specific problem or perform a set of related tasks.
    6 What is a Package ?
    A Package is a collection of related procedures, functions, variables and other package constructs together as a unit in the database.
    7 What are the uses of Database Trigger ?
    Database triggers can be used to automatic data generation, audit data modifications, enforce complex Integrity constraints, and customize complex security authorizations.
    8 What are the advantages of having a Package ?
    Increased functionality (for example,global package variables can be declared and used by any proecdure in the package) and performance (for example all objects of the package are parsed compiled, and loaded into memory once)
    1 With which function of summary item is the compute at options required?
    percentage of total functions.
    2 Why is it preferable to create a fewer no. of queries in the data model?
    Because for each query, report has to open a separate cursor and has to rebind, execute and fetch data.
    3 Why is a Where clause faster than a group filter or a format trigger?
    Because, in a where clause the condition is applied during data retrieval than after retrieving the data.
    4 Which parameter can be used to set read level consistency across multiple queries?
    Read only.
    5 Which of the two views should objects according to possession?
    view by structure.
    6 Which of the above methods is the faster method?
    performing the calculation in the query is faster.
    7 Where is the external query executed at the client or the server?
    At the server.
    8 Where is a procedure return in an external pl/sql library executed at the client or at the server?
    At the client.
    9 When do you use data parameter type?
    When the value of a data parameter being passed to a called product is always the name of the record group defined in the current form. Data parameters are used to pass data to produts invoked with the run_product built-in subprogram.
    10 When a form is invoked with call_form, Does oracle forms issues a save point?
    Yes
    11 What are the important difference between property clause and visual attributes?
    Named visual attributes differ only font, color & pattern attributes, property clauses can contain this and any other properties. You can change the appearance of objects at run time by changing the named visual attributes programmatically , property clause assignments cannot be changed programmatically. When an object is inheriting from both a property clause and named visual attribute, the named visual attribute settings take precedence, and any visual attribute properties in the class are ignored.
    12 What use of command line parameter cmd file?
    It is a command line argument that allows you to specify a file that contain a set of arguments for r20run.
    13 What is WHEN-Database-record trigger?
    Fires when oracle forms first marks a record as an insert or an update. The trigger fires as soon as oracle forms determines through validation that the record should be processed by the next post or commit as an insert or update. c generally occurs only when the operators modifies the first item in the record, and after the operator attempts to navigate out of the item.
    14 What is use of term?
    The term file which key is correspond to which oracle report functions.
    15 What is trigger associated with the timer?
    When-timer-expired.
    16 What is the use of transactional triggers?
    Using transactional triggers we can control or modify the default functionality of the oracle forms.
    17 What is the use of place holder column?
    A placeholder column is used to hold calculated values at a specified place rather than allowing is to appear in the actual row where it has to appear.
    18 What is the use of image_zoom built-in?
    To manipulate images in image items.
    19 What is the use of hidden column?
    A hidden column is used to when a column has to embed into boilerplate text.
    20 What is the use of break group?
    A break group is used to display one record for one group ones. While multiple related records in other group can be displayed.
    21 What is the remove on exit property?
    For a modelless window, it determines whether oracle forms hides the window automatically when the operators navigates to an item in the another window.
    22 What is the purpose of the product order option in the column property sheet?
    To specify the order of individual group evaluation in a cross products.
    23 What is the maximum no of chars the parameter can store?
    The maximum no of chars the parameter can store is only valid for char parameters, which can be upto 64K. No parameters default to 23Bytes and Date parameter default to 7Bytes.
    24 What is the main diff. bet. Reports 2.0 & Reports 2.5?
    Report 2.5 is object oriented.
    25 What is the frame & repeating frame?
    A frame is a holder for a group of fields. A repeating frame is used to display a set of records when the no. of records that are to displayed is not known before.
    26 What is the difference between OLE Server & Ole Container?
    An Ole server application creates ole Objects that are embedded or linked in ole Containers ex. Ole servers are ms_word & ms_excel. OLE containers provide a place to store, display and manipulate objects that are created by ole server applications. Ex. oracle forms is an example of an ole Container.
    27 What is the difference between object embedding & linking in Oracle forms?
    In Oracle forms, Embedded objects become part of the form module, and linked objects are references from a form module to a linked source file.
    28 What is the difference between boiler plat images and image items?
    Boiler plate Images are static images (Either vector or bit map) that you import from the file system or database to use a graphical elements in your form, such as company logos and maps. Image items are special types of interface controls that store and display either vector or bitmap images. Like other items that store values, image items can be either base table items(items that relate directly to database columns) or control items. The definition of an image item is stored as part of the form module FMB and FMX files, but no image file is actually associated with an image item until the item is populate at run time.
    29 What is the difference between $$DATE$$ & $$DBDATE$$ $$DBDATE$$ retrieves the current database date $$date$$ retrieves the current operating system date.
    30 What is the diff. when Flex mode is mode on and when it is off?
    When flex mode is on, reports automatically resizes the parent when the child is resized.
    31 What is the diff. when confine mode is on and when it is off?
    When confine mode is on, an object cannot be moved outside its parent in the layout.
    32 What is the diff. bet. setting up of parameters in reports 2.0 reports 2.5?
    LOVs can be attached to parameters in the reports 2.5 parameter form.
    33 What is the advantage of the library?
    Libraries provide a convenient means of storing client-side program units and sharing them among multiple applications. Once you create a library, you can attach it to any other form, menu, or library modules. When you can call library program units from triggers menu items commands and user named routine, you write in the modules to which you have attach the library. When a library attaches another library, program units in the first library can reference program units in the attached library. Library support dynamic loading-that is library program units are loaded into an application only when needed. This can significantly reduce the run-time memory requirements of applications.
    34 What is term?
    The term is terminal definition file that describes the terminal form which you are using r20run.
    35 What is system.coordination_operation?
    It represents the coordination causing event that occur on the master block in master-detail relation.
    36 What is synchronize?
    It is a terminal screen with the internal state of the form. It updates the screen display to reflect the information that oracle forms has in its internal representation of the screen.
    37 What is strip sources generate options?
    Removes the source code from the library file and generates a library files that contains only pcode. The resulting file can be used for final deployment, but can not be subsequently edited in the designer. ex. f45gen module=old_lib.pll userid=scott/tiger strip_source YES output_file
    38 What is relation between the window and canvas views?
    Canvas views are the back ground objects on which you place the interface items (Text items), check boxes, radio groups etc.,) and boilerplate objects (boxes, lines, images etc.,) that operators interact with us they run your form . Each canvas views displayed in a window.
    39 What is pop list?
    The pop list style list item appears initially as a single field (similar to a text item field). When the operator selects the list icon, a list of available choices appears.
    40 What is new_form built-in?
    When one form invokes another form by executing new_form oracle form exits the first form and releases its memory before loading the new form calling new form completely replace the first with the second. If there are changes pending in the first form, the operator will be prompted to save them before the new form is loaded.
    41 What is lexical reference? How can it be created?
    Lexical reference is place_holder for text that can be embedded in a sql statements. A lexical reference can be created using & before the column or parameter name.
    42 What is forms_DDL?
    Issues dynamic Sql statements at run time, including server side pl/SQl and DDL
    43 What is difference between open_form and call_form?
    when one form invokes another form by executing open_form the first form remains displayed, and operators can navigate between the forms as desired. when one form invokes another form by executing call_form, the called form is modal with respect to the calling form. That is, any windows that belong to the calling form are disabled, and operators cannot navigate to them until they first exit the called form.
    44 What is bind reference and how can it be created?
    Bind reference are used to replace the single value in sql, pl/sql statements a bind reference can be created using a (:) before a column or a parameter name.
    45 What is an user exit used for?
    A way in which to pass control (and possibly arguments ) form Oracle report to another Oracle products of 3 GL and then return control ( and ) back to Oracle reports.
    46 What is an OLE?
    Object Linking & Embedding provides you with the capability to integrate objects from many Ms-Windows applications into a single compound document creating integrated applications enables you to use the features form .
    47 What is an object group?
    An object group is a container for a group of objects; you define an object group when you want to package related objects, so that you copy or reference them in other modules.
    48 What is an anchoring object & what is its use?
    An anchoring object is a print condition object which used to explicitly or implicitly anchor other objects to itself.
    49 What is a User_exit?
    Calls the user exit named in the user_exit_string. Invokes a 3Gl program by name which has been properly linked into your current oracle forms executable.
    50 What is a timer?
    Timer is an "internal time clock" that you can programmatically create to perform an action each time the timer expires.
    51 What is a Text_io Package?
    It allows you to read and write information to a file in the file system.
    52 What is a text list?
    The text list style list item appears as a rectangular box which displays the fixed number of values. When the text list contains values that can not be displayed, a vertical scroll bar appears, allowing the operator to view and select undisplayed values.
    53 What is a property clause?
    A property clause is a named object that contains a list of properties and their settings. Once you create a property clause you can base other object on it. An object based on a property can inherit the setting of any property in the clause that makes sense for that object.
    54 What is a physical page ? & What is a logical page ?
    A physical page is a size of a page. That is output by the printer. The logical page is the size of one page of the actual report as seen in the Previewer.
    55 What is a library?
    A library is a collection of subprograms including user named procedures, functions and packages.
    56 What is a difference between pre-select and pre-query?
    Fires during the execute query and count query processing after oracle forms constructs the select statement to be issued, but before the statement is actually issued. The pre-query trigger fires just before oracle forms issues the select statement to the database after the operator as define the example records by entering the query criteria in enter query mode. Pre-query trigger fires before pre-select trigger.
    57 What is a combo box?
    A combo box style list item combines the features found in list and text item. Unlike the pop list or the text list style list items, the combo box style list item will both display fixed values and accept one operator entered value.
    58 What does the term panel refer to with regard to pages?
    A panel is the no. of physical pages needed to print one logical page.
    59 What are visual attributes?
    Visual attributes are the font, color, pattern proprieties that you set for form and menu objects that appear in your application interface.
    60 What are three panes that appear in the run time pl/sql interpreter?
    1.Source pane. 2. interpreter pane. 3. Navigator pane.
    Regards
    B RANGARAJAN

  • Debugging a PL/SQL with Oracle SQL Developer

    I am trying to debug pl in Oracle SQL Developer, have looked in
    http://www.oracle.com/technology/obe/11gr2_db_prod/appdev/sqldev/plsql_debug/plsql_debug_otn.htm#t5
    and there are not enabled the options "Data", "Smart Data", etc someone knows why?
    thank you.

    In the log windows, when debug, show tihis:
    Conectando a la base de datos OPAVID - Inventariado.
    Ejecutando PL/SQL: ALTER SESSION SET PLSQL_DEBUG=TRUE
    Ejecutando PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP( '10.240.193.202', '2310' )
    Later, 1 min.
    show this
    ORA-30683: failure establishing connection to debugger
    ORA-12535: TNS:operation timed out
    ORA-06512: at "SYS.DBMS_DEBUG_JDWP", line 68
    ORA-06512: at line 1
    El proceso ha terminado.
    Desconectando de la base de datos OPAVID - Inventariado.
    so, do you think, the problem is a firewal, i can´t verify this.

  • Can anyone guide me to ideas on basics of parallel processing in SQL

    Hi all,
    Can anyone guide me to ideas on basics of parallel processing in SQL and its usage in the the performance tuning of the query. If so what's the syntax to be followed and how to arrive at the optimized query after tuning

    My 2'c on the subject.
    Don't break your head over parallel query (PQ) processing. It should be something that is of concern to the DBA/Oracle architect - not the developer.
    Yes, it is good to be aware of how it works. But you should not write hints in your code that forces PQ processing.
    Simple example. You use hints to force a PQ of degrees 5 (meaning 5 PQ processes will be used). It works great on development. In production, 10 users are running that query round about the same time. The PQ ceiling is 20 PQ processes. The 1st 4 users each gets 5 PQs processes and the remaining 6 get none. Or another developer did the same thing, only he was very greedy and coded a PQ of degrees 20 into his SQL. So his SQL is now consuming all available PQ processes. So how did forcing PQ in your code addressed performance? It did just for a couple of users with the majority of users now facing even worse performance.
    The DBA is the one that should be tuning this. He/she can set the degree of PQ per table. Control the size of the PQ etc.
    And it does not stop there. The primary reason for PQ in Oracle is to lower the latency of I/O. Let's say Oracle needs to reads 100MB worth of data (full table scan or fast full index scan for example). It uses multi block (sequential) reads to read bigger chunks at a time. Still, a single process can only read I/O so fast - the speed of which is entirely dependant on the I/O subsystem and hardware.
    Using a second process to assist with the I/O can reduce the overall time. Instead of 1 process reading 100MB data, there are now 2 processes only having to read 50MB each.
    But as I mentioned, the actual I/O thruput is a lower level function. Let's say you start a 100 processes. Great - each only have to read 1MB worth of data. Response should be fast.
    Wrong. Those 100 processes seriously overload the I/O subsystem and throttle it so badly that the complete platform's performance is degraded severely. So instead of these 100 process speeding up I/O performance, they trash the performance of the entire platform.
    Sure, this is an extreme example. But the basic concepts are usually illustrated much better using such an example.
    So, you as developer deciding on just whether to use PQ and just how many PQ processes to use...? Wrong. It is not your decision, not your area of responsibility and usually not your area of expertise.
    Know what PQ is. Know how PQ works. But think long and hard before forcing PQ via your code (using hints) on a production platform.

  • SQL PRO AND ORACLE SQL URGENT HELP

    Can any one help me out here withe these questions:
    Pro C Qusetions:
    1.     What are the SQLCA and SQLDA ?
    2.     What is a mutating table ?
    3.     What are indicator variables and how are they used ?
    4.     What are the components of the Oracle VARCHAR type and how should such a structure be loaded into a C Char type ?
    5.     Why would you use the ‘ALTER SESSION’ command in conjunction with the tkprof program and what is the purpose of each step ?
    ORACLE SQL QUESTIONS:
    1.0     How would you move data from one Oracle database to another Oracle database?
    2.0     How would you import data into an Oracle database from another DBMS or flat file?
    3.0     What is an Outer Join and how does the output differ from a simple join?
    4.0     What is the difference between the conditional expressions IN and EXISTS ? In what circumstances would you USE EACH.
    5.0      You cannot create a unique index on a table due to duplicate values. Describe how you find the offending row and subsequently delete it.

    1. What are the SQLCA and SQLDA ?
    SQLCA = SQL Communications area: stores status variable and error message text. manual reference
    SQLDA = SQL Descriptor Area - stores information about bind variables. manual reference
    2. What is a mutating table ?
    A table that is being modified and that you are trying to select from. Usually encountered in a before insert/update trigger when trying to select from the table that is being inserted/updated, which causes the dreaded ORA-04091 error.
    3. What are indicator variables and how are they used ?
    Used in Pro*C to tell if the table column contains the value NULL.
    4. What are the components of the Oracle VARCHAR type and how should such a structure be loaded into a C Char type ?
    varchar2 is a null-terminated string. Use Pro*C extended type VARCHAR. Manual Reference
    5. Why would you use the "ALTER SESSION" command in conjunction with the tkprof program and what is the purpose of each step ?
    Use alter session to set tracing on for your session:
    alter session set sql_trace = true ;
    this will create a trace file in the user dump destination
    (select value from v$parameter where name = 'user_dump_dest'). Use tkprof to format the trace file.
    1.0 How would you move data from one Oracle database to another Oracle database?
    Export / Import Oracle utility, Database link and INSERT ... SELECT ..., Database link and COPY command, save to flat file and use SQL*Loader, transportable tablespaces, database "cloning" by copying database files over to a new server and creating a new instance based on those files. List of manuals look up CREATE DATABASE LINK in the SQL Reference, COPY command in the SQL*Plus reference, Export/Import or SQL*Loader in the Utilities manual.
    2.0 How would you import data into an Oracle database from another DBMS or flat file?
    SQL*Loader Oracle Utility
    3.0 What is an Outer Join and how does the output differ from a simple join?
    An example is worth 1000 words.
    SQL> select * from emp ;
       EMP_NO EMP_NAME     DEPT_NO
            1 SMITH              1
            2 JONES              1
            3 BROWN              2
            4 BOND               5
    SQL> select * from dept ;
      DEPT_NO DEPT_NAME
            1 SALES
            2 MARKETING
    SQL> -- inner or "ordinary" join
    SQL> select a.emp_name, b.dept_name
      2  from emp a, dept b
      3  where a.dept_no = b.dept_no ;
    EMP_NAME   DEPT_NAME
    SMITH      SALES
    JONES      SALES
    BROWN      MARKETING
    SQL> -- outer join
    SQL> select a.emp_name, b.dept_name
      2  from emp a, dept b
      3  where a.dept_no = b.dept_no (+) ;
    EMP_NAME   DEPT_NAME
    SMITH      SALES
    JONES      SALES
    BROWN      MARKETING
    BOND5.0 You cannot create a unique index on a table due to duplicate values. Describe how you find the offending row and subsequently delete it.
    Using exceptions clause of enable constraint
    ALTER TABLE employees
    ENABLE VALIDATE CONSTRAINT emp_manager_fk
    EXCEPTIONS INTO exceptions ;
    Find rowids in exceptions table and use those rowids to delete the "bad" data. See SQL reference on alter table for more details.

  • Installing Oracle SQL taglibrary

    Hi Guys,
    how would i
    1.) Download (from where) and
    2.) deploy the necessary files (which are necessary, where to deploy in my installation?)
    to enable me using in my JSP pages the Oracle SQL taglib ?
    The dvelopment environment would be IIS/Tomcat and later on the production machine Oracle iAS 9 Release 2.
    Stumbled on a lot of descriptions for using the taglib, but nowhere i found how actually to deploy the files, and where to get them from.
    Thanks a lot, Chris

    Carl, you can download "Oracle Application Server Container for J2EE" following the link
      http://www.oracle.com/technology/software/products/ias/index.html
    Any version will generally do. You can find the file j2ee/home/jsp/lib/taglib/ojsputil.jar once you unzip the downloaded file, oc4j_extended.zip.
    To be able to use them, simply put the ojsputil.jar in your WEB-INF/lib and ensure that class12.zip is in your classthpath. Then you can use them in your jsp like
      <%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/sqltaglib.tld" prefix="sql" %>
      <sql:dbOpen dataSource='<%=request.getParameter("datasource") %>' connId="con1" />
    For more information, see
      http://download-west.oracle.com/docs/cd/B10464_05/web.904/b10319/dataacc.htm#1005996
    Having said that much, I would like to point out:
    1. Why not use Jdeveloper? Download Jdeveloper and use its online help to find all the answer to your questions. It will be much quicker and easier to get you jump started. Jeveloper also support Tomcat. You can import Oracle JSP tag library into a project with a few clicks of your mouse.
    2. Any partiular reason to use Oracle SQL taglib? The following is the Oracle official standing:
    The custom SQL tag library provided with OC4J pre-dates the JavaServer Pages Standard Tag Library (JSTL) and has areas of duplicate functionality. For standards compliance, it is now generally advisable to use JSTL instead. See "Support for the JavaServer Pages Standard Tag Library".
    Oracle is not desupporting the existing library, however. For features in the custom library that are not yet available in JSTL, where there seems to be general usefulness, Oracle will try to have the features adopted into the JSTL standard as appropriate.
    Hope this helps.

  • Enable parallel processing

    Hello,
    I'm trying to enable parallel processing at the session level to force parallel processing on all DML and DDL statements regardless of object definition or lack of hints for DML. I thought the following would do the trick but it's not working. Wondering if I'm missing an instance setting. Thanks for any advice.
    alter session force parallel ddl parallel 2;
    alter session force parallel dml parallel 2;
    SQL>show parameter parallel
    NAME TYPE VALUE
    fast_start_parallel_rollback string LOW
    parallel_adaptive_multi_user boolean TRUE
    parallel_automatic_tuning boolean FALSE
    parallel_execution_message_size integer 2152
    parallel_instance_group string
    parallel_max_servers integer 160
    parallel_min_percent integer 0
    parallel_min_servers integer 0
    parallel_server boolean FALSE
    parallel_server_instances integer 1
    parallel_threads_per_cpu integer 2
    recovery_parallelism integer 0

    I think I see the problem. The statement that I was looking to force parallel processing was an alter table add col with default value. Reading the documentation :) and it states that the alter table statement can only be parallelized for partitioned tables - the table in question is not partitioned. Documentation also states that even with DML parallel enabled the DML operation may still execute serially if there are no parallel hints or no tables with a parallel attribute or if restrictions on parallel operations are violated, i.e. Parallel DML operations cannot be done on tables with triggers.
    The problem for me is that I'm dealing with a 3rd party vendor script that I do not want to modify it (very long, complex PL/SQL with dynamic SQL), among other things the script alters high volume tables with default values, before it alters the table it renames it as table_old and then re-creates as ctas from old, so enabling parallel at the object level is only viable if I modify the script. Same thing with hints.

Maybe you are looking for