Is there a SLEEP command in oracle

I tried using sleep(5); in one of my PLSQL.
The database does not recognize the command
Any body with experience on this

Hi,
Another solution is to write a loop to wait for the given seconds. Depends upon the wait time, you could increase the loop counter.
Thanks.

Similar Messages

  • Diff command in Oracle

    Hi All,
    Just curious to know whether there is any command in Oracle which has the same functionality of diff command in UNIX.
    diff command will give the difference between 2 scripts by checking each and every line.
    Thanks
    Hari

    Actually I am trying to write a trigger which would be fired as and when a new database object has been created. I would then store the code of that database object.
    If a user creates a table,drops it and then creates the same table. My script would be storing the code of the table twice.So I want to compare the two versions of the table before storing. And hence that thought came to my mind.
    Thanks
    Hari

  • How can I use custom WLST commands for Oracle SOA Suite in Weblogic

    Hi There,
    I'm trying to view and search the weblogic log files using WLST on a Solaris/Unix system.
    I have come across this "custom WLST commands for Oracle SOA Suite" and thought of using the custom logging commands to get my task done.
    However, my WLST shell is not recognizing the commands and giving me the NameError!
    wls:/devDomain1/domainRuntime> listLogs()
    Traceback (innermost last):
    File "<console>", line 1, in ?
    NameError: listLogs
    I tried the commands listLogs, displayLogs, getLogLevel & setLogLevel but in vain!
    I have followed the instructions as per the oracle recommendation of using Custom WLST commands (http://docs.oracle.com/cd/E29597_01/core.1111/e10105/getstart.htm#ASADM10692) as below
    - Launched the WLST shell from Oracle Home.
    cd ORACLE_HOME/common/bin
    ./wlst.sh
    - Tried to run the listLogs command from domainRuntime()
    I would like to know if I need to import any additional libraries to run the custom WLST commands for Oracle SOA Suite in my WLST shell?
    I have only weblogic 10.3.1 server installed on my Solaris 10 machine on which I have deployed the OSB application software.
    There is no SOA Suite installed.
    Or is there any other way I can browse the Server Log file and get the list of log messages? Basically I would like to use this feature in my script to customize it according to my requirement of listing specific error logs which I can work it out if I know how to make these commands work.
    Please advise if this is possible and how?
    Cheers.
    Satish

    I have tried on my OSB installation (no SOA Suite here), the command listLogs() works (I was in online mode, after a connect), and the classpath is:
    CLASSPATH=/opt/oracle/fmw11_1_1_5/patch_wls1035/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/oracle/fw11_1_1_5/patch_ocp360/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/lib/jvm/java-1.6.0-sun-1.6.0.33.x6_64/lib/tools.jar:/opt/oracle/fmw11_1_1_5/wlserver_10.3/server/lib/weblogic_sp.jar:/opt/oracle/fmw11_1_1_5/wlserver_10./server/lib/weblogic.jar:/opt/oracle/fmw11_1_1_5/modules/features/weblogic.server.modules_10.3.5.0.jar:/opt/oracle/fmw111_1_5/wlserver_10.3/server/lib/webservices.jar:/opt/oracle/fmw11_1_1_5/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/optoracle/fmw11_1_1_5/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar::/opt/oracle/fmw11_1_1_5/oracle_common/moules/oracle.jrf_11.1.1/jrf-wlstman.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/lib/adfscripting.jar:/opt/oracl/fmw11_1_1_5/oracle_common/common/wlst/lib/adf-share-mbeans-wlst.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/lb/mdswlst.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/auditwlst.jar:/opt/oracle/fmw11_1_1_5/oracle_cmmon/common/wlst/resources/igfwlsthelp.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/jps-wlst.jar:/optoracle/fmw11_1_1_5/oracle_common/common/wlst/resources/jrf-wlst.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/reources/oamap_help.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/oamAuthnProvider.jar:/opt/oracle/fmw111_1_5/oracle_common/common/wlst/resources/ossoiap_help.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/osoiap.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/ovdwlsthelp.jar:/opt/oracle/fmw11_1_1_5/oracle_comon/common/wlst/resources/sslconfigwlst.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/wsm-wlst.jar:/optoracle/fmw11_1_1_5/utils/config/10.3/config-launch.jar::/opt/oracle/fmw11_1_1_5/wlserver_10.3/common/derby/lib/derbynet.ar:/opt/oracle/fmw11_1_1_5/wlserver_10.3/common/derby/lib/derbyclient.jar:/opt/oracle/fmw11_1_1_5/wlserver_10.3/common/drby/lib/derbytools.jar::
    The wlst.sh I have used is /opt/oracle/fmw11_1_1_5/osb/common/bin/wlst.sh
    I hope this can help

  • SYSTEM HANGS WHILE RUNNING EXP COMMAND IN ORACLE 10G

    WHEN WE ARE RUNNING THE EXP (EXPORT) COMMAND IN ORACLE 10G
    TO TAKE THE BACKUP IT GETS HANGED FOR A LONG TIME AND THEN IN THE LOG FILE WE FIND THE FOLLOWING ERROR MESSAGE.
    SOMETIMES AFTER RESTARTING THE SERVER WE ARE ABLE TO RUN THE EXP COMMAND.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    About to export specified users ...
    . exporting pre-schema procedural objects and actions
    . exporting foreign function library names for user MANHAR
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting object type definitions for user MANHAR
    About to export MANHAR's objects ...
    . exporting database links
    . exporting sequence numbers
    . exporting cluster definitions
    *********************************** AT THIS POINT THE SYSTEM HANGS FOR A LONG TIME.
    EXP-00056: ORACLE error 24324 encountered
    ORA-24324: service handle not initialized
    EXP-00056: ORACLE error 24324 encountered
    ORA-24324: service handle not initialized
    EXP-00000: Export terminated unsuccessfully
    THE EXP COMMAND THAT WE USE IS AS FOLLOWS:
    EXP MANHAR/MANHAR FILE=F:\BACKUP\MANHAR.DMP LOG=F:\BACKUP\MANHAR.LOG BUFFER=1000000 GRANTS=Y CONSTRAINTS=Y
    WE ARE RUNNING THE EXP COMMAND ON THE SERVER ITSELF.
    THE SERVER OPERATING SYSTEM IS WINDOWS 2003 SERVER.
    Kindly give us a solution at the earliest.

    You should ask Oracle support for help. There's only one entry for this error stack (Bug 3361288 - Export of XMLSCHEMA may fail with ORA-24324 in UTF8), but it should have been fixed for your DB version and , as far as I can see, you don't have a Unicode database.
    Werner

  • Re: the similar decode sql command (in Oracle) in ABAP

    Dear ABAP Expert,
    Could you let me know where there is a similar decode command in Oracle in ABAP?
    Thanks.
    Arthur

    Hi,
    You can specify case statement between SELECT and ENDSELECT. However this may lead to performance problems. Please take care.
    Example:-
    SELECT FIELD1 into LOC_FIELD FROM TAB.
      CASE LOC_FIELD.
        WHEN 'ABC'.
          WRITE: 'ABC'.
        WHEN OTHERS.
          WRITE: 'REST'.
      ENDCASE.
    ENDSELECT.
    Thanks and Best Regards,
    Dinesh.

  • Errors in impdp command on oracle 10g database-urget help needed

    Hi,
    could you plz help me to solve below errors which are coming while doing import with impdp command in oracle 10g 10.1.0.4.0 os: Red Hat Enterprise Linux ES release 4
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    Job "DCA"."SYS_IMPORT_SCHEMA_01" stopped due to fatal error at 15:31
    i tried to restart job but the following errors coming
    UDI-00008: operation generated ORACLE error 39078
    ORA-39078: unable to dequeue message for agent KUPC$A_1_20081111155728 from queue "KUPC$C_1_20081111155728"
    ORA-06512: at "SYS.DBMS_DATAPUMP", line 2356
    ORA-06512: at "SYS.DBMS_DATAPUMP", line 3261
    ORA-06512: at line 1
    thanks in advance

    Can you check Metalink Note 376022.1? Your STREAMS_POOL_SIZE parameter may be too small.
    If you don't have Metalink access, try this :
    sql> alter system set STREAMS_POOL_SIZE=100M scope=spfile;
    sql> shutdown immediate
    sql> startup
    Note : the Portal Applications forum may not be the appropriate forum for this datapump issue. Try one of the database forums as you'll have a wider audience there.

  • 0% idle time of cpu states from top command in oracle 8i /solaris 5.9

    Hi,
    for long time idle time is 0% in top command :
    database version:oracle 8.1.7.4.0
    operating system : sun solaris 5.9
    load averages: 9.32, 5.78, 6.13 15:22:13
    404 processes: 387 sleeping, 13 running, 4 on cpu
    CPU states: 0.0% idle, 78.2% user, 21.8% kernel, 0.0% iowait, 0.0% swap
    Memory: 16G real, 7535M free, 5842M swap in use, 9965M swap free
    PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND
    6928 oracle 11 20 0 0K 0K run 2:20 12.62% oracle
    23518 oracle 21 31 0 0K 0K run 24:37 11.69% oracle
    9664 oracle 20 30 0 0K 0K run 12:41 10.83% oracle
    15764 oracle 12 21 0 0K 0K run 2:18 10.28% oracle
    9214 oracle 19 21 0 0K 0K run 5:52 8.58% oracle
    13734 oracle 173 21 0 0K 0K cpu/3 311:23 6.11% oracle
    19271 oracle 1 59 0 0K 0K cpu/0 726:20 4.45% oracle
    10436 oracle 1 59 0 0K 0K sleep 81:41 4.39% oracle
    22400 oracle 11 59 0 0K 0K sleep 3:22 4.35% oracle
    9297 oracle 20 59 0 0K 0K cpu/2 7:39 3.66% oracle
    22175 oracle 19 59 0 0K 0K sleep 6:55 3.41% oracle
    9494 oracle 1 30 0 0K 0K run 0:02 2.99% oracle
    10719 oracle 1 59 0 0K 0K sleep 132:48 1.55% oracle
    210 oracle 1 59 0 0K 0K sleep 86:56 1.04% oracle
    22084 oracle 24 59 0 0K 0K sleep 2:50 0.92% oracle
    and sometime load average goes to 25-30 and cpu states is 0% idle in that load so how i can tune my database:
    Regards
    Prakash

    Hi,
    here 0% idle, 0% iowait
    one of the query explain plan i am posting over here:
    Operation     Object Name     Rows     Bytes     Cost     TQ     In/Out     PStart     PStop
    SELECT STATEMENT Hint=CHOOSE          77 K          11800                     
    COUNT STOPKEY                                        
    VIEW          77 K     32 M     11800                     
    SORT UNIQUE STOPKEY          77 K     10 M     8384                     
    HASH JOIN OUTER          77 K     10 M     4968                     
    HASH JOIN          77 K     9 M     4477                     
    HASH JOIN          54 K     2 M     3071                     
    TABLE ACCESS FULL     GA_INSTANCE     10      140      1                     
    HASH JOIN          75 K     2 M     3069                     
    HASH JOIN          75 K     1 M     2351                     
    INDEX FAST FULL SCAN     CUST_ACCT_ADDR_PK     75 K     960 K     282                     
    TABLE ACCESS FULL     ADDRESS     199 K     1 M     1960                     
    TABLE ACCESS FULL     CUST_ACCT     112 K     1 M     593                     
    TABLE ACCESS FULL     IQARA_CNR_ACT_LOG     89 K     6 M     1150                     
    TABLE ACCESS FULL     NI_STATIC_IP_ADDR     21 K     317 K     60                     
    Reagrds
    Prakash

  • Installed the OS update.  Now my 'sleep' command is taking forever to take effect.

    Installed the OS update.  Now my 'sleep' command is taking forever to take effect.

    I'm having the same issue. My iPod video now blinks on and off with the apple logo every 3-5 seconds. The HD clicks as well, but nothing happens. It has been like this for about an hour now, and my iTunes does not even recognize that my iPod is connected. Is there something wrong with the iPod update that we are not aware of? And if so, how can I restore my software without having to reinstall all of my songs and videos? This is really frustrating, and there should be some kind of warning about problems that can occur with new software updates.
    60 GB iPod video   Windows XP  

  • How to execute EXP backup command of Oracle from JSP

    hi frens !!!
    i want a method by which i can call an EXP command of oracle in JSP.
    thanks and regards
    Allwyn

    No, you don't want that. Your JSP should not know that there is such a thing as a database.

  • HOST Command in oracle forms 10g

    Hi,
    I need to use HOST command to run an OS(Unix) command in Oracle Forms 10g.
    Its throwing a non-oracle exception during run time.
    Is there any kind of configuration/settings that I need to check before using HOST command?
    Is there any way to capture the error description?
    Any help will be highly appreciated!
    Thanks,
    Ankit

    Thanks Thangaraj for your valuable suggestion!!
    One question though..
    Should'nt ORACLE_HOME be an absolute path?
    I have added "/bin" in FORMS_PATH but not sure if we can do the same with ORACLE_HOME.
    Can you please suggest?
    Regards,
    Ankit

  • Searchadmin command in Oracle SES

    Hi Can anyone tell me from where can i execute searchadmin command in oracle ses, and  in the link followed Administration Object Types what is /scratch/skins referring to ? Please help its very urgent

    Hi Raford,
    Thanks for your reply.
    I could see all the Metadata attibutes in the advance search option. But instead is there any option like.. first i should select the Category and after that i should select my desired Metadata Attributes in that category.
    We need this feature because a customer might find difficult to select his desired MetaData Attribute from the entire list of MetaData Attributes LOV
    Thanks
    parker.

  • How does sleep command works?

    Does anyone know how sleep command works?
    If I send "sleep 2m" to terminal.. would cpu be idling during those 2 minutes (from that command itself)? Is there something that is implemented in kernel that tells how sleep command works? and how its implemented in code?
    Last edited by kdar (2012-08-08 21:39:54)

    tomk wrote:Here's the code: http://git.savannah.gnu.org/cgit/coreut … rc/sleep.c
    Looks like the real work is done in gnulib: http://git.savannah.gnu.org/cgit/gnulib … anosleep.c
    It looks like a loop that just continuously counts the number of nanoseconds that have passed to see if you've reached the requested time.
    Actually keeping track of nanoseconds is handled by timespec. Doesn't look like a lot of code is involved, but I can't follow it. I'd be interested to hear an explanation!

  • Is there an conditional command RIGHT()

    if there is an EMP table with a row of data with EMPNO 3167
    there are numerous ways of retrieving it but i want to know whether there is an option like this because i read it somewhere in net as i am new to development.
    select * from EMP where RIGHT(EMPNO,2)=67;
    Oracle is showing this as 'RIGHT' invalid identifier.
    Is there a valid syntax using RIGHT

    ya thats what i too mentioned that there are numerous
    possible ways but i wanted to know whether there is a
    command as such as RIGHT(' ',2) .......No, there is no RIGHT command in Oracle. An equivalent substitute would be SUBSTR(' ', -2) as shown by another forum member. For syntax question, you can use the user guide which also offers a search function:
    http://www.oracle.com/pls/db102/homepage
    C.

  • IPhone keeps MacPro from following "sleep" command

    Been having a minor issue with my iPhone and my MacPro. I keep the phone docked a lot when I'm at the computer, and I usually leave it there overnight as well. When I put the MPro to sleep it will go to sleep at first, but then the iPhone wakes up and that prompts the Mac to wake as well. I've tried disabling the automatic sync setting in iTunes but it doesn't seem to make a difference. I've tried waking the phone first before putting the Mac to sleep, which works sometimes but not all the time. Usually if I hit the sleep command 3-4 times the Mac will finally sleep.
    I assumed the iPhone would function like an iPod in this instance (my 5G iPod does not do this); it appears that iPhones don't charge anyway while computers sleep but I haven't seen any statement from Apple about unplugging/un-docking an iPhone before putting your Mac to sleep. Note that my Wife's iMac G5 does NOT exhibit the same behavior, and will go to sleep properly with the iPhone attached.
    Specs: 8GB iPhone, v1.1.1. Standard iPhone dock and USB cable plugged into 23" Cinema Display on Mac pro 2.66, with 4GB ram

    John Knowles,
    Here is one possibility.
    Your MacPro may be waking for Ethernet access, such as your router contacting it, detecting the iPhone when it checks the USB bus after waking, and not going back to sleep automatically because the iPhone is attached.
    If a computer goes to sleep automatically while the iPhone is attached, it may stop charging, and under some conditions discharge the battery on the iPhone.
    Try turning off "Wake for Ethernet Access" if its not needed, and see if that makes a difference.
    Hope this helps,
    Nathan C.

  • Remove sleep command from apple menu

    Hi
    Is there anyway eithier a hack or using mcx plist or similar to remove the sleep command from the Apple Menu?
    10.6.6
    TIA
    G

    gbarrett wrote:
    Hi
    Is there anyway eithier a hack or using mcx plist or similar to remove the sleep command from the Apple Menu?
    10.6.6
    TIA
    G
    Not that I have found, however you might want to read this discussion to see if any of it helps you.
    https://discussions.apple.com/message/15943299

Maybe you are looking for