My table exists in which tablespace?

hi
i have created two tablespaces t1 and t2 respectively as
create tablespace ts1 datafile 'f:\oracle\oradata\data1\ts1.dbf'size 5m autoextend on;and
create tablespace ts2 datafile 'f:\oracle\oradata\data1\ts2.dbf'size 5m autoextend on;i have created two tables namely college and school as follows.
create table college (name varchar(20), location varchar(20)) tablespace ts1;
create table school (name varchar(20), location varchar(20)) tablespace ts2;in the both tables, i have made insertions(5 in each)
i want to know in which tablespace my tables are existing.
previously, i have tried the following command
select tablespace_name from dba_tables where table_name='college';the result of my query is
no rows selected
also i have tried this query too
select owner,table_name, tablespace_name from dba_tables where table_name='college';
here too the same results comes
how can i find it?

You are not finding, because object names are stored in Upper Case unless you do'nt use " ' " with them :
select tablespace_name from dba_tables where table_name='college';
replace college with "COLLEGE"
select tablespace_name from dba_tables where table_name='COLLEGE';

Similar Messages

  • Which table belong to which table

    Wanted to know which table belongs to which tablespace or datafile.
    example table name - ABC
    Facing problem ORA-01653: unable to extend table ABC but no tablespace is mentioned

    Richa wrote:
    Wanted to know which table belongs to which tablespace or datafile.
    example table name - ABC
    Facing problem ORA-01653: unable to extend table ABC but no tablespace is mentionedSELECT TABLESPACE_NAME FROM USER_TABLES WHERE TABLE_NAME = 'ABC';

  • Adding a new Big INT column to existing table in production, which holds 700 million records will impact anything in production?

    Hi Guys,
    I have to add a new Big INT column to existing table in production, which holds 700 million records and would like to know the impact?
    I have been tolled by one of my colleagues that last time they tried adding a column to same table during working hour and it locked out the table and impacted the users.
    Please suggest/share If any one had similar experience.
    Thanks Shiven:) If Answer is Helpful, Please Vote

    If you add a new column to a table using an ALTER TABLE ADD command and specify that the new column allows NULLs and you do not define a default value, then it will take a table lock.  However, once it gets the table lock, it will essentially run instantly
    and then free the table lock.  That will add this new column as the last column in the table, for example
    ALTER MyTable ADD MyNewColumn bigint NULL;
    But if you your change adds a new column with a default value, or you do something like using table designer to add the new column in the middle of the current list of columns, then SQL will have to rewrite the table.  So it will get a table lock, rewrite
    the whole table and then free the table lock.  That will take a considerable amount of time and the table lock will be held for that whole period of time.
    But, no matter how you make the change, if at all possible, I would not alter a table schema on a production database during working hours.  Do it when nothing else is going on.
    Tom

  • How can I write a SQL statement which checks if a table exists?

    How can I write a SQL statement which tells me whether a table exists?

    execute an sql query: select * from <tablename>
    catch the exception n check whether the erroe code
    matches the one that occurs for table doesn't exist
    that's itHow is your answer any different from the one given in the first reply?
    It isn't.
    As WorkForFood says DatabaseMetaData has a bunch of methods for getting information about tables but this is more useful when you don't know the names of any of the tables.. it sounds like you do so I would concur SELECT from table is probably the quickest way to go. If it helps the Xopen error should be either S1000 or 42S01 (I think) but I would try and see if there is a specific vendor code for table not found/not exists error and check for that.

  • Where the table is stored.,temp tablespace is not freed .

    I have created one table in oracle 8.1.7 containing 500 mega records .
    my question is
    1. where the table is stored as the size of users.dbf is just 20 mb and is used upto only 2 MB.
    so it must not be there.
    2. the size of tools.dbf in tools tablespce is somewhere around 13GB. is it there?
    if yes then why?
    3. also the size of temp01.dbf+temp02.dbf + temp03.dbf in temp table space is somewhere around 14 gb and it is going on increasing. say when i give command to create index it after running for some 8 hrs gives error that disk space is full . when i again run he command after adding more file and space the command runs but the space earlier utilised in temp is not released .
    i have tried restrating the oracle service . but it does not release the space utilised by temp.Also the table space is temp not permanent.
    IMP.
    4. can i manually delete the data files in temp.
    will it affect my database????
    thanksin adv.

    I have created one table in oracle 8.1.7 containing 500 mega records .
    my question is
    1. where the table is stored as the size of users.dbf is just 20 mb and is used upto only 2 MB.
    so it must not be there.
    2. the size of tools.dbf in tools tablespce is somewhere around 13GB. is it there?
    if yes then why?
    3. also the size of temp01.dbf+temp02.dbf + temp03.dbf in temp table space is somewhere around 14 gb and it is going on increasing. say when i give command to create index it after running for some 8 hrs gives error that disk space is full . when i again run he command after adding more file and space the command runs but the space earlier utilised in temp is not released .
    i have tried restrating the oracle service . but it does not release the space utilised by temp.Also the table space is temp not permanent.
    IMP.
    4. can i manually delete the data files in temp.
    will it affect my database????
    thanksin adv. Query user_segments as the table owner. This will tell you which tablespace (also the size of you table allocation).
    Query dba_data_files, may need to be a DBA account (e.g. system). This will relate files to tablespaces.
    The files in dba_data_files and in v$logfile and the control files listed in init<sid>.ora comprise your database.
    Hope this helps
    Ken

  • No Fact table exists at this detail level error

    Hi All,
    I am trying to develop an RPD and was trying to use a simple example of joining two fact tables in OBIEE through confirmed dimension.
    This is my example:
    Fact A: Student ID (FK)......Measure1, Measure2...
    Fact B: Student ID (FK)........Measure A, Measure B
    DIM 1: Student ID (PK),.....
    I would like to give the users the option of joining Fact A and Fact B through Dim 1( Which is a conforming Dimension)
    I tried with out level based hierarchy and got NO Fact exists at this level of detail.
    Then I tried creating the level based hierarchy on Dim 1 and selected the detail level for the fact table and I am still getting the error message.
    Am i doing some thing wrong here ?  Or Am i missing any important setting ?
    Is there a way to check whether the dimension is a conforming dimension or not in OBIEE.
    Your help is much appreciated.
    Thanks
    Venu

    Can we use between operator in physical join. We did that, its successfully checking in, but when we re-open the join, its show in RED color.
    So, got doubt, can we use between?When you checkout the rpd object in online mode it would display in red, this is not an error.
    "No fact table exists at the requested level of detail"; what does this error meanThis error usually happens if you have not mapped the content level correctly in the logical table source.
    Rgds,
    Dpka

  • No fact table exists at the requested level of detai error

    Hi Gurus,
    Gud Evening,
    There is a report with 10 columns and its coming fine when ever we are adding new column some date column (Start Date) it is showing the below error
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 14025] No fact table exists at the requested level of detail:
    Can any give some suggestions..
    Regards

    Hi,
    You have to go to the fact LTS and set granularity for each dimension associated with it. You might be bringing a column from a dimension in your report, for which you didn't set up granularity in the facts LTS.
    Thanks
    Venkat
    OBIEEDeveloper

  • ORA-23309: object UMESH.PRODUCT_MASTER of type TABLE exists

    Hi,
    I have two schema on the two servers for replication replication is working fine.
    i export one schema to another so all the tables exists at both the sites.
    I am adding objects in the replication group using oracle enterprise manager
    console.
    some of the tables added fine.
    but some gives me error like.
    ORA-23309: object UMESH.PRODUCT_MASTER of type TABLE exists
    before adding this objects in the group i do like
    SQL> SELECT oname FROM DBA_REPOBJECT ;
    ONAME
    AC_ACCOUNT
    AC_ACCOUNT$RP
    AC_ACCOUNT$RP
    AC_ACCOUNT_MASTER
    AC_ACCOUNT_MASTER$RP
    AC_ACCOUNT_MASTER$RP
    6 rows selected.
    at both the sites.
    when i add product_master in the group then entries becomes like
    SQL> SELECT oname FROM DBA_REPOBJECT ;
    ONAME
    AC_ACCOUNT
    AC_ACCOUNT$RP
    AC_ACCOUNT$RP
    AC_ACCOUNT_MASTER
    AC_ACCOUNT_MASTER$RP
    AC_ACCOUNT_MASTER$RP
    PRODUCT_MASTER
    7 rows selected.
    but with the error in
    and when generate replication support.
    SQL> select  status,request,message,oname from dba_repcatlog;
    STATUS         REQUEST
    MESSAGE
    ONAME
    ERROR          CREATE_MASTER_REPOBJECT
    ORA-23309: object UMESH.PRODUCT_MASTER of type TABLE exists
    PRODUCT_MASTER
    ERROR          CREATE_MASTER_REPOBJECT
    ORA-23309: object UMESH.PRODUCT_MASTER of type TABLE exists
    PRODUCT_MASTER
    STATUS         REQUEST
    MESSAGE
    ONAME
    ERROR          GENERATE_INTERNAL_PKG_SUPPORT
    ORA-23308: object UMESH.PRODUCT_MASTER does not exist or is invalid
    PRODUCT_MASTER
    ERROR          GENERATE_INTERNAL_PKG_SUPPORT
    ORA-23308: object UMESH.PRODUCT_MASTER does not exist or is invalid
    STATUS         REQUEST
    MESSAGE
    ONAME
    PRODUCT_MASTER
    ERROR          GENERATE_INTERNAL_PKG_SUPPORT
    ORA-23308: object UMESH.PRODUCT_MASTER does not exist or is invalid
    PRODUCT_MASTER
    but in the same situation other objects are working fine.i am fed up with this error.
    any help will be appreciated.
    Thanks
    Umesh
    null

    thanks hament
    I have two schema my master definition site have all the objects but second master
    site. have no object.
    i use these command like
    this is at master definition site.
    SQL> BEGIN
      2     DBMS_REPCAT.CREATE_MASTER_REPGROUP(
      3       gname => '"AA"',
      4       qualifier => '',
      5       group_comment => '');
      6  END;
      7  /
    PL/SQL procedure successfully completed.
    SQL> ed
    Wrote file afiedt.buf
      1  BEGIN
      2     DBMS_REPCAT.CREATE_MASTER_REPOBJECT(
      3       gname => '"AA"',
      4       type => 'TABLE',
      5       oname => '"PRODUCT_MASTER"',
      6       sname => '"UMESH"',
      7       copy_rows => TRUE,
      8       use_existing_object => FALSE);
      9* END;
    SQL> /
    PL/SQL procedure successfully completed.
    SQL> commit;
    Commit complete.
    SQL> BEGIN
      2     DBMS_REPCAT.ADD_MASTER_DATABASE (
      3        gname => 'AA',
      4        master => 'neo.world',
      5        use_existing_objects => FALSE,
      6        copy_rows => TRUE,
      7        propagation_mode => 'ASYNCHRONOUS');
      8  END;
      9  /
    PL/SQL procedure successfully completed.
    SQL> COMMIT;
    SQL> select source, status, master,sname, request, oname, type, message from dba_repcatlog;
    SOURCE
    STATUS
    MASTER
    SNAME                          REQUEST
    ONAME                          TYPE
    MESSAGE
    LOCAL.WORLD
    SOURCE
    STATUS
    MASTER
    SNAME                          REQUEST
    ONAME                          TYPE
    MESSAGE
    ERROR
    SOURCE
    STATUS
    MASTER
    SNAME                          REQUEST
    ONAME                          TYPE
    MESSAGE
    NEO.WORLD
    SOURCE
    STATUS
    MASTER
    SNAME                          REQUEST
    ONAME                          TYPE
    MESSAGE
    UMESH                          CREATE_MASTER_REPOBJECT
    SOURCE
    STATUS
    MASTER
    SNAME                          REQUEST
    ONAME                          TYPE
    MESSAGE
    PRODUCT_MASTER                 TABLE
    SOURCE
    STATUS
    MASTER
    SNAME                          REQUEST
    ONAME                          TYPE
    MESSAGE
    ORA-00942: table or view does not exist
    SOURCE
    STATUS
    MASTER
    SNAME                          REQUEST
    ONAME                          TYPE
    MESSAGE
    but according to me this table must be created at the second master site.
    which is main issue i am facing.
    and if i made product_master at second master site manually
    then execute this at master defination site.
    SQL> BEGIN
      2     DBMS_REPCAT.CREATE_MASTER_REPOBJECT(
      3       gname => '"AA"',
      4       type => 'TABLE',
      5       oname => '"PRODUCT_MASTER"',
      6       sname => '"UMESH"',
      7       copy_rows => TRUE,
      8       use_existing_object => TRUE);
      9  END;
    10  /
    BEGIN
    ERROR at line 1:
    ORA-23309: object "UMESH"."PRODUCT_MASTER" of type TABLE exists
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
    ORA-06512: at "SYS.DBMS_REPCAT_MAS", line 2552
    ORA-06512: at "SYS.DBMS_REPCAT", line 562
    ORA-06512: at line 2
    SQL> /
    PL/SQL procedure successfully completed.This is very strange if the table exists then error and if
    it doesn't then error.
    Thanks
    Message was edited by:
    Umesh Sharma

  • How to check if internal table exists in dynamical called subroutine ?

    Hi,
    in a dynamically called subroutine i'm using a internal table, but in some calls this table is not exist.
    How can i check in the code whether the internal table exist or not ?
    regards,
    Hans

    In Horst Keller's blog /people/horst.keller/blog/2005/05/27/abap-geek-10--everything-functions-150-but-how my issue is talked about :
    All other parameters are handled in a way as they were declared as global data objects in the top include of the function group, that can be used only during the execution of the function module: They are visible throughout the function group but you can access them only while the function module is active. If you access such a parameter and the respective function module is not executed, you get the runtime error GETWA_NOT_ASSIGNED (Why? Well, technically thos guys are represented via field symbols which are valid only during the runtime of the function module).
    The code is in SD pricing. Sometimes the code is called from function module PRICING_BUILD_XKOMV or PRICING_SUBSCREEN_PBO where TKOMV is defined as globalized parameter.
    And sometimes it is called from function module PRCING_CHECK where TKOMV is NOT defined as parameter.
    In the call of last function the dump occures on the ASSIGN statement :
         data: ls_tkomv like line of tkomv,
                  lv_tablename(30) type c value 'TKOMV[]'.
        field-symbols: <lfs> type any table.
         assign (lv_tablename) to <lfs>.
         if <lfs> is assigned.
    Any suggestions to solve the issue ?
    regards,
    Hans

  • How to check if database/table exists in MYSQL

    I am writing a program which accesses databases in MYSQL, is there any way to check if the databases exists on the MYSQL server and if not create one && to check if a table exists and create one of if it does not

    OK, found out that as special permissions needed to create databases I assume it cannot be done via my app but how about Tables

  • Dimension table and fact table exists data physically

    Hi experts,
    can anyone plz tell me weather dimension table and fact table exists data physically or not/

    Hi..Sudheer
    SAPu2019s BW is based on "Enhanced Star schema" or "Info Cubes" database design.This database design has a central database table, known as u2018Fact Tableu2019 which is surrounded by associated dimension tables.
    Fact table is surrounded by dimensional tables. Fact table is usually very large, that means it contains
    millions to billions of records.
    These dimension tables doesn't contain data  it contain references to the pointer tables that point to the master data tables which in turn contain Master data objects such as customer, material and destination country stored in BW as Info objects. An InfoObjects can contain single field definitions such as transaction data or complex Customer Master Data that hold attributes, hierarchy and customer texts that are stored in their own tables.
    SID is surrogate ID generated by the system. The SID tables are created when we create a master data IO. In SAP BW star schema, the distinction is made between two self contained areas: Infocube & master data tables/SID tables.
    The master data doesn't reside in the satr schema but resides in separate tables which are shared across all the star schemas in SAP BW. A numer ID is generated which connects the dimension tables of the infocube to that of the master data tables.
    The dimension tables contain the dim ID and SID of a particular IO. Using this SID the attributes and texts of an master data Io is accessed.
    The SID table is connected to the associated master data tables via teh char key.
    Fact table(Transaction data,DIM ID)<>Dimention Table(SID and Dim ID)<->Masterdata table(SID,IO)
    Thanks,
    Abha

  • User objests stored in which tablespace

    Hi,
    if we assign two tablespaces to a user with particular quota, in which tablespace user objects are going to store.

    Hello,
    if we assign two tablespaces to a user with particular quota, in which tablespace user objects are going to store. It depends on how you create the User and the Objects.
    When you create a User you should always assign a Default Tablespace.
    By that way, if you omit to specify the Tablespace when you create a Table / Index to this User, the Table or Index will be created into this Default Tablespace.
    Else, if no Default Tablespace is assigned to the User, the Table or Index may be stored into the SYSTEM Tablespace which is not recommended.
    So the best practice is to define a Default Tablespace for the User and to specify the Tablespace in the CREATE statement of the Table / Index.
    For Objects others than Table or Index (Views, Procedure, Packages,...) their definitions are stored into the SYSTEM Tablespace.
    Hope this help.
    Best regards,
    Jean-Valentin

  • RSRV Check Check if characteristic values of text table exist in SID table

    Hello Guys,
    I have run the RSRV check Check if characteristic values of text table exist in SID table and I got a warning
    when I check the Text table and compare it to attribute table, total entries in text table is more than entries in attribute table..
    TEXT TABLE DONT HAVE ANY LANGUAGE...
    is it possible that there are more entries in text rather than attributes... again THERE are no language..
    Many Thanks

    try to do a 'select * from table' and catch the
    exception as it might fail if the table doesn't exist.Which might take quite a time if the table is big! If you really want to do that I'd use SELECT * FROM table WHERE 1=2
    A better way is, to ask the DatabaseMetadata object to retrieve information about the table...
    Thomas

  • Is it possible to see decrease of table size & size of tablespace

    Hello
    I wander is it possible to see decrease of table size & size of tablespace(in db02 or in brtools). I have in mind decrease due to archiving in XI.
    Thank you in advance

    Hi,
    Yes it is possible to decrease of table size & inturn size of tablespace.
    You can go for table reorg.
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70c8f19f-8010-2c10-ac89-8d828039d8b4.
    Check SAP Note 541538 - FAQ: Reorganization
    Also
    1.From DB02--> detail analysis menu you can take out top 50 tables & indexes. you can mark the size of the index should be generally less than the table.If its more or very much similar size of table, you can rebuild it using SE14. This can free some space.
    or else you may use brspace to do this.
    http://help.sap.com/saphelp_nw70/helpdata/EN/58/6bec38c9fa7e44b7f2163905863575/frameset.htm
    In case of table this option is risky as it may result in data loss.
    2. Earlywatch alert gives the top 20 degenrated index. you can check that which also gives a factor 'storage quality'.
    3. Run report SAP_DROP_TMPTABLES. It removes temporary database objects. ( we do this in our BW system)
    Hope this helps.
    Thanks,
    Sushil
    Edited by: Sushil Suryawanshi on May 25, 2009 1:30 AM

  • Where the foreign key constraint is being physical store? Which tablespace?

    Hi,
    anyone got any idea where the foreign key constraint is being physical store? Which tablespace?
    Thank You...

    A foreign key constraint itself is purely logical -- there is no storage associated with it other than it's definition being stored in the data dictionary tables. If there is an index on the referencing column(s) then you can see where it is stored from the user_indexes view, although strictly speaking it's not part of the FK itself.

Maybe you are looking for