Trying to create 3 schemas from one schema
DB version : 11.2.0.2 Enterprise Edition
Platform : RHEL 5.6
I have an expdp dump of a schema (HRTB_AP_PROD). I wanted to create 3 schemas from this dump in one go. So i tried this
## The parfile I used
DIRECTORY=DPUMP_DIR
DUMPFILE=HRTB_AP_PROD%u.dmp
LOGFILE=TheThreeSchemas-imp.log
remap_schema=HRTB_AP_PROD:HRTB_AP_DEV1
remap_schema=HRTB_AP_PROD:HRTB_AP_DEV2
remap_schema=HRTB_AP_PROD:HRTB_AP_DEV3
exclude=statistics
parallel=2
nohup impdp \'/ as sysdba\' parfile=impdp-aug23.par &But i encountered
ORA-39046: Metadata remap REMAP_SCHEMA has already been specified.When I googled it found the following link in which Dean Says , it is not possible.
Re: one dump file inport into multiple schema
So, I had to run 3 separate imports (impdp) to do this.
This is a bit wierd. I am surprized that Oracle guys haven't done anything about this . This is like DB2 !
Is there a question in your post or are you just letting us know the obvious?
:p
Similar Messages
-
How can we copy table from one schema to other schema
Hi,
I have create one table in one schema and i want to copy it to other schema.How we can copy table from one schema to other schemaHi,
You can try something like this :-
SQL> CONNECT SYS/SYS123@SERVER AS SYSDBA
Connected.
SQL> CREATE USER TEST_1 IDENTIFIED BY TEST_1;
User created.
SQL> CREATE USER TEST_2 IDENTIFIED BY TEST_2;
User created.
SQL> GRANT CONNECT,RESOURCE,DBA TO TEST_1;
Grant succeeded.
SQL> GRANT CONNECT,RESOURCE,DBA TO TEST_2;
Grant succeeded.
SQL> CONNECT TEST_1/TEST_1@SERVER
Connected.
SQL> CREATE TABLE TEST_COPY ( TEST_COL NUMBER );
Table created.
SQL> INSERT INTO TEST_COPY VALUES ( 1 );
1 row created.
SQL> INSERT INTO TEST_COPY VALUES ( 2 );
1 row created.
SQL> COMMIT;
Commit complete.
SQL> GRANT ALL ON TEST_COPY TO TEST_2;
Grant succeeded.
SQL> CONNECT TEST_2/TEST_2@SERVER
Connected.
SQL> CREATE TABLE TEST_COPY AS SELECT * FROM TEST_1.TEST_COPY;
Table created.
SQL> SELECT * FROM TEST_COPY;
TEST_COL
1
2Regards,
Sandeep -
How do I move a table from one schema to another schema on Oracle XE?
How do I move a table from one schema to another schema on Oracle XE?
Hi,
I tried to use the insert/select statement that you had given, it did not work.
The error is ORA-00913: too many values.
But finally what I did was, I went into the system schema where the table was and generated the DDL through the utilities and afterwards I imported them into the schema that I am currently working on. It solved the problem!
However I am still curious to know why the insert/select statement did not work? Do you know any site/tutorial which gives a real time example?
Thank you
Skye -
How do I move a table from one schema to another schema?
How do I move a table from one schema to another schema?
Grant access to the table from the source schema to destination schema.
GRANT SELECT ON <TABLE_NAME> TO <DESTINATION SCHEMA>A simple way would be to use CREATE Table with select syntax (in destination schema)
CREATE TABLE <TABLE_NAME> AS SELECT * FROM <SOURCE SCHEMA>.<TABLE_NAME><li>However, you would be in <b><u>trouble when the table has index,constraints and triggers</u></b>.
So you can better of grab the DDL statement of the table(and any additional components) andd then create the table in the destination schema.You can use SQL developer, Toad or Apex's Object browser for this.
After the table is created, Insert the records using SELECT.
INSERT INTO <TABLE_NAME> SELECT * FROM <SOURCE SCHEMA>.<TABLE_NAME>This question is discussed in great detail in this <b>AskTom thread</b> -
Mapping the xsd:any tag from one schema to other in BPEL
I am using soa suite 11g
I have 2 schemas with <xsd:any> tag
at run time the xml based on one xsd can have tags as below in place of xsd:any tag
<*number* xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeId="1001" readOnly="False">P00001</number>
<*description* xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeId="1002" readOnly="False">Test Part created for Mapping</description>
<*itemType* xsi:type="common:AgileListEntryType" xmlns:common="http://xmlns.oracle.com/AgileObjects/Core/Common/V1" attributeId="1081" readOnly="False">
<selection>
<id>10141</id>
<apiName>Part</apiName>
<value>Part</value>
</selection>
</itemType>
<*lifecyclePhase* xsi:type="common:AgileListEntryType" xmlns:common="http://xmlns.oracle.com/AgileObjects/Core/Common/V1" attributeId="1084" readOnly="True">
<selection>
<id>976</id>
<apiName>PRELIMINARY</apiName>
<value>Preliminary</value>
</selection>
</lifecyclePhase>
and in othe xsd it can be
<key1001 attributeId="5001">P00002</key1001>
<key1002 attributeId="5002">Test Part created for Mapping</key1002>
I can create a DVM to have mapping of attribute id's values 1001 -5001 ,1002-5002 but how to wire/map the any nodes and the attribute id element of one any node to other in XSLT mapper.At design time I am not aware that what all tags can substitute in place of any.
I need to map these two any tags.How to do this in transform activity xslt mapper in BPEL.It does not allow me to directly wire two any tags
Request someone to help me on this.stuck on this for long .I have figured out that with xpath and copy-of operation I can copy all nodes that come in place of xsd:any from one schema to other .But beofre copying I want to change the attribute values of the node that come in place of xsd:any based on the mapping stored in the DVM.Request some one to please help .
-
How to defer constraint of one schema from another schema
Hi All,
I am having a requirement of migrating data from one schema(SCHEMA_A) to another schema(SCHEMA_B). So I tried to implement the same using PL/SQL.
Because of foreign key contraint while migrating child table, Oracle throws an error message like parent key not available.
So I tried to set the all contraints to deferred and after completion of migration i planned to set all the contraints to immediate.
But Here I am executing the procedure from schema(SCHEMA_C) which has rights to access SCHEMA_A and SCHEMA_B.
How could I able to defer all the constraint in SCHEMA_B from SCHEMA_C?
Thanks in Advance,
Antany.Yes,
You could run something like this, for foreign keys:
BEGIN
FOR cur_rec IN (SELECT table_name, constraint_name FROM DBA_CONSTRAINTS WHERE OWNER = <owner> AND CONSTRAINT_TYPE = 'R' )
LOOP
EXECUTE IMMEDIATE 'ALTER TABLE <owner>.' || cur_rec.table_name || ' DISABLE CONSTRAINT ' || cur_rec.constraint_name;
END LOOP;
END;
/ -
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
adamIf 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. -
Best LKM to move data from with in Oracle from one schema to another Schema
Hi Gurus,
What is the best KM to move data from one schema to another schema within same oracle database.
Thanks in advanceDear,
If your source and target are on the same database server then you dont need LKM.
You have to 1. create one data server for the database server
2. Create one physical schema for your source and another physical schema for your target under the above created data server.
3. Then create models for each above created physical schema
In this case you just need IKM knowledge module
Please refer http://oditrainings.blogspot.in/2012/08/odi-interface-source-target-on-same.html
If your source and target are on different server then you must create two different data servers in topology. You have to use LKM.
The best LKM to use is LKM oracle to Oracle dblink. But you should have proper grants to use it
If your source has very few records you can go with LKM SQL to Oracle other wise use LKM oracle to Oracle dblink -
Cpying / Importing only a few tables structure from one schema to other!
Greetings,
Can any one please suggest me the best method to copy the structure of series of tables from one schema to other in a eased way!
For example:- There is a MC scheama and there are about 1000 tables... and there is a AB schema where I need to copy only structure of 85 selected tables from MC -> AB..
Please suggest!Hi,
You could use any of the following:
1) Export 85 tables from source to destination
2) Use Data Pump Export with Network_link if you are on 10g
3) Use CTAS (create table as select )
4) Use DBMS_METADATA.GET_DDL procedure on the source to create a script
Probably, others would come up with more bright ideas.
Regards -
Proper way to migrate schema from one DS5.2 to another
What is the best error free way to migrate schema from one Directory Server 5.2 to another.
Thanks,I have migrated schema from 5.1 to 5.2 and below are my experiences. Check if this helps you in any way.
- After overwriting 99user.ldif from 5.1 to 5.2; experienced problems in starting the DS 5.2 instance. On looking into the logs, few object classes and attributes gave problems.
- Modified 99user.ldif in DS 5.2 by appending schema values group by group. Able to start DS 5.2 instance without problems
- Migrated data (ldif file) via ldif2db command to DS 5.2
- Encountered problems in DS 5.2; Suffix got dissappeared after migrating the data and a restart of DS 5.2 instance. Upon looking logs and few troubleshooting steps, found the aci's in the data file creating problems
- Removed aci's in data (ldif file) manually and migrated using ldapmodify command and it worked -
Copying data contianing long datatype from one schema to another
I'm using Oracle 8.1.7 and trying to move copy data from one schema to another.
Usually an easy task. This time the data contains longs so I can't use standard SQL. The data in the long is too long for a PL/SQL long datatype so that's not worked.
I've tried the COPY FROM command but get the invalid sql command error.
Can anyone save my hair?The COPY command doesn't have to be all on one line. The continuation character for SQL*Plus commands is a hyphen.
SQL> prompt "Hello"
"Hello"
SQL> prompt -
"Hello""Hello"
SQL>Metalink is the website for customers that pay for Oracle support. Go to www.oracle.com and click on the metalink button on the top left of the screen. It's called Metalink because Oracle support levels are named after metals: bronze, silver, gold. -
Move users and schemas from one instance to another
Hi, I'm starting out in a DBA position.
My task at the moment is to move users and schemas from one instance to another.
We're using 9.2.0.7.
I have concluded that the following steps are necessary to move users and schemas from one instance to another :
1. Create the needed tablespaces.
2. Create the users that exist in the source instance
3. Use exp to do a full export
4. Use imp to re-create the schemas from the output file created by exp in step 3
Am I missing anything ?
Thanks,
Gabriel3. Use exp to do a full exportInstead of doing a FULL export just export the users you want to move and imp that in other database using FROMUSER & TOUSER parameter.
Daljit Singh -
Moving procedures and sequences from one schema to another
Hi all,
Is there any way to export the procedures and sequences alone from one schema to another? If not is there any way to generate the procedure creating scripts from the source schema.
I used the following script SET HEADING OFF
SET PAGESIZE 999
SET LINESIZE 100
SELECT DBMS_METADATA.GET_DDL('PROCEDURE', NAME, owner) || '/' FROM ALL_SOURCE WHERE
OWNER='SCOTT' AND TYPE='PROCEDURE'
SPOOL C:\A.SQL
SPOOL OFF
[/CODE]
But the problem is in the out put script it is cutting the line .. for egCREATE OR REPLACE PROCEDURE "QC_PFIZER_REL5"."SPGETNEXTDS
S_ID"
( V_ID OUT NUMBER )
IS
BEGIN
SELECT SEQUENCE_DSS_Id.NEXTVAL INTO V_ID FROM DUAL;
END ;
i experimented with increasing linesize but it is not helping. I am using 9.2.0.5 on windows 2003.
Thanks
MuneerSimilar to getting the code from user_source, you could get sequences from user_sequences.
SQL> select dbms_metadata.get_ddl('SEQUENCE', sequence_name) from user_sequences ;
DBMS_METADATA.GET_DDL('SEQUENCE',SEQUENCE_NAME)
CREATE SEQUENCE "SCOTT"."SEQ" MINVALUE 1 MAXVALUE 1.00000000000000E+27 INCR
EMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE
1 row selected.
SQL> -
Copy data from one schema to another schema tables
Hi,
I was doing a copy using sql developer copy feature, data copy worked perfect but for few table data didn't move there are about 30 tables from schema prod to schema dev i need to move tables are already created only data needs to be moved from prod to dev
Can you suggest me any method were I can move all the tables data at a time from one schema to another. Please suggest.
Thanks
SudhirHi,
If table structure is the same then:
insert into dev.table_name
select
from
prod.table_name --if prod is in another database change to prod.table_name@db_link_to_prod_db
commit
;Hope this helps. Otherwise give some more info about where these schema's are.
Regards,
Peter -
To find Missing DB Objects from one schema,sid to other schema,sid
Hi Friends..
I have an requirement as bellow...
Recently we migrated from one schema to other ,some of the DB objects are missed while migrating.
After Migration now the schema and SID are Different for newly created schema
while comparing the newly created schema2 with old schema1 found that some of the DB objects are missed.
So i need to find out the difference's from Schema1 to Schema2.
But now schema 2 is having different sid and schema name and to make the changes in schema2 with respect to schema1.
Please let me know how to go ahead with this....
Thanks in advance...Hi,
Here's one way:
SELECT object_name
, object_type
FROM all_objects
WHERE owner = 'SCHEMA1' -- Case-sensitive
MINUS
SELECT object_name
, object_type
FROM all_objects
WHERE owner = 'SCHEMA2' -- Case-sensitive
;Use a database link for one half of the MINUS, if necessary.
This will not detect objects that have the same name and type, but are different. For example, if both schemas have a table called TABLE_X, the query above will not display TABLE_X, even if the two tables have different rows and/or columns.
Maybe you are looking for
-
Others can't open documents created in Acrobat X
I'm wondering if anyone else has this problem and what I need to do to fix it. I have both Acrobat 9 and Acrobat X on this computer, but I've had to roll back to using Acrobat 9, because only about half the people I send .pdfs to can open the ones c
-
Bridge CS3 no longer previews CR2 Canon
Currently previews of canon raw photos loaded in Bridge do not always show the photo, only the generic icon "CR2", and won't show the photo when slidestrip icon is selected either. It worked on previous downloads, but not currently. I can see the pho
-
Messages wont work after I received a very long text
Messages wont work after I received a very long text, it keeps freezing up and wont even let me delete that very long text.
-
POWL - Query parameters doesn't open
Hi Gurus, I configured a POWL for shopping carts based on SAPSRM_E_CHECK_STATUS. 1. Create custom application ID 2. Create a custom POWL type with the standard feeder (/SAPSRM/CL_CLL_PWL_A_SC_ESS) 3. Create the link between application ID and POWL ty
-
Hi , i have some m2ts ( AVCHD ) files on my computer but can´t import them to iMovie . What should i do ? I d´ont want to buy a converter.