How does oracle write to datafiles in a tablespace?

hi all
Suppose I have a tablespace consisting of two datafiles. When I need to wirte data onto it,how does ORACLE
write ? Does it initially write to the first datafile and then write to the second datafile when the first datafile getting full or write to two datafiles in an random manner?
Thanks for your reply.

hi all
I have read reply in reponse to thread "tablespaces or datafile " and testcase in that thread shows that ORACLE will write to datafiles in round-robin manner.
But my test show totally different result:
SQL>
SQL> create tablespace ts_maoxl
2 datafile '/crash/oradata/TESTDB/datafile/1.bdf' size 5m,
3 '/crash/oradata/TESTDB/datafile/2.bdf' size 5m
4 EXTENT MANAGEMENT LOCAL;
Tablespace created
SQL>
SQL> create table maoxl(id char(2000),id3 char(2000),id2 char(2000)) tablespace ts_maoxl;
Table created
SQL>
SQL> declare
2 begin
3 for i in 0..99 loop
4 insert into maoxl values('x','y','z');
5 end loop;
6 commit;
7 end;
8 /
PL/SQL procedure successfully completed
SQL> select count(*) from maoxl;
COUNT(*)
100
SQL> select t.file_id,t.extent_id,bytes from dba_extents t where tablespace_name='TS_MAOXL';
FILE_ID EXTENT_ID BYTES
5 0 65536
5 1 65536
5 2 65536
5 3 65536
5 4 65536
5 5 65536
5 6 65536
5 7 65536
5 8 65536
5 9 65536
5 10 65536
5 11 65536
5 12 65536
5 13 65536
14 rows selectedAll extents are allocated from datafile 5,none from datafile 6. My result is different from yours.
BTW,The result of my testcase was from a 10.2.0.4 database running on HP-UNIX
What could be the problem?
thanks

Similar Messages

  • When does oracle write into datafile

    Hi,
    I have the following doubt, when does oracle server process write the data into datafiles,
    is it done after the commit statement or is it done only when the session is closed or is it done only when the database is closed???

    http://www.managedventures.com/images/How_does_DBWR_work.pdf
    Rgds.

  • How does oracle initialize datafile?

    Hi,
    Does anyone know how oracle initialize a datafile? In the following command, does oracle writes zeros to the 5MB datafile?
    # create tablespace test_ts datafile '/u01/oracle/data.dbf' size 500M;
    Thanks,
    R-

    Hi,
    With two consecutive posts stating that the 0's aren't really 0's I feel the need to check my results, so now I reproduced my test case but now with a 300M datafile, it took nearly 80 seconds in my OEL 5.2 (VMWare Workstation), then I checked the contents with bvi and after the header only 0's, then shred again (it took less than 10 seconds) and then bvi again and the contents are random data. Then I created the tablespace again, well assuming the file is already created and it's only a matter of marking in some place that the contents should be interpreted as "empty" space without actually zeroing the file, the creation of the datafile reusing the already existing datafile should take a few seconds, but really took the same 80 seconds it took the first time, so or Oracle is really slow creating the header or it's actually zeroing the contents (or delegating this task to the OS, I don't know). Now I see you're talking about an ascii 0 (hex 30) and I'm talking about a hex 0 (null), in that case yes, they aren't ascii 0's. Then to sumarize, the OP asked if Oracle writes zeros to the datafile and my answer is: when the datafile is create Oracle formats the contents writing zeros, but hex zeros not ascii zeros, the blocks actually don't contain user info but they're now prepared to receive it.
    Enrique
    PS: http://en.wikipedia.org/wiki/Hex_editor
    >
    By using a hex editor, a user can see or edit the raw and exact contents of a file as opposed to the interpretation of the same content that other, higher level application software may associate with the file format. For example, this could be raw image data, in contrast to the way image editing software would interpret the same file.>
    Edited by: Enrique Orbegozo on Oct 21, 2008 7:20 AM
    Edited by: Enrique Orbegozo on Oct 21, 2008 7:25 AM

  • How does oracle suggest the archive log

    Hi All,
    My question is about user managed backup and recovery.
    For User managed hot database refreshes.
    We  create a new controlfile and do cancel based recovery.
    How does oracle suggest the next archive to apply when we do "recover database using backup controlfile until cancel;"
    I mean we created a new control file ..rt.
    where is the information about the archivelogs stored.
    Thanks,
    Silver

    In the controlfile.
    The "using backup controlfile" means using a backed up controlfile, and you want to fool Oracle into thinking a point in time recovery will happen so don't use what would be the controlfiles current scn time to automatically say the recovery is complete.  If you have created a new controlfile, all it can know about is where the logs should be and compare to what log sequences the datafile headers have.  So it uses the init.ora parameters and what the data file headers have in them to figure it out. http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:3151992035532#36651366990046
    If you backup controlfile to trace you can see log files that have the incarnation history.  See "Recovering Through a RESETLOGS with a Created Control File"  in Performing User-Managed Recovery: Advanced Scenarios

  • How does oracle know the databse is inconsistent and needs recovery?

    Hello,
    How does Oracle know that the datafiles are inconsistent and db needs recovery when rebuilding the db off of the online/hot backups? Whereas, it doesn’t ask for recovery when rebuilding the database from cold backup (I understand that, for cold backup, database is shutdown immediate and hence the db is consistent). In both scenarios, a new control file is created (that means it won’t have SCN) and only datafile header will have the SCN. What’s that piece of info that oracle check to know if the database is consistent or inconsistent during the backup restore and recovery and where that info resides?
    Thank you for any hints and answers.
    Jay

    Oracle uses the datafiles to identify if they are consistent. If the datafiles backup was taken when the database was OPEN, they are marked as "fuzzy" in the header. Also, likely, the Checkpoint SCNs may be different if tablespace checkpoints (e.g. by ALTER TABLESPACE BEGIN BACKUP) are at different points in time.
    If the backup was a cold backup with the database shutdown normal/immediate, the headers are marked appropriately.
    When you run CREATE CONTROLFILE, it has to read the datafiles because the controlfile, itself, has no SCN and LogSequenceNumbers information.
    Hemant K Chitale

  • How does Oracle hanlde I/O error

    I've setup an Oracle RAC using four Linux RH hosts connected with fiber channel to a DS4700 disk array.
    In case of a failover between the FC paths it could happen that a disk I/O request return error. How does Oracle handle that, will Oracle retry the error ?

    There are several possibilities to stripe a tablespace.
    You can create
    a) an ORACLE Tablespace with several datafiles
    b) an OS mountpoint which has striped several disks
    If you've an existing tablespace and want to stripe this tablespace with ORACLE than you can create an additional tablespace wtih several datafiles which are on different disks. After this you can use
    - imp/exp
    - CTAS
    - online redifinition
    to copy the tables to the tablespace.
    You should also consider that you've a less safe system if you have several disks which are not mirrored or on a RAID 5 system.

  • HT201991 How does one write a review for an app?

    I would like to write a review for an app I bought from the App Store.
    "Locate the item that you would like to write a review for."
    Where? In the App Store via the internet (e.g. on my iMac), OR via the App Store button on my iPad Mini?
    "Click "Write a Review" in the Customer Reviews section."
    How? I could find no active link associated with the Customer Reviews section once I had located the item for which I wanted to write a review.
    So the question remains "How does one write a review for an app?" … and, so far as things stand, the instructions provided in the page <http://support.apple.com/kb/ht3928> are, as far as I can tell useless. Certainly, the Apple website and associated instructions have become, for this long-time user, more akin to Microsoft Windows in their impenetrable lack of intuitive, user-friendly ccharacter.
    Oh yeh. To add to my 'disgruntledness' … How come there is no iPad Mini option in the Product drop down below?
    Where is Steve Jobs when you need him?!

    I have been having this issue for months, now--at least 3-4.  I updated my credit card info on my account, thinking maybe that would do it, but NOPE--can't review a single thing I've ever purchased in iTunes--not from my iPhone 5, PC or iPad 2.  Ridiculous, at this point...just remove the ability to review at all, if this is how it's going to be. SO frustrating.

  • How does oracle know which AO Framework page or process to execute.

    Hi,
    How does oracle know which AO Framework page or process to execute. I use to think this was defined in the Function definition. But looking through some Function definition in HRMS setup I noticed some of them simply calling the same first page, such as the one below used in many managers menus. This initial page is the page that allows managers to choose the employee they want to work on.
    OA.jsp?akRegionCode=HR_PERSON_TREE_TOP_SS&akRegionApplicationId=800.
    My question is, after executing this initial page, how does Oracle then varies the OA page by the diffferent functions?

    Hi;
    Thanks for sharing
    Please dont forget to change thread status to answered if it possible when u belive your thread has been answered, it pretend to lose time of other forums user while they are searching open question which is not answered,thanks for understanding*
    Regard
    Helios

  • How does Oracle client communicate with a database server

    Looking to idenify how Oracle Database Client for OpenVMS communicates with database server and whether the protocol used is secure. Realize that it is using whatever the configured network protocol is (ie. tcpip) but is languauge it uses ( ie. SQL, etc..)  secured/encrypted and if not what steps can be taken to encypt

    Arizuddin wrote:
    I have installed oracle client 10g on client pc for getting connection to Oracle databse 10g (runng on windows server) usng ODBC through SAGE ACC PAC (ERP). Working fine earlier. Now all of a suddent user starts complaining about database connection. When checked his pc registry values. Two values of ODBC keys are reset to null. Those are DSN and DRIVER values. How come this values reset to null? What is causing this to reset?Nothing in this has anything to do with the sever. You need to check what the client did on his machine that caused registry to get modified?
    How does oracle ODBC works with Oracle database? Need to know all the steps involved?The connectoin from any client is initiated by a client process. This client process is supposed to get a server process to do his work. So if this is done, the client can work now with oracle . Please see the concepts guide for the gory details of the entire process.
    HTH
    Aman....

  • How does Oracle AIA pull details from SOA Suite on installation?

    Quite urgent help:
    How does Oracle AIA pull details from SOA Suite during installation?
    We're encountering an issue with installation of Oracle AIA at step 4. This when providing the SOA Server Details, and the managed server shows:
    "Cannot Connect to Server" error.
    However at the weblogic console, the Admin server and manage server: soa_server1 are running. Please provide us help on this.
    For further details, here are the apps and versions we installed:
    * Oracle Fusion Middleware 11g
    * SOA suite
    * Oracle AIA 11g
    * Weblogic 10.3.4.0
    Thanks!
    -tristan
    Edited by: user8089513 on May 16, 2011 4:58 AM

    Hello,
    Thanks for the reply!
    On my end, i haven't started it yet today, it just leads me to this message when running node manager:
    +<May 17, 2011 3:40:51 PM GMT+08:00> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true>+
    +<May 17, 2011 3:40:52 PM> <INFO> <Secure socket listener started on port 5556, host /10.234.182.26>+
    May 17, 2011 3:40:52 PM weblogic.nodemanager.server.SSLListener run
    INFO: Secure socket listener started on port 5556, host /10.234.182.26
    Should you need to check the nodemanager.properties, here are the details:
    #Fri May 13 10:56:04 GMT+08:00 2011
    DomainsFile=C\:\\Oracle\\MIDDLE~1\\WLSERV~1.3\\common\\NODEMA~1\\nodemanager.domains
    LogLimit=0
    PropertiesVersion=10.3
    DomainsDirRemoteSharingEnabled=false
    #javaHome=C\:\\Oracle\\MIDDLE~1\\JROCKI~1.1-3
    #JavaHome=C\:\\Oracle\\MIDDLE~1\\JROCKI~1.1-3\\jre
    JavaHome=C\:\\Oracle\\MIDDLE~1\\JDK160~21\\jre
    javaHome=C\:\\Oracle\\MIDDLE~1\\JDK160~21
    AuthenticationEnabled=true
    NodeManagerHome=C\:\\Oracle\\MIDDLE~1\\WLSERV~1.3\\common\\NODEMA~1
    LogLevel=INFO
    DomainsFileEnabled=true
    StartScriptName=startWebLogic.cmd
    ListenAddress=10.234.182.26
    NativeVersionEnabled=true
    ListenPort=5556
    LogToStderr=true
    SecureListener=true
    LogCount=1
    DomainRegistrationEnabled=false
    StopScriptEnabled=true
    QuitEnabled=false
    LogAppend=true
    StateCheckInterval=500
    CrashRecoveryEnabled=false
    StartScriptEnabled=true
    LogFile=C\:\\Oracle\\MIDDLE~1\\WLSERV~1.3\\common\\NODEMA~1\\nodemanager.log
    LogFormatter=weblogic.nodemanager.server.LogFormatter
    ListenBacklog=50
    When I check the weblogic console, i manually run the managed server using startManagedWebLogic.cmd.
    Please advise. Do really need help on this.
    Thanks!
    -tristan

  • HT204266 How does one write an app  review

    How does one write an app review? I don't see anywhere to enter one in the store

    On the left Sidebar, it's under Devices when you connect iPhone to computer iTunes.
    If iPhone not recognise on Mac iTunes :
    Mac: http://support.apple.com/kb/TS1591

  • How does Oracle EM support WBEM

    How does Oracle Enterprise Manager suport Web Based Enterprise Manager (WBEM) and more specifically Windows Management Instrumentation (WMI). Is there a provider for these?

    There are already target-types/integration solutions available for these target-types in Oracle EM. Any reason you are not able to take advantage of the same ?
    For web-services, you should find answer to your query in Section 7 of the latest Extensibility guide (10.2.0.5). Also, refer to the section 10 on out-of-box fetchlets (in specific section 10.4 on URL Timing and section 10.10 on OJMX/SOAP fetchlet).
    The extensibility guide can be downloaded from here .

  • How does Oracle Database compare with IBM DB2?

    Hi
    thank you for reading my post
    How Does ORACLE Database compare with IBM DB2 ?
    Which one has better performance with similar workload?
    Which one perform better on System Z hardware and z/OS?
    Is there any document that compare these two product?
    Thanks.

    Hi
    The below link may useful to you.
    http://www.oracle.com/technology/deploy/availability/pdf/CWP_HA_Oracle10gR2_DB28.2.pdf
    With best regards
    Shan

  • How does oracle execute a correlated subquery .... some confusion

    How does oracle 10g execute a correlated subquery?
    I read some articles online & i am a little confused.
    example:
    select * from emp e
    where e.deptno in (select d.deptno from dept d
    where e.deptno = d.deptno);
    My questions .......
    1.In the above example, does oracle read the entire outer table first and then run the inner query using the rows returned by the outer query?
    I read in some articles that they execute simultaneously.
    How does this work?
    2.Should the inner query have lesser amount of rows compared to the outer query for a good performance?
    3.Can every correlated subquery be converted to a join and if so which one to use?
    Truly appreciate any inputs on how oracle executes it at the backend.
    Thanks in advance.

    user10541890 wrote:
    How does oracle 10g execute a correlated subquery?
    I read some articles online & i am a little confused.
    example:
    select * from emp e
    where e.deptno in (select d.deptno from dept d
    where e.deptno = d.deptno);
    My questions .......
    1.In the above example, does oracle read the entire outer table first and then run the inner query using the rows returned by the outer query?
    I read in some articles that they execute simultaneously.
    How does this work?SQL is not a procedural language. SQL code specifies what the system sill do, not how the system wlll do it; that's entirely up to the system.
    What does it matter to you whether the two are done together, or if one is completed before the other begins?
    The system will probably choose to run ucorellated subqueiris only once, and correlated queries multiple times as needed.
    2.Should the inner query have lesser amount of rows compared to the outer query for a good performance?That usually doesn't matter.
    It some cases, you may want to consider whether the subquery is correlated or not. If the subquery is very costly, and produces, say, 1 million rows, but you know the main query will only produce about 5 rows, then you may want to do a correlated subquery rather than an uncorrelated one.
    3.Can every correlated subquery be converted to a join and if so which one to use?I believe so.
    Use whichever is easier to code and debug. That will change depnding on the data and the requirements.
    If performance is an issue, try different ways. Usually, where I've noticed a big difference, join was fastest.
    By the way, it's unusual to have a correlated IN-subquery.
    Usually IN-subqueris are uncorrelated, like this:
    select  *
    from      emp     e
    where     e.deptno     in ( select  d.deptno
                        from    dept     d
                      );(This and the queries below produce the same resutls as your original query.)
    Correlated subqueries are usually used for scalar subqueries or EXISTS subqueries, like this:
    select  *
    from      emp     e
    where     EXISTS ( select  d.deptno
               from    dept     d
                    where   e.deptno = d.deptno
                );To do the same thing with a join:
    select  e.*
    from      emp     e
    join     dept     d     on     e.deptno     = d.deptno
    ;assuming dept.deptno is unique.

  • How does Oracle process DDL w/ refs to yet created objects?

    If I have DDL for four procedures in one file, say ProcA ProcB ProcC and ProcD.
    ProcA references ProcD
    ProcB references ProcC
    How does Oracle compile ProcA and ProcB if the order of the DDL in the file is like above.
    Meaning ProcA and ProcB are compiled and ProcC and ProcD have yet to be created?

    That's a fundamental problem with standalone procedures/functions - with any dependencies, you will have invalid objects after the initial pass. However, those procedures will be automatically recompiled as soon as executed.
    If these four procedures were in a package, there would be no compilation dependency issues at all. Exactly what my knowledge told me.
    What if it was concerning packages and a procedure in PackageA calls a Procedure in PackageB and PackageA's DDL is execute first, what happens?

Maybe you are looking for

  • SCCM Task Sequence no longer installs SCCM Client

    I am using SCCM 2007 R3 with SP2 and MDT 2010 My task sequences were all working fine until one of the other SCCM admins "Synced all sites" by transferring the site settings of one site to all the other sites.  How this broke OSD I don't know. At thi

  • 1GB file was too large and did not upload

    Please indicate when the Cloud will allow for larger uploads, as promised in previous posts by Adobe staff. I have many files larger than 1GB and many files larger than 5GB. (Please correct me if I am wrong. This worked for months when first launched

  • Problem after creating a Photo Book

    After creating a 100 Pages Hardcover Book, I can't buy it, because Iphoto opens a window, saying that not all pages are filled with photos. verity I try, it goes back to one page, but this page is perfectly filled like all the others, no missing phot

  • Blackberry Desktop manager pronlems.

    While installing the updated Desktop Manager program, may computer shuy off in the middle of installing. now when i hook up my phone it isn't recognized. if i try to remove or install the program it tells me that an installation is in progress and st

  • Is it possible to tune the duration of an alert with Communicator 2007 on Windows 7? (makes it stay for ever...)

    1°) Panel for new incoming msg pops up and goes away.  2°) Also looks like that is several incoming msgs from different people are open, the last one does to trigger highlight of communicator icon in the task bar (like it does when there is no such m