Query to consulting tablespaces of a tables

Hello, I want to obtain the tablespaces that contain the tables of my data.
What is the query I need to use?.
Thank's.

You can use
select tablespace_name from dba_tables where table_name='YOUR TABLE NAME';
Jafar

Similar Messages

  • Query to display tablespace (PSAPBTABD) table

    Experts,
    We need to take the list of tables only in "PSAPBTABD" tablespace with following requirements.
    NUM_ROWS,
    AVG_ROW_LEN ROWLEN,
    BLOCKS,
    We have query but it downloads common for tables.
    SELECT * FROM
    ( SELECT
        SUBSTR(TABLE_NAME, 1, 21) TABLE_NAME,
        NUM_ROWS,
        AVG_ROW_LEN ROWLEN,
        BLOCKS,
        ROUND((AVG_ROW_LEN + 1) * NUM_ROWS / 1000000, 0)
    NET_MB,
        ROUND(BLOCKS * (8000 - 23 * INI_TRANS) *
          (1 - PCT_FREE / 100) / 1000000, 0) GROSS_MB,
        ROUND((BLOCKS * (8000 - 23 * INI_TRANS) * (1 - PCT_FREE/ 100) -
          (AVG_ROW_LEN + 1) * NUM_ROWS) / 1000000) "WASTED_MB"
      FROM DBA_TABLES
      WHERE
        NUM_ROWS IS NOT NULL AND
        PARTITIONED = 'NO' AND
        (IOT_TYPE != 'IOT' OR IOT_TYPE IS NULL)
      ORDER BY 7 DESC)
    WHERE ROWNUM <= 10;
    Please let us know how to query a particular tablespace table only
    Thanks
    Malai

    Hi,
    I do not know where you copy your query, but you may try to understand it and then you would find your answer.
    The documentation is your friend
    SELECT * FROM
    ( SELECT
    "BBABLABLA"
    FROM
                                          DBA_TABLES
    WHERE
    NUM_ROWS IS NOT NULL AND
    PARTITIONED = 'NO' AND
    (IOT_TYPE != 'IOT' OR IOT_TYPE IS NULL)
    ORDER BY 7 DESC)
    WHERE ROWNUM <= 10;
    you are selecting from DBA_TABLES
    what are the columns of this view? clue, look at the documentation
    There is a column called "TABLESPACE_NAME" ....
    Then you can put a condition very easily to show ONLY one tablespace

  • Change Tablespace of a table with LONG column

    I have a 9i database that I have just gotten control of. At this point there is just one big dictionary managed tablespace for everything created by users. I am trying to move to multiple locally managed tablespaces with fixed extent sizes but I have run into a problem.
    I have one table with one LONG datatype column. Apparently there is a huge amount of work involved to change the code if I make it a BLOB so that is out.
    At this point I would like to change the tablespace of this table but I can't move it the normal way because of the LONG column. I have found mention of being able to do this with "COPY" but I can't find any documentation on the "COPY" command in the 9i Docs.
    Any help would be appreciated,
    Chris S.

    Chris-
    Can't you create your new table ahead of time in your new tablespace?
    You could then use a statement like:
    COPY FROM old/your_password@olddb TO new/your_password@newdb -
    REPLACE NEWTABLE -
    USING SELECT * FROM OLDTABLE;

  • SELECT * cannot be used in an INSERT INTO query when the source or destination table contains a multivalued field

    Hi,
    I am using Access 2013 and I have the following VBA code, 
    strSQL = "INSERT INTO Master SELECT * from Master WHERE ID = 1"
     DoCmd.RunSQL (strSQL)
    when the SQL statement is run, I got this error.
    SELECT * cannot be used in an INSERT INTO query when the source or destination table contains a multivalued field
    Any suggestion on how to get around this?
    Please advice and your help would be greatly appreciated!

    Rather than modelling the many-to-many relationship type by means of a multi-valued field, do so by the conventional means of modelling the relationship type by a table which resolves it into two one-to-many relationship types.  You give no indication
    of what is being modelled here, so let's assume a generic model where there is a many-to-many relationship type between Masters and Slaves, for which you'd have the following tables:
    Masters
    ....MasterID  (PK)
    ....Master
    Slaves
    ....SlaveID  (PK)
    ....Slave
    and to model the relationship type:
    SlaveMastership
    ....SlaveID  (FK)
    ....MasterID  (FK)
    The primary key of the last is a composite one of the two foreign keys SlaveID and MasterID.
    You appear to be trying to insert duplicates of a subset of rows from the same table.  With the above structure, to do this you would firstly have to insert rows into the referenced table Masters for all columns bar the key, which, presuming this to be
    an autonumber column, would be assigned new values automatically.  To map these new rows to the same rows in Slaves as the original subset you would then need to insert rows into SlaveMastership with the same SlaveID values as those in Slaves referenced
    by those rows in Slavemastership which referenced the keys of the original subset of rows from Masters, and the MasterID values of the rows inserted in the first insert operation.  This would require joins to be made between the original and the new subsets
    of rows in two instances of Masters on other columns which constitute a candidate key of Masters, so that the rows from SlaveMastership can be identified.
    You'll find examples of these sort of insert operations in DecomposerDemo.zip in my public databases folder at:
    https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169
    If you have difficulty opening the link copy its text (NB, not the link location) and paste it into your browser's address bar.
    In this little demo file non-normalized data from Excel is decomposed into a set of normalized tables.  Unlike your situation this does not involve duplication of rows into the same table, but the methodology for the insertion of rows into a table which
    models a many-to-many relationship type is broadly the same.
    The fact that you have this requirement to duplicate a subset of rows into the same table, however, does make me wonder about the validity of the underlying logical model.  I think it would help us if you could describe in detail just what in real world
    terms is being modelled by this table, and the purpose of the insert operation which you are attempting.
    Ken Sheridan, Stafford, England

  • Spatial Query across schemas. one version enabled table another not -Hanged

    Hi,
    I am executing a PL/sql procedure where a Spatial query run across two schemas. One table(in x schema) is version enabled and second table(in y schema) is Unversioned. Add to that complexity I am running the procedure from third user logon. I think I have enough previleges, as I won't get any error message.
    But, Procedure worked fine when there is no table is version enabled. It started giving problem when one table got version enabled.
    I have tried by setting " DBMS_WM.Gotoworkspace('LIVE');" before running spatial query. But still no luck, process just hangs on the spatial query.
    I tried by using physical name of the Table (table1_LT) which is making it to work. But, as per Workspace manager guide, applications, programs should NOT use, this physical tables(because it is not the correct way on versioned table).
    1. How can I hint to my query, to use a table from only live version?
    2. Why Query is hanging forever (even tried by leaving it over night....)
    Normally it used to take one or two minutes(before versioning..)
    I have posted it Workspace manager forum, But No Luck (people seems to be shy away after seeing "Spatial query" )
    Any help is highly appriciated

    Hi,
    I will need to know more details about the specific query you are performing. So, please do the following:
    1. list the actual query that you are using
    2. generate an explain plan of the query both before and after the table was version enabled. use @?/rdbms/admin/utlxpls or anything that generates the predicate information.
    3. also, give any pertinent details about the table(size of the table, number of rows expected to be returned, column types in the table, etc).
    Based on that, I will see if I can suggest a possible hint that may be able to improve the performance of your query.
    Regards,
    Ben

  • CANT execute query with parameter on user defined tables using query genera

    Dear All,
    I have problem when executing query with parameter on user defined tables using query generator.
    It seems SBO cannot accept parameter to query user defined tables.
    I've tried these:
    SELECT T0.U_Status FROM [@ST_PR_H] T0 WHERE T0.U_Status = [%0] --- this FAIL
    I try to pass the value directly without using parameter and It works
    SELECT T0.U_Status FROM [@ST_PR_H] T0 WHERE T0.U_Status = 2 --- this SUCCESS
    This one works
    SELECT * FROM RDOC T0 WHERE T0.width =[%0]  --- this SUCCESS
    and this one works too
    SELECT * FROM RDOC T0 WHERE T0.width = 595  --- this SUCCESS
    Is there anyone can help me ....???
    Thanks,
    Alfa

    I  generated this code using query wizard ....
    SELECT T0.[U_Status] AS 'Document Status' FROM  [dbo].[@ST_PR_H] T0  WHERE T0.[U_Status] = (N'2' )
    and replaced the (N'2' ) with [%0]
    SELECT T0.[U_Status] AS 'Document Status' FROM  [dbo].[@ST_PR_H] T0  WHERE T0.[U_Status] = [%0]
    and It worked ......
    Thanks 4 all .....

  • Query on Creating and Populating I$ table on different condition

    Hi,
    I have a query on creating and populating I$ table on different condition.In which condition the I$ table is created??And These condition are mentioned below:
    1)*source and staging area* are on same server(i.e target is on another server)
    2)*staging area and Target* are on same server(i.e source is on another server)
    3)*source,staging area and Target* are on *3 different* server
    4)source,staging area and Target are on same server
    Thanks

    I am not very much clear about your question. Still trying my best to clear it out.
    In your all above requirement I$ table will be created.
    If staging same as target ( One database,one user) then all temp tables will be created under this user
    If staging is different than target ( One database,two user (A,B)) then all temp tables will be created under this user A (lets consider) and data will be inserted to the target table that is present in user B
    If staging is different than target ( Two database,two user (A1,A2), not recommended architecture) then all temp tables will be created under this user A1 (database A1) and data will be inserted to the target table that is present in user A2 (database A2)
    If source,staging,target will under one database then No LKM is required,IKM is sufficient to load the data into target. Specifically for this you can see one example given by Craig.
    http://s3.amazonaws.com/Ora/ODI-Simple_SELECT_and_INSERT-interface.swf
    Thanks.

  • How to change tablespace for a table in 10g?

    Does anyone know how to change tablespace for a table (like changing tablespace for an index [alter index ... rebuild tablespace ... ])? Many thanks in advance.

    alter table tablename move tablespace newtsname;
    You need to rebuild the indexes after the move.

  • Query to conbine 2 lines from table

    Hi all
    I have a problem in constructing sql query to combine 2 lines from table in Oracle 11g database.
    I will explain, i have one table containing call transactions loaded in one table from 2 different sources, one is from IN which is tagged IN and the other from MSC which is tagged MSC. One subscriber call is registered in IN and MSC and loaded in the table. The problem is the data from IN contains the call duration but not contains Cell information. I'm creating datamart to combine the two lines in one lines but i don't know how to do from query.
    Here is an overview if my data:
    Source     Orig     Dest     startdate     cellid     duration
    MSC     550000     220000     15/05/2012 02:03:29     235e     
    IN     550000 220000     15/05/2012 02:03:30          10
    MSC     550000     220000     15/05/2012 02:04:00     235e     
    IN     550000     220000     15/05/2012 02:03:59          15
    MSC     550000     220001     15/05/2012 02:06:18     235f     
    IN     550000     220001     15/05/2012 02:06:18          60
    The line i want to have is for each line of IN source i sjhould have the cellid like below:
    IN     550000     220000     15/05/2012 02:03:30     235e     10
    IN     550000     220000     15/05/2012 02:03:59     235e     15
    IN     550000     220001     15/05/2012 02:06:18     235f     60
    The query should linked by Orig, Dest and date but for some rows there are difference in seconds.
    Please help.
    Lucienot.

    user13513449 wrote:
    Hi
    Thanks for the reply, here below the create table script and some insert data example:
    CREATE TABLE TRANS
    CALLTRANSTYPE NVARCHAR2(6),
    ORIGANI NVARCHAR2(40),
    TERMANI NVARCHAR2(40),
    STARTTIME DATE,
    STOPTIME DATE,
    CELLID NVARCHAR2(10),
    CONNECTSECONDS NUMBER,
    SWITCHCALLCHARGE NUMBER
    0     555283806     222591626     05/15/2012 00:10:04     05/15/2012 00:13:31     03e9:7565     O     207.00     
    Insert into trans values('MSG','555283806','222591626',to_date('05/15/2012 00:10:04','mm/dd/yyyy hh24:mi:ss'),to_date('05/15/2012 00:13:31','mm/dd/yyyy hh24:mi:ss'),'03e9:7565',10,null); ...It looks like there's some mistake at the end of the CREATE TABLE statement and before the first INSERT statement. Is that supposed to be another INSERT statement?
    Test your code and, if necessary, correct it before you post it.
    Is that sample data supposed to produce the results you posted originally?
    If so, explain, step by step, ho9w you get them.
    If not, post the results you want from that smaple data, formatted, between \ tags, as explained in the forum FAQ {message:id=9360002}
    In my orioginal message, I said "ORDER BY" where I meant "GROUP BY".  If you change that, and use your new table and column names, does the query I posted earlier do what you want?  If not, point out where it is wrong, and show how you might get the right results in those places.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How i can change tablespace of a table in oracle 8.04

    Dear I want to move tablespace of a table in oracle 8.04 version but it is not working my statement is
    ALTER TABLE ACCOUNTING_ENTRY MOVE TABLESPACE EDI_TSPACE;
    and got the following error message:
    ORA-14004: missing PARTITION keyword
    how i can change tablespace of a table

    Hi,
    It seems that the move tablespace feature is available on 8.1 or higher versions of Oracle. In your case you can try one of the foll....
    Option 1:
    Step 1:CREATE TABLE T1
    TABLESPACE NEWTBS
    AS(SELECT * FROM T);
    Step 2: Rename or Drop the old table.
    Step 3: Rename the new table to the old table name.
    Option 2:
    Step 1: Export the old table.
    Step 2: Rename or Drop the old table.
    Step 3: Create the table in the new tablespace. You may use the INDEXFILE from the imp command here.
    Step 4: Import the old table and use IGNORE=Y
    Reply back if you need assistance on syntax.
    Regards.

  • Change tablespace of Wf tables URGENT!!

    Hi'
    we have a problem with the tablespace the workflow tables are stored on. The problem is, that it is nearing max size at rapid pase.
    The question is; What happens, if we change the table space of the workflow tables? Will running workflows be corruptet, if yes can they be restartet? What other problems will we face?
    Any help will be highly appreciatet.
    Kind regards
    Mikkel

    Hi Mikkel,
    I would strongly recommend NOT to change tablespaces, for a few reasons.
    They are optimized by SAP to provide the best performance. E.g. log tables are on different tablespaces to transaction tables - thus different disks, thus can be written in parallel. It goes far deeper than that, there are many DB parameters associated with a tablspace.
    Also, you will have to restrict access or disable WF or possibly even shut down your system (you didn't mention - MS-SQL, Oracle, MaxDB, DB2..., Version? SAP Version?)
    Why not extend the tablespace? This is really something your Basis guys should be able to cope with! Alternatively look at Archiving (Huh?) in a great big hurry - Tx. SARA.
    Another quick-fix not really recommended is SWWL - use it on some high-volume flows e.g. some useless IDOC error tasks that people keep switching on and redirecting to dummy users on many systems. BUT aside from big notes advising against productive use, be aware that auditors may not approve of WI deletion logs in your system....
    Cheers
    Mike

  • Move a table from one table space to another tablespace and different table

    Hi,
    I have a 60gb table nearly 200 million records in it and the table has range partition.
    inorder to archive this table we have created 3 different tables and 3 different tablespaces for the tables.
    I want to move certain partitions to tableA and certain partitions to tableB and on to tableC and on the top i'm creating a view to access these 3 tables.
    Is there any technique to move the partition wise data to different tables. is there any new technique in 11g database?
    The database is 11gr1
    linux rhel5 x-86-64
    Edited by: user8894072 on Oct 12, 2010 2:03 PM

    if i do that like each partition has some millions of records. and the undotablespace is filling out and also the temp table space is filling out. The performance is very very poor if i use the create statement.
    Insert INTO TableA (select * FROM <BASETABLE> where pay_end_dt between '01-Jan-1999' and '31-Dec-2005')
    the above statement is also degrading the performance. I just need the synatx to move the partioned wise data to new table.

  • Doubt with parameters creating a tablespace and a table

    I've created a tablespace and a table with these data:
    CREATE TABLESPACE "TAB_FILE"
    LOGGING
    DATAFILE 'C:\TAB_FILE.ora' SIZE 20M
    AUTOEXTEND ON NEXT 5M MAXSIZE 500M
    EXTENT MANAGEMENT LOCAL
    SEGMENT SPACE MANAGEMENT AUTO;
    CREATE TABLE FILE
    IDFILE NUMBER(16),
    VERSION VARCHAR2(5) NOT NULL,
    NAME VARCHAR2(40) NOT NULL,
    TABLESPACE TAB_FILE,
    PCTFREE 20,
    PCTUSED 40,
    INITRANS 6,
    MAXTRANS 12,
    STORAGE (INITIAL 1024K NEXT 1024K PCTINCREASE 0 MAXEXTENTS 8);
    Is it useless (or not advisable) to write the parameters
    PCTFREE,
    PCTUSED,
    INITRANS,
    MAXTRANS and
    STORAGE (INITIAL 1024K NEXT 1024K PCTINCREASE 0 MAXEXTENTS 8)
    if I've written in the tablespace creation
    EXTENT MANAGEMENT LOCAL
    SEGMENT SPACE MANAGEMENT AUTO?
    Thanks a lot

    I've read that autoallocate parameter is worse than uniform size:
    "Note - there is an autoallocate option for LMTs that can be used instead of uniform size X. This still slices the file up into uniform chunks (in this case always at 64K), and uses one bit per chunk. However, instead of equating one chunk with one extent, Oracle will consider past history and available gaps to decide what size extent to allocate. The extent will be one of a limited set of sizes - 64K, 1MB, 8MB, 64MB. For relatively small, simple systems where there isn't much information available about proper sizing requirements, this can be a minimum fuss mechanism to adopt; but in general I believe you should stick with uniform sizing.......But why is it so convenient to force every extent in the tablespace to be the same size ? (And at this point, you may appreciate my earlier comment about avoiding autoallocate LMTs, which allow for half a dozen sizes of extents). First, ease of monitoring space; secondly, convenience of data packing, and third, reliability of object rebuilds. "
    Is it right? If yes, could anyone tell me with size could be correct? Does it depend on the size of the table, for example? Is there any formula to get the uniform size?
    Message was edited by:
    user573997

  • Querying user enabled status from SSO tables

    Hi guys,
    I'm having issues trying to locate a table/view I can query to get specific SSO user information. In particular I am interested in listing usernames and their enabled/disabled status. In the OID front-end, under the user directory there is a column for 'Enabled' and this is what I am trying to find in the table structure.
    Any help appreciated!
    Cheers,
    Chris

    Thank you for that! I have extended this query to contain the ods.ct_uid table as follows as some users were being omitted. Also I have included a decode statement that changes the 'enabled' or 'disabled' to a 0 or 1.
    SELECT
    UPPER(cus.attrvalue) username,
    DECODE(NVL(ena.attrvalue, 'enabled'), 'enabled', 1, 'disabled', 0) enabled
    FROM
    ods.ct_orclisenabled ena,
    ods.ct_uid cus,
    ods.ct_cn ctu
    WHERE cus.entryid = ctu.entryid
    AND ena.entryid (+) = ctu.entryid

  • Query to find all relationships between tables

    Please help me wit the following
    Query to find all relationships between tables
    SAMPLE OUTPUT:
    PRIMTAB PRIMCOL FOREIGNTAB FOREIGN KEY
    DEPT DEPTNO EMP DEPTNO
    Return all records in the database.
    PLEASE HELP

    SET LINESIZE 150
    COLUMN primcol FORMAT A30
    COLUMN foreigncol FORMAT A30
    SELECT uc1.table_name AS primtab,
    ucc1.column_name AS primcol,
    uc2.table_name AS foreigntab,
    ucc2.column_name AS foreigncol
    FROM user_constraints uc1,
    user_constraints uc2,
    user_cons_columns ucc1,
    user_cons_columns ucc2
    WHERE uc1.constraint_name = uc2.r_constraint_name
    AND uc1.constraint_name = ucc1.constraint_name
    AND uc2.constraint_name = ucc2.constraint_name
    AND ucc1.position = ucc2.position
    ORDER BY uc1.table_name,
    ucc1.position
    /

Maybe you are looking for

  • Firefox doesn't work even after i setup it

    ''when i try to open firefox, it's show me this alert : Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system. i try to close it from the regastry but i neve

  • Quick time won't stream anymore

    I've been watching quicktime streaming videos before (more specifically the Apple Events) and now I can't. I tried opening the link in both FireFox and Safari, and nothing. I deleted quicktime preferences in my library (under my user account) and sti

  • SBO 2005 PL1 : Fixed Assets

    We are deploying SBO in Lebanon - For the Fixed Assets, they have one legal requirement which oblige them to force the Residual Value to one when it's totaly amortize until the equipment or material is not scrap out. How could we force the vaue to on

  • Bank Data

    Does anyone know how to replicate bank data for business partner into SRM?

  • Doubt in using DBMS_AW.Execute

    Hi, Can some tell me how I can get the results back from the OLAP engine to the pl/sql engine after executing a particular command using "DBMS_AW.Execute" I have a variable in one AW. I just want to fetch the value of that variable and use it in pl/s