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 ~]$
Similar Messages
-
How can I export schema with all objects and few tables without data
Hi all
Verion 10g EE.
I have to export schema with all objects but i need to ingnore some of the table data.
There are 4 table those have huge data, we need not to export those tables data but structure should export.
Thanks,
NrYou can do this with a single command. Run your export as normal and add query parameters for the 4 tables that you don't want any rows:
expdp ... query=schema1.table1:"where rownum = 0" query=schema2.table2:"where rownum = 0" ...
It is best to put the query parameters in a parameter file so you don't have to worry about escaping any OS special characters.
Dean -
Good Morning All,
I would like to export schema with data to another.
Any help?
Thanks in advance,
EB NYIf you have a few tables...quick and dirty way is to
create new_table as select * from old_schema.tableOtherwise depending on what version you are on and you have access, use exp/data pump.
Alot of good pages on using expdp but the general syntax is
1st, make the directories
connect / as sysdba
grant create any directory to org_schema_user;
create or replace directory dump_directory as '/my_directory_on_the_file_system/';
grant read, write on directory dump_directory to org_schema_user;
grant read, write on directory dump_directory to new_schema_user;export
expdp user/password schemas=start_schema directory=dump_directory dumpfile=my_dmp_file.dmp logfile=my_dmp_file_export.logimport
impdp new_user/password remap_schema=old_schema:new_schema directory=dump_directory dumpfile=my_dmp_file.dmp logfile=my_dmp_file_import.log -
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 -
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
Erikawhy 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 -
How to export schema with it's data
db11gxe , apex 4.0 , firefox 24 ,
hi all,
i want to export my database tables with it's data included ?
thanksHi,
I do not see how question relates to APEX.
Maybe you check Oracle XE documentation
http://docs.oracle.com/cd/E17781_01/server.112/e18804/impexp.htm#CFHJAHAA
Regards,
Jari -
Export schema with mining models -Need Help Plz-
Hello,
I have to export my schema to another online server to by used by web site. me schema contain some tables, functions etc. It's also contain 33 mining models. When I export the schema using (exp) command and re import the dump file on different machine it import every thing but the mining models.
I just need a confirm if the (exp) command support exporting the mining models? and if yes, why it can not export the models from my schema?
I have already used the (expdp) and the file can be imported without problems on the machines I have here but it generate an error on the servers of the hosting company?
Need any help or ideas
Thankshello
the database on the source is 11g r1. on the target 11g. online hosting database ( http://www.revion.com/hosting/apex.html ).
exp app_eoncologist/app_eoncologist file=exp_eoncologist.dmp log=log.txt
expdp app_eoncologist directory=PICTURES dumpfile=app_eoncologist.dmpboth of the above works fine on my site. I just learned from another post that (exp) don't support mining objects so we don't need to look on it.
When the hosting company try to import the file using (impdp) they get the error
IMP-00010: not a valid export file, header failed verification
IMP-00000: Import terminated unsuccessfully
Hope this can help
Thanks
AL -
Hi,
I did a schema export and got the error for some of the tables
*ORA-39181: Only partial table data may be exported due to fine grain access control on table*
I created another user granted DBA role and still did not work, what other options do i have other than having to disable fine-grained access control.
Thank youuser granted DBA role and still did not work
Verify the user can see the full table. Or try granting EXEMPT ACCESS POLICY, support note 422481.1 -
Export database without tablespace info
hai,
I would like to export the data from one schema with tablespace and the data into a
another schema with different tablespace.
How to do this?
How to use "exp" command to generate dump without tablespace info
thanks
bye
RaghuHi,
Follow this...
1. Take exp of the data
2. Generate the index file from the dump using this command imp file=dump.dmp indexfile=index.txt
3. Open the index file and run the create table command manually at sql prompt in which ever schema, tablespace you want.
4. Once the table is created then import the dump using the ignore =y clause.
Regards,
Deepak Jaisingh. -
Clone schema with current db objects and data.
Hi Cloud expert,
I need feature to clone existing schema and create new schema with schema as a service. I created profile that export schema with database objects and data. I created template that use the profile created. While provisioning the template I found all the database objects with template. Now I need a solution to clone the current schema with all the objects at current time. The way I tried contains all the objects that were exists while exporting the schema. I need the solution to clone schema so that it will contains all the objects and data right now.
While reading document I found snapclone but that is not the exactly the solution I need. I simply need to clone schema with latest db object and data with Self Service portal.
Thank You in advance.
Dilli R. MaharjanOne option is to run BACKUP/RESTORE, once you have restored you run:
SELECT 'ALTER TABLE ' + quotename(s.name) + '.' + quotename(o.name) +
' DISABLE TRIGGER ALL '
FROM sys.schemas s
JOIN sys.objects o ON o.schema_id = s.schema_id
WHERE o.type = 'U'
AND EXISTS (SELECT *
FROM sys.triggers tr
WHERE tr.parent_id = o.object_id)
Copy result and paste into a query window do to run. Next:
SELECT 'DELETE ' + quotename(s.name) + '.' + quotename(o.name)
FROM sys.schemas s
JOIN sys.objects o ON o.schema_id = s.schema_id
WHERE o.type = 'U'
Run this result until you don't get any more errors.
Run the first query again, but change DISABLE to ENABLE.
This is more long-winding than scripting, particularly if you have lots of data. But you know that you will not make any changes whatsoever to the schema.
The scripting in SSMS generally does it right, I believe, but some items are not scripted by default. If you run BACKUP/RESTORE, you know that you get a faithful copy.
Of course, the best way is to keep your code under version control and take the version control system as your ultimate truth.
Erland Sommarskog, SQL Server MVP, [email protected] -
Export Import with different tablespaces
Does anyone know if there is a way to export from one database (creating a dmp file) and then importing into another database with different tablespaces? I have tried this and get this error:
ORA 959. It complained that the tablespace doesnt exist (which it doesnt). Is there a way I can change the export or import parameters to avoid this and just use the default tablespaces?
I may well be missing the point here so please feel free to tell me I am being a fool.
Thanks
JohanExample. All these tables are from the same schema with the same tablespace specified in the dmp file. There are many more and 90 % fail but not all.
importing SCHEMA1 objects into SCHEMA2
IMP-00017: following statement failed with ORACLE error 959:
"CREATE TABLE "ACCOUNT_RPRT_NOT_TOBE_PUBLISH" ("O__NUM" CHAR(13) NOT NULL EN"
"ABLE, "O__ST" NUMBER(4, 0) NOT NULL ENABLE, "STEP_COUNTER" NUMBER(7, 0), "S"
"TATUS" NUMBER(1, 0), "RETRY_COUNTER" NUMBER(5, 0), "RESTART_COUNTER" NUMBER"
"(5, 0), "PID" NUMBER(3, 0), "OBJ_LOCK" VARCHAR2(10), "MYFILE" VARCHAR2(200)"
", "LONG_FIELD" CLOB, "LAST_SELECT_B_S" VARCHAR2(250), "LAST_SELECTION" VARC"
"HAR2(250), "L_EXECUTION_CTRL" CHAR(13), "ID" NUMBER(6, 0), "ERROR_COUNTER" "
"NUMBER(7, 0), "CREATION_TIME" NUMBER(5, 0), "CREATION_DATE" NUMBER(6, 0), ""
"COMPLETION_TIME" NUMBER(5, 0), "COMPLETION_DATE" NUMBER(6, 0), "COMMIT_COUN"
"TER" NUMBER(5, 0)) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(I"
"NITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "AIA_DATA_T_256K" LO"
"GGING NOCOMPRESS LOB ("LONG_FIELD") STORE AS (TABLESPACE "AIA_DATA_T_256K""
" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10 NOCACHE STORAGE(INITIAL 65"
"536 FREELISTS 1 FREELIST GROUPS 1))"
IMP-00003: ORACLE error 959 encountered
ORA-00959: tablespace 'AIA_DATA_T_256K' does not exist
. . importing table "ACTUARIAL_RPT_CNTR" 0 rows imported
. . importing table "ACTUARIAL_RPT_CVRG" 0 rows imported
. . importing table "ALIS_CANCEL_BILLING" 2799 rows imported -
Export schema and import with different name
Hi ,
I need your assistance guys,
I need to export a schema from a database and then import it with different name to another database. How can I do that?
I export it with the following command:
exp userid=system/PW file=May_02_Export.dmp log=May_02_Export.log owner=schema_name statistics="none"
Now I want to import it but with different name (schma_name).
RegardsDid you try FROMUSER and TOUSER option ?
E:\oracle\product\10.2.0\db_1\install>sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Sat May 2 20:01:09 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1247900 bytes
Variable Size 71304548 bytes
Database Buffers 92274688 bytes
Redo Buffers 2945024 bytes
Database mounted.
Database opened.
SQL> create user fromuser identified by fromuser;
User created.
SQL> grant resource, create table, create session to fromuser;
Grant succeeded.
SQL> create user touser identified by touser;
User created.
SQL> grant resource, create table, create session to touser;
Grant succeeded.
SQL> conn fromuser/fromuser
Connected.
SQL> create table export_table(a char);
Table created.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
E:\oracle\product\10.2.0\db_1\install>exp fromuser/fromuser file=e:\a.dmp
Export: Release 10.2.0.1.0 - Production on Sat May 2 20:03:06 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user FROMUSER
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user FROMUSER
About to export FROMUSER's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export FROMUSER's tables via Conventional Path ...
. . exporting table EXPORT_TABLE 0 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.
E:\oracle\product\10.2.0\db_1\install>imp help=y
Import: Release 10.2.0.1.0 - Production on Sat May 2 20:03:47 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
You can let Import prompt you for parameters by entering the IMP
command followed by your username/password:
Example: IMP SCOTT/TIGER
Or, you can control how Import runs by entering the IMP command followed
by various arguments. To specify parameters, you use keywords:
Format: IMP KEYWORD=value or KEYWORD=(value1,value2,...,valueN)
Example: IMP SCOTT/TIGER IGNORE=Y TABLES=(EMP,DEPT) FULL=N
or TABLES=(T1:P1,T1:P2), if T1 is partitioned table
USERID must be the first parameter on the command line.
Keyword Description (Default) Keyword Description (Default)
USERID username/password FULL import entire file (N)
BUFFER size of data buffer FROMUSER list of owner usernames
FILE input files (EXPDAT.DMP) TOUSER list of usernames
SHOW just list file contents (N) TABLES list of table names
IGNORE ignore create errors (N) RECORDLENGTH length of IO record
GRANTS import grants (Y) INCTYPE incremental import type
INDEXES import indexes (Y) COMMIT commit array insert (N)
ROWS import data rows (Y) PARFILE parameter filename
LOG log file of screen output CONSTRAINTS import constraints (Y)
DESTROY overwrite tablespace data file (N)
INDEXFILE write table/index info to specified file
SKIP_UNUSABLE_INDEXES skip maintenance of unusable indexes (N)
FEEDBACK display progress every x rows(0)
TOID_NOVALIDATE skip validation of specified type ids
FILESIZE maximum size of each dump file
STATISTICS import precomputed statistics (always)
RESUMABLE suspend when a space related error is encountered(N)
RESUMABLE_NAME text string used to identify resumable statement
RESUMABLE_TIMEOUT wait time for RESUMABLE
COMPILE compile procedures, packages, and functions (Y)
STREAMS_CONFIGURATION import streams general metadata (Y)
STREAMS_INSTANTIATION import streams instantiation metadata (N)
The following keywords only apply to transportable tablespaces
TRANSPORT_TABLESPACE import transportable tablespace metadata (N)
TABLESPACES tablespaces to be transported into database
DATAFILES datafiles to be transported into database
TTS_OWNERS users that own data in the transportable tablespace set
Import terminated successfully without warnings.
E:\oracle\product\10.2.0\db_1\install>imp system/oracle fromuser=fromuser touser=touser file=e:\a.d
Import: Release 10.2.0.1.0 - Production on Sat May 2 20:04:20 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export file created by EXPORT:V10.02.01 via conventional path
Warning: the objects were exported by FROMUSER, not by you
import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
. importing FROMUSER's objects into TOUSER
. . importing table "EXPORT_TABLE" 0 rows imported
Import terminated successfully without warnings.
E:\oracle\product\10.2.0\db_1\install>sqlplus touser/touser
SQL*Plus: Release 10.2.0.1.0 - Production on Sat May 2 20:04:36 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> desc export_table
Name Null? Type
A CHAR(1)
SQL>HTH
Aman.... -
Using dbms_datapump package to export the schema with the schema name as pa
Hi,
I am using the pl/sql block to export schema using dbms_datapump package,Now I want to pass the scheme name as the parameter to the procedure and get the .dmp and .log files with the schema name included.
CREATE OR REPLACE PROCEDURE export
IS
h1 number;
begin
h1 := dbms_datapump.open (operation => 'EXPORT', job_mode => 'SCHEMA', job_name => 'export1', version => 'COMPATIBLE');
dbms_datapump.set_parallel(handle => h1, degree => 1);
dbms_datapump.add_file(handle => h1, filename => 'EXPDAT.LOG', directory => 'DATA_PUMP_DIR', filetype => 3);
dbms_datapump.set_parameter(handle => h1, name => 'KEEP_MASTER', value => 0);
dbms_datapump.metadata_filter(handle => h1, name => 'SCHEMA_EXPR', value => 'IN(''CHECKOUT'')');
dbms_datapump.set_parameter(handle => h1, name => 'ESTIMATE', value => 'BLOCKS');
dbms_datapump.add_file(handle => h1, filename => 'EXPDAT%U' || to_char(sysdate,'dd-mm-yyyy') || '.DMP', directory => 'DATA_PUMP_DIR', filetype => 1);
dbms_datapump.set_parameter(handle => h1, name => 'INCLUDE_METADATA', value => 1);
dbms_datapump.set_parameter(handle => h1, name => 'DATA_ACCESS_METHOD', value => 'AUTOMATIC');
dbms_datapump.start_job(handle => h1, skip_current => 0, abort_step => 0);
dbms_datapump.detach (handle => h1);
exception
when others then
raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
end;
Thank you in advanced
Sriuser12062360 wrote:
Hi,
I am using the pl/sql block to export schema using dbms_datapump package,Now I want to pass the scheme name as the parameter to the procedure and get the .dmp and .log files with the schema name included.
OK, please proceed to do so
>
CREATE OR REPLACE PROCEDURE export
IS
h1 number;
begin
h1 := dbms_datapump.open (operation => 'EXPORT', job_mode => 'SCHEMA', job_name => 'export1', version => 'COMPATIBLE');
dbms_datapump.set_parallel(handle => h1, degree => 1);
dbms_datapump.add_file(handle => h1, filename => 'EXPDAT.LOG', directory => 'DATA_PUMP_DIR', filetype => 3);
dbms_datapump.set_parameter(handle => h1, name => 'KEEP_MASTER', value => 0);
dbms_datapump.metadata_filter(handle => h1, name => 'SCHEMA_EXPR', value => 'IN(''CHECKOUT'')');
dbms_datapump.set_parameter(handle => h1, name => 'ESTIMATE', value => 'BLOCKS');
dbms_datapump.add_file(handle => h1, filename => 'EXPDAT%U' || to_char(sysdate,'dd-mm-yyyy') || '.DMP', directory => 'DATA_PUMP_DIR', filetype => 1);
dbms_datapump.set_parameter(handle => h1, name => 'INCLUDE_METADATA', value => 1);
dbms_datapump.set_parameter(handle => h1, name => 'DATA_ACCESS_METHOD', value => 'AUTOMATIC');
dbms_datapump.start_job(handle => h1, skip_current => 0, abort_step => 0);
dbms_datapump.detach (handle => h1);
exception
when others then
raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
end;
EXCEPTION handler is a bug waiting to happen.
eliminate it entirely -
Problem with Export Schema form CCM 2.0 SP4
Hello all,
when I am trying to export schema form CCM I am getting the following exception /CCM/CX_EXPORT_ERROR
The exception occurred at following point
program: /ccm/cl_catalog_model=======cp
include: /ccm/cl_catalog_model=======cm01c
line: 28
any hint?
GordanHello all,
i'm facing the same problem with CCM 2.0 SP6..
Anyone know the solution?
Thanks for your help!
Antonio -
How to export and import from AIX to solaris a whole schema with different
how to export and import from AIX to solaris a whole schema with different character set
import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses WE8ISO8859P1 character set (possible charset conversion)
Import terminated successfully with warnings.The conversion between the character sets on the two servers are handled automatically. Export from one server will export the data given the character set defined on that server. Import into another server will import the data given the character set defined on that server, performing a conversion if necessary. This can be a problem when going from single-byte to a multi-byte character set. In your case, the warning is simply for your information, shoule be no real problem given the character sets you're using.
For more info...check out (pertains to 9i):
Export
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96652/ch01.htm#1006791
Character Ste Migration
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96529/ch10.htm#1656
HTH
Maybe you are looking for
-
Windows Vista + iTunes Video = skipping
I have a computer with Windows Vista and I can't get iTunes video to work properly. The sound will be fine, but the video skips and stops and then finally I get an error message saying that iTunes has to close. Please tell me that there is some kind
-
Better of between BO XI 3.1 or new version BO 4.0
Hi We already having project of BO with other database. we are moving database with SAP (currently going on) and we have moved some reports to BO 3.1. Going forward we are having new phases to start. So we have heard BO 4.0 version has come but not
-
Deleting all the similar records except one
I have a table without a primary/unique key, this table contains too many rows that have the same column values(the row is duplicated), How can I delete all the duplicated rows and keep one copy of this rows?
-
Photoshop with mac osx 10.6.8
I have a MAC with mac osx 10.6.8 and I want to install a photoshop. How can I do it?
-
Does anyone know if I can download this version of Java - for OS X 2012-005 - the new Java update is a total mess for me and is preventing me from working remotely... :-( really need to go back to older Java, don't have the Time Machine set up ...