format of 999,999

Hello
in 10g R2 how to display the numbers (and not have # instead):
SQL> set lines 120 trimspool on
SQL> col event head "Waited for" format a30
SQL> col total_waits head "Total|Waits" format 999.999
SQL> col tw_ms head "Waited|for (ms)" format 999.999.99
SP2-0246: cha¯ne de FORMAT non autorisÚe "999.999.99"
SQL> col aw_ms head "Average|Wait (ms)" format 999.999.99
SP2-0246: cha¯ne de FORMAT non autorisÚe "999.999.99"
SQL> col mw_ms head "Max|Wait (ms)" format 999.999.99
SP2-0246: cha¯ne de FORMAT non autorisÚe "999.999.99"
SQL> select event, total_waits, time_waited*10 tw_ms,
  2         average_wait*10 aw_ms, max_wait*10 mw_ms
  3  from v$session_event
  4  where sid =152;

                                  Total      Waited     Average         Max
Waited for                        Waits    for (ms)   Wait (ms)   Wait (ms)
------------------------------ -------- ----------- ----------- -----------
class slave wait                  1.000         .00         .10         .00
Streams AQ: waiting for time m ######## ########### ########### ###########
anagement or cleanup tasks

events in waitclass Other         1.000         .00         .00         .00
Thank you

Hello

format is not correct:

You must set this way, if you want 2 decimal and thousands separator

format 999,999.99

And when it is # means that the number is too large to fit in:

set lines 120 trimspool on
col event head "Waited for" format a30
col total_waits head "Total|Waits" format 999,999
col tw_ms head "Waited|for (ms)" format 999,999.99
col aw_ms head "Average|Wait (ms)" format 999,999.99
col mw_ms head "Max|Wait (ms)" format 999,999.99
select event, total_waits, time_waited*10 tw_ms,
       average_wait*10 aw_ms, max_wait*10 mw_ms
from v$session_event
where sid =152;

                                  Total      Waited     Average         Max
Waited for                        Waits    for (ms)   Wait (ms)   Wait (ms)
------------------------------ -------- ----------- ----------- -----------
class slave wait                      1        0.00         .10        0.00
Streams AQ: waiting for time m       43  ##########  ##########  ##########
anagement or cleanup tasks                                                 

set lines 120 trimspool on
col event head "Waited for" format a30
col total_waits head "Total|Waits" format 999,999,999
col tw_ms head "Waited|for (ms)" format 999,999,999.99
col aw_ms head "Average|Wait (ms)" format 999,999,999.99
col mw_ms head "Max|Wait (ms)" format 999,999,999.99
select event, total_waits, time_waited*10 tw_ms,
       average_wait*10 aw_ms, max_wait*10 mw_ms
from v$session_event
where sid =152;

                                      Total          Waited         Average             Max
Waited for                            Waits        for (ms)       Wait (ms)       Wait (ms)
------------------------------ ------------ --------------- --------------- ---------------
class slave wait                          1            0.00             .10            0.00
Streams AQ: waiting for time m           43   79,054,860.00    1,838,485.10    3,596,180.00
anagement or cleanup tasks        

Kind regards.
Al

Published by: Alberto Faenza November 23, 2012 13:33

Tags: Database

Similar Questions

  • APEX number formatting issue.

    I tried to run this SQL command:

    COL Eq_Cost FORMAT $9 999.99
    COL Eq_Price FORMAT $9 999.99

    Select Eq_Cost, Eq_Price from equipment;

    Where Eq_Cost and Eq_Price are equipment and column is the table. It's the formatting code that does not work. Any suggestion?

    Thank you very much

    -Robert

    Hi Robert

    If you use a classical SQL or interactive report, you can choose to put on a mask of more data currency to display numbers like 9999 as $9999,00. To do this:

    1.) is se connecter connect on your workspace, see the page of the report, and then click the report (or interactive report) link
    2.) under column attributes, click Change next to the column that you want to apply the mask of the currency to
    3.) under the definition of the column, click the icon to the right of the number / Date Format textbox
    4.) when you click the icon, select the format you want to apply in the pop up box

    You can apply masks similar to the forms elements as well.

    ~ Andrew Schultz

  • Column using SQL format

    Hi thanks for the reply.

    IF I want the column OPP_VALUE format how do I format it using sql

    I do when I create the table? I loaded these data using the spreadsheet.

    I tried
    The separate TAB. CLIENT, tab. SC, tab. HOURS, tab. OPP_VALUE, tab.opp_val_rank
    Of
    (SELECT CLIENT, SC, TIME, column OPP_VALUE format OPP_VALUE 999 999, DENSE_RANK() over (order by OPP_VALUE DESC) opp_val_rank)
    OF FMW_ANALY) tab
    WHERE the opp_val_rank < = 10;

    I get the error ORA-00936: lack of expression

    increase the 9 for your lot fits into:

    to_char(OPP_VALUE,'9999999,99999') OPP_VALUE
    
  • phone number format (999-999-9999)

    Hello

    I want to 999-999-9999 number phone this format, under query works correctly, but I want to without using how to get this.

    Select regexp_replace (lpad (67890,10, '0'),'(.{3}) (. {3})(.{4})', '\1-\2-\3') of double;

    output: 000-006-7890

    can anyone suggest me.

    Thank you

    Otherwise use? LPAD? REGEXP? Anyway, you can use to_char:

    Select double to_char(67890,'FM000G000G0000',Q'[nls_numeric_characters='.-']')

    /

    TO_CHAR (67890
    -------------
    000-006-7890

    SQL >

    SY.

  • How to get the number in the format "999,999,999.000" in oracle

    Hi friends,
    How can I get the number entered in the format '999,999,999.000 '...
    for example, if my number has 1900, it should give 1,900.000
    If my number is 10000, then it should give me 10,000.000 like this in sql
    is there a function available for this?

    pls help

    Thank you

    Hello

    Check below hope it solves your problem.

    SQL> SELECT TRIM(TO_CHAR(1900, '999,999,999,999,999.99')) FROM DUAL;
    
    TRIM(TO_CHAR(1900,'999,999,999
    ------------------------------
    1,900.00
    SQL> SELECT TRIM(TO_CHAR(10000, '999,999,999,999,999.99')) FROM DUAL;
    
    TRIM(TO_CHAR(10000,'999,999,99
    ------------------------------
    10,000.00
    
    SQL> 
    

    Concerning
    Ameya

  • CME SIP Phone for any transfer telephone call SCCP

    Hi all

    Incoming call transfer, I cannot possible to Sip at the CSPC sccp phone to the CSPC is transfer works.

    SIP phone 8961

    SCCP phone 7945,6921

    Please check the configuration

    voip phone service
    h323 connections allow h323
    allow connections h323 to SIP
    allow connections sip h323
    allow sip to sip connections
    no service additional h450.2
    no service additional h450.3
    Fax protocol t38 ls-redundancy version 0 0 hs-redundancy 0 help none
    H323
    SIP
    Registration Server expires max 300 minutes 60

    OICE record dn 1
    number 0
    call-forward noan 999 timeout 20 b2bua
    allow to watch
    name operator
    operator label

    vocal range pool 1
    Mac ID 1CAA.0710.0AC1
    type 8961 addon 1 CKEM
    Number 1 dn 1
    model 1
    DTMF-relay rtp - nte sip-kpml sip - notify
    username cisco password cisco
    Codec g711ulaw
    No vad
    camera
    video

    phone service
    3 units of sdspfarm
    Tag Conference 1 sdspfarm
    conference material
    transfer-model of the Conference
    video
    No auto-reg ephone
    Max-joined 100
    Max - dn 250
    IP source address 192.1.1.111 port 2000
    LCC_SIPOREX system message
    zone schedule-31
    aa-mm-dd date format
    voicemail 999
    MWI reg-e164
    MAX conferences 8-6 win
    Web admin system name admin secret 5 $1$ qHe3$ xblvRD1ouV4jr8RcGUiMM.
    DN-webedit
    time-webedit
    transfer full-consult system
    create a cnf-files version-stamp 1 January 2002 00:00:00

    Thank you

    Post engineering, Martin!

  • Growth of DB per Segment for the last days

    Greetings,


    Our Prod database has grown fast enough for the last 2 weeks, I have a question which gives me the current database size, but I'm trying to run a report to get the size of database/trend for the last 7 days or so which segment (Table or Index, etc.) who have contributed to the growth of the database.

    Thank you.

    @AJ

    Thanks LonutC! Unfortunately this is not what I want, I don't have the means to get the size of the database / total space free etc... on level tablespace, datafile, and object, but the main thing I was looking for is to find the size of the table over time (IE how much a XYZ in MB/GB table has increased during the last 14 days?) The closet script that I've found so far is below the Berloson site.  As you can see in my previous discussions, I could see how much in terms of MB a table set increases every hour in a day and 7-day window as well. I think that will suffice for now, I'll go ahead and close this thread and thank you to all WHO helped

    Please note that you can modify this script to report on any object and not just a Table. But, ALWAYS run any script that you encounter on your Test Env first... just a heads-up...

    > This script displays "total used spaced ' (total size) for a specific table to the Oracle, basically computing the size of the Oracle tables over time:

    a15 col c1 format topic ' snapshot | date'

    a25 col c2 format topic ' table. name '

    format header 999 999 999 c3 col ' space. used | total"

    Select

    TO_CHAR (begin_interval_time, ' dd/mm/yy hh24:mm') c1,

    object_name c2,

    space_used_total c3

    Of

    s dba_hist_seg_stat,

    dba_hist_seg_stat_obj o,

    sn dba_hist_snapshot

    where

    o.Owner = "SCHEMA_07".

    and

    s.obj # o.obj = #.

    and

    SN.snap_id = s.snap_id

    and

    object_name like '% objecname '.

    order by

    begin_interval_time;

    > My results Exp
    > 08/10/15 [HR_EMP_LOG] table has increased to about 8.9 MB to 27.7 MB

    10/08/15 09:08 HR_EMP_LOG 8 914 010

    08/10/15 01:08 HR_EMP_LOG 12,687,676

    10/08/15 12:08 HR_EMP_LOG 20,247,050

    08/10/15 14:08 HR_EMP_LOG 27,776,769

    > On 11/08/15 the table [HR_EMP_LOG] has increased by about 2.9 MB 42 MB

    08/11/15 03:08 HR_EMP_LOG 2 967 158
    08/11/15-06:08 HR_EMP_LOG 10,190,002
    11/08/15 11:08 HR_EMP_LOG 17,068,289
    08/11/15 13:08 HR_EMP_LOG 24,868,673
    11/08/15 17:08 HR_EMP_LOG 30,767,601
    11/08/15 18:08 HR_EMP_LOG 35,149,608
    11/08/15 20:08 HR_EMP_LOG 42,113,748
  • Issue of FRA

    I have a question to FRA.  I get "alerts" when my db_recovery_file_dest_size was 85% and I get a critical when alert my it reached 95%.  This database has a retainer

    4 day window.  IE CONFIGURE RETENTION POLICY to RECOVERY WINDOW OF 4 DAYS;  My nightly backups are about 20.8 GB.  My db_recovery_file_dest_size is located at 150 GB.  I can see from my

    Enterprise Manager as 6 days ago from backups stored on the disk.  I understand that FRA pushes the backups and auto cleans itself.

    What I don't understand is why is he alert me and also I think with the script below the amount of recoverable space would not 0.   I could increase my FRA but I think that

    I'd eventually get the same question, because it does not grow on older backups until they need to free up space.  I guess I could disable the alert but then if I did not really

    a question that I will not be informed.  Any ideas?

    My 6 disk 20.82 + 20.77 + 20.77 + 20.77 + 20,79 + 20.78 backup = 124.71

    My flashback zone is 2.5 GB

    My archive logs is 96

    My AutoSave folder is 160 MB

    NAME LIMIT_GB USED_GB RECLAIM_GB PAS_DE_FICHIER

    -------------------- -------- -------- ---------- ----------

    / oRA2/fra 150,0 127,2.0 60

    COL name FORMAT A20

    COL limit_gb FORMAT 9,999.9

    COL used_gb FORMAT 9,999.9

    COL reclaim_gb FORMAT 9,999.9

    SELECT name,

    space_limit/1024/1024/1024 limit_gb

    space_used/1024/1024/1024 used_gb,

    reclaim_gb space_reclaimable/1024/1024/1024,

    NUMBER_OF_FILES pas_de_fichier

    V $ recovery_file_dest

    Hello

    You can use delete noprompt obsolete in your backup script, it will remove the backups that are not necessary.

    Kind regards
    Ivica

  • Question of double arbitrary mask...

    Hello

    I have a field where I want the user to only one entrance to the N999 or R999 format, where 999 is any number between 000 and 999.

    In addition, I would like the letter to always be uppercase.

    I can handle a single mask and the lack of capital letters.

    What I can't do, is managing all together...

    Any help please?

    Thank you.

    Fabien

    Use custom JavaScript and the RegExp object to create a RegExp variable for the image of the format!

    The format and validation RegExp image could be:

    / ^ [NR] \d {3} $/.

    You can then use the method of 'test' to see if the entered string matches the format or not.

    Validation script:'

    deal with non-empty values;

    If (event.value! = "") {}

    If (/ ^([NR]\d{3})$/.test(event.value) == false) {}

    App.Alert ("Enter the value in the form of N999 or R999.", 1, 0);

    Event.RC = false;

    } / / end of RegExp test

    } / / end of non-empty value.

    With the regular expression, it becomes a mask with an optional positional value which can be one of the 2 values.

    Break down values:

    / ^ - beginning of the RegExp

    [NR] - first position can have a value of "N" or "R".

    {\d{3} - positions 2-4 with a 3-digit value, figures are mandatory.

    $/ - end of the RegExp.

    It is also possible to change the expression to limit the strikes to the keyboard and the formatting of the data if necessary.

    RegExp is a common object in a lot of scripts and programming languages and a lot of text editing programs.

  • SQL * more to wrap the set command - doubt

    Hello

    I have a stupid question on the set "WRAP" command in SQL * more. I put A500 for column F2, linesize 100 and wrap is disabled.
    The result is clear, it truncates exactly the 100th character. When I put the envelope, for the header of column F2, I couldn't see
    the '-' character the hyphen for 500 times, but only for 100 characters. With the release, with few characters of column F2, how do I
    confirm that it printed 499 seats for 2 ranks and 495 white space for the last line.

    Please provide details on the envelope and TRIMOUT/TRIMSPOOL in this context.

    Also, when I increase the linesize 1000 and desc T1, it goes for a draw, it is documented in Oracle, but why is it?
    It is possbile to get the result without changing the linesize. Thank you.

    SQL > column f1
    F1 COLUMN WE
    FORMAT OF 999.99
    SQL > column f2
    COLUMN f2 WE
    FORMAT a500

    SQL > show linesize
    linesize 100

    SQL > set wrap off

    SQL > select f1, f2 from t1;

    F1 F2
    ------- --------------------------------------------------------------------------------------------
    1.00 IS
    2.00 Y
    3.00 three

    SQL > wrap value on

    SQL > show wrap
    Wrap: lines will be wrapped

    SQL > SELECT F1, F2 FROM TEST1;

    F1
    -------
    F2
    ----------------------------------------------------------------------------------------------------
    1.00
    THERE

    2.00
    THERE

    3.00
    Three

    Hello

    845956 wrote:
    Hello

    I have a stupid question on the set "WRAP" command in SQL * more. I put A500 for column F2, linesize 100 and wrap is disabled.
    The result is clear, it truncates exactly the 100th character. When I put the envelope, for the header of column F2, I couldn't see
    the '-' character the hyphen for 500 times, but only for 100 characters.

    Exactly. If LINESIZE is 100, the maximum display width of any column is 100, even if the column is actually longer, and/or you have an explicit order of the COLUMN in this way it will be longer. Nothing after that 100 characters will be encapsulated, if the package is enabled.

    With the release, with few characters of column F2, how do I
    confirm that it printed 499 seats for 2 ranks and 495 white space for the last line.

    Save the output in a HOLD file and change the file to see exactly what it contains. If TRIMSPOOL is activated, it does not contain the final spaces.
    >

    Please provide details on the envelope and TRIMOUT/TRIMSPOOL in this context.

    See the SQL * Plus Manual:
    http://docs.Oracle.com/CD/B28359_01/server.111/b31189/ch12040.htm#i2683480

    Also, when I increase the linesize 1000 and desc T1, it goes for a draw, it is documented in Oracle, but why is it?
    It is possbile to get the result without changing the linesize. Thank you.

    Describe automatically adjusts the width of each column to use all the space available with the LINESIZE current. I don't think there is a way to change this. If you cannot change LINESIZE, then write your own query on all_tab_columns and use it instead of sql * over order DESC.

    Published by: Frank Kulash, 5 March 2012 10:20

  • Migration of data from the old platform to the new primary database, need advice.

    I have physical standby facility and everything works now.

    Next weekend, we will do the actual migration of the old platform to the new environment.

    I have several issues of concern.

    Migration will go to the primary database. I'll have to remove patterns and inside expdp dmp.

    While I do all those, what data base waiting? should I disable it again apply?

    What other concerns and precautions I need to take before I have to remove all data from primary school and do a migration?

    Thank you in advance.

    Hello;

    My main concern would be the FRA (assuming you use it).

    By doing all that generates a ton of archives, you have to worry about the space on both sides.

    I would consider increasing my FRA on both sides.

    I would not disable the recovery, but I look very close and be willing to adjust my space as needed.

    As long as you don't miss space you should be fine. I had once a backup log files more than 250, and it took about 15 minutes to catch up.

    Have a little prepared scripts in advance if you can increase the space or delete archive applied and it should be fine.

    I also opened at least two terminals on the primary and Standby. Everyone look at space and the other to execute all what you need to adjust the space.

    The rest is common sense, first do the smaller drawing if you have an idea what to expect. Decaying etc. as much as possible.

    Best regards

    mseberg

    I have a shell script called 'quickcheck.sh' (use a separate but .env file it will send information vital back)

    With a little work, you can do this in something that makes it easy to keep an eye on things.

    #!/bin/bash
    ####################################################################
    #
    
    if [ "$1" ]
    then DBNAME=$1
    else
    echo "basename $0 : Syntax error : use . quickcheck  "
    exit 1
    fi
    
    #
    # Set the Environmental variable for the instance
    #
    . /u01/app/oracle/dba_tool/env/${DBNAME}.env
    #
    #
    
    $ORACLE_HOME/bin/sqlplus /nolog <
    

    and then a SQL file called quickaudit:

    SPOOL OFF
    CLEAR SCREEN
    SPOOL /tmp/quickaudit.lst
    
    --SELECT SYSDATE FROM DUAL;
    --SHOW USER
    
    PROMPT
    PROMPT -----------------------------------------------------------------------|
    PROMPT
    
    SET TERMOUT ON
    SET VERIFY OFF
    SET FEEDBACK ON
    
    PROMPT
    PROMPT Checking database name and archive mode
    PROMPT
    
    column NAME format A9
    column LOG_MODE format A12
    
    SELECT NAME,CREATED, LOG_MODE FROM V$DATABASE;
    
    PROMPT
    PROMPT ------------------------------------------------------------------------|
    PROMPT
    
    PROMPT
    PROMPT Checking free space in tablespaces
    PROMPT
    
    column tablespace_name format a30
    
    SELECT tablespace_name ,sum(bytes)/1024/1024 "MB Free" FROM dba_free_space WHERE
    tablespace_name <>'TEMP' GROUP BY tablespace_name;
    
    PROMPT
    PROMPT ------------------------------------------------------------------------|
    PROMPT
    
    PROMPT
    PROMPT Checking freespace by tablespace
    PROMPT
    
    column dummy noprint
    column  pct_used format 999.9       heading "%|Used"
    column  name    format a16      heading "Tablespace Name"
    column  bytes   format 9,999,999,999,999    heading "Total Bytes"
    column  used    format 99,999,999,999   heading "Used"
    column  free    format 999,999,999,999  heading "Free"
    break   on report
    compute sum of bytes on report
    compute sum of free on report
    compute sum of used on report
    
    set linesize 132
    set termout off
    select a.tablespace_name                                              name,
           b.tablespace_name                                              dummy,
           sum(b.bytes)/count( distinct a.file_id||'.'||a.block_id )      bytes,
           sum(b.bytes)/count( distinct a.file_id||'.'||a.block_id ) -
           sum(a.bytes)/count( distinct b.file_id )              used,
           sum(a.bytes)/count( distinct b.file_id )                       free,
           100 * ( (sum(b.bytes)/count( distinct a.file_id||'.'||a.block_id )) -
                   (sum(a.bytes)/count( distinct b.file_id ) )) /
           (sum(b.bytes)/count( distinct a.file_id||'.'||a.block_id )) pct_used
    from sys.dba_free_space a, sys.dba_data_files b
    where a.tablespace_name = b.tablespace_name
    group by a.tablespace_name, b.tablespace_name;
    
    PROMPT
    PROMPT ------------------------------------------------------------------------|
    PROMPT
    
    PROMPT
    PROMPT Checking Size and usage in GB of Flash Recovery Area
    PROMPT
    
    SELECT
      ROUND((A.SPACE_LIMIT / 1024 / 1024 / 1024), 2) AS FLASH_IN_GB,
      ROUND((A.SPACE_USED / 1024 / 1024 / 1024), 2) AS FLASH_USED_IN_GB,
      ROUND((A.SPACE_RECLAIMABLE / 1024 / 1024 / 1024), 2) AS FLASH_RECLAIMABLE_GB,
      SUM(B.PERCENT_SPACE_USED)  AS PERCENT_OF_SPACE_USED
    FROM
      V$RECOVERY_FILE_DEST A,
      V$FLASH_RECOVERY_AREA_USAGE B
    GROUP BY
      SPACE_LIMIT,
      SPACE_USED ,
      SPACE_RECLAIMABLE ;
    
    PROMPT
    PROMPT ------------------------------------------------------------------------|
    PROMPT
    
    PROMPT
    PROMPT ------------------------------------------------------------------------|
    PROMPT
    
    PROMPT
    PROMPT Checking free space In Flash Recovery Area
    PROMPT
    
    column FILE_TYPE format a20
    
    select * from v$flash_recovery_area_usage;
    
    PROMPT
    PROMPT ------------------------------------------------------------------------|
    PROMPT
    
    PROMPT
    PROMPT ------------------------------------------------------------------------|
    PROMPT
    
    PROMPT
    PROMPT Checking last sequence in v$archived_log
    PROMPT
    
    clear screen
    set linesize 100
    
    column STANDBY format a20
    column applied format a10
    
    --select max(sequence#), applied from v$archived_log where applied = 'YES' group by applied;
    
    SELECT  name as STANDBY, SEQUENCE#, applied, completion_time from v$archived_log WHERE  DEST_ID = 2 AND NEXT_TIME > SYSDATE -1;
    
    prompt
    prompt----------------Last log on Primary--------------------------------------|
    prompt
    
    select max(sequence#) from v$archived_log where NEXT_TIME > sysdate -1;
    
    PROMPT
    PROMPT ------------------------------------------------------------------------|
    PROMPT
    
    PROMPT
    PROMPT Checking switchover status
    PROMPT
    
    select switchover_status from v$database;
    
    PROMPT
    PROMPT ------------------------------------------------------------------------|
    PROMPT
    
    SPOOL OFF
    
    exit
    

    The env file looks like this: (if the file would be PRIMARY.env)

    ORACLE_BASE=/u01/app/oracle
    
    ULIMIT=unlimited
    
    ORACLE_SID=PRIMARY
    
    ORACLE_HOME=$ORACLE_BASE/product/11.2.0.2
    
    ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
    
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
    
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
    
    LIBPATH=$LD_LIBRARY_PATH:/usr/lib
    
    TNS_ADMIN=$ORACLE_HOME/network/admin
    
    PATH=$ORACLE_HOME/bin:$ORACLE_BASE/dba_tool/bin:/bin:/usr/bin:/usr/ccs/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:/usr/lbin:/GNU/bin/make:/u01/app/oracle/dba_tool/bin:/home/oracle/utils/SCRIPTS:/usr/local/bin:.
    
    export EXP_DIR=/u01/oradata/PRIMARY_export
    
    export TERM=vt100
    
    export ORACLE_BASE ORACLE_SID ORACLE_TERM ULIMIT
    
    export ORACLE_HOME
    
    export LIBPATH LD_LIBRARY_PATH ORA_NLS33
    
    export TNS_ADMIN
    
    export PATH
    

    Published by: mseberg on December 9, 2011 18:19

  • Quaries using tablespace temp

    Hi all

    Y at - it a script which gives the
    list of quaries which heavily uses temp tablespace.
    Because my temp tablespace size is 32 GB, use of a few times will go up to 28 GB, and it resets to 0,

    I need to know what quary it runs when the use is at 28 GB.

    Please help me to consider this,

    Kind regards
    VAMSi.

    V$ SORT_USAGE or V$ TEMPSEG_USAGE you can get the details like the session to which, use

    set pagesize 10000
    set linesize 133
    Col tablespace format a15 section "Tablespace name.
    heading col segfile # format 9 999 ' file | ID'
    heading col segblk # format 999 999 999 ' block | ID'
    blocks of col in the form title 999,999,999 'blocks '.
    Col username format a15
    Select b.tablespace, b.segfile #, b.segblk #, b.blocks, a.sid, a.serial #, a.username, a.osuser, a.status
    v $ SESSION a, V$ SORT_USAGE b where a.saddr = b.session_addr order by b.tablespace, b.segfile #, b.segblk #, b.blocks;

  • Names of the TABS as a variable

    Hello
    I have the following query and I want to use it for a tablespace for which the user will be prompted and enter the name of the tablespace. At the moment the name of tablespase is hardcoded "PSINDEX." How to do this?
    set pages 999
    col tablespace_name format a40
    col "size MB" format 999,999,999
    col "free MB" format 99,999,999
    col "% Used" format 999
    select  tsu.tablespace_name, ceil(tsu.used_mb) "size MB"
    ,       decode(ceil(tsf.free_mb), NULL,0,ceil(tsf.free_mb)) "free MB"
    ,       decode(100 - ceil(tsf.free_mb/tsu.used_mb*100), NULL, 100,
                   100 - ceil(tsf.free_mb/tsu.used_mb*100)) "% used"
    from    (select tablespace_name, sum(bytes)/1024/1024 used_mb
            from    dba_data_files group by tablespace_name union all
            select  tablespace_name || '  **TEMP**'
            ,       sum(bytes)/1024/1024 used_mb
            from    dba_temp_files group by tablespace_name) tsu
    ,       (select tablespace_name, sum(bytes)/1024/1024 free_mb
            from    dba_free_space group by tablespace_name) tsf
    where   tsu.tablespace_name = tsf.tablespace_name (+)
    and tsf.tablespace_name='PSINDEX'
    order   by 4;
    Thank you.

    Hello

    To the user at run time input, use SQL * more substitiution variable. Before the query actually implemented, do something like this:

    COLUMN  ...
    
    ACCEPT  my_ts_name PROMPT 'Please enter the tablespace name (e.g. PSINDEX): '
    
    SELECT  ...
    

    If the user enters letters, the value will be tiny cntain, then you'll probably want to use it like this:

    and     tsf.tablespace_name = UPPER ('&my_ts_name')'
    

    Published by: Frank Kulash, June 27, 2011 08:03

  • space free / busy in a tablespace

    Hello
    in 10g R2, I am looking for a query that shows free and occupied space in a tablespace.

    Thanks for the help.
    Tablespace usage
    
    set pages 999
    col tablespace_name format a40
    col "size MB" format 999,999,999
    col "free MB" format 99,999,999
    col "% Used" format 999
    select      tsu.tablespace_name, ceil(tsu.used_mb) "size MB"
    ,     decode(ceil(tsf.free_mb), NULL,0,ceil(tsf.free_mb)) "free MB"
    ,     decode(100 - ceil(tsf.free_mb/tsu.used_mb*100), NULL, 100,
                   100 - ceil(tsf.free_mb/tsu.used_mb*100)) "% used"
    from     (select tablespace_name, sum(bytes)/1024/1024 used_mb
         from      dba_data_files group by tablespace_name union all
         select      tablespace_name || '  **TEMP**'
         ,     sum(bytes)/1024/1024 used_mb
         from      dba_temp_files group by tablespace_name) tsu
    ,     (select tablespace_name, sum(bytes)/1024/1024 free_mb
         from      dba_free_space group by tablespace_name) tsf
    where     tsu.tablespace_name = tsf.tablespace_name (+)
    order     by 4
    /
    

    Source:-http://www.shutdownabort.com/dbaqueries/Structure_Tablespace.php

  • Flash Builder 4.5.1 - Air ApplicationUpdaterUI Auto Update fails

    I just reinstalled my FlashBuilder 4.5.1 and built a new HelloWorld application

    in order to test the SDK version 2.6 with the ApplicationUpdaterUI of the Air.

    I get no errors, but it will not be updated using namespace 2.6 in both - app.mxml and update.xml on the server.

    A stroke in the StatusUpdateEvent never appears in debug mode.

    The only window that opens is one asking to control upgrade?

    Pulling my hair - must be something obvious I am doing wrong here - can a new set of eyes with something?

    Main xml file:

    <? XML version = "1.0" encoding = "utf-8"? >

    " < = xmlns:fx s:WindowedApplication ' http://ns.Adobe.com/MXML/2009 "

    xmlns:s = "library://ns.adobe.com/flex/spark".

    xmlns:MX = "library://ns.adobe.com/flex/mx".

    creationComplete = "checkForUpdate()"; title = "Test Air Updater" >

    < fx:Declarations >

    <! - Place non-visual elements (e.g., services, items of value) here - >

    < / fx:Declarations >

    < fx:Script >

    <! [CDATA]

    Import air.net.URLMonitor;

    Import air.update.ApplicationUpdaterUI;

    Import air.update.events.StatusUpdateErrorEvent;

    Import air.update.events.StatusUpdateEvent;

    Import air.update.events.UpdateEvent;

    import flash.events.ErrorEvent;

    Import mx.controls.Alert;

    Import mx.events.CloseEvent;

    Import mx.events.FlexEvent;

    private const APP_VERSION_FILE:String = " " http://www.public-knowledge.com/Quest/timesheets/new_app_version.XML "; "

    private var appUpdater:ApplicationUpdaterUI = new ApplicationUpdaterUI();

    private function checkForUpdate (): void {}

    Add events

    appUpdater.addEventListener (UpdateEvent.INITIALIZED, onInitialized);

    appUpdater.addEventListener (StatusUpdateErrorEvent.UPDATE_ERROR, onUpdateStatusError);

    appUpdater.addEventListener (StatusUpdateEvent.UPDATE_STATUS, updateStatusHandler);

    appUpdater.addEventListener (ErrorEvent.ERROR, onError); If something is wrong, run onError

    appUpdater.isCheckForUpdateVisible = true;

    appUpdater.isUnexpectedErrorVisible = true;

    appUpdater.isDownloadUpdateVisible = true;

    appUpdater.isDownloadProgressVisible = true;

    appUpdater.isInstallUpdateVisible = true;

    appUpdater.updateURL = APP_VERSION_FILE; XML file server that describes the update

    trace (APP_VERSION_FILE);

    appUpdater.initialize ();

    }

    private void onError(event:ErrorEvent):void {}

    Alert.Show ("ERROR:" + event.toString ());

    }

    private void onUpdateStatusError(event:StatusUpdateErrorEvent):void {}

    Alert.Show ("error checking for updates:" + event.toString ());

    }

    private void onInitialized(event:UpdateEvent):void {}

    trace ("check for updates...");

    appUpdater.checkNow ();

    }

    private void updateStatusHandler(event:UpdateEvent):void {}

    var descriptor: XML = NativeApplication.nativeApplication.applicationDescriptor.

    var ns:Namespace = descriptor.namespaceDeclarations () [0];

    var verNum:String = descriptor.ns::versionNumber;

    trace ("update event reached...'");

    }

    []] >

    < / fx:Script >

    < s:TitleWindow = "63" x y = "35" width = "250" height = "200" title = "Hello" >

    < s:Label x = '24' y = '80' text = "Hello World" / >

    < / s:TitleWindow >

    < / s:WindowedApplication >

    -App.MXML file: (first part)

    <? XML version = "1.0" encoding = "utf-8" standalone = 'no '? >

    " < application xmlns =" http://ns.Adobe.com/air/application/2.6 ">

    <!-adobe AIR Application Descriptor File Template.

    Specifies the ID setting, installation and launch AIR applications.

    xmlns - The Adobe AIR space of names: http://ns.Adobe.com/air/application/2.6

    The last segment of the namespace specifies the version

    the runtime AIR required to run this application.

    minimumPatchLevel - the level of minimum patch of the AIR runtime required to run

    the application. As an option.

    ->

    <!-a universal identifier unique application. Must be unique across all AIR applications.

    By using a reverse DNS type name as id is recommended. (For example. com.example.ExampleApplication.) Mandatory. ->

    CA.questgeomatics.testairapp < id > < /ID >

    <!-used as the application file name. Mandatory. ->

    < file_name > TestAirUpdater < / name of the file >

    <!-the name that is displayed in the AIR application installer.

    Can have multiple values for each language. See the sample or the schema xsd file. As an option. ->

    < name > TestAirUpdater < / name >

    <! - a string value in the format < 0 - 999 >. < 0-999 >. <>0-999 that represents the version of the application that can be used to verify the upgrade request.

    Values can also be parts 1 or 2 items. It is not necessary to have a value of 3 parts.

    A version update of application must have a versionNumber value greater than the previous version. Required for namespace > = 2.5. ->

    < versionNumber > 1.0.0 < / versionNumber >

    <!-a string value (e.g. "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be displayed to users. As an option. ->

    < versionLabel > v 1.0.0 < / versionLabel >

    File XML updater (new_app_version.xml):

    <? XML version = "1.0" encoding = "utf-8"? >

    " < day xmlns =" http://ns.Adobe.com/air/framework/update/description/2.6 ">

    < versionNumber > 1.0.1 < / versionNumber >

    < versionLabel > v 1.01 < / versionLabel >

    < url > http://www.public-knowledge.com/Quest/timesheets/TestAirUpdater.air < / url >

    < description > <! [CDATA]

    * First official release this update feature automatic implemements

    []] > < / description >

    < / update >

    Versions of descriptor bolded appl Post edited by: DonMitchinson

    Update - don't know if it's a bug, faulty design, installation problem or my misunderstanding.

    I managed to do it working first changing that my Flex library to 4.5.0 - still did not work with current

    App and update files mxml by using "2.6" for their versions of namespace. But I did at least

    get the error number 16815 - indicating an error in the namespace version update of popup.

    Leaving my namespace application version to "2.6" and by changing the "2.5" updated version... bingo!

    I got my new autiomatically installed update.

    Is it so it is supposed to work - or my runtimes are mixed?

    It even will work using the Flex SDK 4.5.1? I'll soon find out

    Hope this helps others.

Maybe you are looking for