How many datafile in tablespace

Hi,
I have migrate database 9i to 10g so some question is required?
how many datafile in tablespace ?
i hv following query is use
select file_name,tablespace_name from dba_data_file ?

Dear Mohamed
Select name, ts#
from v$datafile;
this statment give you only the datafiles
and
select file_name, tablespace_name
from dba_data_files;
give you the tablespace name and datafiles
thank you
Mohamed Tawfik

Similar Messages

  • How to define tablespaces in Oracle 10g and how put tables on tablespaces

    Hello,
    I'm having trouble to define the structure of tablespaces and how to distribute the tables/indexes/lobs on these tablespaces.
    Do you know some rules on how to define this?
    What I have until now:
    1) Put table indexes in separate tablespace
    2) Put lobs in separate tablespace and use storage clause when defining the lob column. Not sure how many tablespaces to use, I have tables with millions of lobs and tables with just one lob (with row containing the lob).
    3) Please fill more rules here ...
    Thank you, Alex.

    Long story: I received database and schema creation scripts defined in Oracle 9i. I want to redesign the tablespaces number/storage and also to change the distribution of tables into tablespaces.
    As an example I will show how tablespaces are created now. There is one tablespace for indexes BLUE_AUTO_INDX and one for each EXTENT MANAGEMENT of:
    - 64K for BLOB , name BLUE_K064_BLOB
    - 64K for tables , name K064_NTAB
    - 128K for tables, name BLUE_K128_NTAB
    - 512K for CLOB , name BLUE_K512_CLOB
    - 4M for BLOB , name BLUE_M004_BLOB
    - 64M for CLOB , name BLUE_M064_CLOB
    - 8M for tables , name BLUE_M008_NTAB
    - 1M for tables , name BLUE_M001_NTAB
    - 256M for tables, name BLUE_M256_NTAB
    Definition of each tablespace is like:
    CREATE TABLESPACE BLUE_AUTO_INDX DATAFILE 'BLUE_AUTO_INDX01.DBF' SIZE 200M REUSE AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED LOGGING ONLINE PERMANENT EXTENT MANAGEMENT LOCAL UNIFORM SIZE 64M SEGMENT SPACE MANAGEMENT AUTO;
    CREATE TABLESPACE BLUE_K064_BLOB DATAFILE 'BLUE_K064_BLOB01.DBF' SIZE 20M REUSE AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED LOGGING ONLINE PERMANENT EXTENT MANAGEMENT LOCAL UNIFORM SIZE 64K SEGMENT SPACE MANAGEMENT AUTO;
    CREATE TABLESPACE BLUE_K064_NTAB DATAFILE 'BLUE_K064_NTAB01.DBF' SIZE 20M REUSE AUTOEXTEND ON NEXT 20M MAXSIZE UNLIMITED LOGGING ONLINE PERMANENT EXTENT MANAGEMENT LOCAL UNIFORM SIZE 64K SEGMENT SPACE MANAGEMENT AUTO;
    CREATE TABLESPACE BLUE_K128_NTAB DATAFILE 'BLUE_K128_NTAB01.DBF' SIZE 20M REUSE AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED LOGGING ONLINE PERMANENT EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K SEGMENT SPACE MANAGEMENT AUTO;
    CREATE TABLESPACE BLUE_K512_CLOB DATAFILE 'BLUE_K512_CLOB01.DBF' SIZE 20M REUSE AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED LOGGING ONLINE PERMANENT EXTENT MANAGEMENT LOCAL UNIFORM SIZE 512K SEGMENT SPACE MANAGEMENT AUTO;
    CREATE TABLESPACE BLUE_M004_BLOB DATAFILE 'BLUE_M004_BLOB01.DBF' SIZE 20M REUSE AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED LOGGING ONLINE PERMANENT EXTENT MANAGEMENT LOCAL UNIFORM SIZE 4M SEGMENT SPACE MANAGEMENT AUTO;
    CREATE TABLESPACE BLUE_M064_CLOB DATAFILE 'BLUE_M064_CLOB01.DBF' SIZE 400M REUSE AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED LOGGING ONLINE PERMANENT EXTENT MANAGEMENT LOCAL UNIFORM SIZE 64M SEGMENT SPACE MANAGEMENT AUTO;
    CREATE TABLESPACE BLUE_M008_NTAB DATAFILE 'BLUE_M008_NTAB01.DBF' SIZE 200M REUSE AUTOEXTEND ON NEXT 100M MAXSIZE UNLIMITED LOGGING ONLINE PERMANENT EXTENT MANAGEMENT LOCAL UNIFORM SIZE 8M SEGMENT SPACE MANAGEMENT AUTO;
    CREATE TABLESPACE BLUE_M001_NTAB DATAFILE 'BLUE_M001_NTAB01.DBF' SIZE 100M REUSE AUTOEXTEND ON NEXT 50M MAXSIZE UNLIMITED LOGGING ONLINE PERMANENT EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M SEGMENT SPACE MANAGEMENT AUTO;
    CREATE TABLESPACE BLUE_M256_NTAB DATAFILE 'BLUE_M256_NTAB01.DBF' SIZE 512M REUSE AUTOEXTEND ON NEXT 256M MAXSIZE UNLIMITED LOGGING ONLINE PERMANENT EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256M SEGMENT SPACE MANAGEMENT AUTO;
    Does this structure of tablespaces ok? I mean if the logic of one tablespace for different EXTENT SIZEs looks ok?

  • How many Management agents can you have running simultaneously on a host?

    Hi all,
    I've scoured the Oracle documentation and not been able to find a definitive answer to this question, how many Oracle management agents can you have on a single managed host target? Can you for example run an 11g agent and a 12c agent simultaneously (whilst migrating to 12c without upgrading the present OEM instance) If so can you run two 12c agents, each pointing to a different OMS? I’ve seen examples of an agent for each database instance on a host managed target, so a host with three Oracle database instances has three Oracle Management agents all pointing to the same OMS with each agent is monitoring just one of the database instances. There must be resource considerations here for memory, cpu and network traffic etc? I’ve always understood it to be one Oracle Management Agent per managed host
    Thanks

    I don't think there's any data on impact or performance since it's not a recommended configuration. If you have host/configuration monitoring enabled on both agents, they will be running the same queries/scripts against the host/inventory, etc. so they will likely have contention at some point. If you monitor the same databases, you will definitely see contention and increased overhead as there will be multiple agents running the same queries. You might also see problems w/ any of the server generated alerts (tablespace, etc) if you change thresholds as the agents send that to the database, and then the database will be out of sync with the other agents.
    What exactly is the goal for having multiple agents? Is it short term or long term?

  • How to see the tablespace size

    hi
    how to get the tablespace size??
    thx

    Hello,
    select SUM(bytes)/1024/1024 MB from dba_data_files
    where tablespace_name = 'xxxxxx';
    works fine.
    I am trying to build a function for that:
    select SUM(bytes)/1024/1024 MB
    from dba_data_files
    where tablespace_name=upper('&user')
    However, I need to make some enhancements:
    1. how to make comments in sql files?Refer to the REM statement in the sqlplus reference manual
    2. a lot of outputs are generated:
    SQL> @get_size
    Enter value for user: tts1
    old 3: where tablespace_name=upper('&user')
    new 3: where tablespace_name=upper('tts1')
    MB
    2048
    how to avoid that so that only the size is
    displayed.
    for example:
    SQL> @get_size
    Enter value for user: tts1
    MB
    2048
    Refer to set verify off in the sqlplus reference manual.
    >
    3. how to let the function accept a parameter such
    as:
    SQL> @get_size tts1
    Refer to the define command in the sqlplus reference manual.
    >
    4. how to include a usage (help) to that function
    such as:
    SQL> @get_size
    usage: get_size <tablespace name>
    Many thanksRefer to the prompt statement in the sqlplus reference manual.
    Sybrand Bakker
    Senior Oracle DBA

  • How many tables are in my database

    I wanted to check how many tables I have so I ran the following query to list all of the tables in all of the tablespaces.
    select t.table_name, df_name from dba_tables t, v$tablespace df
    where t.tablespace_name = df.name;
    I got back 34377 tables or records.
    but if I wanted to count the number of tables I have I could run the following command.
    SQL> select count(*) from dba_tables;
    I got back 34700 tables.
    Can anyone tell me why these numbers don't match or what I am missing here?

    Also you can try to count them regarding to your tablespace which is better
    SELECT COUNT(*),tablespace_name  FROM USER_TABLES group by tablespace_name;also Laurent Schnieder provide with way that you count your tables in specific schema like the following :
    SQL> select
      2    table_name,
      3    to_number(
      4      extractvalue(
      5        xmltype(
      6     dbms_xmlgen.getxml('select count(*) c from '||table_name))
      7        ,'/ROWSET/ROW/C')) count
      8  from user_tables;http://www.dba-oracle.com/t_count_tables_schema.htm

  • Configuring data guard: how many standby redolog do I need?

    Hi all, I want to add a standby databse to my RAC test environment but I don't understanad how many redolog I need.
    The main db is a 2 node RAC (10.2.0.4.0); every node has 3 log groups; every log group has 2 logfile (every log group is multiplexed on DG_DATA1/ASR/ and FLASH_RECOVERY_AREA/ASR/ )
    The standby db will have all its datafile on the same filesystem, so I already configured the trasnslations parameters:
    DB_FILE_NAME_CONVERT='/opt/oracle/app/oracle/oradata1/ASRSB','+DG_DATA1/ASR','/opt/oracle/app/oracle/oradata2/ASRSB','+FLASH_RECOVERY_AREA/ASR'
    LOG_FILE_NAME_CONVERT='/opt/oracle/app/oracle/oradata1/ASRSB','+DG_DATA1/ASR','/opt/oracle/app/oracle/oradata2/ASRSB','+FLASH_RECOVERY_AREA/ASR'
    Replication via rman works well, but I have to manually add the standby redolog on the standby db and which formula to use to calculate the number of the standby redolog needed. Which is the correct formula between :
    1)
    # of standby log = ( # of redolog files + 1) * # of thread = (6 +1)*2 = 14 standby redolog files
    2)
    # of standby log = ( # of redolog groups + 1) * # of thread = (3 +1)*2 = 8 standby redolog files
    thanks,
    andrea

    Andrea,
    I think 8 should be the answer on your question. Because you have 3 log groups and 2 threads therefore (3+1)*2 = 8.
    According to the documentation :
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/create_ps.htm#SBYDB00426
    Minimally, the configuration should have one more standby redo log file group than the number of online redo log file groups on the primary database. However, the recommended number of standby redo log file groups is dependent on the number of threads on the primary database. Use the following equation to determine an appropriate number of standby redo log file groups:
    (maximum number of logfiles for each thread + 1) * maximum number of threads
    I think you may get confused with maximum number of logfiles. But sometimes logfile is used as a synonym to log group. The actual log group files are usually called log members. (for instance MAXLOGFILES parameter specifies the maximum number of log groups and MAXLOGMEMBERS specifies the maximum number of members for each group).
    Each additional member in a redo log group is just a multiplexed copy. You can also consider multiplexing the standby redo log files, the same why you do for redo log members.
    In order to learn more about the usage, benefits and limitations of Standby Redo Logs (SRL) you can refer to Metalink Note 2193444.1.
    I hope this helps.
    --Mihajlo                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Adding No. of Datafiles to TableSpace

    Hi All,
    I have doubt regarding adding no. of datafiles to Tablespace. I wanna connect my application to Oracle10g database. As a DBA I am going to allocate on separate Tablespace to this new Application. As time will pass the data acumulated by the application would reach in GBs, So how should I control the datafile???
    1) Shall I add only one Big datafile to the TB
    OR
    2) Periodically I should go on adding the datafile as it crosses the particular limit of
    data size???
    What policy should I follow....
    Regards,
    Darshan

    Hi,
    There is no issue in creating multiple datafiles while creating database or adding them later. If space is no constraitn for you then you should create multiple datafiles during creation of database.
    Also create then with AUTOEXTEND clause and you don't have to put this clause OFF if you create it with MAXSIZE parameter. It's always better tot have MAXSIZE parameter defined because this will not allow your datafile to grow bigger then the MAXSIZE parameter size. Here is example of adding a datafile to tablespace with MAXSIZE clause;
    ALTER TABLESPACE users
    ADD DATAFILE '/u02/oracle/rbdb1/users03.dbf' SIZE 10M
    AUTOEXTEND ON
    NEXT 512K
    MAXSIZE 250M;
    After defining the MAXSIZE, keep a close eye on growth of data in datafile and when its near to fill add a new datafile to tablespace and keep this cycle on....
    Regarding your second question :
    You are write that data is written 2nd to datafile when first one is full. But you try to validate this point running database then sometimes you will find that 2nd datafile is consuming more space then 1st, even have 1st datafile is sufficient empty. This is due to fact od frequent deletions in the tables who resides in datafile.
    Hope that you got some hints......

  • How to Shrink UNDO Tablespace

    Hello,
    We had a UNDO Tablespace of 22Gb but it is using just 2GB. How to shrink undo tablespace. we are using clustered 3 node production database 10.2.0.4
    Is there is way that we can shrink UNDO Tablespace or do i need to create a UNDO tablespace and assign the undo tablespace to DB and drop the old UNDO?
    How to ensure that transactions are done and free to drop the old UNDO?
    Is it something we need to restart all the three nodes as each node has its own UNDO Tablespace.
    Need Help on this issue.
    would appreciate your quick response.
    Thanks

    if i am in your place i will do the following:
    <pre class="jive-pre">1-Query DBA_DATA_FILES to determine the name of the datafiles of the UNDO</pre>
    2. Create a new UNDO tablespace.
    <pre class="jive-pre">CREATE UNDO TABLESPACE undo_ts2 DATAFILE '/directory/undo_ts2_01.dbf' SIZE xxxM;</pre>
    3. Modify the database parameter to use the new UNDO tablespace.
    <pre class="jive-pre"> ALTER SYSTEM SET undo_tablespace=undo_ts2 SCOPE=BOTH; </pre>
    4-The Drawback:
    <pre class="jive-pre">New transactions will begin using the new undo tablespace. After some time passes (at least the number of seconds specified by the UNDO_RETENTION initialization parameter), you can drop the old UNDO tablespace. The downside to this approach is that for a short time period, your database will have two UNDO tablespaces</pre>
    Regards
    Mohamed

  • How many hash partitions create is prefer

    I want to create hash partitions on a large table,but i don't know how many partitions to create?
    create table T_PARTITION_HASH
      ID   NUMBER,
      NAME VARCHAR2(50)
    partition by hash (ID)
      partition T_HASH_P1
        tablespace USERS,
      partition T_HASH_P2
        tablespace USERS,
      partition T_HASH_P3
        tablespace USERS
    );

    Agustin UN wrote:
    What is the table size in rows and Mb?
    What is the grow estimated of table?
    What access is on table?
    . :-) Any help with my english will be welcome :-).the table contain about 1 hundred million rows.
    the table grows 1000000 rows per day.
    the table is use for statistical analysis in data wasehouse.
    Edited by: user7244870 on Nov 5, 2010 2:22 AM

  • Drop datafile from tablespace

    I'm new to oracle.
    After I extended a tablespace I understood that it was too large.
    I've been reading about how to drop a tablespace, but I don't want to drop the entire tablespace. I just want to drop the last datafile of this tablespace.
    I know how to drop tablespaces in sapdba and brtools, but I don't know how I can drop one specific datafile (number 29) of the tablespace PSAPBTABD?
    Please Help med.
    Best regards
    Harald V

    Hello Harald,
    see please this thread:
    Re: How to drop data file?
    also the section 43. <i>How can I delete a data file that was created by mistake</i>
    in the SAP Note<i><b> 592393 - FAQ: Oracle</b></i>
    if you have Oracle 9i databases, it is not easy to drop a datafile, but in Oracle 10g
    you can drop a datafile like that:
    <b><i>ALTER TABLESPACE</i></b> <<u><i>Tablespace Name</i></u>> <b><i>DROP DATAFILE</i></b> '<<u>PATH und NAME of Datafile</u>>';
    for example,  you have a tablespace called PSAPC11 and you want to drop a datafile called dat.data15 of this tablespace, you can drop it like that:
    e.g. <b><i>alter tablespace</i></b> <u>PSAPC11</u> <b><i>drop datafile</i></b> <u>'/oracle/C11/psapc11/dat.data15'</u>
    Best regards
    Baran

  • How Many Times Can I Use The Same Serial Number For Adobe Creative Suite 4?

    I have design standard and was told I can use the same serial number on multiple computers. How many time can I use it? And say I install it on the maximum number of computers, but get a new computer, can I uninstall it on one of the old computers and use it on the new one? And can I use the programs on both computers simultaneously or do I have to use them one at a time?

    Fred Tech wrote:
    Broadly speaking, it depends on the type of license you have.
    Specifically, if you have a single license then officially, you should only install it once on one computer.
    Practically, (unless it has changed with CS4) you maybe able to install it on more then one computer, BUT can only run one instance of the software at a time. You can not run more then one instance of the software concurrently; i.e. you can't run Dreamweaver on Computer 1 and Photoshop on Computer 2. That would be two instances, and is not permitted.
    This is my understanding. I am happy to be corrected if I am wrong
    Fred
    Sorry Fred you are wrong.
    If you have a single license you can install it on as many computers as you like. you can only activate the suite on two computers at anyone time. Work and Home or as many of us do it Desktop and Laptop. You can not use the computers simultaneously. You only have 20 activation/deactivations so use them wisely. Student versions only have one activation. You can not break up the suite installs the suite is considered one application.

  • HT5622 How many family members, computers, iPods,iPad,IDs can you have on one iTunes account?

    I'm just trying to sort out some iTunes I'd issues.  Does anyone know how many total iPad iPods can be used with one Apple ID?  Or how many apple  IDs your can have with one iTunes account? Or does each person need there own Apple ID or Apple account? Thanks

    You can't have multiple IDs on one account, but you can use multiple IDs for different purposes on the same device.
    Just use the one AppleID for iTunes and the AppStore so you can all share your music and app purchases. Then each person should have their own individual AppleID with associated iCloud account for mail, contacts, calendars, iMessage and FaceTime.
    You don't have to use the same AppleID for all services.

  • Want to use Adobe forms departmentally.  How many users per license?

    How many people can use Adobe Forms per license/how many computers can we download software to?

    Adobe FormsCentral is a web-based app so there is nothing to download - you access from the web browser.
    Each users who creates forms needs a license of FormsCentral. In a month or so you'll be able to by a team pack (5,10,25) at reduces prices for a larger group who wants to create forms.
    Randy

  • How many calendars can you share with the same iCloud person?

    OK Apple people, here is my concern:
    I have several calendars in my iCal app.  I can share one (home) with my wife but for some reason, I am not able to add her to another calendar that I wish for her to  view/edit (work).  She does have an iCloud account.  The documentation on the Apple web site for iCloud states:  " You can share a calendar both publicly and privately with other people. Sharing gives you flexibility in managing calendars. For example, you could create a calendar for your child’s sports team and share it privately with just the coaches so they can edit it. You could also share it publicly with all the parents so they can view (but not change) it whenever they want."
    Is there a limit to just how many calendars in the application that one one can send as suggested by the "a"?
    Thanks in advance for your responses.
    RAP

    All my family devices are tied to one Apple ID.  We did that b/c we would consolidate our purchases by syncing via 1 Mac in the house.  So any device could purchase an app/music/whatever, then we would plug it into the main Mac and transfer the purchase to that and then plug in other devices and add to them.  Pain the rear!  I think my example of tedious process above is one reason for iCloud.  So, now with iCloud we should be able to purchase from any device and the other devices would have access without wires.   I thought the only way to tie them all together is if they are all under the same AppleID.  That is how iCloud knows they are related, right?  Makes sense to me.   However, on each device, we use their own @me/@mac email account to setup iCloud b/c each email is tied to that family member but under the master Apple ID for our family.  Each email account has their own contacts, emails, etc.  I thought that was the way to setup.  Shouldn’t this work?  Kind of separate but yet tied together via the 1 Apple ID.  Thoughts?

  • How many times can I review my account ?????????

    I have reviewed my account three times with my PayPal info and received confirmation from my PayPal Account but it still won't let me log in. It wants me to review EVERY time. Let me know if anyone can shed some light on this problem.
    This is a REAL PAIN.
    Thanks, Andy

    Lfc89 wrote:
    How many times can I change my country or region on my ipad 2 or iPod touch 5
    Not sure what you are asking... but...
    See  >  Change your iTunes Store country
    Here  >  http://support.apple.com/kb/HT1311
    Settings > iTunes & App Stores > Apple ID: > View Apple ID > Country/Region = Change Country / Region

Maybe you are looking for

  • Shipping legacy MSDS uploaded which are in pdf format

    Hi Friends, Do not get mislead by Questiom Here is the requirement. In our project, We have imported legacy MSDS in PDF format. For this we created a program to upload legacy MSDS in PDF format. The generation variants are of type "MSDS" and not "IBD

  • Apple TV streaming iTunes Match?

    Okay, so iTunes Match tunes in the cloud works great on the ATV2.... which has a very small SSD, acting as a cache, correct? So, the cloud must be streaming right? I mean, it's obviously not filling up my harddrive on the ATV, so it must be streaming

  • Solid amber flashes green once about every minute + even more problems

    I have a problem with my airport express: -Even after doing a factory reset my airport express has an solid amber light wich flashes green once about every minute. - Sometimes the LED light even goes off for a couple of seconds. - I can't find the ai

  • XI behind firewall for a Rosettanet business partner

    We have the XI system behind a firewall. What do we need to do so that a business partner can send/receive messages. We are using the Rosettanet adapter. Thank you.

  • Inserting a column to the right / left ? How to do it?

    When I had a table on my screen, I had an option to incert coluns to right / left of the column that I had highlighted. I don't have that option anymore ( because I clicked on something, I don't remember what). How can I get it back?