Create procedure statement Hangs in 11g database, doesn't hang in 10.2

I have installed 11g on a windows workstation and created a new database. I then attempted to import a schema from a tried and tested 10.2 database, this hung.
I pinpointed the cause of the hang to a create procedure sstatement within the import file.
I removed the procedure from the 10.2 database, re-exported and imported sucessfully in to the 11g database minus the rogue prrocedure.
I now have a create statement for the procedure thats causing the hangs, and this hangs when I try and run it - it runs fine against my 10.2 database?
I can comment large chunks of the create procedure statment out so I get an anonymous block that runs, and pinpoint the hang down to the inclusion of the the line marked below
(starting FOR UPDATE OF...........).
I cant work out whats going on, I'm no programmer by the way!
Any pointers would be greatly appreciated.
Nick
declare
job_rec job_table%ROWTYPE;
err_msg varchar2(2000);
abort_msg varchar2(2000);
l_ok boolean := TRUE;
l_bat_job varchar2(14) := 's2_novate_RIC';
LINES DELETED FOR PURPOSE OF POSTING CURSOR c_sah IS
     SELECT
          sah_next,
          sah_table_key,
          sah_old_status,
          sah_new_status,
          sah_processed_ind,
          sah_processed_date,
          sah_processed_time
     FROM senatordba.sah_status_audit_history
     JOIN (SELECT distinct to_char(spd_next) spd_next
          FROM senatordba.spd_std_risk_dets
          JOIN senatordba.rso_risk_system_options
          ON rso_spd_next = spd_next
          AND spd_ric_code = l_ric_code
          AND coalesce(l_uw_year, spd_yr) = spd_yr
          AND coalesce(l_risk_ref, spd_ref) = spd_ref
     ON spd_next = sah_table_key
     AND sah_table_code = 'SPD'
     AND sah_status_table_code = 'NOV'
     AND sah_processed_ind = 'N';
FOR UPDATE OF sah_processed_ind, sah_processed_date, sah_processed_time;               <---------if this line is commented out runs OK, if left in, it hangs??
r_sah c_sah%ROWTYPE;
begin
open c_sah;
close c_sah;
end;

Hi Nick, no one else has answered so I thought I'd answer my own question, it appears that I was hitting Oracle bug 9294110. had to uninstall 11.2 and install 11.0.7 instead. very annoyed that I wasted ages diagnosing this known problem. The following test should replicate the hang
connect / as sysdba
create user test identified by test default tablespace users temporary tablespace temp;
grant connect, resource to test;
connect test/test
create table a_tab
( col001 number, col002 number, col003 number, col004 number);
create table b_tab( col001 number);
-- the next statement hangs forever
select
a.col002,
a.col003,
a.col004
from
a_tab a
left outer join b_tab
on a.col001 = b_tab.col001
for update of a.col002,
a.col003,
a.col004;

Similar Messages

  • Oracle 11g Database Configuration Assistant Hangs At 45% During 1st Install

    Platform: Windows Vista 64 Bit Version
    Downloaded: Oracle 11g Database 64 Bit
    Service Pack 1
    Greetings to all my Oracle Seniors. I have been attempting in vain to install the Oracle 11g database software package fully. I was able to complete the initial installation and made it to the second recommended action which was the Database Configuration Assistant operation. After 3 attempts, the progress bar stalled at 45%. I tried to look at the log file cfgtoologs (cloneDBCreation, and CloneRmanRestore), but it said that I didn't have permission. My pre-check cleared OK on everything. So, please direct me as to how to correct this issue.
    Thanks
    Preston
    System Integrator

    Well, that is not much of an option right now. I discovered that I have to reinstall the XP Pro OS after attempting the 11g installation 4 times and the install always stalled at 69% during the initial installation. I did have Windows Service Pack 3 installed on the system. I down graded and added 1 G of additional memory and checked the pre-check with no problem. But, the install continued to stall at 69%. So, and, yet, here we are.
    Now in regards to the metalink notes, I am new to the forum, so I don't know my way around quite yet. Isn't the metalink the paid suppport option? If so, I don't have that access.

  • How to specify precision and scale for a datatype in create procedure statement

    Specifying precision and scale in the datatype when creating a procedure does not work:
    create or replace function SqlTxFunctionTesting(inparam in number(9,2)
    Error(1,48): PLS-00103: Encountered the symbol "(" when expecting one of the following: := . ) , @ % default character The symbol ":=" was substituted for "(" to continue.

    user4928701 wrote:
    Specifying precision and scale in the datatype when creating a procedure does not work:
    create or replace function SqlTxFunctionTesting(inparam in number(9,2)
    Error(1,48): PLS-00103: Encountered the symbol "(" when expecting one of the following: := . ) , @ % default character The symbol ":=" was substituted for "(" to continue.
    And one of the cons in the PL/SQL language in my view.
    The language does not allow parameters to be declared in the fashion you are attempting to. Even declaring a subtype and using that, does not enforce either the precision or scale, on the parameter value passed.
    Even worse - the parameter value can be a different data type all together from the defined parameter type - and a silent and implicit data type conversion will be done at run-time.
    So you can expect run-time errors in your code unit caused by the caller passing invalid values, despite the compiler okaying the call from the caller to your code.
    There are pros and cons to this approach. But if you are from a very strong type language environment like C or Pascal, you tend to see more cons than pros in this specific case.

  • Create table statement goes to hang state..in ODI.. in BI database

    Our development team is trying to create an external tabe to another database's schema. ODI is creating the connection bridge inside. I don't know how. But whenever they fire this query it is going to hang state. where as same code is running fine from another database.
    The users by which they are connceting to the source database to fire this query are having same privileges.
    For one database it is working fine as the table is created at the target database and in proper schema but for another it is not working and hanging...(not giving any result)
    Databases are used for BI work and having almost same configurations.
    I have checked the Target database v$session view. It is giving me <enq: PS - contention> event
    and three rows are returning with <PX Deq: Table Q Close> event for other two following rows....
    can anybody throw some light on this? waht should I do now. as killing the blocking session is not solving the problems
    Here is an example of the query executed :
    CREATE TABLE SCHEMA_NAME.C$_0ODS_JDE_F0004
    ( C1_DTSY, C2_DTUCD1, C3_DTRT, C4_DTJOBN, C5_DTUPMJ_DT, C6_DTMRTY, C7_DTDL01, C8_DTPID,
    C9_DTMRCT, C10_DTLN2, C11_DTCNUM, C12_DTUSEQ, C13_DTUSER, C14_DTCDL, JRN_SUBSCRIBER, JRN_FLAG, JRN_DATE )
    ORGANIZATION EXTERNAL
    ( TYPE oracle_datapump
    DEFAULT DIRECTORY DIR_SCHEMA_NAME
    LOCATION ('X58030417C$_0ODS_JDE_F0004_1.EXP' , 'X58030417C$_0ODS_JDE_F0004_2.EXP')
    PARALLEL 2 AS
    SELECT
    NVL(TRIM(F0004.DTSY), ' ') C1_DTSY, NVL(TRIM(F0004.DTUCD1), ' ') C2_DTUCD1, F0004.DTRT C3_DTRT,
    TRIM(F0004.DTJOBN) C4_DTJOBN, J2DT(DTUPMJ, DTUPMT) C5_DTUPMJ_DT, NVL(TRIM(F0004.DTMRTY), ' ') C6_DTMRTY,
    TRIM(F0004.DTDL01) C7_DTDL01, TRIM(F0004.DTPID) C8_DTPID, F0004.DTMRCT C9_DTMRCT, F0004.DTLN2 C10_DTLN2,
    F0004.DTCNUM C11_DTCNUM, F0004.DTUSEQ/10 C12_DTUSEQ, TRIM(F0004.DTUSER) C13_DTUSER,
    F0004.DTCDL C14_DTCDL, ' ' AS JRN_SUBSCRIBER, 'I' AS JRN_FLAG, SYSDATE AS JRN_DATE
    FROM SCHEMA_NAME.F0004 F0004 WHERE (1=1)
    -Regards,
    Saha

    Saha, did you ever get an answer to this? I have the same issue. I thought maybe it had to do with grants on the directory, but that hasn't helped anything.
    Dan

  • How to use the default database service name on creating procedure for data

    how to use the default database service name on creating procedure for datagaurd client failover ??? all oracle doc says create a new service as below and enable at DB startup. but our client is using/wanted database default service to connect from application on the datagaurd environment (rac to non rac setup).please help.
    Db name is = prod.
    exec DBMS_SERVICE.CREATE_SERVICE (service_name => 'prod',network_name =>'prod',failover_method => 'BASIC',failover_type => 'SELECT',failover_retries => 180,failover_delay => 1);
    says already the service available.
    CREATE OR REPLACE TRIGGER manage_dgservice after startup on database DECLARE role
    VARCHAR(30);BEGIN SELECT DATABASE_ROLE INTO role FROM V$DATABASE;
    IF role = 'NO' THEN DBMS_SERVICE.START_SERVICE('prod');
    END IF;
    END;
    says trigger created, but during a swithover still the service is listeneing on listener.
    tns entry.
    prod =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (LOAD_BALANCE = YES)
    (ADDRESS = (PROTOCOL = TCP)(HOST = prod1)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = prod2)(PORT = 1521)) ---> primary db entry
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = proddr)(PORT = 1521)) --> DR DB entry
    (CONNECT_DATA =
    (SERVICE_NAME = prod)
    thanks in advance.
    Edited by: 854393 on Dec 29, 2012 11:52 AM

    Hello;
    So in the example below replace "ernie" with the alias you want the client to use.
    I can show you how I do it :
    First an entry need to be added to the client tnsnames.ora that uses a SERVICE_NAME instead of a SID.
    ernie =
    (DESCRIPTION =
        (ADDRESS_LIST =
           (ADDRESS = (PROTOCOL = TCP)(HOST = Primary.host)(PORT = 1521))
           (ADDRESS = (PROTOCOL = TCP)(HOST = Standby.host)(PORT = 1521))
           (CONNECT_DATA =
           (SERVICE_NAME = ernie)
    )Next the service 'ernie' needs to be created manually on the primary database.
    BEGIN
       DBMS_SERVICE.CREATE_SERVICE('ernie','ernie');
    END;
    /After creating the service needs to be manually started.
    BEGIN
       DBMS_SERVICE.START_SERVICE('ernie');
    END;
    /Several of the default parameters can now be set for 'ernie'.
    BEGIN
       DBMS_SERVICE.MODIFY_SERVICE
       ('ernie',
       FAILOVER_METHOD => 'BASIC',
       FAILOVER_TYPE => 'SELECT',
       FAILOVER_RETRIES => 200,
       FAILOVER_DELAY => 1);
    END;
    /Finally a database STARTUP trigger should be created to ensures that this service is only offered if the database is primary.
    CREATE TRIGGER CHECK_ERNIE_START AFTER STARTUP ON DATABASE
    DECLARE
    V_ROLE VARCHAR(30);
    BEGIN
    SELECT DATABASE_ROLE INTO V_ROLE FROM V$DATABASE;
    IF V_ROLE = 'PRIMARY' THEN
    DBMS_SERVICE.START_SERVICE('ernie');
    ELSE
    DBMS_SERVICE.STOP_SERVICE('ernie');
    END IF;
    END;
    /lsnrctl status - should show the new service.
    When I do this the Database will still register with the listener. I don't give that to the clients. That one will still be available but nobody knows about it. Meanwhile "ernie" moves with the database role.
    So in my example the default just hangs out in the background.
    Best Regards
    mseberg
    Edited by: mseberg on Dec 29, 2012 3:51 PM

  • Executing create or replace procedure statement from plsql script

    Hi ,
    I want to execute create or replace procedure from pl/sql block without using execute immediate or dbms_sql, please let me know if feasible.
    Eg:
    declare
    begin
    create or replace procedure .....
    if v_temp = 4 then
    end if;
    end;
    Thanks for help.
    Regards,
    RK

    user588487 wrote:
    Actual requirement is I have .sql file which has Create procedure command in it
    and i have to conditionally execute the above .sql file so going for a pl/sql block.
    Eg:
    begin
    if variable1 <> variable2 then
    @xyz.sql -- contains create or replace procedure statement
    insert into tablexyz.....
    end if;
    end;
    Won't work. The PL/SQL code block (also called an anonymous block) is shipped from the client (e.g. SQL*Plus) to the database server. There it is parsed and executed.
    It cannot execute SQL*Plus code.
    There are 2 basic approaches to address this requirement.
    Method 1. Use PL/SQL and SQL to perform the conditional logic checks that SQL*Plus cannot. Use bind variables to "copy" the results between SQL*Plus and PL/SQL, use substitution variables to execute the conditional branch (as a script) in SQL*Plus.
    Basic example:
    SQL> --// bind variable for passing data to PL/SQL code and
    SQL> --// to receive data from PL/SQL code
    SQL> var status varchar2(100)
    SQL>
    SQL> declare
      2          function ExistsTable( tableName varchar2 ) return boolean is
      3                  i       integer;
      4          begin
      5                  select 1 into i
      6                  from    user_objects
      7                  where   object_type = 'TABLE'
      8                  and     object_name = tableName;
      9                  return( true );
    10          exception when NO_DATA_FOUND then
    11                  return( false );
    12          end;
    13  begin
    14          --// determine if table exists
    15          if not ExistsTable( 'FOOTAB' ) then
    16                  --// table does not exists and SQL*Plus client
    17                  --// needs to run the footab client script
    18                  :status := 'footab.sql';
    19          else
    20                  :status := 'do-nothing.sql';
    21          end if;
    22  end;
    23  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> --// use a substitution variable to determine what to do
    SQL> set define on
    SQL> col STATUS new_value SCRIPT
    SQL> select :status as STATUS from dual;
    STATUS
    footab.sql
    SQL>
    SQL> --// execute the relevant script (i.e. execute the conditional
    SQL> --// branch of the PL/SQL IF condition
    SQL> @ &SCRIPT
    SQL> --// file: footab.sql
    SQL>
    SQL> create table footab(
      2          id      number primary key,
      3          col1    number,
      4          col2    date
      5  ) organization index
      6  /
    Table created.
    SQL>
    SQL> --//eof
    // running the same steps when the table does exist
    SQL> --// bind variable for passing data to PL/SQL code and
    SQL> --// to receive data from PL/SQL code
    SQL> var status varchar2(100)
    SQL>
    SQL> declare
      2          function ExistsTable( tableName varchar2 ) return boolean is
      3                  i       integer;
      4          begin
      5                  select 1 into i
      6                  from    user_objects
      7                  where   object_type = 'TABLE'
      8                  and     object_name = tableName;
      9                  return( true );
    10          exception when NO_DATA_FOUND then
    11                  return( false );
    12          end;
    13  begin
    14          --// determine if table exists
    15          if not ExistsTable( 'FOOTAB' ) then
    16                  --// table does not exists and SQL*Plus client
    17                  --// needs to run the footab client script
    18                  :status := 'footab.sql';
    19          else
    20                  :status := 'do-nothing.sql';
    21          end if;
    22  end;
    23  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> --// use a substitution variable to determine what to do
    SQL> set define on
    SQL> col STATUS new_value SCRIPT
    SQL> select :status as STATUS from dual;
    STATUS
    do-nothing.sql
    SQL>
    SQL> --// execute the relevant script (i.e. execute the conditional
    SQL> --// branch of the PL/SQL IF condition
    SQL> @ &SCRIPT
    SQL> prompt Nothing to do...
    Nothing to do...
    SQL> Method 2. Move all "client scripting" to the server. You can still use .sql files. These need to contain valid DDL that can be parsed and executed. On the server, the .sql files are loaded into a table.
    This can be a physical load (e.g. using <i>DBMS_LOB.LoadFromFile()</i>). Or you can keep the .sql files on the server and use BFILE pointers instead to the files.
    You can now use execute immediate to execute the contents of a .sql file as a CLOB that was read from the table containing the .sql scripts.
    To be honest - I have used both methods extensively in the past and no longer bother using either. Table exists when running the table create script? So what. If the table should not exist, use server exceptions in SQL*Plus to cease processing and exit. If it does not matter whether the table exists or not, why be concern with running the script to create the table if the table already exists?

  • Oracle 11g R1 Installation hangs at Cloning Database .

    When I installing Oracle 11g R1 on RHEL 5.4, the installation hangs in Cloning Database step. I have stopped the installation and then executed the scripts mentioned during installation :
    "Run below as root user
    /opt1/Oracle/OracleDB/oraInventory/orainstRoot.sh
    /opt1/Oracle/OracleDB/product/11.1.0/db_2/root.sh
    After I run the sqlplus and tried to logon:
    SJP2VM0140:work2}-/home/work2# sqlplus
    SQL*Plus: Release 11.1.0.6.0 - Production on Wed Jul 21 20:17:31 2010
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    Enter user-name: scott
    Enter password:
    ERROR:
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 Error: 2: No such file or directory
    Process ID: 0
    Session ID: 0 Serial number: 0
    Any help in this regard is greatly appreciated.
    Edited by: Durga Pulipati on Jul 22, 2010 12:13 AM

    # sqlplus /nolog
    SQL> connect / as sysdba
    Connected to an idle instance.
    SQL> startup
    ORACLE instance started.
    Total System Global Area 1269366784 bytes
    Fixed Size 2144024 bytes
    Variable Size 738199784 bytes
    Database Buffers 520093696 bytes
    Redo Buffers 8929280 bytes
    ORA-00205: error in identifying control file, check alert log for more info
    The alert log :
    <txt>ORA-00210: cannot open the specified control file
    ORA-00202: control file: &apos;/opt1/Oracle/OracleDB/oradata/orcl/control03.ctl&apos;
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 3
    ORA-00210: cannot open the specified control file
    ORA-00202: control file: &apos;/opt1/Oracle/OracleDB/oradata/orcl/control02.ctl&apos;
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 3
    ORA-00210: cannot open the specified control file
    ORA-00202: control file: &apos;/opt1/Oracle/OracleDB/oradata/orcl/control01.ctl&apos;
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 3
    Could you please help me with this?

  • Ampersand substitution in create or replace procedure statement

    Hi Guys,
    I wonder why my ampersand substitution does not work in a create or replace stored procedure statement.
    CREATE OR REPLACE PROCEDURE UPDATE_DIM_SALES AS
    UNDEFINE DimSales;
    UNDEFINE FactTable;
    DEFINE DimSales = 'TESTTAB';
    DEFINE FactTable = myfact;
    BEGIN
    Error(5,20): PLS-00103: Encountered the symbol "=" when expecting one of the following: := . ( @ % ; not null range default character
    If I then assign the value with := I get the error "invalid table" later on for the INSERT statemnt:
    CREATE OR REPLACE PROCEDURE UPDATE_DIM_SALES AS
    UNDEFINE DimSales;
    UNDEFINE FactTable;
    DEFINE DimSales := 'x2';
    DEFINE FactTable := 'x1';
    BEGIN
    INSERT INTO &DimSales  (column1, column2,...)
    Why does ampersand substitution not work within a stored procedure?

    Hi,
    Thanks for the suggestion.
    The IF---ELSE Logic I have to write is quite complex.
    I dont think joins will not do the trick and limiting the collection size to smaller than 4000 seems not very practical. there
    is no poin using a collection if I have to use X amout of them.
    UNDEFINE DimSALES;
    UNDEFINE FactTable;
    DEFINE DimSALES = 'TESTTAB';
    DEFINE FactTable = 'testfact';
    --Collect all distinct SELLERNr into materialized views
    CREATE MATERIALIZED VIEW v1 AS select distinct SELLERnr from &FactTable;
    CREATE MATERIALIZED VIEW v2 AS select distinct SELLER_ID from &DimSALES;
    DECLARE
    v_SELLERNr VarChar(9);
    CURSOR v1_cursor IS Select * from v1;
    l_exists INTEGER;
    BEGIN
    OPEN v1_cursor;
    LOOP
    FETCH v1_cursor INTO v_SELLERNr;
    EXIT WHEN v1_cursor%NOTFOUND;
    SELECT COUNT(*) INTO l_exists FROM v2 WHERE SELLER_id =v_SELLERNr AND ROWNUM = 1;
    IF l_exists <> 1 THEN
    INSERT INTO &DimSALES (K_SALES,REG,BVL,DS, VS,RS,SELLER_ID,VK,VALID_FROM)
    (SELECT SEQ_DIM_SALES.NEXTVAL ,REG, BVL,DS, VS,RS,SELLERNR,VK,sysdate from &FactTable where SELLERNR =v_SELLERNr);
    commit;
    ELSE
    --Update old combination(s), invalidate (DATE)
    UPDATE &DimSALES SET VALID_TO = SYSDATE -1 WHERE REG||BVL||DS||VS||RS||SELLERNR||VK IN(
    --In case the SELLER and combinations exists and differs from what is in the dimension then invalidate old combinations and insert new ones
    SELECT * FROM(
    SELECT REG||BVL||DS||VS||RS||SELLERNR||VK WHERE SELLERNR = v_SELLERNr FROM &FactTable;
    MINUS
    SELECT REG||BVL||DS||VS||RS||SELLERNR||VK WHERE SELLERNR = v_SELLERNr FROM &DimSALES;)
    commit;
    --Insert new combination
    INSERT INTO &DimSALES (K_SALES,REG,BVL,DS, VS,RS,SELLER_ID,VK,VALID_FROM)
    (SELECT SEQ_DIM_SALES.NEXTVAL ,REG, BVL,DS, VS,RS,SELLERNR,VK,sysdate from &FactTable where SELLERNR =v_SELLERNr) subselect;
    WHERE &DimSALES.SELLER_Id=v_SELLERNr AND subselect.REG||BVL||DS||VS||RS||SELLERNR||VK NOT IN &DimSALES.REG||BVL||DS||VS||RS||SELLERNR||VK
    commit;
    END IF;
    END LOOP;
    CLOSE v1_cursor;
    END;
    DROP MATERIALIZED VIEW v1;
    DROP MATERIALIZED VIEW v2;
    -----------------

  • ORA-06553: PLS-908 when calling 10g remote procedure from 11g database

    Hi,
    I have 2 instances: 11g (11.1.0.7) and 10g (10.2.0.4). When I try to call 10g (remote) procedure from 11g database, there is errors:
    ORA-04052: error occurred when looking up remote object CUSTOMER.PRL_PK2_GENERAL@CUSTOMER_LINK
    ORA-06541: PL/SQL: compilation error - compilation aborted
    ORA-06553: PLS-908: The stored format ofCUSTOMER.PRL_PK2_GENERAL@CUSTOMER_LINK is not supported...
    But, if I call the same procedure from another 10g instance, it's OK.
    How can I fix the problem?
    Thx,
    qtpham

    As you can see ,it seems like the workaround that was mentioned there is currently the only way to remove this ORA.
    Workaround: Remove the function call(s) from the called subroutine's
                package's spec.

  • Creating 11g Database

    When i am creating 11g database ..i got the below errors ..I think i given deprecated parameters ..
    SQL> STARTUP NOMOUNT pfile=/u101/app/oracle/product/11.1.0/dbs/initdevgrl.ora
    ORA-32006: BACKGROUND_DUMP_DEST initialization parameter has been deprecated
    ORA-32006: USER_DUMP_DEST initialization parameter has been deprecated
    ORA-27102: out of memory
    SVR4 Error: 22: Invalid argument
    could some one say what parameters i have to give for this in oracle 11.1.0

    I can see you are on a unix like OS, but you didn't specify your OS platform. This error seems to be an excessively big value at some instance memory parameter or a not properly configured kernel parameter. I suggest you to take a look at the instance alert.log file and if required the trace file generated at the startup attempt.
    ~ Madrid
    http://hrivera99.blogspot.com/

  • Create user statement on Procedures

    Hi,
    How to use create user command in oracle procedure.
    Whenever I am using the statemet create user <username> identified by <password> it gives me the error. But whenever I am removing this statement the procedure is compiling successfully.
    Is there anyway to use create user statement inside procedure?
    Regards,
    Indraneel

    You have to use dynamic sql :
    SQL> begin
      2  execute immediate ('create user test_user identified by test_user');
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SQL>Of course the command should be completed with other information (e.g. default tablespace, temporary tablespace, and so on).
    Paul

  • Create View Statement Hangs

    Hello -
    I'm running 10g R2 on AIX. I have view A, view B, and view C. View C look like this:
    select * from view A;
    union all
    select * from view B;
    View A and View B both contains many left outer joins.
    View C will compile when it only references view A or view B (without the union).
    What would cause the create view statement to hang when using the union statement? Also, if I leave out the create view for C, then the following select statements will never complete:
    select * from view A;
    union all
    select * from view B;
    I have determined that something with the union statement is causing this to hang.
    Has anyone ever seen anything like this? Any help is greatly appreciated!
    Thanks,
    Mike

    Thanks all for the postings. Sorry it took me so long to get back to this. I am posting the actual ddl for the views. The TESTA and TESTB views are created without any problems. The TESTC view (with the union all) just hangs when trying to create. It's not the view, but the select with the union all. If I run the sql without the create view statement, it still hangs. If I remove the union, and just select from TESTA or only TESTB, then it works fine. I have never seen anything like this. Any help is greatly appreciated! Thx!
    *****************create TESTA****************************************************
    CREATE OR REPLACE VIEW TESTA AS
    SELECT
    addr.addressline1 AS address1,
    addr.addressline2 AS address2,
    addr.addressline3 AS city,
    addr.addressline4 AS state,
    addr.addressline5 AS zipcode
    FROM fapplication app
    INNER JOIN findividual ind
    ON ind.fapplicationid = app.fapplicationid
    LEFT OUTER JOIN fcreditrequest cr
    ON app.fapplicationid = cr.fapplicationid
    LEFT OUTER JOIN faddress addr
    ON ind.findividualid = addr.findividualid
    LEFT OUTER JOIN fvrmaxdealstructure ds
    ON cr.fcreditrequestid = ds.fcreditrequestid
    LEFT OUTER JOIN fvsystemcollectionentry sce1
    ON ds.productratetypeid = sce1.fsystemcollectionentryid
    LEFT OUTER JOIN fvsystemcollectionentry sce2
    ON cr.loanpurposeid = sce2.fsystemcollectionentryid
    AND sce2.flanguageid = COALESCE (sce1.flanguageid, sce2.flanguageid)
    LEFT OUTER JOIN fvsystemcollectionentry sce3
    ON ds.productpymtfreqid = sce3.fsystemcollectionentryid
    AND sce3.flanguageid = COALESCE (sce1.flanguageid, sce2.flanguageid, sce3.flanguageid)
    LEFT OUTER JOIN fvsystemcollectionentry sce4
    ON ds.productsecuritytypeid = sce4.fsystemcollectionentryid
    AND sce4.flanguageid = COALESCE (sce1.flanguageid, sce2.flanguageid, sce3.flanguageid, sce4.flanguageid)
    LEFT OUTER JOIN fvproductcategory prodcat
    ON ds.fproductcategoryid = prodcat.fproductcategoryid
    AND prodcat.flanguageid = COALESCE (sce1.flanguageid, sce2.flanguageid, sce3.flanguageid, prodcat.flanguageid)
    LEFT OUTER JOIN fvproduct prod
    ON ds.fproductid = prod.fproductid
    AND prod.flanguageid = COALESCE (sce1.flanguageid, sce2.flanguageid, sce3.flanguageid, prodcat.flanguageid, prod.flanguageid)
    LEFT OUTER JOIN fvrcommonfields udapp1
    ON app.fapplicationid = udapp1.applicationid
    LEFT OUTER JOIN fvrloanauthfields1 udapp2
    ON app.fapplicationid = udapp2.applicationid
    LEFT OUTER JOIN fvrloanauthfields2 udapp3
    ON app.fapplicationid = udapp3.applicationid
    LEFT OUTER JOIN fvrloanauthfields3 udapp4
    ON app.fapplicationid = udapp4.applicationid
    LEFT OUTER JOIN fvrloanauthfields4 udapp5
    ON app.fapplicationid = udapp5.applicationid
    LEFT OUTER JOIN fvrmemofields udapp6
    ON app.fapplicationid = udapp6.applicationid
    WHERE COALESCE(sce1.languagecd, sce2.languagecd, sce3.languagecd, sce4.languagecd, prodcat.languagecd, prod.languagecd, 'EN') = 'EN'
    *****************create TESTB****************************************************
    CREATE OR REPLACE VIEW TESTB AS
    SELECT
    addr.addressline1 AS address1,
    addr.addressline2 AS address2,
    addr.addressline3 AS city,
    addr.addressline4 AS state,
    addr.addressline5 AS zipcode
    FROM fapplication app
    INNER JOIN findividual ind
    ON ind.fapplicationid = app.fapplicationid
    LEFT OUTER JOIN fcreditrequest cr
    ON app.fapplicationid = cr.fapplicationid
    LEFT OUTER JOIN faddress addr
    ON ind.findividualid = addr.findividualid
    LEFT OUTER JOIN fvrmaxdealstructure ds
    ON cr.fcreditrequestid = ds.fcreditrequestid
    LEFT OUTER JOIN fvsystemcollectionentry sce1
    ON ds.productratetypeid = sce1.fsystemcollectionentryid
    LEFT OUTER JOIN fvsystemcollectionentry sce2
    ON cr.loanpurposeid = sce2.fsystemcollectionentryid
    AND sce2.flanguageid = COALESCE (sce1.flanguageid, sce2.flanguageid)
    LEFT OUTER JOIN fvsystemcollectionentry sce3
    ON ds.productpymtfreqid = sce3.fsystemcollectionentryid
    AND sce3.flanguageid = COALESCE (sce1.flanguageid, sce2.flanguageid, sce3.flanguageid)
    LEFT OUTER JOIN fvsystemcollectionentry sce4
    ON ds.productsecuritytypeid = sce4.fsystemcollectionentryid
    AND sce4.flanguageid = COALESCE (sce1.flanguageid, sce2.flanguageid, sce3.flanguageid, sce4.flanguageid)
    LEFT OUTER JOIN fvproductcategory prodcat
    ON ds.fproductcategoryid = prodcat.fproductcategoryid
    AND prodcat.flanguageid = COALESCE (sce1.flanguageid, sce2.flanguageid, sce3.flanguageid, prodcat.flanguageid)
    LEFT OUTER JOIN fvproduct prod
    ON ds.fproductid = prod.fproductid
    AND prod.flanguageid = COALESCE (sce1.flanguageid, sce2.flanguageid, sce3.flanguageid, prodcat.flanguageid, prod.flanguageid)
    LEFT OUTER JOIN fvrcommonfields udapp1
    ON app.fapplicationid = udapp1.applicationid
    LEFT OUTER JOIN fvrloanauthfields1 udapp2
    ON app.fapplicationid = udapp2.applicationid
    LEFT OUTER JOIN fvrloanauthfields2 udapp3
    ON app.fapplicationid = udapp3.applicationid
    LEFT OUTER JOIN fvrloanauthfields3 udapp4
    ON app.fapplicationid = udapp4.applicationid
    LEFT OUTER JOIN fvrloanauthfields4 udapp5
    ON app.fapplicationid = udapp5.applicationid
    LEFT OUTER JOIN fvrmemofields udapp6
    ON app.fapplicationid = udapp6.applicationid
    WHERE COALESCE(sce1.languagecd, sce2.languagecd, sce3.languagecd, sce4.languagecd, prodcat.languagecd, prod.languagecd, 'EN') = 'EN'
    *****************create TESTC****************************************************
    CREATE OR REPLACE VIEW TESTC AS
    SELECT
         TESTA.ADDRESS1,
    TESTA.ADDRESS2,
    TESTA.CITY,
    TESTA.STATE,
    TESTA.ZIPCODE
    FROM TESTA
    UNION ALL
    SELECT
    TESTB.ADDRESS1,
    TESTB.ADDRESS2,
    TESTB.CITY,
    TESTB.STATE,
    TESTB.ZIPCODE
    FROM TESTB;

  • Cannot debug procedure in 11g database using SQL Developer

    Hi,
    We have recently migrated our database from 10.2.0.4 to 11.2.0.2. We were able to debug procedures using PL/SQL Developer earlier but after 11g migration we are not able to debug the same procedure in 11g database.
    Is it that we require 11g PL/SQL developer with 11g client installed to debug?

    11g has a new privilege required to debug stored procedures, DEBUG CONNECT SESSION.
    Does your user have this priv?
    No client required to debug, but if you ARE using a client via OCI THICK preference, be sure that the client version matches the server version.

  • How to create procedure having delete statement with between function?

    I am very new in SQL Development, I want to create a procedure having two date variable start and end and these two variable i want to use in procedure body to delete data from a specific table between two date duration.
    Please guide
    Thanks,

    create procedure some_proc (start_date date, end_date date)
    as
    begin
         delete from your_table
                   where your_date_column between start_date and end_date;
    end some_proc;
    /

  • Create a databse link to oracle 11g database

    Hi All,
    I have installed oracle 10g express edition n Apex 4.0.2 verion.
    Now i want to connect 11g database to Apex. When i try to connect,
    it prompts me an error saying;
    Error Testing Database Link.
    ORA-01017: invalid username/password; logon denied ORA-02063: preceding line from PRODSTDBY
    And at the same time i can connect a 10g database successfully.. is this because of oracle db versioning issue ???
    if yes, how can i able to overcome from this issue...????
    please somebody help me to solve this......
    Thanks in Advance,
    Max

    Telnet is not running on the server, I tried starting it, but it failed. When trying to connecting from my local machine through telnet, it is giving the following error:*Could not open connection to the host, on port 23: Connect failed*.
    I am able to connect to the machine through SSH(putty).
    Is there any other way to test if port 1521 is accepting connections?
    Thanks,
    Rajesh.

Maybe you are looking for

  • HT201250 Deleting files once backed up

    Once something has been backed up by timemachine, can I delete it off my harddrive or will that make those files disappear during the next backup? Just trying to make more room on my harddrive.

  • What program can I use to...

    What program can I use to screen record things on my mac?

  • How can I setup 2 mailservers in 1 office for same domain?

    We have a small office here with 25 email users. I just got a mini with 10.7 server that I'm going to use as an email server. I'm working on changing folks over from my old SuSE Linux machine to the new mini. I'd like to setup the mini (the new serve

  • Compatibility of jinitiator

    Hi, i m facing a problem with jinitiator. i have to use jinitiator 1.1.8.21 for oracle apps 11.5.10 and i need jinitiator 1.1.8.16 for oracle apps 11.5.9. i need to access both the servers and only one copy of jinitiator can be there. so is there any

  • What about 64-bit applications?

    Some time ago I wrote in this same section, asking what was happening with the 64-bits on Leopard. http://discussions.apple.com/thread.jspa?messageID=6990310 So everybody told me that all was running 64, and that if I wanted I could try to write an a