Forcing all schema objects to use one tablespace

Before importing i always create an empty schema using the following script.
CREATE USER scott IDENTIFIED BY tiger
DEFAULT TABLESPACE <font color="red"><b>hcdata</b></font>
TEMPORARY TABLESPACE TEMP;I want all the objects in the scott schema to use hcdata tablespace.
But tables in the dumpfile which i am going to import to the empty scott schema were created with DDLs like
CREATE TABLE BATCH_HIST_STAT
  BATCH_ID  NUMBER(9)                 NOT NULL,
  BATCH_NBR           VARCHAR2(15 CHAR)         NOT NULL,
  ITEM_ID              VARCHAR2(10 CHAR)         NOT NULL
TABLESPACE <font color="navy"><b>tmdata</b></font>
/Now when i try to import BATCH_HIST_STAT table, it will only use tmdata and i'll get errors if i haven't allocated enough space on tmdata. How can i force these objects to use only the DEFAULT TABLESPACE (hcdata in my example) i specified in the CREATE USER command.

make sure the user doesn't have unlimited tablespace provilige (as a result of GRANT RESOURCE).
Make sure the user has sufficient quota on the target tablespace and no quota on other tablespaces.
alter user ... quota unlimited on hcdata quota 0 on tmdata;
Sybrand Bakker
Senior Oracle DBA

Similar Messages

  • How do I find out all the objects I use in my application.

    As I am creating my documentation, I realized it would be helpful to know all the objects that my application uses ( tables, views, packages etc). Is there a way to find that out i.e. any script or simple alternative etc ?
    Thanks, folks!

    I am on version 3.0.1.00.08 and am trying to figure this out for this version.The navigation path is different but the report is available somewhere.
    Also, is there a way to get the sql from all the pages out ?What do you mean?
    Scott

  • Copy all the objects from the one system that start with (ZANK)

    hi to all,
    I have installed the name space /ank/ in the US system, we need to copy all the objects from the India system that start with (Zank) and re-create them as /ank/. problem is how can i copy objects and re-create.
    thanks

    Hi Ankal,
    I guess this is your second thread on the same question. Ok provide these information
    >>I have installed the name space /ank/ in the US system,
    Are you saying that you have a machine (US System) and i has a namespace /ank/ ? What all objects are there in this namespace?
    >>we need to copy all the objects from the India system that start with (Zank) and re-create them as /ank/.
    Is the India system on the same US system?
    Also tell me whether you have opened the home page of SAP XI/PI?  If yes , are you able to open Integration Repository? If yes then how these US and India systems are referred in Integration Repository? Are they referred as separate software components?
    Regards
    Suraj

  • On one mac, is it possible for just one user to download and use windows, or will it force all the users to use windows?

    I want to download windows on the guest identity, so that I can play pc games (which only work on windows), but I dont want to have to use windows on my regular user identity. Does anyone know if it will only download for the one user?

    no user is forced to use Windows.

  • Is there a way to find which DB object is used in which all pages

    Hi All,
    Is there any way by which we can find out which All Database objects are used in which all pages in an Application. Our Application is quite big and has lots of pages, So is there any report like functionality where I can check the DB objects used on page basis or any underlying view where we can get this information.
    Thanks,
    Vikas

    Hello Vikas,
    There are a couple of APEX Views which provide you with that information.
    If you go to Home>Utilities>Application Express Views
    following views may be useful to you:
    - APEX_APPLICATION_PAGE_DB_ITEMS
    - APEX_APPLICATION_PAGE_PROC
    There are a couple of others (for ex if you make use of flash charts, interactive reports etc) but if you start with the above you'll have a good starting point.
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/
    http://www.apexblogs.info/

  • Access to schema objects

    Guys,
    I am on 10g R2 and have this requirement.
    We refresh our QA environment from PROD every day ( exp/imp and schema refresh ). App team now have a requirement where by they want to create few objects including tables every day and load those tables with static data. This in a way doesn't need to be refreshed every day.. So, could place this in another schema. But we do not want to grant access on that schema to the user.
    Alternatively, we can get them to send the us a script, that can be run as POST refresh script on completion of the refresh. But this would mean that any changes to the script will involve us copying the file, which could be a hassle.
    I am wondering, if there is better way to handle this.. BTW, the app team do not have access to the database host and we don't plan to grant it either..
    What is the best alternative ?

    You can use DBMS_METADATA and EXECUTE IMMEDIATE
    SQL> create user u1 identified by u1;
    User created.
    SQL> create or replace type u1.type1 as object (a number, b date);
      2  /
    Type created.
    SQL> declare
      2  stat varchar2(32000):= dbms_metadata.get_ddl('TYPE','TYPE1','U1');
      3  begin
      4    execute immediate replace(stat,'"U1".','');
      5  end;
      6  /
    PL/SQL procedure successfully completed.
    SQL> desc type1
    Name                                                        Null?    Type
    A                                                                    NUMBER
    B                                                                    DATEYou can loop on all schema objects selected from dba_objecs to manage all objects with a single statement:
    SQL> create function u1.f1 return number is
      2  begin
      3    return 0;
      4  end;
      5  /
    Function created.
    SQL> declare
      2  stat varchar2(32000);
      3  begin
      4    for r in (select object_type, object_name from dba_objects where owner='U1') loop
      5      stat := dbms_metadata.get_ddl(r.object_type,r.object_name,'U1');
      6      dbms_output.put_line(stat);
      7      execute immediate replace(stat,'"U1".','');
      8    end loop;
      9  end;
    10  /
      CREATE OR REPLACE TYPE "U1"."TYPE1" as object (a number, b date);
      CREATE OR REPLACE FUNCTION "U1"."F1" return number is
    begin
      return 0;
    end;
    PL/SQL procedure successfully completed.
    SQL> desc f1
    FUNCTION f1 RETURNS NUMBER
    SQL> desc type1
    Name                                                        Null?    Type
    A                                                                    NUMBER
    B                                                                    DATEMax
    [My Italian Oracle blog| http://oracleitalia.wordpress.com/2010/02/07/aggiornare-una-tabella-con-listruzione-merge/]

  • Non Schema Objects

    Hi ,
    i was going through oracle 10 g SQL documentation in which i read about non schema objects such as users, tablespace etc. could anyone please let me know how to query them .

    Dictionary views names are all stored in the DICT view.
    Dictionary views are divided in 4 main groups:
    DBA_ --> all objects of a given type
    ALL_ --> all objects of a given type accessible by the current user
    USER_ --> all objects of a given type owned by the current user
    V$ --> all objects of a given type that can change dinamically (also without an explicit user action)
    Tablespaces can be queried this way:
    Select * from dba_tablespacesUsers this way
    Select * from dba_usersMax
    [My Italian Oracle blog| http://oracleitalia.wordpress.com/2010/02/07/aggiornare-una-tabella-con-listruzione-merge/]

  • Does System Maintains Objects related to one BSp Application

    Hello Friends ,
    Does SAP System maintians anything anywhere which can help us to know all the objects related to one BSP apllication??
    Say My application has few function modules , their function groups , Any Table type used or other indepent Dictionary objects used in my application.Does System Maintains this history at any place??
    or is there any other way to know??
    Regards,
    AShwini

    Hi ,
    For a BSP Applicatiopn, the Function modules and Function groups are accessed normally as we do in any other ABAP Program, so you c an find them in SE37.
    Also for Dictionary objects and table types, you can find them in SE11.
    Hope this helps.
    <b><i>Do reward each useful answer..!</i></b>
    Thanks,
    Tatvagna.

  • Using one music library with multiple user accounts

    I want to use one Music Library and be able to have all my computer user accounts be able to access it. Article 93195 does not work for some reason. It is easy to share music over a network but not on the same computer? This can't be. I have talked to several Apple "Geniuses" and they all scratch their head. One guy could do it in Leopard, but not in Tiger. Could it have something to do with the permissions of the Itunes Music Folder? Any help would be appreciated. This is driving me crazy.

    1 Quit iTunes.
    2 Drag your entire *iTunes folder* from /Username/Music to /Users/Shared.
    3 Log out.
    1 Log in on your other account(s).
    2 Start iTunes and immediately press an hold the Option key.
    3 iTunes will ask to *Create new library* or *Choose existing library*. Select *Choose existing library*.
    4 Select the *iTunes library file* in the *iTunes folder* in /Users/Shared.
    5 Now go to File -> *Add to library* and select the *iTunes music folder* located in /Username/Music.
    6 - iTunes will add all the music in from this account to the main iTunes music folder/library.
    7 Delete the *iTunes folder* in /Username/Music
    8 Restart iTunes normally (don't hold Option). Everything should be there.
    9 Quit iTunes and log out of the account.
    10 Do the above steps for all users. Don't do the first 1-3 steps. Start at the second series.
    Log into your account, start iTunes normally and all music should be there.
    Whenever any of you do anything in iTunes, it will be seen by all since you are using one and the same iTunes library file.
    Create a "main" playlist for each user with their own music. Create a smart playlist and set it to Playlist is not the playlist you created above. Select this and it will show you everything NOT in your playlist. Do the same for the others. This will help when adding only the music you want your own playlist.
    Note that iTunes can only be opened by one user at a time. If you have Fast user switching enabled, the other users must quit iTunes in order for anyone else to use it.

  • Multiple Material Numbers to use one Info Record

    I have several material numbers that I have recently set up as Subcontracting special procurement. All of these numbers use one quote from our vendor. How do I assign multiple numbers to a single info record?
    Thanks for your assistance!!

    SAP knows 2 kind of subcontracting scenarios, a purchasing route and a production route.
    in the purchasing subcontract scenario you order the finished material with item category L, you can see the components in the purchase order and you consume the components when you post the goods receipt to  this purchase order.
    in the production route, you create production orders to "manufacture" the finished and to consume the components, the purchase order is only to procure the service. you do goods receipt and cosumption in reference to the production order, and you do a goods receipt for the service in reference to the purchase order.
    if the info record is without material number,then you cannot have a permanent  link to a material if you use the purchasing route.
    Usually SAP will propose the info record as source when you assign and process requisitions in ME57. I doupt that SAP will propose info records without material number for requisition with material number. so the only chance to assign such info record to a PO to get the price defaulted would be manual entry of info record number in ME21N (F4 search help is available)
    in the production subcontracting process you can enter the info record number in the recipe, so you can establish a permanent link in master data. So SAP exactly knows which info record price to pull for the service orders. and in this process you can enter one info record number in several recipes.

  • How to move all the tables from one tablespace to other for a whole schema

    Hi,
    Is there any way to move all the tables in a schema from one tablespace to other?
    If so please help me out to do that.
    Thanks
    Regards
    Gatha

    hi,
    here is the steps to move SCOTT's objects from their current tablespace to a NEW_TABLESPACE
    would be:
    1) do an export of all of scott's objects. Make sure no one modifies them after you
    begin this process. You will lose these changes if they do.
    $ exp userid=scott/tiger owner=scott
    2) you would drop all of scotts tables. This will get the indexes as well. I don't
    suggest dropping the user SCOTT but rather dropping scott's objects. Dropping scott
    would cause any system priveleges SCOTT has to disappear and the import would not restore
    them. This script can be used to drop someones tables:
    set heading off
    set feedback off
    set verify off
    set echo off
    spool tmp.sql
    select 'drop table &1..' || table_name || ' cascade constraints;'
    from dba_tables
    where owner = upper('&1')
    spool off
    @tmp.sql
    3) You would modify the user to not have unlimited tablespace (else the IMP will just
    put the objects right back into the tablespace they came from) and then give them
    unlimited quota's on the new tablespace you want the objects to go into and on their
    temporary tablespace (for the sorts the index creates will do)
    alter user SCOTT default tablespace NEW_TABLESPACE
    revoke unlimited tablespace from SCOTT
    alter user SCOTT quota unlimited on NEW_TABLESPACE
    alter user SCOTT quota unlimited on SCOTTS_TEMPORARY_TABLESPACE
    4) you will IMP the data back in for that user. IMP will rewrite the create statements
    to use the users default tablespace when it discovers that it cannot create the objects
    in their original tablespace. Please make sure to review the file imp.log after you do
    this for any and all errors after you import.
    imp userid=scott/tiger full=y ignore=y log=imp.log
    5) you can optionally restore 'unlimited tablespace' to this user (or not). If you do
    not, this user can only create objects in this new tablespace and temp (which in itself
    is not a bad thing)...
    Regards,
    Mohd Mehraj Hussain
    http://mehrajdba.wordpress.com

  • How can i access all the objects of one schema from another schema

    Dear All,
    How can i access all the objects(Tables,Views,Triggers,Procedures,Functions,Packages etc..) and do the modifications of one schema from another schema (Without using synonyms concept).
    Thanks in advance,
    Mahi

    First of all, synonyms only help you easy reference the object. It doesn't have any implication of object privilege.
    As long as you have proper privilege on target object. You can access it with or without synonyms.
    Assuming you have proper privilege of objects, you can use following command to assume schema owner.
    ALTER SESSION SET CURRENT_SCHEMA = Schema_owner

  • To capture all the objects from an tablespace and restore.

    Hi All,
    I have a situation in the  Schema  refresh process where i may have  to delete a tablespace  and its datafiles.
    Then I have to recreate it as it was before and restore all it objects .
    Is there any way that i can capture all the objects of that tablespace before it is deleted  and then later restore it back as it was .
    Any Expert sugggestion is highly apprciated .
    The Platform is as below ..
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    Thanks In Advance .

    There are 2 methods you could use with Data Pump.
    1. tablespace mode export.  expdp user/password tablespaces=<your list here> ...
    2. transportable tablespace mode.  expdp user/password transport_tablespaces=<your tablespace list here> ...
      NOTE:  for #2, you need to have your tablespaces in read only mode, then you need to copy the data files, and the
                    tablespaces need to be self contained.
    Hope this helps.
    Dean

  • Move objects from one tablespace to another

    Hello
    Running Oracle 10g rel 2 and I would like to move all objects from one tablespace to another. There are Primary Key indexes to other tables in this tablespace. The size grew too large and I want to reduce the size.
    Thank you.

    Good afternoom Sir!
    I believe that below "ask tom - moving tables across tablespaces" may help you.
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:47812348053
    Regards,
    Marcello M.

  • I want to copy all the objects from one user to another... Please help

    Hii Experts.... I have a problem here. Please give me solution for this...
    I am using Oracle 11g on my windows XP system.
    I created a new user named "some"
    I want to copy all the objects from scott user to some user... Please help me
    Please Explain me in detailed way
    Thank you

    SowmyRaj wrote:
    Hii Experts.... I have a problem here. Please give me solution for this...
    I am using Oracle 11g on my windows XP system.
    I created a new user named "some"
    I want to copy all the objects from scott user to some user... Please help me
    If all what you are interested is Scott schema than no need to use the datapump or CTAS. Run demobld.sql in your schema and it would have all the objects of Scott.
    http://www.oracle.com/technology/sample_code/tech/sql_plus/htdocs/demobld.html
    HTH
    Aman....

Maybe you are looking for

  • How to enable disk use on an iPod in "recovery mode"?

    I am trying to enable disk use on my iPod classic 80GB to recover lost files. One day out of the blue, 12 days worth of music vanished from my iPod, and as my laptop that stored all of my music was stolen a few months earlier, I need to manually reco

  • Help: Link buttons to each row in JTable

    Here is the story: a JTable contains many entries/rows. I want to have a small "edit" button next to each row, once user click the "edit" button, another GUI will be loaded, and the new GUI is filled with the row of data where that clicked button is

  • Closing old PO's API

    Hi, I am new to oracle apps and coding and am working on the API to close old PO's.When I tried to execute the API it executes without errors but it is actually not closing the PO.Also how can i see what x_return_code holds?Pls help ASAP DECLARE x_re

  • [Dreamweaver CS4] Absolute & Relative Position - Referenzpunkt und Probleme WebSite

    Hallo Community! Ich habe mich heute hier registriert, und dies ist auch mein erster Beitrag, allerdings habe ich schon des "öfteren" auch hier nach relevanten Hilfen für mich gesucht und diese auch meistens gefunden, allerdings hänge ich jetzt wiede

  • Subcontractor Invoice from MIRO with Retention of Fixed Future "Due Date"

    Post retention entry to subcontractor Business scenario PO Raised in MM Retention deducted from All Vendor ABC Bill will be released on 31/12/2009 All Invoices of Vendor ABC will have same due date ending 31/12/2009 irrespective of the Bill posting D