Export schema from tablespace

Hello Everyone,
I work with an enterprise application that uses oracle to store meta data and objects as well as BLOB's in the tablespace.
I have a question about exporting schema's from a table space.
I have Oracle 9.2.0.8 in Windows 2003.
I have a tablespace called TestData02, I created 2 users (orauser1 and orauser2) both with this table space as the default. From within my enterprise application I would use it's tool to initialize the tablespace and create a schema.
What I did was create 2 schema's under one tablespace, one schema owned by 'orauser1' and another by 'orauser2'.
Now I'd like to export everything owned by the user 'orauser2' and create a new tablespace called TestData03 and import this schema and all associated data and BLOBS into here.
I've been reading about the exp and imp tools, but just can't figure out how to export a schema ... I did figure out (i think) how to export the entire table space, but thats not what I want.
Can anyone help me ... I am quite new to oracle.

Hi Pavan,
Before 10g expdp and impdp (this is one of the reasons why versions are really important), any ''dependent' objects will not be 'remapped'.
Let's say you have T1 in TS1, and a primary key in IX_TS1.
Now you move the table to a different user with different tablespaces.
You can 'move' the table, using the default tablespace of the new owner, however, the index will be created in the old tablespace.
This is why you often need to precreate objects.
Without seeing the definition of the LOBsegment, there is no conclusive evidence, but you probably do have a LOBsegment in TS1, which isn't going to be 'remapped'
expdp and impdp will take care of this with the remap_tablespace clause.
Sybrand Bakker
Senior Oracle DBA

Similar Messages

  • Is it possible to export schema from one HANA server to other

    Hi,
    Is it possible to export schema from one HANA DB server and import it on another HANA Server?
    Thanks & Regards,
    Kumar

    Hi Gaurav,
    Yes you can Export Schema and Import Eported Schema in New Schema if you have HANA Rev 69.
    Please check below links.
    Backup particular database on B1H HANA
    SAP HANA restore and backup single schema
    SAP Business One 9.0, version for SAP HANA PL04 available
    SAP Business One 9.0, version for SAP HANA PL03 available now
    Hope this helps
    Regards::::
    Atul Chakraborty

  • Export DB from tablespace to other tablespace

    Hi,
    Is possible to do an export DB indicating tablespace?
    like..
    exp myuser/mypass@mySID TABLES=MY_TABLE TABLESPACES=TS_ONE FILE=EJ.dmp log=file.logbecause, after this I need import the EJ.dmp to other schema whith other tablespace (TS_TWO)
    thanks
    pd: my oracle is: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    Edited by: cat on 12-mar-2009 17:17

    Hi, I try to do:
    expdp myuser/mypass@mysid dumpfile=example.dmp directory=dmpdir tables=(tbl_city) logfile=filedp.logI execute this from c:\temp directory in Windows, where I have created the dir dmpdir and I have this error:
    Export: Release 10.2.0.1.0 - Production on Viernes, 13 Marzo, 2009 13:03:54
    Copyright (c) 2003, 2005, Oracle.  All rights reserved.
    Conectado a: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    ORA-39002: invalid operation
    ORA-39070: Unable to open the log file.
    ORA-39087: directory name DMPDIR is invalid

  • Exporting schema from 11.1.0.7 to 10.2.0.4

    I am working on Oracle Database version 11.1.0.7 on Solaris 10. I need to export a schema from this version and import into 10.2.0.4 version i Windows 2003.
    So should I install 10.2.0.4 client on Solaris and run exp to create a 10.2.0.4 dump file.
    Should I run any specific scripts before running 10.2.0.4 exp on 11.1.0.7 database?
    IN case of datapump will using version parameter solve the issue like
    expdp version=10.2.0.4
    Let me know if I'm wrong and any other suggestions are welcome?

    I the exp optons will take quite some time as I dont have 10g software installed on the machine and it is 40G export so by network it is going to take a while.
    I think datapump verion=10.2.0.4 is something to consider here?
    expdp system/..... schemas=hr directory=sample_dir dumpfile=hr.dmp logfile=hr.log version=10.2.0.4
    is the previous command correct way of doing it ?
    Once done while importing think so I dont need to do anything extra there
    impdp system/.... directory=sample1_dir dumpfile=hr.dmp logfile=hr.log
    Also should I run any scripts before doing expdp at source or impdp at target?

  • Export schema from one machine to other machine by datapump

    can I export 10g schema from one machine other machine (10g) if how
    thanks

    In the same manner as You ould use expdp/impdp on the same machine.
    expdp needed data on one server.
    copy dmp file to another
    impdp on another server
    Read documentation:
    http://www.oracle-base.com/articles/10g/OracleDataPump10g.php

  • Export schema with tablespace

    Hi all,
    I exported schema pro with index=yes, rows=no, trigger=yes...
    when i import to another database. I have to create tablespace for schema pro in new database.
    how can i export and then import without having to create tablespace in new database for schema pro.
    Thank you!

    Dan wrote:
    Hi all,
    I exported schema pro with index=yes, rows=no, trigger=yes...
    when i import to another database. I have to create tablespace for schema pro in new database.
    how can i export and then import without having to create tablespace in new database for schema pro.
    Thank you!
    [oracle@wissem ~]$ exp wissem file=USERS.dmp log=USERS.log TABLESPACES=USERS
    Export: Release 11.2.0.1.0 - Production on Sat Sep 3 10:00:03 2011
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    Password:
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Export done in US7ASCII character set and AL16UTF16 NCHAR character set
    server uses AL32UTF8 character set (possible charset conversion)
    About to export selected tablespaces ...
    For tablespace USERS ...
    . exporting cluster definitions
    . exporting table definitions
    . . exporting table                           DEPT          4 rows exported
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    . . exporting table                            EMP         14 rows exported
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    . . exporting table                       SALGRADE          5 rows exported
    EXP-00091: Exporting questionable statistics.
    . . exporting table                          SALES          2 rows exported
    EXP-00091: Exporting questionable statistics.
    . . exporting table                     SALES_LIST
    . . exporting partition                     SALES_WEST          1 rows exported
    . . exporting partition                     SALES_EAST          1 rows exported
    . . exporting partition                  SALES_CENTRAL          0 rows exported
    EXP-00091: Exporting questionable statistics.
    . . exporting table          SALES_LIST.SALES_EAST          4 rows exported
    EXP-00091: Exporting questionable statistics.
    . exporting referential integrity constraints
    . exporting triggers
    Export terminated successfully with warnings.
    [oracle@wissem ~]$

  • Export Schema from 24x7 OLTP

    I have been asked to take a full export of a database schema from a 24x7 production instance.
    This schema is heavily in use with lots of DML's and Selects, Can I use 'EXP' utility to take an online full export of this schema?
    Please answer as it is very urgent. Thanks in advance.

    Hello,
    Though using datapump is a better choice but it needs to be run on server itself and it will be drain on system resources,so use it with caution. Where conventional exp can be run from client and if your client is connected over same LAN or in same physical location as your production server, you should go great using "exp".
    Use "feedback" option to monitor the progress of export. you can also cherry pick options of constraints, indexes, .. to speed up "export" little faster.
    Regards

  • What is the best practice to export  schema from HTMLDB 2.0 to Bundle APEX

    Hello,
    1. I want to transfer data ( with trigger, sequence, procedures and functions ) from schema in HTMLDB 2.0 to APEX (with internal www server).
    2. Application export and import is good. I want to import data from this apps schema to Oracle XE in methodology export and import without creation by SQL scripts all objects (I need to achive this same sequence and other objects).
    3. Generaly, how to transfer apps and data from HTMLDB 2.0 with EE8MSWIN1250 to APEX 2.0 with DB XE AL32UTF8
    (all transfers between DB with the same NLS_CHARACTERSET are succesful without any problems)
    4. What I must to change with user rights and image properties in apps in new APEX
    2.1.0.00.39
    5. I the new verssion of the bundle APEX (with internal www server)
    Best regards, Remi

    Aaron:
    Check this site: Bonsai’s HDV to DVD page.
    Hope it helps !
      Alberto

  • Exporting schema from 11g to 10g

    how can i export full schema(suppost scott) from 11g to 10g both are on different machines and i dont know much about db side, if any body can suggest some queries.
    thanks and regards
    Abbas

    when i run the expdp it gives me following error
    Export: Release 10.1.0.4.2 - Production on Wednesday, 27 April, 2011 11:43
    Copyright (c) 2003, Oracle. All rights reserved.
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit
    Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    ORA-39002: invalid operation
    ORA-39070: Unable to open the log file.
    ORA-29283: invalid file operation
    ORA-06512: at "SYS.UTL_FILE", line 536
    ORA-29283: invalid file operation
    what can be wrong
    Regards
    Abbas

  • Import/export schema with ODI

    Hi all,
    do you know if with ODI11g I can import a full schema from Oracle database to another Oracle database?
    Thanks
    Erika

    why don't use imp/exp command to export schema from source db and import into target db.
    1) export11g ODI repository schemas in DMP files
    example : my 11g schemas are "ODI_MASTER" and "ODI_WORK"
    exp userid=odi_master/*odi_master* file=c:\odi_master.dmp
    exp userid=odi_work/*odi_work* file c:\odi_work.dmp
    2) import the dump file into new schemas in the new database (or is it the same database ? in my case, it was a different one)
    imp userid=SYSTEM/password touser=odi_master fromuser=odi_master file=c:\odi_master.dmp
    imp userid= SYSTEM/password touser=odi_work fromuser=odi_work file=c:\odi_work.dmp
    --nayan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Can one export a schema from a 64 bit Oracle DB into a 32 bit Oracle DB?

    Hello:
    I need to copy a schema from one DB to another. The source DB runs 64 bit version of Oracle DB but the target DB runs 32 bit version of Oracle DB. Can the schema in 64 bit DB instance be exported and imported into a 32 bit DB instance with exp/imp or expdp/impdp command? Thanks.

    Hello:
    Thanks for your help. Please see part of the error message below. In the new db, I have created the same user with same password and also grant connect and resource privilege to that user. But I don't understand why some table could be recreated without any issue while all those with BLOB column cannot.
    Import: Release 11.2.0.2.0 - Production on Wed Nov 9 18:02:07 2011
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - Productio
    n
    Export file created by EXPORT:V10.01.00 via conventional path
    import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    import server uses AL32UTF8 character set (possible charset conversion)
    . importing TPC's objects into TPC
    . . importing table "OTPC_ACTIVE_WORKITEM" 34 rows imported
    IMP-00017: following statement failed with ORACLE error 959:
    "CREATE TABLE "OTPC_BLD_ARCHIVE" ("ID" NUMBER(19, 0) NOT NULL ENABLE, "TEST_"
    "OUTPUT_FILE" BLOB NOT NULL ENABLE, "VERSION" NUMBER(19, 0) NOT NULL ENABLE,"
    " "TEST_SCHEMA_DEFINITION_ID" NUMBER(19, 0) NOT NULL ENABLE, "BUILD_DASHBOAR"
    "D_ID" NUMBER(19, 0) NOT NULL ENABLE) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXT"
    "RANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DE"
    "FAULT) TABLESPACE "TPC" LOGGING NOCOMPRESS LOB ("TEST_OUTPUT_FILE") STORE A"
    "S (TABLESPACE "TPC" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10 NOCACHE"
    " STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT))"
    IMP-00003: ORACLE error 959 encountered
    ORA-00959: tablespace 'TPC' does not exist
    IMP-00017: following statement failed with ORACLE error 959:
    "CREATE TABLE "OTPC_BLD_CHANGESET" ("ID" NUMBER(19, 0) NOT NULL ENABLE, "COM"
    "MIT_DATE" TIMESTAMP (6) NOT NULL ENABLE, "CONTENTS" BLOB, "NAME" VARCHAR2(2"
    "56) NOT NULL ENABLE, "OWNER" VARCHAR2(128) NOT NULL ENABLE, "COMMENTS" VARC"
    "HAR2(4000), "VERSION" NUMBER(19, 0) NOT NULL ENABLE, "CREATED_BY_ID" NUMBER"
    "(19, 0)) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 655"
    "36 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "TPC" LOGG"
    "ING NOCOMPRESS LOB ("CONTENTS") STORE AS (TABLESPACE "TPC" ENABLE STORAGE "
    "IN ROW CHUNK 8192 PCTVERSION 10 NOCACHE STORAGE(INITIAL 65536 FREELISTS 1 "
    "FREELIST GROUPS 1 BUFFER_POOL DEFAULT))"
    IMP-00003: ORACLE error 959 encountered
    ORA-00959: tablespace 'TPC' does not exist

  • Is it possible to export tables from diffrent schema using expdp?

    Hi,
    We can export tables from different schema using exp. Ex: exp user/pass file=sample.dmp log=sample.log tables=scott.dept,system.sales ...But
    Is it possible in expdp?
    Thanks in advance ..
    Thanks,

    Hi,
    you have to use "schemas=user1,user2 include=table:"in('table1,table2')" use parfileexpdp scott/tiger@db10g schemas=SCOTT include=TABLE:"IN ('EMP', 'DEPT')" directory=TEST_DIR dumpfile=SCOTT.dmp logfile=expdpSCOTT.log{quote}
    I am not able to perform it using parfile also.Using parfile it shows "UDE-00010: multiple job modes requested, schema and tables."
    When trying the below, i get error
    {code}
    bash-3.00$ expdp directory=EXP_DUMP dumpfile=test.dmp logfile=test.log SCHEMAS=(\'MM\',\'MMM\') include=TABLE:\"IN\(\'EA_EET_TMP\',\'WS_DT\'\)\"
    Export: Release 10.2.0.4.0 - 64bit Production on Friday, 15 October, 2010 18:34:32
    Copyright (c) 2003, 2007, Oracle. All rights reserved.
    Username: / as sysdba
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Starting "SYS"."SYS_EXPORT_SCHEMA_01": /******** AS SYSDBA directory=EXP_DUMP dumpfile=test.dmp logfile=test.log SCHEMAS=('MM','MMM') include=TABLE:"IN('EA_EET_TMP','WS_DT')"
    Estimate in progress using BLOCKS method...
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 0 KB
    Processing object type SCHEMA_EXPORT/TABLE/TABLE
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
    Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
    Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    . . exported "MM"."EA_EET_TMP" 0 KB 0 rows
    ORA-39165: Schema MMM was not found.
    Master table "SYS"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
    Dump file set for SYS.SYS_EXPORT_SCHEMA_01 is:
    /export/home/nucleus/dump/test.dmp
    Job "SYS"."SYS_EXPORT_SCHEMA_01" completed with 1 error(s) at 18:35:19
    {code}
    When checking expdp help=y shows :-
    {code}TABLES Identifies a list of tables to export - one schema only.{code}
    As per few testing,tables from different schemas are not possible to export using expdp in a single command.
    Anand

  • How to export a user and their schema from one 10g database to another?

    Hi,
    I would like to export a user and their entire schema from one 10g database to another one. How do I do this?
    thx
    adam

    If you want to export a user and the schema owned to the user, and import to the same user in a different database, or a different user in the same database, you can use the exp and imp commands as described in the Utilities manual.
    These commands are very versatile and have a lot of options - well worth learning properly. To give you a simplistic shortcut, see below - I create a user 'test_move', create some objects in the schema, export, create a new user in the database 'new_move' and import.
    oracle@fuzzy:~> sqlplus system/?????
    SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 11 21:46:54 2006
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> create user test_move identified by test_move;
    User created.
    SQL> grant create session, resource to test_move;
    Grant succeeded.
    SQL> connect test_move/test_move
    Connected.
    SQL> create table test (x number);
    Table created.
    SQL> insert into test values (1);
    1 row created.
    SQL> exit
    Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    oracle@fuzzy:~> exp system/????? file=exp.dmp owner=test_move
    Export: Release 10.2.0.1.0 - Production on Sat Mar 11 21:48:34 2006
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    Export done in AL32UTF8 character set and AL16UTF16 NCHAR character set
    About to export specified users ...
    . exporting pre-schema procedural objects and actions
    . exporting foreign function library names for user TEST_MOVE
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting object type definitions for user TEST_MOVE
    About to export TEST_MOVE's objects ...
    . exporting database links
    . exporting sequence numbers
    . exporting cluster definitions
    . about to export TEST_MOVE's tables via Conventional Path ...
    . . exporting table                           TEST          1 rows exported
    . exporting synonyms
    . exporting views
    . exporting stored procedures
    . exporting operators
    . exporting referential integrity constraints
    . exporting triggers
    . exporting indextypes
    . exporting bitmap, functional and extensible indexes
    . exporting posttables actions
    . exporting materialized views
    . exporting snapshot logs
    . exporting job queues
    . exporting refresh groups and children
    . exporting dimensions
    . exporting post-schema procedural objects and actions
    . exporting statistics
    Export terminated successfully without warnings.
    oracle@fuzzy:~> sqlplus system/?????
    SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 11 21:49:23 2006
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> create user new_move identified by new_move;
    User created.
    SQL> grant create session, resource to new_move;
    Grant succeeded.
    SQL> exit
    Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    oracle@fuzzy:~> imp system/????? file=exp.dmp fromuser=test_move touser=new_move
    Import: Release 10.2.0.1.0 - Production on Sat Mar 11 21:50:12 2006
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    Export file created by EXPORT:V10.02.01 via conventional path
    import done in AL32UTF8 character set and AL16UTF16 NCHAR character set
    . importing TEST_MOVE's objects into NEW_MOVE
    . . importing table                         "TEST"          1 rows imported
    Import terminated successfully without warnings.
    oracle@fuzzy:~>                                                       If moving between databases, remember to set the SID properly before the import. If keeping the same userid, skip the from/to stuff in the import.
    There are many variations on the theme ...
    You can simplify this. You can select tables individually. You can use a parameter file. You can transport all the constraints and data. You can skip the data and only move the definitions. You can get some help (imp/exp help=yes).
    And, if it's all 10g, there is a new and improved facility called expdp/impdp (dp = data pump) which has a lot more capability as well, including direct transfer (no intermediate file) together with suspend/restart. Also documented in the Utilities manual.

  • A small schema from 120 GB export could not be imported

    Dear,
    could you please be so kind and advice me what could be a problem for the following issue?
    I have 8.1.7 database on W2K (it is a shame, bit it is not a topic of my question) and I have to import one schema from 120 GB export done successfully few days ago. How to say - very simple task. So, I created the different user (e.g. TARGET_USER) in database, granted connect, resource privileges, and let me go:
    cmd> set ORACLE_SID=SID
    cmd> imp userid=sys fromuser=SOURCE_USER touser=TARGET_USER file=120_GB_export.dmp log=imp.log
    So, import takes some time, I observe in task manager number of data read by IMP.EXE program. When the value reaches about 80 GB at about all tables are imported and then import goes on. When the number of data read from disk (values in task manager) reaches about 95% of export size the process hangs.
    Checking in database: a) session is INACTIVE, b) in V$SESSION_WAIT I could find the following event: SQL*NET message from client, SECONDS_IN_WAIT increasing to minutes, hours and does not finish.
    Have you any idea?
    Kind Regards, Piotr

    Try importing just the data first and re-create the indexes later.
    Monitor the import process using,
    SELECT
    SUBSTR(sql_text, INSTR(sql_text,'INTO "'),30) table_name
    , rows_processed
    , ROUND( (sysdate-TO_DATE(first_load_time,'yyyy-mm-dd hh24:mi:ss'))*24*60,1) minutes
    , TRUNC(rows_processed/((sysdate-to_date(first_load_time,'yyyy-mm-dd hh24:mi:ss'))*24*60)) rows_per_minute
    FROM
    sys.v_$sqlarea
    WHERE
    sql_text like 'INSERT %INTO "%'
    AND command_type = 2
    AND open_versions > 0;
    check the alert.log for any errors reported.

  • Export documentation from schema

    Hi,
    there is a way to export documentation from oracle schema (something lije java api documentation)?
    thanks

    You can get all list of comments for your tables by viewing
    DBA_COL_COMMENTStable. Please refer to documentation for more information
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_4009.htm#SQLRF01109
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com

Maybe you are looking for