Sqlplus -s hangs

hi,
when using sqlplus with s option, sqlplus -s system/my_password
it hangs all the time,(sqlplus system/my_password is ok)
can anyone explain this for me, thanks.
(win2003,oracle 11g r1)
Edited by: roy_lau on 2010-1-2 上午11:04

If I remember correctly the '-s' command line switch stands for silent execution of a script.
In that case you would have to be sure that your script ends with an 'exit' (followed by a carriage return).
Also you would want to make sure that your script does not require any user-input, as it will just stop and wait for you to input that.
May be you can run the script without the silent option, and see if it then finishes without you having to enter anything with the keyboard.

Similar Messages

  • R3trans and sqlplus/@SID hang when the AS is started

    Hi all,
    I have migrated one platform on Windows 2003 with SAP 4.6C Oracle 10.2.2 and client 920
    Everything is working fine with the DBCI + the first AS
    SAP + DB + DB COnnect ...
    I can perform an R3tans with return code 000 from the DBCI , the first AS and the 2nd AS as well
    But When I start the 2nd Application Server ; the R3trans hangs, and I can't connect to the Database (sqlplus /@SDI hangs)  through the 2nd AS, the first and the DBCI neighter.
    If someone has encountered this issue, thanks for your help
    Cheers
    Yacine

    Hi Eric,
    Many thanks for your answer and sorry for the delay of my anser.
    Indeed we have adjusted these parameters and deceased the WP for both AS.
    Currently it's a closing period for us so the 2 AS si stopped for security, but for the next month we will start it whith these changes.
    Thanks to all for your help
    Yacine

  • SQLPlus login hangs because of "Thread 1 cannot allocate new log"

    Hi to everybody!
    Could you please give an advice how to overcome the following situation.
    In my 10GR2 database I have destination for archive logs placed in ASM disk group. When suddenly this disk group becomes overfilled I can not login into the database even "/as sysdba" locally. The best solution is to switch log_archive_dest_1 to some other place, but as I mentioned I even can not login into the database to do this change. Another solution is to free some space in ASM disk group by deletion of some archive logs. But if I have a Standby DB and if I delete some archive logs I'll lose my Standby DB.
    I will be glad to hear your real life's experience :)
    Thank's in advance!

    Dear Sybrand, I've used search button a lot. I'd be happier if you had pointed where the documentation has something useful for my situation. May be you meant
    an alternate destination for archive logs, but as you know there is no exact upper bound for the "REOPEN" parameter. So switching can take undetermined time.
    Seems to me I've made a full description of my situation.
    I was not able to login to the database - this is a fact. My database is quite up to date (PSU 4) and OS environment is set correctly. So i don't believe that my case is something very uncommon.
    Let me make several clarification:
    1)I can not extend LUN on wich ASM disk group has been created, because this operation requires restart of the host - not an online operation.
    2) I can not move archive logs from my ASM disk group to ether another one or to the file systems, because a) I can not login into the database neither through SQLPLUS nor through RMAN 2) in 10GR2 "asmcmd" doesn't have an ability to copy files ("cp")
    3) Let's imagine (it can be) that connectivity with standby had been broken before my incident took place and none of the archive logs was shipped to the Standby site. This exclude an option of deleting some of archive logs through the "asmcmd" and "rm" because none of them were applied to a standby.
    The only solution I used is to find some idle opened consoles in a SCREEN (linux) and use them. But this method is not quite reliable.
    P.S. When I said "SQLPlus login hangs" I meant "/as sysdba", not just simple login.. It is clear that simple login will fail.

  • What areas to look ,when the application causes the Oracel Sqlplus to Hang

    we got an application that suddenly hangs and after that we are no longer able to connect through SQLplus.What should i look for.

    My vote goes to, looking into the alert log file, any trace files generated, is the same with all the users and of course, my favorate v$session_wait.
    V$SESSION_WAIT just reveals what is going on currently.
    You can also try HANGANALYSIS, with the help of Oracle support.
    For more details, check in Metalink for HANG ANALYSIS.
    Jaffar

  • Sqlplus is hanging on RAC1 node

    Hi all,
    I have 3 Node RAC DB (11.2.0.3). When i am trying to connect sqlplus to rac 1 , there is no error but i am not getting sqlplus prompt.
    RAC 1 : sqlplus "/as sysdba" -- Hangs
    RAC 2 : sqlplus "/as sysdba" -- getting prompt
    RAC 3 : sqlplus "/as sysdba" -- getting prompt
    from RAC 2 : sqlplus sys/password@rac1 as sysdba -- Hangs
    RAC 3 : sqlplus sys/password@rac1 as sysdba -- Hangs
    RAC 2 : sqlplus "/as sysdba" -- getting prompt but when i query any thing from gv$session, then it hangs.
    there is no error in alert log and cput utilization on RAC 1 is 5-10% only (Which is normal).
    Kindly inform me how i can resolve this issue.
    Thanks
    Krishna

    Hello All,
    My operating system is Linux 64 Bit. and all the mount points have sufficient space. There is no message in DB alert log/listener log.
    Kindly advice me if i can check some else.
    Thanks
    Krishna

  • Sqlplus hangs up remotely after entering the credentials.

    Hi Experts,
    Sqlplus hangs remotely after giving the credentials. There are two homes in same Windows machine.Earlier one home was with Oracle 10g R1 and other with R2.
    I upgraded the R1 release to R2.
    Now the database which was earlier running on R2 has started giving this strange problem when trying to connect remotely, tnsping is successful to this database, sqlplus just hangs up no error nothing.
    Has any one faced this kind of problem or knows how to resolve this, please help me out.
    Thanks in Advance,
    Bhavesh

    Remotely :
    H:\>sqlplus
    SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jun 13 19:04:51 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Enter user-name: system/oracle
    ERROR:
    ORA-12560: TNS:protocol adapter error
    Locally when using @:
    C:\Documents and Settings>sqlplus
    SQL*Plus: Release 10.2.0.3.0 - Production on Fri Jun 13 18:20:41 2008
    Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
    Enter user-name: system@lbu1
    Enter password:
    Thts the hanged state..

  • SQL*Plus hangs when connecting to remote DB (Solaris, 10gR2)

    First of all the particulars:
    Local System:
    Solaris 8, Oracle 10.2.0.4, October CPU
    Remote System:
    Solaris 10, Oracle 10.2.0.4, July CPU
    We are trying to initiate a connection from our local system to our remote system using a DB Link. After opening SQL*Plus, we log in with <user>@<dblink>, are asked for a password, and after entering the password, SQL Plus hangs indefinitely (we typically have to kill the sqlplus process to regain our session). Also, logging into the local system with a local account, and then querying using the db link (select * from dual@<link>) gives the same result.
    From the remote system, we CAN log into the local system using the same process, and we can also query the local system. in other words, it works in one direction, but not the other.
    We have checked all the usual suspects: tnsnames, sqlnet, db_domain, global_names, and all are set correct for our setup (although I of course welcome suggestions to check something else in the files). Also have confirmed validity of /etc/hosts entries, and permissions on those files for the 'oracle' user. A 'tnsping' and 'ping' are both successful in both directions, though I understand these only check the listener and hardware layer.
    Our Sys Admin has checked firewall connections between the two systems, and stated that they're open on the listener port (1521).
    Listener log files on the remote host, when the hang happens, show an established connection from the local host.
    Does anyone have any suggestions as to what to check for next?
    Thank you in advance for the assist!

    Whew, that truss output is enough to make your eyes bleed!
    This system is on a closed network, so I cannot post the files here, nor would I wish reading those things on anyone nice enough to spend a minute here helping me out!@
    But comparing the truss from the "broken" system, and the working one, the sqlplus that hangs returns a:
    ERR #134 ENOTCONN on a getpeernam() thread.
    The other truss (working side), does not throw that particular line, and the truss output varies widely after that line in the output fille.
    After a few moments letting the sqlplus process "hang", I get:
    ERR #62 ETIME
    Outside of that, lust a lot of hex values!

  • Updating Table with Triggers causes Raptor to Hang.

    Received an Error Window
    ORA-01000 Max Open Cursors Exceeded 1000
    Vendor Code 100
    This was displayed when updating a data value in a table which spawned a couple of Triggers, a before, after, and after statement trigger. What the Trigger does is when an Exchange Rate for a Date (one row), is changed the exchage_rate for every receipt is updated. The size of the table are in test and there are 100 receipts. The Echange Rate table has one record for every day between 01-JAN-2000 and 31-DEC-2050 (365.25*50) Rows. The open_cursors param in init file is 1000. Have done various scenarios and everything works fine from sqlplus. Hangs with message in Raptor, and have to kill process in windows..
    When run in Sqlplus no problem with update.

    I had the same problem but without triggers. I only changed some values in different records (always automatically commited) and after the third change I got this error message. At the same time I was connected with TOAD to the databse and there was no problem to change the data - so it doesn't look like a database problem.
    UPDATE "BLATABLE"."KEYS" SET "BLAVALUE" = "abcdef" WHERE ROWID = 'AAA2c1AADAAAHa5AAH' AND ORA_ROWSCN = '7738949481842'
    One error saving changes to table "BLATABLE"."KEYS":
    Row 6: ORA-01000: maximum open cursors exceeded

  • Can't find out the problem in this query

    emp Table->
    (name varchar2(10),
    shot_seq varchar2(1)
    The emp table contains around 2 million records.
    When I run the following query the output comes within 20 seconds.
    select name,sum(decode(shot_seq,1,1,0)) as pd2 from emp where shot_seq = 1
    group by name;
    But when i made the change in the query by putting ' shot_seq = '1' ', so that query is now:
    select name,sum(decode(shot_seq,1,1,0)) as pd2 from emp where shot_seq = '1'
    group by name;
    The output doesn't comes, sqlplus just hangs up.
    Please explain what is the reason behind this.
    Thanks for ur time,
    skala.

    Don't you think your query should be like this as seq_shot is a varchar2(1) field ?
    select name,sum(decode(shot_seq,'1',1,0)) as pd2 from emp where shot_seq = '1'
    group by name;
    null

  • Can't find out the problem in the query.

    emp Table->
    (name varchar2(10),
    shot_seq varchar2(1)
    The emp table contains around 2 million records.
    When I run the following query the output comes within 20 seconds.
    select name,sum(decode(shot_seq,1,1,0)) as pd2 from emp where shot_seq = 1
    group by name;
    But when i made the change in the query by putting ' shot_seq = '1' ', so that query is now:
    select name,sum(decode(shot_seq,1,1,0)) as pd2 from emp where shot_seq = '1'
    group by name;
    The output doesn't comes, sqlplus just hangs up.
    Please explain what is the reason behind this.
    Thanks for ur time,
    skala.

    1.
    I think the problem is with sum and decode part:
    ..sum(decode(shot_seq,1,1,0)) as ...
    If <shot_seq> is character then you need to convert it to_number before using any group functions....
    2.
    Check your decode:
    ......(shot_seq,1,1,0)) as pd2 from emp where shot_seq = '1'
    I think it should be something like that(after you convert chars to nums)....
    null

  • 11g R2(11.2.0.2)-Not able to connect using SID - Win 7 32 bit

    Hi Experts,
    I have installed 11gR2(11.2.0.2) on Win 7 32 bit OS.
    I am able to start database and listener services without any problem. ORACLE_BASE and ORACLE_HOME variables are set.
    I am even able to connect to database using "sqlplus user/pass". (With ORACLE_SID variable set)
    However, sqlplus command hangs when I try to connect using SID "sqlplus user/pass@o11gr2".
    (No error, after waiting for >20 minutes I have to kill the command.)
    =================
    Following in "C:\Oracle\product\11.2.0.2\dbhome_3\RDBMS\trace\o11gr2_ora_6352.trc"
    - "2012-04-05 09:50:55.846: [ default]ut_read_reg:2:ocr registry key SOFTWARE\Oracle\ocr cannot be opened. error 2"
    Following in "C:\Oracle\product\11.2.0.2\dbhome_3\log\machinename\client"
    - 2012-04-26 14:35:18.781: [ default][1216]ut_read_reg:2:ocr registry key SOFTWARE\Oracle\olr cannot be opened. error 2
    [    CLSE][1216]clse_get_crs_home: Error retrieving OLR configuration [0] [Error opening olr registry key. The system cannot find the file specified.
    "tnsping" returns OK for "tnsping o11gr2", "tnsping localhost", "tnsping 127.0.0.1", "tnsping 192.168.0.1"
    Output of LSNRCTL:
    LSNRCTL> status
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=J1009615W7LT.jda.corp.local)(PORT=1521)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 11.2.0.2.0 - Production
    Start Date 26-APR-2012 14:35:17
    Uptime 0 days 0 hr. 4 min. 6 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File C:\Oracle\product\11.2.0.2\dbhome_3\network\admin\listener.ora
    Listener Log File C:\Oracle\diag\tnslsnr\J1009615W7LT\listener\alert\log.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=J1009615W7LT.jda.corp.local)(PORT=1521)))
    Services Summary...
    Service "O11GR2" has 2 instance(s).
    Instance "O11GR2", status UNKNOWN, has 1 handler(s) for this service...
    Instance "O11GR2", status READY, has 1 handler(s) for this service...
    The command completed successfully
    =================
    This was working earlier. One day it stopped working all of a suddent and I am not able to connect using SID till now.
    I tried re-installing in different home multiple times. But no luck even after disabling firewall completely.
    Any suggest/help is greatly appreciated on this.

    ------------------------------tnsping-------------------------
    C:\>tnsping o11gr2
    TNS Ping Utility for 32-bit Windows: Version 11.2.0.2.0 - Production on 26-APR-2012 14:54:32
    Copyright (c) 1997, 2010, Oracle. All rights reserved.
    Used parameter files:
    C:\Oracle\product\11.2.0.2\dbhome_3\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = J1009615W7LT.jda.corp.local)(PORT = 1521
    ))) (CONNECT_DATA = (SERVICE_NAME = O11GR2)))
    OK (30 msec)
    C:\>
    -----------------------------ping-------------------------------
    C:\>ping J1009615W7LT.jda.corp.local
    Pinging J1009615W7LT.jda.corp.local [fe80::20c9:b748:311a:95e4%14] with 32 bytes of data:
    Reply from fe80::20c9:b748:311a:95e4%14: time<1ms
    Reply from fe80::20c9:b748:311a:95e4%14: time<1ms
    Reply from fe80::20c9:b748:311a:95e4%14: time<1ms
    Reply from fe80::20c9:b748:311a:95e4%14: time<1ms
    Ping statistics for fe80::20c9:b748:311a:95e4%14:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms
    C:\>ping 10.60.200.221
    Pinging 10.60.200.221 with 32 bytes of data:
    Reply from 10.60.200.221: bytes=32 time<1ms TTL=64
    Reply from 10.60.200.221: bytes=32 time<1ms TTL=64
    Reply from 10.60.200.221: bytes=32 time<1ms TTL=64
    Reply from 10.60.200.221: bytes=32 time<1ms TTL=64
    Ping statistics for 10.60.200.221:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms
    C:\>
    -----------------------------C:\Oracle\diag\tnslsnr\J1009615W7LT\listener\alert\log.xml---------------------------------
    </msg>
    <msg time='2012-04-26T14:35:18.855-04:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='J1009615W7LT'
    host_addr='fe80::20c9:b748:311a:95e4%14'>
    <txt>
    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
    </txt>
    </msg>
    <msg time='2012-04-26T14:35:26.200-04:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='J1009615W7LT'
    host_addr='fe80::20c9:b748:311a:95e4%14'>
    <txt>26-APR-2012 14:35:26 * ping * 0
    </txt>
    </msg>
    <msg time='2012-04-26T14:35:43.204-04:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='J1009615W7LT'
    host_addr='fe80::20c9:b748:311a:95e4%14'>
    <txt>26-APR-2012 14:35:43 * ping * 0
    </txt>
    </msg>
    <msg time='2012-04-26T14:35:55.952-04:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='J1009615W7LT'
    host_addr='fe80::20c9:b748:311a:95e4%14'>
    <txt>Dynamic address is already listened on (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=J1009615W7LT.jda.corp.local)(PORT=1521)))
    </txt>
    </msg>
    <msg time='2012-04-26T14:35:55.953-04:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='J1009615W7LT'
    host_addr='fe80::20c9:b748:311a:95e4%14'>
    <txt>26-APR-2012 14:35:55 * service_register * O11GR2 * 0
    </txt>
    </msg>
    <msg time='2012-04-26T14:37:08.732-04:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='J1009615W7LT'
    host_addr='fe80::20c9:b748:311a:95e4%14'>
    <txt>26-APR-2012 14:37:08 * ping * 0
    </txt>
    </msg>
    <msg time='2012-04-26T14:38:34.943-04:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='J1009615W7LT'
    host_addr='fe80::20c9:b748:311a:95e4%14'>
    <txt>26-APR-2012 14:38:34 * (CONNECT_DATA=(SERVICE_NAME=O11GR2)(CID=(PROGRAM=C:\oracle\product\11.2.0.2\dbhome_3\bin\sqlplus.exe)(HOST=J1009615W7LT)(USER=j1009615))) * (ADDRESS=(PROTOCOL=tcp)(HOST=fe80::20c9:b748:311a:95e4%14)(PORT=51907)) * establish * O11GR2 * 0
    </txt>
    </msg>
    <msg time='2012-04-26T14:39:23.627-04:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='J1009615W7LT'
    host_addr='fe80::20c9:b748:311a:95e4%14'>
    <txt>WARNING: Subscription for node down event still pending
    </txt>
    </msg>
    <msg time='2012-04-26T14:39:23.628-04:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='J1009615W7LT'
    host_addr='fe80::20c9:b748:311a:95e4%14'>
    <txt>26-APR-2012 14:39:23 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=j1009615))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=186647040)) * status * 0
    </txt>
    </msg>
    <msg time='2012-04-26T14:54:25.550-04:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='J1009615W7LT'
    host_addr='fe80::20c9:b748:311a:95e4%14'>
    <txt>System parameter file is C:\Oracle\product\11.2.0.2\dbhome_3\network\admin\listener.ora
    </txt>
    </msg>
    <msg time='2012-04-26T14:54:25.551-04:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='J1009615W7LT'
    host_addr='fe80::20c9:b748:311a:95e4%14'>
    <txt>Log messages written to C:\Oracle\diag\tnslsnr\J1009615W7LT\listener\alert\log.xml
    </txt>
    </msg>
    <msg time='2012-04-26T14:54:25.552-04:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='J1009615W7LT'
    host_addr='fe80::20c9:b748:311a:95e4%14'>
    <txt>Trace information written to C:\Oracle\diag\tnslsnr\J1009615W7LT\listener\trace\ora_11640_3776.trc
    </txt>
    </msg>
    <msg time='2012-04-26T14:54:25.553-04:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='J1009615W7LT'
    host_addr='fe80::20c9:b748:311a:95e4%14'>
    <txt>Trace level is currently 0
    </txt>
    </msg>
    <msg time='2012-04-26T14:54:25.553-04:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='J1009615W7LT'
    host_addr='fe80::20c9:b748:311a:95e4%14'>
    <txt>
    </txt>
    </msg>
    <msg time='2012-04-26T14:54:25.555-04:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='J1009615W7LT'
    host_addr='fe80::20c9:b748:311a:95e4%14'>
    <txt>Started with pid=11640
    </txt>
    </msg>
    <msg time='2012-04-26T14:54:25.560-04:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='J1009615W7LT'
    host_addr='fe80::20c9:b748:311a:95e4%14'>
    <txt>Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=J1009615W7LT.jda.corp.local)(PORT=1521)))
    </txt>
    </msg>
    <msg time='2012-04-26T14:54:26.695-04:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='J1009615W7LT'
    host_addr='fe80::20c9:b748:311a:95e4%14'>
    <txt>Listener completed notification to CRS on start
    </txt>
    </msg>
    <msg time='2012-04-26T14:54:26.712-04:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='J1009615W7LT'
    host_addr='fe80::20c9:b748:311a:95e4%14'>
    <txt>
    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
    </txt>
    </msg>
    <msg time='2012-04-26T14:54:29.880-04:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='J1009615W7LT'
    host_addr='fe80::20c9:b748:311a:95e4%14'>
    <txt>Dynamic address is already listened on (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=J1009615W7LT.jda.corp.local)(PORT=1521)))
    </txt>
    </msg>
    <msg time='2012-04-26T14:54:29.881-04:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='J1009615W7LT'
    host_addr='fe80::20c9:b748:311a:95e4%14'>
    <txt>26-APR-2012 14:54:29 * service_register * O11GR2 * 0
    </txt>
    </msg>
    <msg time='2012-04-26T14:54:32.090-04:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='J1009615W7LT'
    host_addr='fe80::20c9:b748:311a:95e4%14'>
    <txt>26-APR-2012 14:54:32 * ping * 0
    </txt>
    </msg>
    Edited by: 850920 on Apr 26, 2012 11:59 AM

  • Not able to compile wrapped package bodies.

    Hi All
    Can anybody pls help me finding me the reason why I m not able to compile .plb (wrapped package body). There are no compilation errors. But when I run the .plb file (as @xyz.plb), sqlplus window hangs. No error shown. Everytime I had to close the window after waiting for 8-10 minutes.
    This is happening only with 11 files out of 200.Rest were compiled.
    Any ideas? Do we have any other way to wrap than using pl/sql wrap utility or pl/sql plug-in for wrapping(which is actually the same as former)??
    ThanksInAdvance!!
    Keep striking the iron until it's hot!

    yes, I did check for locks from pl/sql developer only. No Locks.
    I waited for 10 minutes for a 6 kb .plb file to get compiled. But had to close the session after that.
    I am using oracle 10g, pl/sql developer 7.1.0.1337
    sql*plus Release 10.2.0.2.0

  • Problem inserting and querying XML data with a recursive XML schema

    Hello,
    I'm facing a problem with querying XML data that is valid against a recursive XML Schema. I have got a table category that stores data as binary XML using Oracle 11g Rel 2 on Windows XP. The XML Schema is the following:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:complexType name="bold_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="keyword_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
                   <xs:element name="plain_text" type="xs:string"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="emph_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="text_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="parlist_type">
              <xs:sequence>
                   <xs:element name="listitem" minOccurs="0" maxOccurs="unbounded" type="listitem_type"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="listitem_type">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="parlist" type="parlist_type"/>
                   <xs:element name="text" type="text_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:element name="category">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="name"/>
                        <xs:element name="description">
                                  <xs:complexType>
                                            <xs:choice>
                                                           <xs:element name="text" type="text_type"/>
                                                           <xs:element name="parlist" type="parlist_type"/>
                                            </xs:choice>
                                  </xs:complexType>
                        </xs:element>
                                                                </xs:sequence>
                                                                <xs:attribute name="id"/>
                                            </xs:complexType>
                        </xs:element>
    </xs:schema>I registered this schema and created the category table. Then I inserted a new row using the code below:
    insert into category_a values
    (XMlElement("category",
          xmlattributes('categoryAAA' as "id"),
          xmlforest ('ma categ' as "name"),
          (xmlelement("description", (xmlelement("text", 'find doors blest now whiles favours carriage tailor spacious senses defect threat ope willow please exeunt truest assembly <keyword> staring travels <bold> balthasar parts attach </bold> enshelter two <emph> inconsiderate ways preventions </emph> preventions clasps better affections comes perish </keyword> lucretia permit street full meddle yond general nature whipp <emph> lowness </emph> grievous pedro')))    
    The row is successfully inserted as witnessed by the results of row counting. However, I cannot extract data from the table. First, I tried using SqlPlus* which hangs up and quits after a while. I then tried to use SQL Developer, but haven't got any result. Here follow some examples of queries and their results in SQL Developer:
    Query 1
    select * from category
    Result : the whole row is returned
    Query 2
    select xmlquery('$p/category/description' passing object_value as "p" returning content) from category
    Result: "SYS.XMLTYPE"
    now I tried to fully respect the nested structure of description element in order to extract the text portion of <bold> using this query
    Query 3
    select  xmlquery('$p/category/description/text/keyword/bold/text()' passing object_value as "p" returning content) from  category_a
    Result: null
    and also tried to extract the text portion of element <text> using this query
    Query 4
    select  xmlquery('$p/category/description/text/text()' passing object_value as "p" returning content) from  category_a
    Result: "SYS.XMLTYPE".
    On the other hand, I noticed, from the result of query 1, that the opening tags of elements keyword and bold are encoded as the less than operator "&lt;". This explains why query 3 returns NULL. However, query 4 should display the text content of <text>, which is not the case.
    My questions are about
    1. How to properly insert the XML data while preserving the tags (especially the opening tag).
    2. How to display the data (the text portion of the main Element or of the nested elements).
    The problem about question 1 is that it is quite unfeasible to write a unique insert statement because the structure of <description> is recursive. In other words, if the structure of <description> was not recursive, it would be possible to embed the elements using the xmlelement function during the insertion.
    In fact, I need to insert the content of <description> from a source table (called category_a) into a target table (+category_b+) automatically .
    I filled category_a using the Saxloader utility from an flat XML file that I have generated from a benchmark. The content of <description> is different from one row to another but it is always valid with regards to the XML Schema. The data is properly inserted as witnessed by the "select * from category_a" instruction (500 row inserted). Besides, the opening tags of the nested elements under <description> are preserved (no "&lt;"). Then I wrote a PL/SQL procedure in which a cursor extracts the category id and category name into varchar2 variables and description into an XMLtype variable from category_a. When I try to insert the values into a category_b, I get the follwing error:
    LSX-00213: only 0 occurrences of particle "text", minimum is 1which tells that the <text> element is absent (actually it is present in the source table).
    So, my third question is why are not the tags recognized during the insertion?
    Can anyone help please?

    Hello,
    indded, I was using an old version of Sqlplus* (8.0.60.0.0) because I had a previous installation (oracle 10g XE). Instead, I used the Sqlplus* shipped with the 11g2database (version 11.2.0.1.0). All the queries that I wrote work fine and display the data correctly.
    I also used the XMLSERIALIZE function and can now display the description content in SQL Developer.
    Thank you very much.
    To answer your question Marco, I registered the XML Schema using the following code
    declare
      doc varchar2(4000) := '<?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:complexType name="bold_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="keyword_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
                   <xs:element name="plain_text" type="xs:string"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="emph_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="text_type" mixed="true">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="bold" type="bold_type"/>
                   <xs:element name="keyword" type="keyword_type"/>
                   <xs:element name="emph" type="emph_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:complexType name="parlist_type">
              <xs:sequence>
                   <xs:element name="listitem" minOccurs="0" maxOccurs="unbounded" type="listitem_type"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="listitem_type">
              <xs:choice minOccurs="0" maxOccurs="unbounded">
                   <xs:element name="parlist" type="parlist_type"/>
                   <xs:element name="text" type="text_type"/>
              </xs:choice>
         </xs:complexType>
         <xs:element name="category">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="name"/>
                        <xs:element name="description">
                                  <xs:complexType>
                                            <xs:choice>
                                                           <xs:element name="text" type="text_type"/>
                                                           <xs:element name="parlist" type="parlist_type"/>
                                            </xs:choice>
                                  </xs:complexType>
                        </xs:element>
                                                                </xs:sequence>
                                                                <xs:attribute name="id"/>
                                            </xs:complexType>
                        </xs:element>
    </xs:schema>';
    begin
      dbms_xmlschema.registerSchema('/xmldb/category_auction.xsd', doc,     LOCAL      => FALSE, 
            GENTYPES   => FALSE,  GENBEAN    => FALSE,   GENTABLES  => FALSE,
             FORCE      => FALSE,
             OPTIONS    => DBMS_XMLSCHEMA.REGISTER_BINARYXML,
             OWNER      => USER);
    end;then, I created the Category table as follows:
    CREATE TABLE category_a of XMLType XMLTYPE store AS BINARY XML
        XMLSCHEMA "xmldb/category_auction.xsd" ELEMENT "category";Now, there still remains a problem of how to insert the "description" content which I serialized as a CLOB data into another table as XML. To this purpose, I wrote a view over the Category_a table as follows:
    CREATE OR REPLACE FORCE VIEW "AUCTION_XWH"."CATEGORY_V" ("CATEGORY_ID", "CNAME", "DESCRIPTION") AS
      select category_v."CATEGORY_ID",category_v."CNAME",
      XMLSerialize(content ( xmlquery('$p/category/description/*' passing object_value as "p" returning content)) as clob) as "DESCRIPTION"
      from  auction.category_a p, 
    xmltable ('$a/category' passing p.Object_Value as "a"
    columns  category_id varchar2(15) path '@id',
              cname varchar2(20) path 'name') category_v;Then, I wrote a procedure to insert data into the Category_xwh table (the source and target tables are slightly different: the common elements are just copied wereas new elements are created in the target table). The code of the procedure is the following:
    create or replace PROCEDURE I_CATEGORY AS
    v_cname VARCHAR2(30);
    v_description clob ;
    v_category_id VARCHAR2(15);
    cursor mycursor is select category_id, cname, description from category_v;
    BEGIN
    open mycursor;
      loop
      /*retrieving the columns*/
      fetch mycursor into v_category_id, v_cname, v_description ;
      exit when mycursor%notfound;
      insert into category_xwh values
      (XMlElement("category",
          xmlattributes(v_category_id as "category_id"),
          xmlelement("Hierarchies", xmlelement("ObjHierarchy", xmlelement ("H_Cat"),
                                                               xmlelement ("Rollsup",
                                                                                  (xmlelement("all_categories",
                                                                                   xmlattributes('allcategories' as "all_category_id")))
        xmlforest (
                  v_cname as "cat_name",
                  v_description as "description")    
    end loop;
      commit;
      close mycursor;
    END I_CATEGORY;When I execute the procedure, I get the following error:
    LSX-00201: contents of "description" should be elements onlyso, I just wonder if this is because v_description is considered as plain text and not as XML text, even if its content is XML. Do I need to use a special function to cast the CLOB as XML?
    Thanks for your help.
    Doulkifli

  • [HELP] 10g error TNS-12518: TNS:listener could not hand off client connecti

    Hi all,
    TNS-12518: TNS:listener could not hand off client connection
    (when I do a sqlplus, it hangs for one two minutes, then the error above shows)
    My oracle 10g is installed in a windows system. this error only happens when the database is heavily used for some time. After I restarted the Listoner, the connection is ok again. Does anyone has a solution for this? Thanks a lot.
    Jason

    Monitor your page file usage on Windows system (I assume its a 32 bit machine). When Windows starts to swap Oracle SGA into page file., you encounter TNS errors. Strange but we have observed this.
    If you can allocate more free physical memory on the server (by removing unwanted applications from the memory), then you can reduce these errors.
    Permanent solution would be to add more physical RAM (with 4GT on 32 bit) or switch to 64 bit architecture.
    Message was edited by:
    Satish Kandi
    Typo corrected and added following.
    You can set DIRECT_HANDOFF_TTC_LISTENER=OFF in listener.ora and restar the database as temporary solution. Check metalink Doc ID: 233747.1

  • Installing other packages may have broken Oracle InstantClient

    Hi Folks,
    I had the oracle instant client installed and working okay and also the oci8 php module. It looks like it's stopped working, though, and I'm not sure how to troubleshoot it. The symptoms are that my php page just hangs and doesn't produce any output, and from the commandline sqlplus just hangs, leaving no output.
    I have it installed on another machine (a test machine, slightly different specs), and it's still working fine, so I think it must be something that's changed on the server. The only thing I can think of is that I've installed some packages recently (mod_python, postgresql), but I don't see how that would have made a difference, or how I can troubleshoot. Is there a debug mode for sqlplus??
    Thanks, Tom

    I've reinstalled the new 20060331 version and things seem to be okay.
    Thanks, Tom

Maybe you are looking for

  • Accounting document summarisation

    Dear All,      A billing document is posted which has material with free quantity.The value of the free goods is getting debited to the sales Revenue GL account. Our requirement is that  instead of posting as stated above, the sales value has to be s

  • Virtual PC on Windows 7 (32 bit) and T4300 processor

    Hi, I bought my laptop specifically to run Virtual PC and deliberately got a 4Gb machine. I now find out that the T4300 processor doesn't support hardware assisted virtualisation and seemingly you then can't run VPC? I'm not interested in XP mode - I

  • Lost Recent items list in FW

    I successfully upgraded FW to 11.1.0.205 some time ago (when I upgraded  CS5 to CS5.5), but I've been experiencing a couple strange behaviors  ever since.  I'm on a pc using Vista. (1) FW  now requires admin permission whenever I launch it.  No other

  • MDT timezones out

    Hi, I'm relatively new to MDT and have an odd issue. Deploying Win 7 x64, the deployment completes fine with no errors except the timezone is always out, usually by 2 hrs. I've covered all the bases as far as the config.ini goes, adding UK timezone,

  • Refurbishment order

    Dear Experts, Please suggest which route is better for capturing the repair cost of a material send outside for repair. 1. Through external services ( Control key PM03 ) 2. Through sub-contracting ( Control key PM02 ) Kindly explain the pros and cons