TableSpace question

I know how to create a Tablespace , but I dont know how to lookup tablesspaces
I can look up tables in dba_tables, how do I lookup existing tablespaces ?
Thanks

Jeez. If we have to preface advice to look up DBA_anything_at_all with the proviso that "there's also a USER_anything_at_all equivalent", why not go the whole hog and say there's an "ALL_anything_at_all" view to complete the set, albeit not on this occasion?
If someone doesn't know that DBA_, ALL_ and USER_ views are three parts of the data dictionary, and that what is available in one is almost always available in the other, then we have rather more of a problem than someone wanting to know how to find out information about tablespaces. Perhaps we do, on this occasion, in which case further questioning by the OP may have brought the topic to light. But I'd prefer we didn't assume people were that ignorant!

Similar Messages

  • Temporary tablespace questions

    I have an Oracle 9.2.0.1.0 database running on a Windows 2000 server. I'm encountering several problems with its temporary tablespace. Here is how the temporary tablespace is created:
    create database testdb
    datafile 'd:\oradb\testdb\datafiles\testdbsys1.dbf'
    size 200M AUTOEXTEND ON NEXT 10M
    default temporary tablespace temporary
    tempfile 'd:\oradb\testdb\datafiles\tmp1.dbf'
    size 16400K reuse autoextend on next 16400K
    undo tablespace undotbs
    datafile 'd:\oradb\testdb\datafiles\testdbrbs1.dbf'
    size 100M reuse autoextend on next 10M maxsize unlimited;
    Questions:
    1- Despite the fact that the temporary tablespace datafile is specified "autoextend on", it autoextends up to 4 Gb then it fails. The exact error is ORA-0652: unable to extend temp segment by 64 in tablespace TEMPORARY. If I manually extend it beyond 4 Gb, everything works fine. Is this a bug or is it something I do wrong ? If so, what should I do to correct this ?
    2- I can't figure out what statement of my application makes the temporary tablespace grow so big. I looked at all the trace files in UDUMP and I noticed it's always the same statement that is logged when the "autoextend" error occurs. But when I run the statement on its own in SQLPlus, nothing special happens to the temporary tablespace. What is the best way to track what statement uses what resources of the temporary tablespace ?
    3- I don't know if this is what happens, but it looks like space isn't reused in the temporary tablespace. Is this possible ? If so, how can I tell Oracle to reuse it ?
    Thanks.

    1-You can try to modify the maxsize for datafaile to UNLIMITED. I am not sure it shall work, but it's worth a try
    2-Probably it's a statement that uses an order by on a large result set
    3-You can try to force the wakeup of SMON process that would free the unused extents of temporary tablespace.
    Try http://www.ixora.com.au/tips/admin/stray_temp.htm
    There is also a script to force the wakeup of smon

  • Default Tablespace Question.

    This thread may be slightly out of place, but does have to do with tablespaces. I've exhausted my research in other areas. Any help is appreciated.
    In Oracle 10g there are, by default, two tablespaces (sysaux & system) from what I can tell. In the Visual Web Developer 2005 Express (MS Web Dev Tool) Database Explorer, I am seeing the system tablespace. This is good because this is where I imported my tables to. In the SQLDataSource Wizard, I am using the same connection, but unfortunately I am being presented with the tables in the sysaux tables. Does anyone know why this is happening? I checked the system user, that I am connecting with, and verified that the default tablespace is system. Previously, the Wizard was showing the HR tablespace, but I dropped the HR user and then the sysaux tablespace started showing up.

    Hi,
    don't ever import own tables into the system tablespace!!!
    Create your own tablespace and your own user!
    Never use system tablesapce for whatever!
    As system or sys:
    create tablespace myts datafile '/your/oracle/oradata/SID/myts01.dbf' size 50M autoextend on extent management local uniform size 1M segment space management auto;And your user
    create user XY identified by supersavepassword default tablespace myts;
    grant create session to XY;
    grant resource to XY;Drop the tables you created in the system tablespace after that.
    Use system or sys ONLY if you are doing adminstrativ task never for developing.
    Dim
    Message was edited by:
    Dr.Dimitri

  • Advanced Security -TDE - Encrypted Tablespace Question

    In discussions regarding the move of existing objects from a non-encrypted tablespace to a TDE tablespace, all relevant text, e.g. [TDE Best Practices|http://www.oracle.com/technology/deploy/security/database-security/pdf/twp_transparent-data-encryption_bestpractices.pdf], states that the objects should be exported from the non-encrypted tablespace and then imported into the encrypted tablespace. After which the old tablespace should be dropped, wiped, etc.
    I'm just wondering if there is a reason that we couldn't use an ALTER TABLE..MOVE operation instead. If not, specifically, why not?
    Thanks,
    -Joe

    Oracle Docs at followng link says..
    http://download-uk.oracle.com/docs/cd/E11882_01/network.112/e10746/asotrans.htm
    " You cannot encrypt an existing tablespace. However, you can import data into an encrypted tablespace using the Oracle Data Pump utility. You can also use SQL commands like CREATE TABLE...AS SELECT...or ALTER TABLE...MOVE... to move data into an encrypted tablespace. The CREATE TABLE...AS SELECT... command enables you to create a table from an existing table. The ALTER TABLE...MOVE... command enables you to move a table into the encrypted tablespace.
    So you can do Alter table move too.

  • Should Default Tablespace for User DIP be "SYSTEM" or "USERS"?

    Oracle Enterprise Manager is giving me a warning about some non-system users who have a default tablespace of SYSTEM. One of the users is DIP. Is it OK for me to change the default tablespace for DIP to USERS, or should it remain SYSTEM?
    Thank you,
    Bill

    To the best of my knowledge user DIP was created automatically by Oracle software when I upgraded my database from 8i to 10gR2. In my mind that means it is needed for managing some system function in the database. That is why I hesitate to change the default tablespace from SYSTEM to USERS.
    If user DIP is tied to use of Oracle Directory Integration and Provisioning then I am not knowingly using the DIP account. I do not know what Directory Integration and Provisioning is and read about it only when researching this tablespace question. That being said, I expect that Oracle software does a lot of things internally that I am not aware of.
    I was hoping someone familiar with user DIP could tell me that changing the default tablespace to USERS for this Oracle supplied account would do no harm.
    Thank you,
    Bill

  • Oracle Follow-Up activities after EHP4 Upgrade

    Hi!
    I am currently executing the EHP4 Upgrade for SAP ERP 6.0 with Oracle.
    After doing so I need to execute several oracle specific actions
    Can some one give me technical documentation for the following actions:
    1) Delete all empty Tablespaces
    Question: How (SQL commando) can I identify which of my tablespaces are empty?
    2) Tablespace "PSAPSR3700" should be released/deallocated
    Question: what does it mean? 
    3) Load generation ???
    Any helpful information will be very appreciated
    Jürgen

    > 1) Delete all empty Tablespaces
    > Question: How (SQL commando) can I identify which of my tablespaces are empty?
    You can check that using brtools.
    > 2) Tablespace "PSAPSR3700" should be released/deallocated
    > Question: what does it mean? 
    The sources are in PSAPSR3701 with EHP4 so that old tablespace is no more needed.
    > 3) Load generation ???
    Yes -run SGEN.
    Markus

  • Question about Undo Tablespace?

    Hello;
    The size requirement of the undo tablespace is related to the number and size of transactions that occur on the database.But I dont need to query any of these transaction for a schema or table by using flashback so is there a way of disabling writing any transactions on a table or schema to undo tablespace ?
    Edited by: Ecimen on 04.Mar.2013 03:50
    Edited by: Ecimen on 04.Mar.2013 03:51

    Rob_J wrote:
    Hi,
    No, that's not what I meant. What I meant was that if you say your logging tables are creating a lot of UNDO it must mean that you are writing/updating/deleting a lot of information from them. I was just throwing out the thought that if this is the cause of the issue, can you reduce the amount of data you write to these tables? In other words, do you need all this logging data? It's a question for the business and/or designers of your application to answer.
    RobHello Rob;
    i got it now , and yes we need to logging all this data because its production database occuring many transactions always...
    Edited by: Ecimen on 04.Mar.2013 06:28
    Edited by: Ecimen on 04.Mar.2013 06:31

  • Question about ALTER TABLESPACE add/drop datafile

    Good afternoon,
    As an exercise, I created a tablespace STORETABS and added a datafile to it using the command:
    SQL> alter tablespace storetabs add datafile 'e:/storetabs3.dbf' size 50M;This step succeeded. A new file was created in the root of e: as expected.
    Following that command, I issued:
    SQL> alter tablespace storetabs drop datafile 'e:/storetabs3.dbf';
    Tablespace altered.The command succeeded. However, the file *'e:/storetabs3.dbf'* was not removed. After re-reading the documentation found at http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_3002.htm, I get the impression that removing the O/S file itself is something that always needs to be done manually.
    The question: Am I correct that there is no option to cause the "alter tablespace <tablespace> drop datafile <datafilename>" to delete the O/S file ? In other words, must the O/S file always be manually deleted as a separate step ?
    Thank you for your help,
    John.

    I believe in windows directory paths used backslash and not forward slash.
    You can argue why oracle does not give error, either while creating or while dropping ;)
    SQL> select * from v$version ;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL> select tablespace_name, file_name from dba_data_files ;
    TABLESPACE_NAME
    FILE_NAME
    USERS
    /u01/app/oracle/oradata/orcl/users01.dbf
    UNDOTBS1
    /u01/app/oracle/oradata/orcl/undotbs01.dbf
    SYSAUX
    /u01/app/oracle/oradata/orcl/sysaux01.dbf
    SYSTEM
    /u01/app/oracle/oradata/orcl/system01.dbf
    EXAMPLE
    /u01/app/oracle/oradata/orcl/example01.dbf
    SCOTT_TBS
    /home/oracle/scott_f1.dat
    6 rows selected.
    SQL> !ls -l scott_f1.dat   
    -rw-r----- 1 oracle oinstall 276832256 Sep 11 21:15 scott_f1.dat
    SQL> alter tablespace scott_tbs add datafile '/home/oracle/scott_f2.dat' size 10M ;
    Tablespace altered.
    SQL> !ls -l scott_*.dat
    -rw-r----- 1 oracle oinstall 276832256 Sep 11 21:15 scott_f1.dat
    -rw-r----- 1 oracle oinstall  10493952 Sep 11 21:18 scott_f2.dat
    SQL> alter tablespace scott_tbs drop datafile '/home/oracle/scott_f2.dat' ;
    Tablespace altered.
    SQL> !ls -l scott*.dat
    -rw-r----- 1 oracle oinstall 276832256 Sep 11 21:15 scott_f1.dat

  • Oracle8 Tablespace backup question

    [Sorry for posting in this "8iLite" forum. I couldn't seem to locate a better forum.]
    When I perform a hot OS tablespace backup in Oracle8, I know to perform the ALTER TABLESPACE <TS_NAME> BEGIN BACKUP command. And I also know that this command checkpoints the tablespace's datafiles.
    Question 1 of 2: Do I have to wait until the checkpoint is complete for a particular datafile until I can begin the OS file-copy?
    Question 2 of 2: If so, what Oracle8 view can I use to ascertain when the checkpoint is finished for each of the datafiles in the tablespace being backed up.
    Thanks!
    null

    [Sorry for posting in this "8iLite" forum. I couldn't seem to locate a better forum.]
    When I perform a hot OS tablespace backup in Oracle8, I know to perform the ALTER TABLESPACE <TS_NAME> BEGIN BACKUP command. And I also know that this command checkpoints the tablespace's datafiles.
    Question 1 of 2: Do I have to wait until the checkpoint is complete for a particular datafile until I can begin the OS file-copy?
    Question 2 of 2: If so, what Oracle8 view can I use to ascertain when the checkpoint is finished for each of the datafiles in the tablespace being backed up.
    Thanks!
    null

  • Question about Full Table Scans and Tablespaces

    Good evening (or morning),
    I'm reading the Oracle Concepts (I'm new to Oracle) and it seems that, based on the way that Oracle allocates and manages storage the following premise would be true:
    Premise: A table that is often accessed using a full table scan (for whatever reasons) would best reside in its own dedicated tablespace.
    The main reason I came to this conclusion is that when doing a full table scan, Oracle does multiblock I/O, likely reading one extent at a time. If the Tablespace's datafile(s) only contain data for a single table then a serial read will not have to skip over segments that contain data for other tables (as would be the case if the tablespace is shared with other tables). The performance improvement is probably small but, it would seem that there is one nonetheless.
    I'd like to have the thoughts of experienced DBAs regarding the above premise.
    Thank you for your contribution,
    John.

    Good morning :) Aman,
    >
    A little correction! A segment(be it a table,index, cluster, temporary) , would stay always in its own tablespace. Segments can't span tablespaces!
    >
    Fortunately, I understood that from the beginning :)
    You mentioned fragmentation, I understand that too. As rows get deleted small holes start existing in the segment and those holes are not easily reusable because of their limited size.
    What I am referring to is different though.
    Let's consider a tablespace that is the home of 2 or more tables, the tablespace in turn is represented by one or more OS datafiles, in that case the situation will be as shown in the following diagram (not a very good diagram but... best I can do here ;) ):
    Tablespace TablespaceWithManyTables
      (segment 1 contents)
        TableA Extent 1
          TableA Block 1
          TableA Block 2
          Fragmentation may happen in these blocks or
          even across blocks because Oracle allows rows
          to span blocks
          TableA Block n
        End of TableA Extent 1
        more extents here all for TableA
      (end of segment 1 contents)
      (segment 2 contents)
        TableZ Extent 5
          blocks here
        End of TableZ Extent 5
        more extents here, all for tableZ
      (end of segment 2 contents)
        and so on
      (more segments belonging to various tables)
    end of Tablespace TablespaceWithManyTablesOn the other hand, if the tablespace hosts only one table, the layout will be:
    Tablespace TablespaceExclusiveForTableA
      (segment 1 contents)
        TableA Extent 1
          TableA Block 1
          TableA Block 2
          Fragmentation may happen in these blocks or
          even across blocks because Oracle allows rows
          to span blocks
          TableA Block n
        End of TableA Extent 1
        another extent for TableA
      (end of segment 1 contents)
      (segment 2 contents)
        TableA Extent 5
          blocks here
        End of TableA Extent 5
        more extents for TableA
      (end of segment 2 contents)
      and so on
      (more segments belonging to TableA)
    end of Tablespace TablespaceExclusiveForTableAThe fragmentation you mentioned takes place in both cases. In the first case, regardless of fragmentation, some segments don't belong to the table that is being serially scanned, therefore they have to be skipped over at the OS level. In the second case, since all the extents belong to the same table, they can be read serially at the OS level. I realize that in that case the segments may not be read in the "right" sequence but they don't have to because they can be served to the client app in sequence.
    It is because of this that, I thought that if a particular table is mostly read serially, there might be a performance benefit (and also less work for Oracle) to dedicate a tablespace to it.
    I can't wait to see what you think of this :)
    John.

  • Undo Tablespace - newbie question

    Q1. Is an Undo Tablespace mandatory in a database ? I thought the only mandatories were SYSTEM, SYSAUX and TEMP ?
    Q2. What happens if you do not have an Undo Tablespace ?
    Q2. How does an Undo Tablespace relate to Undo / Rollback Segments in a database ?

    >
    Just to give simple, one-liner replies though its all covered in the doc link given by Helios,
    Q1. Is an Undo Tablespace mandatory in a database ? I thought the only mandatories were SYSTEM, SYSAUX and TEMP ?Yes, it is a mandatory tablespace loss of which would be requiring you to do a closed database recovery.
    Q2. What happens if you do not have an Undo Tablespace ?The system tablespace's Undo segment would be used. But that's a bad idea and you should have one .
    Q2. How does an Undo Tablespace relate to Undo / Rollback Segments in a database ?Because Undo segments are no where else but within the Undo tablespace only.
    HTH
    Aman....

  • Multiple tablespace maxsize value question

    Hi,
    I am seeing multiple value on same tablespace after this query.
    select tablespace_name, MAXBYTES from dba_data_files;
    TABLESPACE_NAME MAXBYTES
    tbs1                    8589934592
    tbs1                    2.2549E+10
    tbs1                1.2885E+10
    tbs1                1.2885E+10
    Which one is the value specify where our tablespace can grow to?
    Thanks

    one is the value specify where our tablespace can grow to?Technically the size limit is defined per datafile. There is no definition of size limit at the tablespace level. A Tablespace is a logical grouping of datafiles. Size is a physical limit so it is applied at the physical datafiles.
    Therefore, you need to sum across DBA_DATA_FILES entries for the limit for a Tablespace.
    Something like
    select tablespace_name, sum(bytes)/1048576 Total_Size_MB, sum(maxbytes)/1048576 Total_MaxSize_MB
    from dba_data_files
    group by tablespace_name
    order by tablespace_name
    /This is assuming that AUTOEXTEND is set to ON for each datafile and that MAXBYTES is equal to or greater than BYTES for each datafile.
    Hemant K Chitale
    Edited by: Hemant K Chitale on Oct 31, 2011 11:58 AM

  • Tablespaces : 2 Questions

    hello,
    im a informatik student from hamburg,
    we have the course databasedesign with focus on oracle dbms.
    in the past i worked 2 years a bit at oracle 8i and 9i databases as administrator, therfor i have some little konwledge.
    our professor told us:
    1.
    oracle recommend that a tablespace shoudnt greater than 10 gb, i ask him if he mean that the tablespace files shouldnt be greate, he told me that he means the real tablespace, not the tablespace files.
    2.
    my professor also told us that we can create a single table over more than 1 tablespace, i never heard something about that option. i asked him and he told me he never did it but it shoud really be possible, mybe create table option.
    at both pionts i never heard about it, and at my search at the internet i dindt found some relevant information.
    maybe i get some answers at this forum :o)
    thanks
    Andreas

    Hi,
    Oracle 10g now supports Bigfile Tablespace whcih can contain even very big datafile. See the following abstract from Oracle Document:
    Bigfile Tablespaces
    A bigfile tablespace is a tablespace with a single, but very large (up to 4G blocks) datafile. Traditional smallfile tablespaces, in contrast, can contain multiple datafiles, but the files cannot be as large. The benefits of bigfile tablespaces are the following:
    A bigfile tablespace with 8K blocks can contain a 32 terabyte datafile. A bigfile tablespace with 32K blocks can contain a 128 terabyte datafile. The maximum number of datafiles in an Oracle Database is limited (usually to 64K files). Therefore, bigfile tablespaces can significantly enhance the storage capacity of an Oracle Database.
    Bigfile tablespaces can reduce the number of datafiles needed for a database. An additional benefit is that the DB_FILES initialization parameter and MAXDATAFILES parameter of the CREATE DATABASE and CREATE CONTROLFILE statements can be adjusted to reduce the amount of SGA space required for datafile information and the size of the control file.
    Bigfile tablespaces simplify database management by providing datafile transparency. SQL syntax for the ALTER TABLESPACE statement lets you perform operations on tablespaces, rather than the underlying individual datafiles.
    Bigfile tablespaces are supported only for locally managed tablespaces with automatic segment-space management, with three exceptions: locally managed undo tablespaces, temporary tablespaces, and the SYSTEM tablespace can be bigfile tablespaces even if their segments are manually managed.

  • Autoextend tablespace query question

    I set my regular tablespace datafile to autoextend the next 400 meg up until 1 gig. What query can I use to see what these two values are when I know a datafile is set to be autoextend, but I also want to know what the next and max values were set to when that dba set that datafile to be autoextend. I know this time because I know I ran the alter database datafile autoextend command with next 400 and maxsize 1 gig, but what if I didn't know that?
    What is the query?
    Thanks,
    --Justin                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    SQL> desc dba_data_files
    Name                            Null?    Type
    FILE_NAME                             VARCHAR2(513)
    FILE_ID                             NUMBER
    TABLESPACE_NAME                        VARCHAR2(30)
    BYTES                                  NUMBER
    BLOCKS                              NUMBER
    STATUS                              VARCHAR2(9)
    RELATIVE_FNO                             NUMBER
    AUTOEXTENSIBLE                         VARCHAR2(3)
    MAXBYTES                             NUMBER
    MAXBLOCKS                             NUMBER
    INCREMENT_BY                             NUMBER
    USER_BYTES                             NUMBER
    USER_BLOCKS                             NUMBER
    ONLINE_STATUS                             VARCHAR2(7)

  • Restoring from RMAN tablespace backup ; Few questions

    11.2.0.3/RHEL 5.8
    We have a RAC DB which is used by more than 20 applications. One schema for each application and one tablespace for each schema.
    We have a schema with 130gb in size. All Objects in this schema use a single tablespace MCS_DATA.
    This weekend we are applying some changes involving DDL, Code and Data .Usually we take an expdp backup of the schema before the activity starts and later if something goes wrong with script deployment we'll revert to old state by dropping the schema and doing an impdp from the expdp backup.
    Question1.
    Can we do an RMAN tablespace only backup and if something goes wrong with script deployment can we drop the schema and the tablespace and then create an empty schema and then restore from the tablespace backup ?
    Question2.
    If the above is possible , can you explain how it is going to work out because we are essentially plugging (restore,recover) in a tablespace to the database. Any potential problems ?
    Question3. If the above (Question1) is possible, will restore/recover of this tablespace require a downtime for the entire DB ?

    Tom;
    If you are talking about RMAN TSPITR then yes you can. See - Purpose of RMAN TSPTIR in Backup and Recovery User's Guide E10642-03.
    The problem with TSPTIR is bulk. You need a lot of disk space to create a copy and then data pump the information out and back in. I just tested this on 11.2.0.3 and its slow. RMAN created a script which produced an AUX instance and did the data pump, but I had clean up afterwards. If it errors out you can have an AUX instance hanging out in the background.
    For TSPTIR you will need an area on the disk to server as an auxiliary destination large enough to hold what you are recovering plus the SYSTEM, UNDO and TEMP tablespaces.
    I would probably look at Transportable tablespaces as a possible option too.
    http://docs.oracle.com/cd/E25054_01/backup.1111/e10642/rcmttbsb.htm
    E10642-03 has a section for recovering a tablespace in chapter 2. The Tablespace must be offline, but the database can be up.
    This uses "restore tablespace" and "recover tablespace" commands. You would perform this type of recovery when you are say missing a datafile. You can recover any tablespace except SYSTEM and UNDO with this.
    Data Pump might be an option too, but given your tablespace size I would have worries about recovery time. Oracle lets you set compression
    and a limit to each file produced.
    expdp TABLESPACES=YOUR_DATA dumpfile=DATA_PUMP_DIR:ts_dumps_%U.dmp LOGFILE=DATA_PUMP_DIR:ts_dumps_log.log parallel=2 filesize=10G compression=ALL
    Given the size of your database a better option might be something like Data Guard as your recovery time would be brutal.
    Best Regards
    mseberg

Maybe you are looking for

  • How can I create a query with tables in INFOSET?

    Dear Gurus, How can I create a query with tables in INFOSET? Just tables and fields INFOSET? Kind Regards,

  • Halting Timer() in order to show diffrent data

    I I wrote this little script shown below, that shows images from an array and displays them one by one on the screen. Now i have been trying to implement how to display another screen perhaps while halting all the action on the main screen and displa

  • Query to cube using rscrm_bapi

    can we load data from a query with newselection to cube using rscrm_bapi. During  check these warings occurs Key figure  (F) is not a basic key figure Key figure  has no fixed currency; requires currency conversion please suggest Regards, Raj

  • WLC 5508 with 6.0.188 -- ap-manager interface..

    6.0.188 code on new 5508 WLC does not show ap-manager interface. 6.0.188 code on 4404 wlc does have ap-manager interface. Both are working fine. Why is that?

  • Cookie / url rewriting doubt

    1) Browser cookie support enabled. Request first sent & server sets the session ID as cookie in the HTTP response header. 2) Browser sends the cookie back while making the next request to the server. Now the server picks up sessionID cookie and thus