Segments, extents and data blocks

I'm somewhat green when it comes to Oracle and databases in general, so bare with me. I bought the OCP Exam Guide to try and learn as much as I can. I'm at the chapter about segments, extents and data blocks and I'm having a bit of trouble grasping the conecpts of these. Are these logical? Does anyone have time for quick overview?
Thank you!

Ignoring the O/S, the basic storage unit in Oracle is a block (db_block). You define the size of the block with the db_block_size parameter, and it is effectively fixed at database creation. You can have tablespaces with a different block size from the database default, but we won't go there for now. A db_block is not the sme as an O/S block, so in that sense it is a logical unit.
In Oracle, a segment is anything that takes disc space, generally speaking, a table or an index. Every segment is stored in a tablespace. A segment can only be in one tablespace, but a tablespace can hold many segments. A tablespace gets its space from a data file (an O/S file). Each data file belongs to one tablespace, but a tablespace can have multiple data files.
Each segment is made up a a number of extents. The are the units of space that are allocated to the segment as it needs space. The size of each extent is controlled by either the INITIAL and NEXT parameters in CREATE TABLESPACE or in one of the CREATE <segment> commands. If you are using locally managed tablespaces, the tablespace parameters define the extent sizes. Each extent belongs to only one segment, but a segment can have many extents. Although the extent sizes are defined in bytes, they must be a multiple of the block size.So, if you have an 8K block size, you cannot have a 12K extent size.
So:
An extent is made up of one or more (contiginous) blocks within a data file.
A segment is made up of one or more (possibly non-contiginous) extents possibly in multiple data files.
Note that the blocks in an extent must be contiginous, but that is a logical concept within Oracle, since Oracle has no way of knowing how and where the O/S has actually allocated the physical space, it just has an internal map of the file space allocated by the O/S.
HTH
John

Similar Messages

  • Create Multiple Signature and Date fields with a custom Toolbar Button

    First off, thanks in advance!  I am a scripting newbie and I am trudging my way through with very little experience with scripting of any kind.  I am good at taking other's scripts and forming them into something I need, but I can't seem to find anything to do what I want.
    Using Adobe Acrobat X, I am trying to create a toolbar button that I can press to create multiple signature and date fields with predetermined locations.
    Below is the script I have that is working to create just a single signature box, but I can't seem to figure out the exact syntax to have that same button create multiple fields.  In total it is 9 signature fields and 9 date fields need to be created.  If you can just give me an example of what the button would look like with multiple scripts?  I was assuming I would set up multiple variables and then in the cExec property of the toolbar button I could just call out all of those variables? 
    var sigswm = "addField('sigSWM', 'signature', '0', [108, 198, 494.64, 72])"
    app.addToolButton({cName: "dotbutton", cExec: sigswm, cLabel: "Place Signature and Date Blocks",});
    Thanks in advance for any help you can provide.
    Billy Sweeney

    Thanks!  That was probably the only thing I didn't try.
    I do have one more question.  What I want is when the signature field is clicked it fills out a specific date field. I beleive the script I want would be:
    var currentTime = new Date()
        var month = currentTime.getMonth() + 1
        var day = currentTime.getDate()
        var year = currentTime.getFullYear()
        var signingTime = day +"/"+month+"/"+year
        var f = this.getField("dateSWM"); 
        f.value = signingTime;
    I found this on another thread that mentioned it could be placed in the Signed tab of the signature properties dialog.  I am assuming it would be placed in my button script file as a setAction script for each signature, but I am not real sure exactly where or how?

  • How do I select more records using data blocks, set_block_property

    Hi, I am new in oracle forms builder. I want to fetch more then one records using set_block_property and data block. please help me. How do I select more then one data? I don't have any Idea about Oracle
    Please Help its urgent

    What is your Forms version?  Is your form in "Form" (single record) or "Tabular" (multi-record) layout?  You can't use the SET_BLOCK_PROPERTY() built-in to change the number of records that are displayed - this must be done during design through the Forms Builder.
    What exactly are you needing to do?
    Craig...

  • Data Block, Extents, and Segments in Datafiles

    I'm trying to understand the relationship of Data Blocks, Extents, and Segments in Datafiles. What is the simpliest explanation for their relationships.

    Hi,
    Look at this (might be more readable if you paste it somewhere and use a font with fixed width):
    SQL>CONNECT SYSTEM/MANAGER
    ConnectÚ.
    SQL> CREATE TABLE MyTable
    2 (
    3 CH1 VARCHAR2(10),
    4 CH2 VARCHAR2(10)
    5 ) TABLESPACE TOOLS;
    Table crÚÚe.
    SQL>SELECT * FROM DBA_SEGMENTS WHERE SEGMENT_NAME='MYTABLE';
    OWNER SEGMENT_NAME PARTITION_NAME SEGMENT_TYPE TABLESPACE_NAME HEADER_FILE HEADER_BLOCK BYTES BLOCKS EXTENTS INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE FREELISTS FREELIST_GROUPS RELATIVE_FNO BUFFER_
    SYSTEM MYTABLE TABLE TOOLS 7 1555 65536 16 1 65536 1 2147483645 7 DEFAULT
    SQL> SELECT * FROM DBA_EXTENTS WHERE SEGMENT_NAME='MYTABLE';
    OWNER SEGMENT_NAME PARTITION_NAME SEGMENT_TYPE TABLESPACE_NAME EXTENT_ID FILE_ID BLOCK_ID BYTES BLOCKS RELATIVE_FNO
    SYSTEM MYTABLE TABLE TOOLS 0 7 1553 65536 16 7
    SQL> -- Give it another extent
    SQL> ALTER TABLE MyTable ALLOCATE EXTENT;
    Table modifiÚe.
    SQL> SELECT * FROM DBA_EXTENTS WHERE SEGMENT_NAME='MYTABLE';
    OWNER SEGMENT_NAME PARTITION_NAME SEGMENT_TYPE TABLESPACE_NAME EXTENT_ID FILE_ID BLOCK_ID BYTES BLOCKS RELATIVE_FNO
    SYSTEM MYTABLE TABLE TOOLS 0 7 1553 65536 16 7
    SYSTEM MYTABLE TABLE TOOLS 1 7 1569 65536 16 7
    SQL> -- Note that in this particular case, Both extents are on the same datafile (7), and if you add the block_id (first block in the extent) of the extent 0 (first one) to the number
    SQL> -- of blocks in the extent (16) = 1553 + 16 = 1569 = BLOCK_ID of the second extent (they are physically side by side)
    SQL> -- THIS IS NOT ALWAYS TRUE, AND GENERALLY FALSE!
    SQL>
    SQL> -- Let's dump the first block and see what's in:
    SQL> ALTER SYSTEM DUMP DATAFILE 7 BLOCK 1553;
    SystÞme modifiÚ.
    SQL> -- Now edit the trace file
    /* Content:
    Start dump data blocks tsn: 7 file#: 7 minblk 1553 maxblk 1553
    buffer tsn: 7 rdba: 0x01c00611 (7/1553)
    scn: 0x0000.0007b1fa seq: 0x02 flg: 0x00 tail: 0xb1fa2002
    frmt: 0x02 chkval: 0x0000 type: 0x20=FIRST LEVEL BITMAP BLOCK
    Dump of First Level Bitmap Block
    nbits : 4 nranges: 1 parent dba: 0x01c00612 poffset: 0
    unformatted: 13 total: 16 first useful block: 3
    owning instance : 1
    instance ownership changed at
    Last successful Search
    Freeness Status: nf1 0 nf2 0 nf3 0 nf4 0
    Extent Map Block Offset: 4294967295
    First free datablock : 3
    Bitmap block lock opcode 0
    Locker xid: : 0x0000.000.00000000
    Highwater:: 0x01c00614 ext#: 0 blk#: 3 ext size: 16
    #blocks in seg. hdr's freelists: 0
    #blocks below: 0
    mapblk 0x00000000 offset: 0
    HWM Flag: HWM Set
    DBA Ranges :
    0x01c00611 Length: 16 Offset: 0
    0:Metadata 1:Metadata 2:Metadata 3:unformatted
    4:unformatted 5:unformatted 6:unformatted 7:unformatted
    8:unformatted 9:unformatted 10:unformatted 11:unformatted
    12:unformatted 13:unformatted 14:unformatted 15:unformatted
    End dump data blocks tsn: 7 file#: 7 minblk 1553 maxblk 1553
    SQL> -- Now add 2 lines
    SQL> INSERT INTO MYTABLE VALUES ('ABC','123');
    1 ligne crÚÚe.
    SQL> COMMIT;
    Validation effectuÚe.
    SQL> INSERT INTO MYTABLE VALUES ('DEF','456');
    1 ligne crÚÚe.
    SQL> COMMIT;
    Validation effectuÚe.
    SQL> -- And get the ROWID (absolute line physical position) of these lines
    SQL> SELECT ROWID FROM MYTABLE;
    ROWID
    AAAHotAAHAAAAYfAAA
    AAAHotAAHAAAAYfAAB
    SQL> -- Absolute file number of these 2 lines:
    SQL> SELECT DBMS_ROWID.ROWID_TO_ABSOLUTE_FNO('AAAHotAAHAAAAYfAAA','SYSTEM','MYTABLE') FROM DUAL;
    DBMS_ROWID.ROWID_TO_ABSOLUTE_FNO('AAAHOTAAHAAAAYFAAA','SYSTEM','MYTABLE')
    7
    SQL> SELECT DBMS_ROWID.ROWID_TO_ABSOLUTE_FNO('AAAHotAAHAAAAYfAAB','SYSTEM','MYTABLE') FROM DUAL;
    DBMS_ROWID.ROWID_TO_ABSOLUTE_FNO('AAAHOTAAHAAAAYFAAB','SYSTEM','MYTABLE')
    7
    SQL> -- Both in file 7: no surprise, in the extent.
    SQL> -- Let's be curious and look up the block id:
    SQL> SELECT DBMS_ROWID.ROWID_BLOCK_NUMBER('AAAHotAAHAAAAYfAAA') FROM DUAL;
    DBMS_ROWID.ROWID_BLOCK_NUMBER('AAAHOTAAHAAAAYFAAA')
    1567
    SQL> SELECT DBMS_ROWID.ROWID_BLOCK_NUMBER('AAAHotAAHAAAAYfAAB') FROM DUAL;
    DBMS_ROWID.ROWID_BLOCK_NUMBER('AAAHOTAAHAAAAYFAAB')
    1567
    SQL> -- Both lines are in block number 1567.. look again into the dump from block 1553 (First free datablock : 3)
    SQL> -- Dump the block:
    SQL> ALTER SYSTEM DUMP DATAFILE 7 BLOCK 1567;
    SystÞme modifiÚ.
    SQL>
    /* Content:
    Start dump data blocks tsn: 7 file#: 7 minblk 1567 maxblk 1567
    buffer tsn: 7 rdba: 0x01c0061f (7/1567)
    scn: 0x0000.0007b2fd seq: 0x01 flg: 0x02 tail: 0xb2fd0601
    frmt: 0x02 chkval: 0x0000 type: 0x06=trans data
    Block header dump: 0x01c0061f
    Object id on Block? Y
    seg/obj: 0x7a2d csc: 0x00.7b2f5 itc: 2 flg: E typ: 1 - DATA                                             <--------- Here is the objet ID. 0x7a2d = 31227 (check just below block dump)
    brn: 0 bdba: 0x1c00611 ver: 0x01
    inc: 0 exflg: 0
    Itl Xid Uba Flag Lck Scn/Fsc
    0x01 0x0006.003.000002f8 0x008000b7.0081.06 --U-    1  fsc 0x0000.0007b2f9
    0x02 0x0005.000.000002fd 0x00800099.008f.16 --U-    1  fsc 0x0000.0007b2fd
    data_block_dump,data header at 0x2ff1064
    ===============
    tsiz: 0xf98
    hsiz: 0x16
    pbl: 0x02ff1064
    bdba: 0x01c0061f
    76543210
    flag=--------
    ntab=1
    nrow=2                                                                                                                                                                                              <--------- 2 Lines in the block
    frre=-1
    fsbo=0x16
    fseo=0xf82
    avsp=0xf6c
    tosp=0xf6c
    0xe:pti[0]     nrow=2     offs=0
    0x12:pri[0]     offs=0xf8d
    0x14:pri[1]     offs=0xf82
    block_row_dump:
    tab 0, row 0, @0xf8d
    tl: 11 fb: H-FL lb: 0x1 cc: 2                                                                                                                        <--------- First line header
    col 0: [ 3] 41 42 43                                                                                                                                                      <--------- Here is 'ABC'
    col 1: [ 3] 31 32 33                                                                                                                                                      <--------- Here is '123'
    tab 0, row 1, @0xf82
    tl: 11 fb: H-FL lb: 0x2 cc: 2                                                                                                                        <--------- Second line header
    col 0: [ 3] 44 45 46                                                                                                                                                      <--------- Here is 'DEF'
    col 1: [ 3] 34 35 36                                                                                                                                                      <--------- Here is '456'
    end_of_block_dump
    End dump data blocks tsn: 7 file#: 7 minblk 1567 maxblk 1567
    SQL> SELECT OBJECT_ID FROM DBA_OBJECTS WHERE OBJECT_NAME='MYTABLE';
    OBJECT_ID
    31277
    Sincerely hope this'll help you understand.
    Regards,
    Yoann.

  • Logical units in DB-Tablespace,extent, segments, data blocks

    I understand what are tablespaes,Segments,Extents, data blocks.But i want to know why do we have all these logical seggregations.Does DBA create all these while creating tablespaces?
    Could some one plz explain me the exact concept behind having all these?

    user11365275 wrote:
    I understand what are tablespaes,Segments,Extents, data blocks.But i want to know why do we have all these logical seggregations.Does DBA create all these while creating tablespaces?
    Could some one plz explain me the exact concept behind having all these?You should check and read the link that Helios has given. The DBA is only going to create tablespaces with datafiles added to them. The rest of the things are going to come into as and when the objects are going to get created, either by the DBA or by the end users. To answer why, this is the why oracle lets the dba manage the granularity within the datafile. These are all logical constructs which means, their existence is only within the oracle's own views . In real, its just bunch of files allocating space on the physical hard drive.
    Aman....

  • Ora-01113 and ora-01110 -- Data Block Corruption

    Running 10g no backup and noarchivelog.
    I put the datafile offline so I can bring up the database. Can anyone help me figure out how to fix the Bad datafile?
    Thank You,

    TRACE FILE INFORMATION
    SQL> select pa.value || '/' || i.instance_name || '_ora_'
      2         || pr.spid || '.trc' as trace_file
      3  from v$session s, v$process pr, v$parameter pa, v$instance i
      4  where s.username = user and s.paddr = pr.addr
      5* and pa.name='user_dump_dest';
    TRACE_FILE
    /oracle/admin/ora9i/udump/ora9i_ora_25199.trcDUMPING A TABLE BLOCK
    SQL> select file_id,block_id,bytes,blocks
      2  from dba_extents
      3  where owner='P' and segment_name='EMP';
    FILE_ID   BLOCK_ID            BYTES   BLOCKS
          3          9           65,536        8next is to find out the tablespace name and the datafile...
    SQL> select tablespace_name,file_name from dba_data_files
      2  where relative_fno = 3;
    TABLESPACE_NAME                FILE_NAME
    USER_DATA           /oradata3/ora9i/user_data01.dbfNow that we know which file and blocks hold our table, let’s dump a sample block of the table. This is done as follows:
    SQL> alter system dump datafile 3 block 10;System altered.
    Let’s now look at the contents of dumping one block.
    Start dump data blocks tsn: 3 file#: 3 minblk 10 maxblk 10
    buffer tsn: 3 rdba: 0x00c0000a (3/10)
    scn: 0x0000.00046911 seq: 0x02 flg: 0x04 tail: 0x69110602
    frmt: 0x02 chkval: 0x579d type: 0x06=trans data
    Block header dump:  0x00c0000a
    Object id on Block? Y
    seg/obj: 0x6d9c  csc: 0x00.46911  itc: 2  flg: O  typ: 1 - DATA
         fsl: 0  fnx: 0x0 ver: 0x01
    Itl           Xid                  Uba         Flag  Lck        Scn/Fsc
    0x01   xid:  0x0005.02f.0000010c    uba: 0x00806f10.00ca.28  C---    0  scn 0x0000.00046900
    0x02   xid:  0x0003.01c.00000101    uba: 0x00800033.0099.04  C---    0  scn 0x0000.00046906
    This is the beginning of the data block dump. The first line tells us that we are dumping file#3, starting at block# 10 (minblk), and finishing with block# 10 (maxblk). Had we dumped more than one data block, these values would represent a range. The relative data block address (rdba) is 0x00c0000a. For more information on the rdba, refer to a later section in this paper. At the end of this line, we can see in parentheses that the rdba corresponds to file# 3, block# 10 (3/10).
    The third line describes the SCN of the data block. In our case, the SCN is 0x0000.00046911. The tail of the data block is composed of the last two bytes of the SCN (6911) appended with the type (06) and the sequence (02). If the decomposition of the tail does not match these three values, then the system knows that the block is inconsistent and needs to be recovered. While this tail value shows up at the beginning of the block dump, it is physically stored at the end of the data block.
    The block type shows up on the fourth line. Some of the valid types correspond to the following table:
         Type     Meaning                    
         0x02     undo block
    0x06     table or index data block
    0x0e     undo segment header
         0x10     data segment header block
         0x17     bitmapped data segment headeri hope it will help...

  • Hot Data Block with concurrent read and write

    Hi,
    This is from ADDM Report.
    FINDING 8: 2% impact (159 seconds)
    A hot data block with concurrent read and write activity was found. The block
    belongs to segment "SIEBEL.S_SRM_REQUEST" and is block 8138 in file 7.
    RECOMMENDATION 1: Application Analysis, 2% benefit (159 seconds)
    ACTION: Investigate application logic to find the cause of high
    concurrent read and write activity to the data present in this block.
    RELEVANT OBJECT: database block with object# 73759, file# 7 and
    block# 8138
    RATIONALE: The SQL statement with SQL_ID "f1dhpm6pnmmzq" spent
    significant time on "buffer busy" waits for the hot block.
    RELEVANT OBJECT: SQL statement with SQL_ID f1dhpm6pnmmzq
    DELETE FROM SIEBEL.S_SRM_REQUEST WHERE ROW_ID = :B1
    RECOMMENDATION 2: Schema, 2% benefit (159 seconds)
    ACTION: Consider rebuilding the TABLE "SIEBEL.S_SRM_REQUEST" with object
    id 73759 using a higher value for PCTFREE.
    RELEVANT OBJECT: database object with id 73759
    SYMPTOMS THAT LED TO THE FINDING:
    SYMPTOM: Wait class "Concurrency" was consuming significant database
    time. (4% impact [322 seconds])
    what does it mean by hot block with concurrent read and write??
    is rebuilding the table solves the problem as per addm report?

    Hi,
    You must suffer from buffer busy waits.
    When a buffer is updated, the buffer will be latched, and other sessions can not read it or write it.
    You must have multiple sessions reading and writing that one block.
    Recommendation 2 results in fewer records per block, so less chance multiple sessions are modifying and reading 1 block. It will also result in a bigger table.
    The recommendation doesn't make sense for tablespaces with segment storage management auto, as for those tablespaces pctfree does not apply.
    Buffer busy waits will also occur if the blocksize of your database is set too high.
    Sybrand Bakker
    Senior Oracle DBA

  • Hiding organization data and partner block in IC_AGENT role

    Hello,
       For  Business role : IC_AGENT and under  Work Center  : Interaction record ,we have a screen with three different blocks:
       Overview  Organizational Data  Partner.
       My requirement is to hide Organization Data and Partner block.
       Please suggest how can i do that?
       Regards
       Najm

    Hello Najm,
    for the same purpose I've done in the following way.
    Enhance component ICCMP_BT_INR in BSP_WD_CMPWB if it's not been done yet.
    Enhance view InrHeaderViewSet if it's not been done yet.
    In view controller implementation class for this view (in my case it was ZL_ICCMP_BT_INRHEADERVIEW_IMPL) redefine GET_TAB_LINK_TABLE method in the following way:
    METHOD get_tab_link_table.
    CONSTANTS: c_orgdata TYPE string VALUE 'InrOrgData.BTORGSET/OrgSet',
                c_partner TYPE string VALUE 'InrPartnerId.MainWindow'.
    CALL METHOD super->get_tab_link_table
       RECEIVING
         rt_result = rt_result.
    * hide org. data tab
    DELETE rt_result WHERE id CP c_orgdata.
    * hide partners tab
    DELETE rt_result WHERE id CP c_partner.
    ENDMETHOD.
    Other way is:
    Enhance component ICCMP_BT_INR in BSP_WD_CMPWB if it's not been done yet.
    Go to Runtime Repository Editor there.
    Delete InrPartnerId.MainWindow and InrOrgData.BTORGSET/OrgSet views from the viewarea Header of the ICCMP_BT_INR/InrHeaderViewSet.
    But personally I've preffered first one. Just to remember what was actually there in standard.

  • Data Concurrency and Consistency ( SCN , DATA block)

    Hi guys, i am getting very very very confused about how oracle implement consistency / multiversioning with regards to SCN in a data block and transaction list in the data block..
    I will list out what i know so you guys can gauge me on where i am..
    When a SELECT statement is issued, SCN for the select query is determined. Then Blocks with higher SCN are rebuilt from the RBS.
    Q1) The SCN in the block implied here - is it different from the SCNs in the transaction list of the block ? where is this SCN store ? where is the transaction list store ? how is the SCN of the block related with the SCNs in the transaction list of the block ?
    Q2) can someone tell me what happen to the BLOCK SCN and the transaction list
    of the BLOCK when a transaction start to update to a row in the block occurs.
    Q3) If the BLOCK SCN reflects the latest change made to the block and If the SCN of the block is higher then the SCN of the SELECT query, it means that the block has change since the start of the SELECT query, but it DOESNT mean that the row (data) that the SELECT query requires has changed.
    Therefore why cant ORACLE just check to see whether the row has changed and if it has, rebuilt a block from the RBS ?
    Q4) when ORACLE compares the BLOCK SCN, does it only SCAN for the BLOCK SCN or does it also SEARCH through the TRANSACTION LIST ? or it does both ? and why ?
    Q5) is transaction SCN same as Transaction ID ? which is store in the RBS , the transaction SCN or ID ?
    Q6) in short i am confuse with the relationship between BLOCK SCN, transaction list SCN, their location, their usage and relationship of the BLOCK SCN and transaction list when doing a SELECT, their link with RBS..
    any gurus clear to give me a clearer view of what is actually happening ?

    Hi Aman
    Hmm agreed.So when commit is issued , what happens at that time?Simply put:
    - The SCN for the transaction is determined.
    - The transaction is marked as committed in the undo header (the commit SCN is also stored in the undo header).
    - If fast cleanout takes place, the commit SCN is also stored in the ITL. If not, the ITL (i.e. the modified data blocks) are not modified.
    So at commit, Oracle will replace the begin scn in the ITL with this scn
    and this will tell that the block is finally committed is it?The ITL does not contain the begin SCN. The undo header (specifically the transaction table) contains it.
    I lost here.In the ITL , the scn is transaction SCN or commit scn?As I just wrote, the ITL contains (if the cleanout occured) the commit SCN.
    This sounds like high RBA information?What is RBA?
    Commit SCNThis is the SCN associated with a committed transaction.
    Begin SCNThis is the SCN at which a transaction started.
    Transaction SCNAs I wrote, IMO, this is the same as the commit SCN.
    Also please explain that what exactly the ITL stores?If you print an ITL slot, you see the following information:
    BBED> print ktbbhitl[0]
    struct ktbbhitl[0], 24 bytes     @44
          struct ktbitxid, 8 bytes    @44
             ub2 kxidusn              @44       0x0009
             ub2 kxidslt              @46       0x002e
             ub4 kxidsqn              @48       0x0000fe77
          struct ktbituba, 8 bytes    @52
             ub4 kubadba              @52       0x00800249
             ub2 kubaseq              @56       0x3ed6
             ub1 kubarec              @58       0x4e
          ub2 ktbitflg                @60       0x2045 (KTBFUPB)
          union _ktbitun, 2 bytes     @62
             b2 _ktbitfsc             @62       0
             ub2 _ktbitwrp            @62       0x0000
          ub4 ktbitbas                @64       0x06f4c2a3- ktbitxid --> XID, the transaction holding the ITL slot
    - ktbituba --> UBA, used to locate the undo information
    - ktbitflg --> flags (active, committed, cleaned out, ...)
    - _ktbitfsc --> free space generated by this transaction in this block
    - _ktbitwrp+ktbitbas --> commit SCN
    HTH
    Chris

  • Data block and push button

    Hi
    I have a data block where I need that the first two items are a push button.
    Now when user want to insert a new record, if you have a text item, since the cursor is in the text item, you can enter a new record.
    Now with the push button, I cannot click on it before i click on a text item (which in fact create the new line)
    How to have a push button which is able to create a new record like a text item does?

    In fact the original problem is :
    if you have a row in a data block that start with a push button. and then many text item, you are obliged to put the cursor on one text item of a new record to get the button working. The button is by default disable and cannot be used to create a new record.
    If I put the button as a default button, the query is not executed. That the original problem

  • Space utilization and optimal row size in Data Blocks in Oracle 11g

    Hi,
    My main concern till now is to find the Optimal no. of rows/tuples per one oracle data block of size 8192. For that purpose i'm doing different kind of testing.
    I created one table:
    SQL> create table t5
    2 (x char(2000));
    Table created.
    Inserted 4 rows in it.
    Queried to check in which block no's these 4 rows exist.
    SQL> SELECT x,DBMS_ROWID.ROWID_BLOCK_NUMBER(rowid) "Block No."
    2 from t5;
    x Block No.
    A 422
    B 422
    C 422
    D 423
    SQL> analyze table t5 compute statistics;
    Table analyzed.
    SQL> select LOGGING,BACKED_UP,NUM_ROWS,BLOCKS,EMPTY_BLOCKS, AVG_SPACE,CHAIN_CNT, AVG_ROW_LEN
    2 from user_tables
    3 where table_name = 'T5';
    LOG B NUM_ROWS BLOCKS EMPTY_BLOCKS AVG_SPACE CHAIN_CNT AVG_ROW_LEN . YES N 4 5 3 6466 0 2006 .
    8 data blocks are initially allocated. but my question is that while creating table of even small sizes, every time i'm seeing that it shows BLOCKS (used) are 5.
    why 3 block are EMPTY_BLOCKS allocated all the time?
    AVG_SPACE is the FREE space in every BLOCK that is used if i'm not wrong?
    In this scenerio 3 rows (each of around 2006 bytes) are inserted into into one BLOCK of 8192 i.e. 8192-6006=2186. 2186 is the PCTFREE or what?
    How can I see this CHAIN_CNT column value other than 0?
    How can actually I find the optimal no. of rows/tuples in 1 data block that will not increase OVERHEAD on the system.
    I'll highly appreciate the genuine help and solid suggestions.
    Thanks in Advance.
    Best Regards,
    Kam

    kamy555 wrote:
    If you want to suggest something it'll be nice of yo.I can't disclose my main concern :)If you can't disclose what you mean by "optimal" and you can't disclose what "overhead" you are concerned about, I'm not sure that anyone could answer your question.
    In this scenerio 3 rows (each of around 2006 bytes) are inserted into into one BLOCK of 8192 i.e. 8192-6006=2186. 2186 is the PCTFREE or
    what?PCTFREE is a percentage. You haven't specified what you set it to, but that decreases the space in a block available for inserts to 8192 * (1 - PCTFREE/100).
    How can I see this CHAIN_CNT column value other than 0?Why do you believe there would be chained rows? You would need to use the ANALYZE command to populate the CHAIN_CNT column.
    How can actually I find the optimal no. of rows/tuples in 1 data block that will not increase OVERHEAD on the system.Since you can't disclose what "optimal" means or what "overhead" you're concerned with, I don't see how this question could be answered.
    Justin

  • Query Execution/Elapsed Time and Oracle Data Blocks

    Hi,
    I have created 3 tables with one column only. As an example Table 1 below:
    SQL> create table T1 ( x char(2000));
    So 3 tables are created in this way i.e. T1,T2 and T3.
    T1 = in the default database tablespace of 8k (11g v11.1.0.6.0 - Production) (O.S=Windows).
    T2 = I created in a Tablespace with Blocksize 16k.
    T3 = I created in a Tablespace with Blocksize 4k. In the same Instance.
    Each table has approx. 500 rows (So, table sizes are same in all the cases to test Query execution time ). As these 3 tables are created under different data block sizes so the ALLOCATED no. of data blocks are different in all cases.
    T1  =   8k  = 256 Blocks =  00:00:04.76 (query execution time/elapsed time)
    T2  = 16k=121 Blocks =  00:00:04.64
    T3 =   4k =  490 Blocks =  00:00:04.91
    Table Access is FULL i.e. I have used select * from table_name; in all 3 cases. No Index nothing.
    My Question is why query execution time is nearly the same in all 3 cases because Oracle has to read all the data blocks in each case to fetch the records and there is a much difference in the allocated no. of blocks ???
    In 4k block size example, Oracle has to read just 121 blocks and it's taking nearly the same time as it's taking to read 490 blocks???
    This is just 1 example of different data blocks. I have around 40 tables in each block size tablespace and the result are nearly the same. It's very strange for me because there is a much difference in the no. of allocated blocks but execution time is almost the same, only difference in milliseconds.
    I'll highly appreciate the expert opinions.
    Bundle of thanks in advance.
    Best Regards,

    Hi Chris,
    No I'm not using separate databases, it's 8k database with non-standard blocksizes of 16k and 4k.
    Actually I wanted to test the Elapsed time of these 3 tables, so for that I tried to create the same size
    tables.
    And how I equalize these is like I have created one column table with char(2000).
    555 MB is the figure I wanted to use for these 3 tables ( no special figure, just to make it bigger than the
    RAM used for my db at the db startup to be sure of not retrieving the records from cache).
    so row size with overhead is 2006 * 290,000 rows = 581740000(bytes) / 1024 = 568105KB / 1024 = 555MB.
    Through this math calculation I thought It will be the total table size. So I Created the same no. of rows in 3 blocksizes.
    If it's wrong then what a mes because I was calculating tables sizes in the same way from the last few months.
    Can you please explain a little how you found out the tables sizes in different block sizes.Though I understood how you
    calculated size in MB from these 3 block sizes
    T8K =97177 BLOCKS=759MB *( 97177*8 = 777416KB / 1024 = 759MB )*
    T16K=41639 BLOCKS=650MB
    BT4K=293656 BLOCKS=1147MB
    For me it's new to calculate the size of a table. Can you please tell me then how many rows I can create in each of
    these 3 tables to make them equal in MB to test for elapsed time.
    Then I'll again run my test and put the results here. Because If I've wrongly calculated table sizes then there is no need to talk about elapsed time. First I must equalize the table sizes properly.
    SQL> select sum(bytes)/1024/1024 "Size in MB" from dba_segments> 2 where segment_name = 'T16K';
    Size in MB
    655
    Is above SQL is correct to calculate the size or is it the correct alternative way to your method of calculating the size??
    I created the same table again with everything same and the result is :
    SQL> select num_rows,blocks from user_tables where table_name = 'T16K';NUM_ROWS BLOCKS
    290000 41703
    64 more blocks are allocated this time so may be that's y it's showing total size of 655 instead of 650.
    Thanks alot for your help.
    Best Regards,
    KAm
    Edited by: kam555 on Nov 20, 2009 5:57 PM

  • Data Blocks and the Elapsed Time

    Hi,
    I have created 3 tables with one column only. As an example Table 1 below:
    SQL> create table T8k( x char(2000));
    So 3 tables are created in this way i.e. T8k,T16K and T4K
    T8 = in the default database tablespace of 8k (11g v11.1.0.6.0 - Production) (O.S=Windows).
    T16 = I created in a Tablespace with Blocksize 16k.
    T4K = I created in a Tablespace with Blocksize 4k. In the same Instance.
    Each table has 290,000 rows and all the 3 tables have equal size of 555MB (2006(rowsize with overhead) * 290,000/1024/1024 = 555MB) to test Elapsed Time (set timing on).
    As these 3 tables are created under different block sizes so the allocated no. of data blocks are different as below:
    T8K = 97177 BLOCKS= 00:41:20.21 (Elapsed Time)
    T16K=41639 BLOCKS= 00:44:11.59
    BT4K=293656 BLOCKS=00:37:29.06
    Please note the difference. First table i.e. 8k block size, allocated blocks are 97177 and taking around 41 mins. Third table i.e. BT4K (in a 4k block size tablespace), allocated blocks(293656 ) are almost 3 times bigger, taking around 37 mins to execute the query. I mean the difference is only 4 mins hardly and blocks difference is 3 times.
    In case of any doubt, I've created these tables bigger than the memory used for my db(memory_max_size 408M) i.e. 555 MB that If Blocks are already in cache then reading the blocks and counting the rows will nearly be the same regardless of the block sizes or the number of blocks.
    Need solid suggestions and if possilble, links also which has some serious discussions regarding my issue.
    Bundle of thanks.
    Best Regards,

    Because I was not completely satisfied with the things last time. It doesn't seem so simple to me as people said
    I thought may some guru have a look today, not just to point out that i have created it again.
    And I have compact my question to avoid confusion.

  • Data Blocks - Different data source for Query  and DML

    Would anyone please tell me if it is possible in a BLOCK to define a stored procedure for queriying and a table for DML operations or vice-versa at the SAME time.
    If possible how do you do it using DATA BLOCK WIZARD? If you select your block to be based on stored procedure then it gives only stored procedure options for Querying and DML operations in next few screens.
    Also, suppose I used a stored procedure defined in a block for insert operations, is it implicitly called by INSERT RECORD function key in default menu? How does it take values from different fields on its own?

    Hi Deepon,
    We get data from both BSIK(open items)and BSAK (cleared items). Obviously if a accounting doc is not cleared it would be in open items and vice versa..
    Go through the help link for more information..
    http://help.sap.com/saphelp_bw33/helpdata/en/90/10e73a86e99c77e10000000a114084/frameset.htm
    Regards
    Manga(Assign points if it helps)
    Message was edited by: Manga

  • Relationship between a data block and latch

    Hello Experts,
    I have just read an article about indexes and full table scan by Richard Foote. http://richardfoote.wordpress.com/2009/04/16/indexes-on-small-tables-part-i-one-of-the-few/
    I thought each block required only one latch for each operation. However, I don't undersand that why a single block required 2 latch? The qoute is the following,
    Note that yes indeed, there were 4 consistent gets performed and that none of the consistent gets were the “cheaper” consistent gets examinations. Therefore, the 4 consistent gets used in performing the FTS of the one block table required 4 x 2 = 8 latches.
    Can anyone explain the above quote please?
    Thanks in advance.

    Jonathan Lewis wrote:
    Solomon Yakobson wrote:
    Read Concepts manual. Database Buffer Cache in particular:Every buffer has an access mode: pinned or free (unpinned).
    I hope the manual doesn't use the word "free" as a synonym for "unpinned", since a buffer (header) with state = "free" is one that doesn't hold a copy of a datablock and is therefore immediately available for re-use.
    Regards
    Jonathan Lewis
    Hello Sir,
    I have just read Memory Architecture document, buffer states part, I know the meaning of dirty buffers. However, when we just SELECT any table, the corresponding data blocks that read into memory from disk, are they considered as clean buffers? Because as far as I understand from dirty buffers, these are modified buffers. And maybe the manual should have used "clean" instead of "free"?
    The database uses a sophisticated algorithm to make buffer access efficient. Pointers to dirty and nondirty buffers exist on the same least recently used (LRU) list, which has a hot end and cold end. A coldbuffer is one that has not been recently used. A hot buffer is frequently accessed and has been recently used
    Also the above statement is excerpt from Oracle Memory Architecture document, does the nondirty buffers refer to data blocks that move to the memory in SELECT query?
    Thanks a lot for your remarkable thoughts.

Maybe you are looking for

  • If you take it out of the shop ..you are on your own buddy

    sorry if this is posted in the wrong place..? I am about to buy my first ever Apple Mac ( iMac ) when the current freezing / screen problems have been resolved as a total newbie to the world of Mac's , I would like to walk into the Apple Store, and b

  • A dual 2 GHz M9032LL/A G5 needs a new graphics card

    I have a ATI Radeon 9600 Pro card (ROM revision 113-A13601- 126) in there now, but the card is failing. There's a temperature sensitive element and I need to put a blow dryer on the graphics card to wake it up. After it's up it runs fine, but dealing

  • Help me in creating script to check rows in a table

    Hi, I want to write a shell script which should run the sql statement (select count(*) from TRACKNTRACE.SSA_REPL_LOG;), and if the count(*) exceeds 600000, the error should be generated in alert log as : ORA-ERGO:"Golspie,Prodamp TRACKTRACE too high

  • Entry missing in sxmb_moni

    Hi, My interface recived meeages through http and uses a BPM for some other synchronous calls in the flow. We were testing negative test cases and asked the sender system to send a wrongly formatted message. but the problem now is that a message that

  • Sub reports in crystal reports

    Hi All, I have a report where I am using a on demand sub report as in this thread calling a report Now my user is viewing this report from a java application. So whenever he run the report he will view this output in PDF format. The data will come li