Renaming a tablespace through Datapump

Hi.
I have a tablespace X in my source and I want to import it in to another DB and rename it to Y VIA data pump. Do I have to use the REMAP_DATAFILE & REMAP_TABLESPACE parameters or will the REMAP_TABLESPACE do it for me?
I my datafile has the name of the tbs in it so I would like to change it as well so I assume you would need both. Just wanted confirmation. Something like this?
impdp /
directory=DATA_PUMP_DIR
dumpfile= 'TEST.dmp'
transport_datafiles= C:\x
REMAP_TABLESPACE= X:Yor
impdp /
directory=DATA_PUMP_DIR
dumpfile= 'TEST.dmp'
transport_datafiles= C:\x
REMAP_DATAFILE=X.dbf:Y.dbf
REMAP_TABLESPACE= X:Yand I am using ASM with OMF. so my actual datafilename is something like this +DATA/x.284.715018095
Edited by: Gunners on Mar 31, 2010 11:02 AM
Edited by: Gunners on Mar 31, 2010 11:03 AM

I was thinking this...doubt it though, lol
REMAP_DATAFILE=+DATA:+DATA
Cause when I create my tablespace or name a file, I never actually do. Just do a simple
create tablespace X datafile '+DATA' size 100M.....;it generates for us '+DATA/[dbname]/datafile/x.317.657819225'

Similar Messages

  • Exporting Tablespace using DATAPUMP

    Hi,
    I found out that exporting a tablespace with Datapump doesn't
    export Objects like Sequences or Procedures. Also you can't recreate
    a user when you import the data.-->you can if you use SCHEMA-Option
    Did I forgot any option or is it not possible?
    What I need is a possibility to export all users with all objects of
    a tablespace!
    Is that only possible by exporting with the SCHEMA-Option?
    Regards
    Schoeib

    Hi
    Go through below link
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:29426634229263
    PS.> may be some problem occured to open above site. but try later.
    regards
    Taj

  • Renaming a tablespace

    hi
    I have a tablespace and wanted to rename it:
    alter tablespace oldttbs rename TO newttbs;
    create user newttbs identified by newttbs default tablespace newttbs
    grant unlimited tablespace to newttbs
    However, I noticed that the owner is still the old one (named also oldttbs).
    So now I have this situation:
    select distinct owner,TABLESPACE_NAME from dba_segments where owner in ('oldttbs','newttbs');
    OWNER TABLESPACE_NAME
    newttbs newttbs
    oldttbs      newttbs
    the new tablespace (owner newttbs) has some empty tables.
    Can you please advise?

    You are mixing up owners and tablespaces.
    There is no tight relation between them.
    A database consist of multiple tablespaces.
    An owner can store objects in multiple tablespaces.
    There is no rule: owner=tablespace.
    So when you renamed the tablespace, the result is owner oldtbbs (very bad name) is now storing his objects in tablespace newtbbs.
    What you see right now is what you asked.
    You have an existing user 'oldtbbs' who stores his objects in tablespace newttbs.
    You have a newly created user 'newttbs' who also store his objects in tablespace newttbs.
    If you really want a separate tablespace for every user, you should have created a new tablespace apart from oldttbs,
    Also granting unlimited tablespace privilige is a very bad thing to do.
    This allows the user to create objects in any tablespace, including SYSTEM.
    You should have created the user thus
    create user newttbs identified by newttbs default tablespace newttbs quota unlimited on newttbs.
    Guess you are in dire need of reading the Concepts Manual.
    Sybrand Bakker
    Senior Oracle DBA

  • How to move indexes to another tablespace through script

    Hi Dear,
    How i can move indexes to another tablespace through a script which just gets new tablespace name, owner name and move and rebuild indexes in one go.
    Thank u for your prompt Help.
    Regards

    Hi,
    alter session set sort_area_size = 15000000;
    spool index.sql
    select 'alter index '||owner||'.'||index_name||' rebuild tablespace TARGET_TBS;'
    from dba_indexes
    where tablespace_name = 'INIT_TBS'
    @index.sql
    This script move and rebuild index from one tablespace INIT_TBS to an other tablespace TARGET_TBS
    Hope this help you
    Nicolas.

  • Alter Tablespace Through BRTOOLS

    Hi,
    How can we alter tablespace through BRTOOLS.
    Regards,
    Nitin

    Hi,
    Choice menu 1 - please make a selection
    BR*Tools main menu
    1 = Instance management
    2 - Space management
    3 - Segment management
    4 - Backup and database copy
    5 - Restore and recovery
    6 - Check and verification
    7 - Database statistics
    8 - Additional functions
    9 - Exit program
    Standard keys: c - cont, b - back, s - stop, r - refr, h - help
    BR0662I Enter your choice:
    2
    Your choice: '2'
    Choice menu 5 - please make a selection
    Database space management
    1 = Extend tablespace
    2 - Create tablespace
    3 - Drop tablespace
    4 - Alter tablespace
    5 - Alter data file
    6 - Move data file
    7 - Additional space functions
    8 - Reset program status
    Standard keys: c - cont, b - back, s - stop, r - refr, h - help
    BR0662I Enter your choice:
    4
    Your choice: '4'
    After this you can select the table space by selecting the options
    Enter string value for "tablespace" []: Table name which you need to Alter
    and select the options it will clearly mentioned
    and followup the process
    Thanks & regards
    Sreedhar Reddy

  • Is there anyway to use imp and rename a tablespace during import? Sort of what remap_tablespace for datapump import does?

    I have a dump file from a 9i Oracle database with tablespace USERDEL_DATA but my database in 11g has tablespace USER_DEL_DATA. I don't want to name the tablespace what it is called in the 9i database because the naming convention is not consistent with what I have been naming the tablespaces. There needs to be a '_' between USER and DEL.
    The problem I have is that, each time I try importing to 11g database, some tables that probably have USERDEL_DATA as their default tablespace in the 9i database would not import into the 11g database. Is there any parameter (I haven't found one yet) using native import (i.e. imp) to remap_tablespace? I know with impdp, I would be able to remap tablespace easily but this dump file is from a 9i database and impdp would not work on it. Please help.
    Thank you for your assistance.

    The old exp/imp utilities have a tablespace transport mode, sort of like the end goal, but maybe not quite exactly.
    >> tables that probably have USERDEL_DATA as their default tablespace
    That's not quite accurate, users have a default tablespace, used for table creation when a tablespace isn't specified in the DDL.
    What we've done when an export file has tablespaces that disagree with the tablespace names in the import target, go ahead and create the disagreeable tablepspace, and set the target schema(s) user(s) to have zero quota on the "bad" named tablespace. The IGNORE=Y imp setting will end up putting the tables into the user default tablespace, as long as the user(s) haven't picked up the unlimited tablespace system privilege somehow/somewhere.
    So when import is done, just drop the bad tablespace [including contents and datafiles]; and Problem Solved.
    >> the naming convention is not consistent
    Not seeing a problem there. Its got a name, tablespace(s) have to have one. Don't care what its called, just do have to know about it for backup/recovery, that would be the critical bit..

  • Unable to Extend The Tablespace through Brtools

    Hello Guru's
    In Our Production Server we are not able to extend table space through BRtools while performing table space extend i am facing this error, please give me the solution so that this error is going to rectified
    i am attaching the log for your reference :
    BR0280I BRTOOLS time stamp: 2007-06-19 11.18.57
    BR0657I Input menu 81 - please check/enter input values
    BRSPACE options for tablespace extension
    1 - BRSPACE profile (profile) ...... [initPBW.sap]
    2 - Database user/password (user) .. [/]
    3 ~ Tablespace name (tablespace) ... [PSAPODSD]
    4 - Confirmation mode (confirm) .... [yes]
    5 - Scrolling line count (scroll) .. [20]
    6 - Message language (language) .... [E]
    7 - BRSPACE command line (command) . [-p initPBW.sap -s 20 -l E -f tsextend -t
    PSAPODSD]
    Standard keys: c - cont, b - back, s - stop, r - refr, h - help
    BR0662I Enter your choice:
    c
    BR0280I BRTOOLS time stamp: 2007-06-19 11.19.02
    BR0663I Your choice: 'c'
    BR0259I Program execution will be continued...
    BR0291I BRSPACE will be started with options '-p initPBW.sap -s 20 -l E -f tsext
    end -t PSAPODSD'
    BR0280I BRTOOLS time stamp: 2007-06-19 11.19.02
    BR0670I Enter 'c[ont]' to continue, 'b[ack]' to go back, 's[top]' to abort:
    c
    BR0280I BRTOOLS time stamp: 2007-06-19 11.19.05
    BR0257I Your reply: 'c'
    BR0259I Program execution will be continued...
    BR1001I BRSPACE 7.00 (11)
    BR0252E Function remove() failed for '/oracle/PBW/sapbackup/.user.pas' at locati
    on global_set-5
    BR0253E errno 13: Permission denied
    BR0700E Fatal errors occurred - terminating processing...
    BR1008I End of BRSPACE processing: sdvncsuh.log 2007-06-19 11.19.19
    BR0280I BRSPACE time stamp: 2007-06-19 11.19.19
    BR1007I BRSPACE terminated with errors
    BR0292I Execution of BRSPACE finished with return code 3
    BR0668I Warnings or errors occurred - you can continue to ignore them or go back
    to repeat the last action
    BR0280I BRTOOLS time stamp: 2007-06-19 11.19.19
    BR0670I Enter 'c[ont]' to continue, 'b[ack]' to go back, 's[top]' to abort:

    Hi Shishir Bajpai
    I have a problem it seems to be like the problem that you had! Tell me one thing, how can I know if I have permissions in brtools to extend a table space or for other tasks in there?
    I have win 2003 server and Oracle 10.2.0.4!
    I must to extend a set of table space on data base!!! Please help me how can I do that through br*tools!!
    Best regards
    João Dimas

  • Renaming a tablespace in 8.1.7

    I know there's no way to do it via the SQL Plus command line but I'm told there's an unsupported backdoor way. Anyone know how?
    I'm not talking about renaming a data file, I need to change the actual tablespace name.
    Thanks for any info,
    Ted

    you can do the following:
    1. export all objects in your tablespace, by using option tables=(x,y,...)
    2. drop your tablespace including contents
    3. create new tablespace with a desired name using the same datafiles names (you can physically delete them first or use a REUSE option)
    4. create objects you exported in the new tablespace.
    5. perform your import
    By creating objects first, you guarantee that export will populate tables in the tablespace you need.
    This is just a general plan, you have to clarify and confirm all details.

  • Renaming a Tablespace and Schema in Oracle 9i

    hi,
    i have the following scenario
    1') Schema with name X attached with a default tablespace whos name also is X.
    i want to now move to Schema with name Y attached with a default tablespace whos name is Y. but i want the data to be same as that of point 1)
    Can anyone provide me help in doing that.
    Vesion of Oracle being used is Oracle 9i Release 2 with Windows 2000
    Thanks in Advance

    Unfortunately, there is no facility for renaming schemas or tablespaces in Oracle 9i. There are such options in 10g, but that probably doesn't help you much.
    Depending on the amount of data we're talking about, it may be easiest to do a schema-level export and import using the fromuser and touser commands.
    Justin

  • How to rename albums purchased through the itunes store?

    Hello, I am having problems renaming albums that I purchased through itunes.  I bought the Black Sabbath Complete Studio Albums 1970-1978 and the Rush Complete Mercury years or whatever it is.  Anyway, the album titles are all listed as the same, every Black Sabbath album is called "Complete Studio Albums 1970-1978" and the same for the Rush albums.
    Every time I go in and manually change the album names, when I close and reopen itunes it decides to rename them all "Complete Studio Albums 1970-1978"
    Anyone know if there is some setting in itunes or possibly something in the file properties I can change to keep this from happening? Sifting through my ipod and having 8-10 albums under the same album name is the issue here that I am desperately trying to resolve.
    Thanks,
    -Patrick

    See my response in your other thread Is there a way to keep itunes from re-renaming my box set albums?

  • Migrating multiple domains with same name - how? Rename? Migrate through temporary domain?

    Hi,
    we have acquired another company, and they have multiple, separate domains with the same name (every site has a domain with NetBIOS name "COMPANY" and DNS name "company.local"). Now we want to migrate all these domains into ours using
    ADMT.
    Unfortunately, we did not manage to migrate one of these domains completely, so the trust must remain established for some time. But we have to continue with the second domain - which normally would require a trust, but of course we can't establish a trust
    to two domains with the same name at the same time.
    I found two potential solutions for the dilemma, but I'm not sure if both are reasonable:
    1) Rename the domain with RENDOM.EXE to COMPANY2 and company2.local and then migrate with ADMT
    2) Migrate COMPANY to a temporary domain such as COMPANYTEMP and then migrate from COMPANYTEMP to our domain
    Given that there are roughly 100 users, 2 domain controllers and 8 other servers, what would be the better approach? Is option 2 possible at all, so would I be able to use the sidHistory attribute migrated from the original COMPANY domain in our domain at
    all?
    There is also an Exchange 2007 server, which seems to make option 1 impossible unless we find another way to migrate it (like, export all mailboxes to PST before migration) ...

    Ok, that's what I expected. Still, I have servers in the old domain, so if I do these steps:
    first create a new temporary domain i.e COMPANYTEMP and
    create trust between COMPANYTEMP -
    COMPANY(Right)
    then do the migration with sidHistory from COMPANY(right) --> COMPANYTEMP ,
    disconnect the domain COMPANY(right) ,
    users will lose connectivity to any servers in the domain. I understand that it does not work with all domains connected? Of course I can't make OURCOMPANY's domain controllers see the DCs of COMPANY (right) in DNS (though I could achieve it the other way
    round).
    My original plan was:
    first create a new temporary domain i.e COMPANYTEMP and
    create trust between COMPANYTEMP -
    COMPANY(Right)
    then do the migration with sidHistory from COMPANY(right) --> COMPANYTEMP ,
    create trust between OURDOMAIN and COMPANYTEMP
    then do the migration with sidHistory from
    COMPANYTEMP --> OURDOMAIN,
    Migrate users
    Migrate computers
    Migrate servers
    remove trusts and old domain
    But I see that this will not work out, right? So, my only option would be:
    first create a new temporary domain i.e COMPANYTEMP and
    create trust between COMPANYTEMP -
    COMPANY(Right)
    then do the migration with sidHistory from COMPANY(right) --> COMPANYTEMP ,
    Migrate computers and servers to COMPANYTEMP
    Install new Exchange server in COMPANYTEMP
    migrate mailboxes to COMPANYTEMP
    disconnect / abandon COMPANY(right)
    create trust between OURDOMAIN and COMPANYTEMP
    then do the migration with sidHistory from COMPANYTEMP
    --> OURDOMAIN,
    Migrate users
    Migrate computers
    Migrate servers
    Migrate mailboxes
    remove trusts and old domain
    And to minimize user impact, all this would have to be done in one go (over night), which is hardly possible .........................

  • Transaction Status during Database Export through DataPump

    Hi,
    I've q question and need clarification. We have 120GB Database ( Version 11GR1 ) which has a single application schema other than standard schemas (Like ststem,sysaux, example etc). The object containg in the application schema will be round about 110~115 GB and the rest size of other standard schemas object. The application users that made transaction through front end J2EE application that hit to application's schema objects.
    We usually expdp that schema. Now my question is when we export the schema when the users are performing transactions what will be the status of that transactions that were made during export process ? what that be reflected in the dump or not? What is that Oracle Actual mechanism for that type of transactions in case of Datapup export.
    Regards,
    Kamran

    Let's say you have 3 tables
    table a
    table b
    table c with partition 1
    table c with partition 2
    Now let's say all of these tables are being exported and while the export is happening, users are adding/dropping rows to these tables/partitions. This is what Data Pump will do if you don't specify flashback_time or flashback_scn;
    Since table a and table b are not partitioned, they will be exported with the scn that is current when the unload of that table is scheduled. So,
    table a gets scheduled to be unloaded when the scn is 12345. The data in the dumpfile for this table will be consistent with 12345. If rows were modified before 12345, the data in the dumpfile will have those rows. If rows were added after 12345, they would not be in the dumpfiles.
    Table b gets scheduled to be unloaded when the scn is 23456. The data in the dumpfile for this table will be consistent with 23456. If rows were modified before 23456, the data in the dumpfile will have those rows. If rows were added after 23456, they would not be in the dumpfiles. If you had ref constraints from table a to table b, you could hit a problem.
    Table c partition 1 gets scheduled at 34567. All of the data in the dumpfile will be consistent with 34567. Just like above
    Here is the exception to the rule!
    Table c partition 2 gets scheduled at 45678. The difference is that partition 1 of this table got scheduled at 34567, so the data in this partition will also be
    consistent with 34567. All partitions of a table will use the same SCN as the first partition that is scheduled.
    If you want a consistent dumpfile, use either
    flashback_time='some date' you can use flashback_time=sysdate if you want to put it in a script and not have to update the date in the script.
    or
    flashback_scn='some_scn'
    Hope this explains what you wanted to know.
    Dean

  • Getting ORA-31655 while trying to export Tablespace via Datapump

    Hi
    I am trying to export the tablespace GRAHAM_BMF_TS_01 as per below but I am getting the following error:
    ORA-31655: no data or metadata objects selected for job
    SQL> select SEGMENT_NAME from dba_segments where TABLESPACE_NAME='GRAHAM_BMF_TS_01';
    SEGMENT_NAME
    BMF_AGREEMENTS
    SQL> select count(*) from BMF_AGREEMENTS;
      COUNT(*)
        199999
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning and Data Mining options
    $ expdp directory=DATA_PUMP_DIR_CORRUPTION_TEST dumpfile=pre_corruption_dp.dmp logfile=pre_corruption_dp.log  TABLESPACES=GRAHAM_BMF_TS_01 CONTENT=ALL
    Export: Release 10.2.0.3.0 - 64bit Production on Tuesday, 21 June, 2011 12:45:59
    Copyright (c) 2003, 2005, Oracle.  All rights reserved.
    Username: / as sysdba
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning and Data Mining options
    Starting "SYS"."SYS_EXPORT_TABLESPACE_01":  /******** AS SYSDBA directory=DATA_PUMP_DIR_CORRUPTION_TEST dumpfile=pre_corruption_dp.dmp logfile=pre_corruption_dp.log TABLESPACES=GRAHAM_BMF_TS_01 CONTENT=ALL
    Estimate in progress using BLOCKS method...
    Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 0 KB
    ORA-31655: no data or metadata objects selected for job
    Job "SYS"."SYS_EXPORT_TABLESPACE_01" completed with 1 error(s) at 12:46:14Any ideas what I am doing wrong?
    Edited by: Grahambo on Jun 21, 2011 4:52 AM

    Not sure why this thread was locked, but I unlocked it.
    There may be segments in this tablespace, but they may not be owned by a schema that is exported using Data Pump. For example, if all of the storage in this tablespace is owned by the SYS schema, then there is nothing in this tablespace to be exported.
    Any idea what schema owns the segments in this tablespace?
    Dean

  • Can we rename Oracle username & tablespace name in 11g R2

    - We have Oracle tablespace name "TULIP"
    - We have Oracle username "TULIP"
    Default tablespace for use TULIP is TULIP.
    - Now can we rename tablespace TULIP to TULIP_NEW ?
    - Now can we rename username TULIP to TULIP_NEW ?
    Can this be done online when the database is running ?
    If NOT please give me the steps involved.
    Thanks
    Bristol

    Yes you can rename a tablespace.
    ALTER TABLESPACE <tablespace_x> RENAME TO <tablespace_y>;As far as renaming the schema there is no command for that. One approach would be to export the data and re-import using the REMAP_SCHEMA (for Data Pump) option.

  • Droping and renaming tablespace druing hot user managed backup

    Will dropping and renaming of tablespace will have any effect if hot user managed backup of that db is in progress ?
    thanks in advance

    However, you will encounter a more serious issue because of the way DROP TABLESPACE works.
    Even if the DROP fails, the "INCLUDING CONTENTS" causes all segments to be dropped !!
    SQL> drop table ASSM_TABLE purge;
    Table dropped.
    SQL> create table ASSM_TABLE (pk_col number not null, descr_col  varchar2(30)) tablespace ASSM_TBS;
    Table created.
    SQL> create unique index ASSM_TABLE_PK on ASSM_TABLE (pk_col) tablespace ASSM_TBS;
    Index created.
    SQL> select segment_name, segment_type from user_segments where tablespace_name = 'ASSM_TBS';
    SEGMENT_NAME                   SEGMENT_TYPE
    ASSM_TABLE_PK                  INDEX
    ASSM_TABLE                     TABLE
    SQL> insert into ASSM_TABLE select rownum, 'ABCD ' || rownum from dual connect by level < 10;
    9 rows created.
    SQL> commit;
    Commit complete.
    SQL>
    SQL> connect / as sysdba
    Connected.
    SQL>
    SQL> alter tablespace ASSM_TBS begin backup;
    Tablespace altered.
    SQL> drop tablespace ASSM_TBS including contents and datafiles;
    drop tablespace ASSM_TBS including contents and datafiles
    ERROR at line 1:
    ORA-01150: cannot prevent writes - file 7 has online backup set
    ORA-01110: data file 7:
    'filename'
    SQL> connect hemant/hemant
    Connected.
    SQL> select segment_name, segment_type from user_segments where tablespace_name = 'ASSM_TBS';
    no rows selected
    SQL>  alter tablespace ASSM_TBS end backup
      2  /
    Tablespace altered.
    SQL>The DROP TABLESPACE failed but the contents did get dropped !
    Hemant K Chitale
    Edited by: Hemant K Chitale on Oct 7, 2011 2:41 PM

Maybe you are looking for