SQL%ROWCOUNT problem in Oracle 9i

We have migrated our application from 8i to 9i. There is a PL/SQL procedure which returns number of rows inserted in the table. In Oracle it was returning correct number of rows but when we have migrated same procedure on Oracle9i it is returning 0 (ZERO) number of records even though procedure inserts successfully more than 100,000 rows in the table. It is used as:
tmpCount := SQL%ROWCOUNT;
Is there any change on Oracle9i?

From MetaLink
The behaviour you are observing is due to bug 2286387. You can set event 10943 to level 4194304 in your init<SID>.ora to get the old Oracle 8i behaviour.
NOTE : The new behaviour in which SQL% attributes are affected by commit and rollback will be the DEFAULT behaviour going forward (Oracle 10i) so it is recommended to change the code so that you check the SQL% attrubutes before a commit or rollback.
The event 10943 will also be removed in the future releases.

Similar Messages

  • SQl%rowcount problem

    i have created a function, in pl/sql to check the diffrence betwenn 2 similar tables having same columns . if it has diffrence tha is if select query returns row then it shoul go in error log table but this is not happening could you solve my problem.
    thanks in advance
    CREATE OR REPLACE FUNCTION CAL_BETWEEN_TABLES(
    source_name IN VARCHAR2,
    target_name IN VARCHAR2)
    RETURN number
    IS
    v_success CONSTANT NUMBER := 0;
    v_failure CONSTANT NUMBER := -1;
    V_SQL VARCHAR2(10000);
    v_rows_processed NUMBER :=0;
    p_err_modul error_logs.err_modul%TYPE := 'NULL';
    p_err_function error_logs.err_function%TYPE := ' CAL_BETWEEN_TABLES';
    p_err_type error_logs.err_type%TYPE := 'SN';
    BEGIN
    V_SQL:= 'SELECT * from '||source_name||' minus select * from '||target_name||'';
    v_rows_processed:=sql%rowcount;
    IF v_rows_processed>0
    THEN
         p_err.insert_error(p_err_modul,
    p_err_function,
    p_err_type,
    SQLCODE,
    USER,
    'Failed in the function CAL_BETWEEN_TABLES' ||
    SQLERRM);
    RETURN(v_failure);
    --dbms_output.put_line('failure');
    ELSE
    RETURN(v_success);
    --dbms_output.put_line('success');
    END IF;
    END CAL_BETWEEN_TABLES;

    You are missing EXECUTE IMMEDIATE or it is cut and paste problem. also
    Declare variable
    v_row source_name%rowtype;
    V_SQL:= 'SELECT * from '||source_name||' minus select * from '||target_name||'';
    EXECUTE IMMEDIATE v_sql INTO v_row;
    v_rows_processed:=sql%rowcount;
    HTH

  • Problem in Loading Data from SQL Server 2000 to Oracle 10g

    Hi All,
    I am a university student and using ODI for my final project on real-time data warehousing. I am trying to load data from MS SQL Server 2000 into Oracle 10g target table. Everything goes fine until I execute the interface for the initial load. When I choose the CKM Oracle(Create unique index on the I$ table) km, the following step fails:
    21 - Integration - Prj_Dim_RegionInterface - Create Unique Index on flow table
    Where Prj_Dim_Region is the name of my target table in Oracle.
    The error message is:
    955 : 42000 : java.sql.SQLException: ORA-00955: name is already used by an existing object
    java.sql.SQLException: ORA-00955: name is already used by an existing object
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:633)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1086)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3057)
         at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    I am using a surrogate key column in my target table alongwith the natural key. The natural key is populated by the primary key of my source table, but for the surrogate key, I have created a sequence in my oracle schema where the target table exists and have used the following code for mapping:
    <%=snpRef.getObjectName( "L" , "SQ_PRJ_DIM_REGION" , "D" )%>.nextval
    I have chosen to execute this code on target.
    Among my attempts to solve this problem was to set Create Index option of the CKM Oracle(Create Index for the I$ Table) to No so that it wont create any index on the flow table. I also tried to use the simple CKM Oracle km . Both solutions allowed the interface to execute successfully without any errors, but the data was not loaded into the target table.
    When I right-click on the Prj_Dim_Region data store and choose Data, it shows empty. Pressing the SQL button in this data store shows a dialog box " New Query" where I see this query:
    select * from NOVELTYFURNITUREDW.PRJ_DIM_REGION
    But when i press OK to run it, I get this error message:
    java.lang.IllegalArgumentException: Row index out of range
         at javax.swing.JTable.boundRow(Unknown Source)
         at javax.swing.JTable.setRowSelectionInterval(Unknown Source)
         at com.borland.dbswing.JdbTable.accessChange(JdbTable.java:2959)
         at com.borland.dx.dataset.AccessEvent.dispatch(Unknown Source)
         at com.borland.jb.util.EventMulticaster.dispatch(Unknown Source)
         at com.borland.dx.dataset.DataSet.a(Unknown Source)
         at com.borland.dx.dataset.DataSet.a(Unknown Source)
         at com.borland.dx.dataset.DataSet.a(Unknown Source)
         at com.borland.dx.dataset.DataSet.open(Unknown Source)
         at com.borland.dx.dataset.StorageDataSet.refresh(Unknown Source)
         at com.borland.dx.sql.dataset.QueryDataSet.refresh(Unknown Source)
         at com.borland.dx.sql.dataset.QueryDataSet.executeQuery(Unknown Source)
         at com.sunopsis.graphical.frame.a.cg.actionPerformed(cg.java)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    I do not understand what the problem is and wasting days to figure it out. Any help will be highly appreciated as my deadline is too close for this project.
    Thank you so much in advance.
    Neel

    Hi Cezar,
    Can u plz help me with this scenario?
    I have one Oracle data model with 19 source tables and one SQL Server data model with 10 target tables. I have created 10 interfaces which use JournalizedDataOnly on one of the tables in the interface; e.g in interface for DimCustomer target table, I have 2 tables, namely Customer and Address, but the journalizing filter appear only on Customer table and this option is disabled for Address automatically.
    Now I want to create a package using OdiWaitForLog event detection. Is it possible to put all these 10 interfaces in just one package to populate the target tables? It works fine when I have only one interface and I use the name of one table in the interface for Table Name parameter of OdiWaitForLogData event, but when I try a comma seperated list of table names[Customer, Address] this error happens
    java.sql.SQLException: ORA-00942: table or view does not exist
    and if I use this method <%=odiRef.getObjectName("L","model_code","logical_schema","D")%>, I get this error
    "-CDC_SET_NAME=Exception getObjectName("L", "model_code", "logical_schema", "D") : SnpLSchema.getLSchemaByName : SnpLschema does not exist" "
    Please let me know how to make it work?
    Do I need to create separate data models each including only those tables which appear in their corresponding interface and package? Or do I need to create multiple packages each with only one journalized interface to populate only one target table?
    Thank you for your time in advance.
    Regards,
    Neel

  • Migration From SQL Server 2005 to Oracle DB through Oracle SQ Dev Problem

    Hi all,
    we are trying to do a full Migration from MS SQL Server 2005 to Oracle DB 9.2 i
    we are using Oracle SQL Developer V 1.5.3,
    the capturing of the DB and the conversion to the oracle model completed succefully
    however when we try to generate the scripts from the converted model
    the script generation hangs on a sequence and no further progress is made (the script generation pop up keeps still on a certain sequence displaying its name, and thats it )
    no error messages are displayed,
    how can we know the reason for this? or atleast find a log for whats happening...
    any suggestions?
    Thank you

    Hi,
    migrating a sequence shouldn't make a problem. I did a quick test. I created this table in SQL Server:
    create table test_seq (col1 int identity(1,1),col2 char(1))
    Then I captured the table, converted the table and generated the script. There was no problem.
    CREATE SEQUENCE succeeded.
    CREATE TABLE succeeded.
    Connected
    TRIGGER test_seq_col1_TRG Compiled.
    As you see, applying the script was also successful.
    I am using Oracle RDBMS 11g, I don't know whether this makes a difference. Do you have any 11g instance available to test it?
    Can you show me one of the sequences that are causing the hang? Is the CREATE SEQUENCE statement already in the generated script, or not? Your table is for sure more complex than my simple example.
    Regards,
    Wolfgang
    Edited by: wkobargs on Jan 13, 2009 3:01 AM

  • Is there any known problem using Oracle SQL Developer 3.0.04 with Java 1.7?

    I'm new to Oracle. I have installed Oracle SQL Developer 3.0.04 and Java 1.7. When I run Oracle SQL Developer, I will get the window Running this product is supported with minimum Java version of 1.6.0_04 and a maximum version less than 1.7. This product will not be supported....
    Is there any known problem using Oracle SQL Developer 3.0.04 with Java 1.7?
    I have already downloaded Java 1.6 but don't know whether I need to uninstall Java 1.7 first. If don't need to uninstall Java 1.7, how can I set Oracle SQL Developer to run with Java 1.6?
    Thanks for any help.
    Edited by: 881656 on Aug 25, 2011 11:22 AM

    Hi,
    One prior post discussing the use of Java 7 is:
    SQL Developer 3.0  and Java SE 7?
    There is no need to uninstall any Java version (except if you have disk space constraints) and no problem switching between Java versions. This may be controlled in the sqldeveloper.conf file in your ...\sqldeveloper\sqldeveloper\bin directory via the SetJavaHome line. For example:
    #SetJavaHome ../../jdk
    SetJavaHome C:/Program Files/Java/jdk1.6.0_26
    #SetJavaHome C:/Program Files/Java/jdk1.7.0Regards,
    Gary Graham
    SQL Developer Team

  • Data length problem migrating from sql server 7 to oracle 8i

    I just migrated SQL Server 7 database to Oracle 8i db and everything seemed to have ran ok except that in my newly created oracle database, the field size is doubled. For instance a field with nvarchar(4) in sql server would convert to varchar2(8). Has anyone ran into this problem and also does anyone know how to fix it? Thank you so much.

    Hi Roberto,
    You cannot use Workbench 1.2.2 to migrate from SQL Server 7 to
    Oracle 8.
    However, the good news is that we have a new verion of the
    workbench that will have a plugin that can migrate from SQL
    Server 7.0 to Oracle8.
    A beta version will be downloadable from this web-site in approx
    one week. Eventhough this version is a beta version, it has
    undergone some rigourous testing and is very close to production.
    Regards
    John
    Roberto Werneck (guest) wrote:
    : I would like to know if it is possible to use the workbench
    : 1.2.2 to migrate from SQL Server 7 to Oracle 8. If possible
    what
    : kinds of problems would i probably have. If not, how can i get
    : the Beta version ?
    : Thanks,
    Oracle Technology Network
    http://technet.oracle.com
    null

  • HANA equivalent of oracle's sql%rowcount to get affected rows.

    I want to get the number of rows affected from an insert or update statement inside a stored procedure.
    Is there any equivalent to oracle's sql%rowcount that can be called after the query.
    For example:
    create procedure procedure_name
    begin
         declare l_c integer;
         insert into table values ('somevalue');
         l_c := sql%rowcount; -- This would return 1 for the row inserted.
    end;

    Yes, after the INSERT statement....
    SELECT ::ROWCOUNT into L_C FROM DUMMY;
    Cheers,
    Rich Heilman

  • Problems with loading source model using omw from sql server 7 into oracle 9i

    I am migrating data from sql servr 7 into oracle 9i. when doing capture phase i get the following error.
    ==>failed to load source model.[microsoft][odbc sql server][sql server]select permission
    denied on column 'password' of object 'syslogins', database master, owner dbo.
    Why is this so...is it bcz of something with my odbc link...
    also is there any way to load only tables and not system tables when doing capture phase.
    any help asap will be much appreciated.
    thanks

    Hi,
    You must ensure that you have the correct password to login to SQL Server.
    The Workbench requires some of the tables in the Master database.
    Regards
    John

  • Problem passing oracle.sql.ARRAY to Oracle

    I am having ClassCastException when I try to pass a oracle.sql.ARRAY to a Oracle Package.
    Here is my code:
    PreparedStatement stmt = null;
    String strArray[] = { "1,2,3,4,5" };
    ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor( "TEST_PAC_1.TEST_COLL_2", dbConnection );
    //encounter Exception on the line below.
    ARRAY array_to_pass = new ARRAY( descriptor, dbConnection, strArray );
    String queryStr = "begin TEST_PAC_1.TEST_PROC_2(?); end;";
    stmt = dbConnection.prepareStatement(queryStr);
    stmt.setArray( 1, array_to_pass );
    stmt.execute();
    I understand that oracle.sql.ARRAY has been replaced by weblogic.jdbc.vendor.oracle.OracleArray in Weblogic.
    MY QUESTION IS: HOW DO I INSERT MY STRING ARRAY INTO THE OracleArray and pass it to the plsql.
    Really frustrated searching through the forums for the whole day,
    Thanks,

    Try this if you are at weblogic 8.1:
    Connection con = getConnectionFromDataSource();
    Connection vendorConnection = ((WLConnection)con).getVendorConnection();
    // use direct oracle connection.
    ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor( "TEST_PAC_1.TEST_COLL_2", dbConnection );
    vendorConnection.close();
    Beware that you should be very careful as you are going to use a direct vendor
    connection.
    The better aproach is to pass the string array as a delimited string to your storad
    procedure and parse it in the SP - then you don't have to mess up with vendor-specific
    handling.
    Hope this helps.
    Regards,
    Slava Imeshev
    "Daddy Daddy" <[email protected]> wrote in message news:24349835.1097143668312.JavaMail.root@jserv5...
    I am having ClassCastException when I try to pass a oracle.sql.ARRAY to a Oracle Package.
    Here is my code:
    PreparedStatement stmt = null;
    String strArray[] = { "1,2,3,4,5" };
    ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor( "TEST_PAC_1.TEST_COLL_2", dbConnection );
    //encounter Exception on the line below.
    ARRAY array_to_pass = new ARRAY( descriptor, dbConnection, strArray );
    String queryStr = "begin TEST_PAC_1.TEST_PROC_2(?); end;";
    stmt = dbConnection.prepareStatement(queryStr);
    stmt.setArray( 1, array_to_pass );
    stmt.execute();
    I understand that oracle.sql.ARRAY has been replaced by weblogic.jdbc.vendor.oracle.OracleArray in Weblogic.
    MY QUESTION IS: HOW DO I INSERT MY STRING ARRAY INTO THE OracleArray and pass it to the plsql.
    Really frustrated searching through the forums for the whole day,
    Thanks,

  • SQL Server 200 to Oracle - problem loading objects

    Here's what I've done so far:
    1. Download and install SQLDeveloper (C:\Oracle\sqldeveloper 1.2.1.32.13)
    2. Create omwbuser (w/ role=dba) in Oracle test database (hc02) (9.2.0.7.0).
    3. From Explorer, double-click sqldeveloper.exe
    4. File > New > Database connection (clicked Test button, but whatever it was that popped up, disappeared before I could read it.)
    5. Assuming it worked, click Connect button. Try a better test "select name from v$database;". Works.
    6. Migration > Repository Management > Create Repository ("Repository Built Successfully")
    7. Migration > SQL Server Offline Capture > Create Database Capture Scripts.
    Choose C:\Oracle\sqldeveloper\sqldeveloper\temp
    Generate for Windows Batch File
    Microsoft SQL Server (2000)
    8. Email scripts to Sql Server dba to execute. Get files back.
    9. Copy 16 SS2K_SYS<objectname>S.dat files to C:\Oracle\sqldeveloper\sqldeveloper\temp
    10. Migration > SQL Server Offline Capture > Load Database Capture Script Output
    Open C:\Oracle\sqldeveloper\sqldeveloper\temp\sqlserver2000.ocp
    Window pops up labelled "Capturing Database", but I don't see any entries under "Object Type" or "No of Objects Captured".
    Lower down in the pop up window it says "Capture Done".
    What am I missing?

    Hi,
    Here is the detailed explanation.
    Iam using the latest version of SQL Developer 1.5 EA2 with the thrid party JDBC driver as jtds 1.2.jar file. I have created connections of SQL Server 2000 and oracle 9i.
    I have created the repository and associated it. I can able to view the structure of SQL Server Objects like tables, views, procedures etc.,
    All the pre-migration check got success.
    When i try to do "Quick Migrate Microsoft SQL Server", Iam getting the following exception in the trace window..
    WARNING: Unknown directive: SetSkipJ2SDKCheck
    DB Adapter warning: Replacing connection creator oracle.jdeveloper.db.adapter.My
    SQLConnectionCreator for subtype MYSQL with oracle.dbtools.thirdparty.mysql.MySQ
    LConnectionCreator
    DB Adapter warning: Replacing connection creator oracle.jdeveloper.db.adapter.Or
    acleConnectionCreator for subtype oraJDBC with oracle.dbtools.raptor.standalone.
    connection.RaptorConnectionCreator
    Exception occurred during event dispatching:
    java.lang.NullPointerException
    at javax.swing.plaf.basic.BasicTreeUI.paint(BasicTreeUI.java:1215)
    at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
    at javax.swing.JComponent.paintComponent(JComponent.java:742)
    at javax.swing.JComponent.paint(JComponent.java:1005)
    at oracle.ide.controls.JTreeTable$TreeTableCellRenderer.paint(JTreeTable
    .java:309)
    at javax.swing.CellRendererPane.paintComponent(CellRendererPane.java:134
    at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2071)
    at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1972
    at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1895)
    at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
    at javax.swing.JComponent.paintComponent(JComponent.java:742)
    at javax.swing.JComponent.paint(JComponent.java:1005)
    at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4963)
    at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4916)
    at javax.swing.JComponent._paintImmediately(JComponent.java:4859)
    at javax.swing.JComponent.paintImmediately(JComponent.java:4666)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(System
    EventQueueUtilities.java:114)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:163)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:153)
    at java.awt.Dialog$1.run(Dialog.java:515)
    at java.awt.Dialog.show(Dialog.java:536)
    at java.awt.Component.show(Component.java:1300)
    at java.awt.Component.setVisible(Component.java:1253)
    at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
    at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
    at oracle.dbtools.migration.workbench.core.ui.MigrationProgressBar.start
    (MigrationProgressBar.java:338)
    at oracle.dbtools.migration.workbench.core.ui.MigrationProgressBar.start
    (MigrationProgressBar.java:233)
    at oracle.dbtools.migration.workbench.core.ui.AbstractMigrationProgressR
    unnable.start(AbstractMigrationProgressRunnable.java:127)
    at oracle.dbtools.migration.workbench.core.FullMigrateInitiator.launch(F
    ullMigrateInitiator.java:74)
    at oracle.dbtools.raptor.controls.sqldialog.ObjectActionController.handl
    eEvent(ObjectActionController.java:140)
    at oracle.ide.controller.IdeAction.performAction(IdeAction.java:513)
    at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:84
    3)
    at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:486)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:18
    49)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
    a:2169)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
    .java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258
    at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1
    000)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMen
    uItemUI.java:1041)
    at java.awt.Component.processMouseEvent(Component.java:5488)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
    at java.awt.Component.processEvent(Component.java:5253)
    at java.awt.Container.processEvent(Container.java:1966)
    at java.awt.Component.dispatchEventImpl(Component.java:3955)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
    at java.awt.Container.dispatchEventImpl(Container.java:2010)
    at java.awt.Window.dispatchEventImpl(Window.java:1774)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    SELECT DISTINCT(REF_ID_FK), REF_TYPE FROM MD_ADDITIONAL_PROPERTIES WHERE PROP_KE
    Y IN (?) AND CONNECTION_ID_FK = ?
    The Migration log message says like this :
    a USE database statement is not allowed in a procedure or trigger.
    Also, Iam not even able to migrate single table.
    The Migration log gives the same message as:
    a USE database statement is not allowed in a procedure or trigger.
    Kindly let me know if am not clear in my explanation.
    Kindly help me to proceed as soon as possible.
    Thanks & Regards,
    Inigo Skylab
    Message was edited by:
    Inigo Skylab

  • PL/SQL Performance problem

    I am facing a performance problem with my current application (PL/SQL packaged procedure)
    My application takes data from 4 temporary tables, does a lot of validation and
    puts them into permanent tables.(updates if present else inserts)
    One of the temporary tables is parent table and can have 0 or more rows in
    the other tables.
    I have analyzed all my tables and indexes and checked all my SQLs
    They all seem to be using the indexes correctly.
    There are 1.6 million records combined in all 4 tables.
    I am using Oracle 8i.
    How do I determine what is causing the problem and which part is taking time.
    Please help.
    The skeleton of the code which we have written looks like this
    MAIN LOOP ( 255308 records)-- Parent temporary table
    -----lots of validation-----
    update permanent_table1
    if sql%rowcount = 0 then
    insert into permanent_table1
    Loop2 (0-5 records)-- child temporary table1
    -----lots of validation-----
    update permanent_table2
    if sql%rowcount = 0 then
    insert into permanent_table2
    end loop2
    Loop3 (0-5 records)-- child temporary table2
    -----lots of validation-----
    update permanent_table3
    if sql%rowcount = 0 then
    insert into permanent_table3
    end loop3
    Loop4 (0-5 records)-- child temporary table3
    -----lots of validation-----
    update permanent_table4
    if sql%rowcount = 0 then
    insert into permanent_table4
    end loop4
    -- COMMIT after every 3000 records
    END MAIN LOOP
    Thanks
    Ashwin N.

    Do this intead of ditching the PL/SQL.
    DECLARE
    TYPE NumTab IS TABLE OF NUMBER(4) INDEX BY BINARY_INTEGER;
    TYPE NameTab IS TABLE OF CHAR(15) INDEX BY BINARY_INTEGER;
    pnums NumTab;
    pnames NameTab;
    t1 NUMBER(5);
    t2 NUMBER(5);
    t3 NUMBER(5);
    BEGIN
    FOR j IN 1..5000 LOOP -- load index-by tables
    pnums(j) := j;
    pnames(j) := 'Part No. ' || TO_CHAR(j);
    END LOOP;
    t1 := dbms_utility.get_time;
    FOR i IN 1..5000 LOOP -- use FOR loop
    INSERT INTO parts VALUES (pnums(i), pnames(i));
    END LOOP;
    t2 := dbms_utility.get_time;
    FORALL i IN 1..5000 -- use FORALL statement
    INSERT INTO parts VALUES (pnums(i), pnames(i));
    get_time(t3);
    dbms_output.put_line('Execution Time (secs)');
    dbms_output.put_line('---------------------');
    dbms_output.put_line('FOR loop: ' || TO_CHAR(t2 - t1));
    dbms_output.put_line('FORALL: ' || TO_CHAR(t3 - t2));
    END;
    Try this link, http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/05_colls.htm#23723

  • %ROWCOUNT problem

    Dear SQL Experts,
    I have below PL/SQL procedure to update a table, here I see %ROWCOUNT returning 0 rows in all cases and not displaying actual number of rows updated.
    When I run the update statement directly, it updates correct number of rows? Is there a limitation around %rowcount? How to overcome this problem?
    Edited by: Ora DBA on Dec 11, 2012 12:49 AM

    Hi All, am facing same problem with SQL%ROWCOUNT returning 0, as well another issue with SELECT.
    SET serveroutput on;
    DECLARE
       TYPE date_array IS TABLE OF VARCHAR2 (12);
       v_date             date_array;
       v_cnt_before_upd   PLS_INTEGER;
       v_cnt_after_upd    PLS_INTEGER;
       PROCEDURE update_table_desc (ip_char IN CHAR)
       IS
          v_desc_from   VARCHAR2 (30);
          v_desc_to     VARCHAR2 (30);
       BEGIN
          IF ip_char = 'C'
          THEN
             v_desc_from := 'From Desc 1';
             v_desc_to := 'To Desc 1';
          ELSIF ip_char = 'S'
          THEN
             v_desc_from := 'From Desc 2';
             v_desc_to := 'To Desc 2';
          END IF;
          SELECT COUNT (*)
            INTO v_cnt_before_upd
            FROM table1
           WHERE col1_desc = v_desc_from;
          UPDATE table1
             SET col1_desc = v_desc_to
           WHERE col1_desc = v_desc_from;
          DBMS_OUTPUT.put_line ('sql%rowcount:..... ' || SQL%ROWCOUNT);
          SELECT COUNT (*)
            INTO v_cnt_after_upd
            FROM table1
           WHERE col1_desc = v_desc_to;
          DBMS_OUTPUT.put_line (   'To be updated: '
                                || v_cnt_before_upd
                                || '......Updated: '
                                || v_cnt_after_upd
          IF v_cnt_after_upd = v_cnt_before_upd
          THEN
             DBMS_OUTPUT.put_line (   v_desc_from
                                   || ' updated successfully to '
                                   || v_desc_to
             COMMIT;
          ELSE
             DBMS_OUTPUT.put_line (v_desc_from || ' update failed');
             ROLLBACK;
          END IF;
       EXCEPTION
          WHEN OTHERS
          THEN
             RAISE;
       END;
    BEGIN
       SELECT reporting_date
       BULK COLLECT INTO v_date
         FROM table2
        WHERE TRUNC (reporting_date) >= '31-Mar-2011'
          AND TRUNC (reporting_date) <= TRUNC (SYSDATE);
       FOR i IN v_date.FIRST .. v_date.LAST
       LOOP
          pack_context.context_open (v_date (i));
          DBMS_OUTPUT.put_line ('..............');
          DBMS_OUTPUT.put_line ('Context: ' || v_date (i));
          update_table_desc ('C');
          update_table_desc ('S');
          pack_context.context_disable;
       END LOOP;
    EXCEPTION
       WHEN OTHERS
       THEN
          DBMS_OUTPUT.put_line (DBMS_UTILITY.format_error_stack ());
    END;
    OUTPUT:
    ..............          (LOOP 1)
    Context: 26-OCT-12
    sql%rowcount:..... 0
    To be updated: 0......Updated: 573
    From Desc 1 update failed
    sql%rowcount:..... 0
    To be updated: 0......Updated: 127
    From Desc 2 update failed
    ..............          (LOOP 2)
    Context: 02-NOV-12
    sql%rowcount:..... 0
    To be updated: 0......Updated: 573
    From Desc 1 update failed
    sql%rowcount:..... 0
    To be updated: 0......Updated: 127
    From Desc 2 update failed
    ..............          (LOOP 3)
    Context: 31-AUG-12
    sql%rowcount:..... 0
    To be updated: 571......Updated: 573
    From Desc 1 update failed
    sql%rowcount:..... 0
    To be updated: 127......Updated: 127
    From Desc 2 updated successfully to To Desc 2
    PL/SQL procedure successfully completed.As you can see, SQL%ROWCOUNT returns 0 even when there is an update in (LOOP 3).
    Also note the counts returned before and after update. They're different in LOOP 3. But
    when I run the update stmt alone, am getting only the 571 records updated which is what
    available there. Don't understand from where the select stmt get 573 from. Please help me
    understand the possibilities of getting wrong counts.
    FYI: I didnt faced this issue in Oracle 11.2.0.3, am facing it in 11.2.0.1

  • Connection Problem with Oracle and Tomcat.

    I was able to enter Oracle using scott/tiger when I did not connect Tomcat.But when I connect tomcat I am unable to log onto Oracle.
    When I logged to the database then I tried to start the Tomcat but it gave an exception.So I went to the task manager and ended the running processes like isqlplus.exe, oracle.exe, tomcat.exe, apache.exe.When I ended all the processes except oracle.exe, tomcat gave an exception. But when I ended oracle.exe Tomcat started working but Oracle stopped working. I don't know what the problem is.
    Can anyone help me out?
    Thanks,
    Sravanthi.

    > Can anyone help me out?
    Yeah sure. Is there a SQL or PL/SQL related question in there.. somewhere.. hiding away?
    After all, you do realise that the name of this forum is SQL and PL/SQL and that it deals with the SQL and PL/SQL languages in the Oracle server.. right?

  • Problems with Oracle 11g XE R2

    Hi guys,
    I've got a problem and try'n to solve it for abt a week now and tried many solutions.
    My enviroment:
    Windows 7 Professional SP 1 64-Bit
    AMD Phenom II x4 940 @3.0 GH
    4 GB RAM (In Usage while installing 40%)
    Windows-Firewall is activated (but oracle.exe and lstnr.exe are configured as exception)
    avast! Free Antivirus Version 2014.9.0.2018
    Installation (both times with same outcome):
    Installed O 11g XE 64-Bit in two different ways:
    User I was logged in with is in Admingroup
    Started installation via rightclick with administrationprivileges
    I activated the administrators account and logged in with adminprivileges.
    After that I've installed the 11g XE 64 bit
    between both steps I cleaned everything up and restarted my system, registry was empty too and folder was deleted manually
    at first I get this problem: Windows cannot find "http://127.0.0.1:%HTTPPORT%/apex/f?p=4950"
    -> Manually changing %HTTPORT% to 8080
    --> now I could doubleclick the shortcut, Firefox/IE/Chrome opens but 404 not Found-Error is returned
    - OracleServiceXE, XracleXETNListener both are running
    [code]
    C:\Windows\system32>lsnrctl status
    LSNRCTL for 64-bit Windows: Version 11.2.0.2.0 - Production on 04-NOV-2014 18:02
    :56
    Copyright (c) 1991, 2014, Oracle.  All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
      TNS-00511: No listener
       64-bit Windows Error: 2: No such file or directory
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=D³rsinKurt-PC)(PORT=1521
    STATUS of the LISTENER
    Alias                     LISTENER
    Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.2.0 - Produ
    ction
    Start Date                04-NOV-2014 13:53:50
    Uptime                    0 days 4 hr. 9 min. 9 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Log File         C:\oraclexe\app\oracle\diag\tnslsnr\D³rsinKurt-PC\list
    ener\alert\log.xml
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=D³rsinKurt-PC)(PORT=1521)))
    The listener supports no services
    The command completed successfully
    [/code]
    so Listenerservice is up and running but I cant find the http 8080-Service with netstat -a
    so I started investigating a bit more:
    Registryfolder: HK_LOCAL_MACHINE\SOFTWARE\ORACLE is installed
    following subdirectories are installed: KEY_XE, ODP.NET, OracleMTSRecoveryService
    What I tried (both ways, starting with and without adminstrationprivileges):
    I created two new DWORD-Values in KEY_XE ORACLE_SID_AUTOSTART and -SHUTDOWN both with the value True and stopped and started the services, nothing changes.
    Inserted both users (Administrator and normal User) in ORA_DBA-Group, nothing changes, even tried to turn it off and on again
    wanted to connect to sqlplus via console:
    C:\Windows\system32>sqlplus system
    SQL*Plus: Release 11.2.0.2.0 Production on Di Nov 4 18:09:21 2014
    Copyright (c) 1982, 2014, Oracle.  All rights reserved.
    Enter password:
    ERROR:
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Process ID: 0
    Session ID: 0 Serial number: 0
    Enter user-name:
    when I start the sqlplus-prompt directly and write the command startup I get the following msg: ORA-01031: insufficient privileges
    I looked into the ORA_BASE-Folder and looked at the oradat folder, it contains a XE-Folder which is empty, the admin-folder contains: XE/ and adump, dpdump and pfile, all three are empty (what does this mean? No DB at all created?)
    I watched the ORA_HOME-Folder and found initXE.ora, oradba.exe, oradim and PWDXE.ora
    I looked into the oradim.txt-Log:
    Tue Nov 04 11:21:17 2014
    C:\oraclexe\app\oracle\product\11.2.0\server\bin\oradim.exe -shutdown -sid xe -usrpwd * -shutmode immediate -log oradim.log
    Tue Nov 04 11:21:55 2014
    ORA-01012: not logged on
    Tue Nov 04 11:23:01 2014
    C:\oraclexe\app\oracle\product\11.2.0\server\bin\oradim.exe -startup -sid xe -usrpwd *  -log oradim.log -nocheck 0
    Tue Nov 04 11:23:38 2014
    ORA-01078: failure in processing system parameters
    ORA-01565: error in identifying file 'C:\oraclexe\app\oracle\product\11.2.0\server\dbs/spfileXE.ora'
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) Das System kann die angegebene Datei nicht finden.
    --> bingo, 1st Issue: there is no spfileXE.ora, how can I create this? plus in the dbs-folder there is only a init.ora and no initXE.ora?
    Looked into the log-Folder 5 files starting with clscX.txt (probably after every systemreboot? containing the following:
    Oracle Database 11g Clusterware Release 11.2.0.2.0 - Production Copyright 1996, 2010 Oracle. All rights reserved.
    2014-11-04 13:53:52.197: [ default][5576]ut_read_reg:2:ocr registry key SOFTWARE\Oracle\olr cannot be opened. error 2
    [    CLSE][5576]clse_get_crs_home: Error retrieving OLR configuration [0] [Error opening olr registry key. The system couldn't find the file.
    -> Systemlanguage is german, so I've translated the german parts, maybe there was smth lost in translation
    --> 2nd Issue: Is there any regkey missing?
    further I watched the folder ORACLE_HOME /server/config/home cloesly:
    cloneDBCreation:
    SQL> Create controlfile reuse set database "XE"
      2  MAXINSTANCES 8
      3  MAXLOGHISTORY 1
      4  MAXLOGFILES 16
      5  MAXLOGMEMBERS 3
      6  MAXDATAFILES 100
      7  Datafile
      8  'C:\oraclexe\app\oracle\oradata\XE\system.dbf',
      9  'C:\oraclexe\app\oracle\oradata\XE\undotbs1.dbf',
    10  'C:\oraclexe\app\oracle\oradata\XE\sysaux.dbf',
    11  'C:\oraclexe\app\oracle\oradata\XE\users.dbf'
    12  LOGFILE
    13  GROUP 1 SIZE 51200K,
    14  GROUP 2 SIZE 51200K,
    15  RESETLOGS;
    SP2-0640: Not connected
    SQL> exec dbms_backup_restore.zerodbid(0);
    SP2-0640: Not connected
    SP2-0641: "EXECUTE" requires connection to server
    SQL> shutdown immediate;
    ORA-01012: not logged on
    SQL> startup nomount pfile="C:\oraclexe\app\oracle\product\11.2.0\server\config\scripts\initXETemp.ora";
    ORA-01031: insufficient privileges
    CloneRmanRestore:
    SQL> startup nomount pfile="C:\oraclexe\app\oracle\product\11.2.0\server\config\scripts\init.ora";
    ORA-01031: insufficient privileges
    SQL> @C:\oraclexe\app\oracle\product\11.2.0\server\config\scripts\rmanRestoreDatafiles.sql;
    SQL> set echo off;
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    ERROR:
    ORA-01031: insufficient privileges
    SQL> spool C:\oraclexe\app\oracle\product\11.2.0\server\config\log\cloneDBCreation.log
    PostDBCreation:
    QL> connect "SYS"/"********" as SYSDBA
    ERROR:
    ORA-01031: insufficient privileges
    SQL> set echo on
    SQL> //create or replace directory DB_BACKUPS as 'C:\oraclexe\app\oracle\fast_recovery_area';
    SP2-0103: Nothing in SQL buffer to run.
    SQL> begin
      2      dbms_xdb.sethttpport('8080');
      3      dbms_xdb.setftpport('0');
      4  end;
      5  /
    SP2-0640: Not connected
    SQL> create spfile='C:\oraclexe\app\oracle\product\11.2.0\server\dbs/spfileXE.ora' FROM pfile='C:\oraclexe\app\oracle\product\11.2.0\server\config\scripts\init.ora';
    SP2-0640: Not connected
    SQL> shutdown immediate;
    ORA-01012: not logged on
    SQL> connect "SYS"/"&&sysPassword" as SYSDBA
    ERROR:
    ORA-01031: insufficient privileges
    SQL> @C:\oraclexe\app\oracle\product\11.2.0\server\rdbms\admin\dbmssml.sql;
    SP2-0310: unable to open file "C:\oraclexe\app\oracle\product\11.2.0\server\rdbms\admin\dbmssml.sql"
    SQL> @C:\oraclexe\app\oracle\product\11.2.0\server\rdbms\admin\dbmsclr.plb;
    SQL> DROP PUBLIC DATABASE LINK DBMS_CLRDBLINK;
    SP2-0640: Not connected
    SQL> CREATE PUBLIC DATABASE LINK DBMS_CLRDBLINK USING 'ORACLR_CONNECTION_DATA';
    SP2-0640: Not connected
    SQL> CREATE OR REPLACE LIBRARY ORACLECLR_LIB wrapped
      2  a000000
      3  1
      4  abcd
      5  abcd
      6  abcd
      7  abcd
      8  abcd
      9  abcd
    10  abcd
    11  abcd
    12  abcd
    13  abcd
    14  abcd
    15  abcd
    16  abcd
    17  abcd
    18  abcd
    19  16
    20  51 8d
    21  L/XXXXXXXXXX...
    22  XXXXXXX...
    23 
    24  /
    SP2-0640: Not connected
    SQL> DROP TYPE DBMS_CLRParamTable;
    SP2-0640: Not connected
    SQL> DROP TYPE DBMS_CLRType;
    SP2-0640: Not connected
    SQL> CREATE OR REPLACE TYPE DBMS_CLRType wrapped
    XE :
    Instance created.
    So hopefully thats enough Information
    thank you in advance
    Dürsin Kurt

    OK guys I've found it out:
    Problem was, the XE.bat-Script couldn't add me to the ORA_DBA-Group.
    Reason: my Computername and my username, both had a vowel mutation "ü".
    Reason it didn't work at my business-laptop too, both have my "Ü" in the username
    solved!

  • Problem installing Oracle Identity Manager Server  9.1

    Hello,
    I try to install oracle identity Manager Server 9.1, but I'm having a problem.
    Oracle identity manager 9.03 is already installed with jboss-4.0.3SP1 and j2sdk1.4.2_15
    and oracle 10.2.0
    So I follow these steps to clean out the db:
    1. Drop tablespace: drop tablespace oimtbs including contents;
    2. Drop user: drop user oimuser cascade;
    and ran prepare_xl_db.bat as instructed. No errors in the log.
    I ran the DiagonasticDashboard : the db setup was fine.
    When I ran the installer "setup_server.exe", i haved this message :
    Folowing Error occured during schema creation
    Error encountered while loading database script
    E:\OIM_Install\OIM9100\installServer\Xellerate/db/oracle/xell.sql
    Please contact your DBA!
    maximum key length (1478) exceeded
    Does anybody have any idea what this error is about ?
    Thanks.

    Index IDX_LKV_LKV_ENCODED on Table LKV (Column :- LKV_ENCODED - VARCHAR2(3000)) is failing on 2k block size. Though all the Indexes are working fine with the 4k block size.
    But OIM Dev team recommends to create the 8k block size for the Index storage.
    Because the blocksize affects the number of keys within each index node, it follows that the blocksize will have an effect on the structure of the index tree. All else being equal, large blocksizes will have more keys, resulting in a flatter index than the same index created in a 2k tablespace. A large blocksize will also reduce the number of consistent gets during index access, improving performance for scattered reads access.
    HOW TO CREATE THE INDEXES IN LARGER BLOCKSIZE TABLESPACE
    In the existing database:-
    Create a tablespace with the 8k blocksize, For Example
    First,
    Set the system cache size for that particular db block size
    sql> alter system set db_8k_cache_size=100M;
    sql> CREATE TABLESPACE db_8k_tablespace DATAFILE 'C:/oracle/product/10.2.0/oradata/8k_file.dbf' SIZE 100M BLOCKSIZE 8192;
    Then
    Reorganize the Index using command:-
    sql> Alter Index <Index_Name> Rebuild tablespace <Tablespace_Name>
    Regards,
    Neeraj Goel

Maybe you are looking for

  • IMovie '11 will no longer show project or open the project file

    Upon finishing a project, I was ready to do a Share > Export Movie command, and opted first to do a restart on my computer (by first doing a File > Quit in iMovie). Now my project no longer shows up in the projects pane! While the import of the origi

  • HP Photosmart Plus Driver Issue

    My computer was recently wiped clean of everything on it. I am in the process of TRYING to re-install my printer. The software seems to load fine but the drivers do not. I have tried the online download and it goes part way through and then stops and

  • Unwanted keyline around media in interactive PDF

    Using: Indesign CS6 Acrobat X Pro I am exporting an interactive PDF with a movie placed on a page, and when viewing in Acrobat I'm getting a black keyline around the movie's bounding box when I enter the page. If I click anywhere else on the page, th

  • Mail service problem

    I can not access to may mail and community in my nokia c3 mobile phone. When I open mail, it shows a box and 'start' is written within the box, but as I press start button, it shows a message 'ur latest service is available'. And suddenly is disconne

  • HFM BPMA web

    Hi , We are on Hypeiron 9, I know I can access hyperion planning and HFM through workspace, can anyone tell me whats the web address for HFM like planning http://server:8300/HyperionPlanning/LogOn.jsp... In workspace I can navigate in webanalysis but