Imp records of One schema into another schema of same table.
I had done following steps,
schemas(toy,toys)
1) i open the session of toy schema
First i taken backup of table
create table bck20121103_himan as select * from himan;
Backup table is created.
After taking the Backup table
delete himan;(deleting the records)
2) i log in to another session(toys)
exp toys/toys@orcl file=20121103TOYs.DMP TABLES=(HIMAN) /* Particular table is taken*/
3) i log in to toy schema
imp toy/toy@orcl file=<dump file name> TABLES=(HIMAN) INDEXES=N IGNORE=Y
i tried the above statement it taken so much of time..
Later i tried
I log in to toy session
i rename the table with other name.
later i imported
imp toy/toy@orcl file=<dump file name> TABLES=(HIMAN) IGNORE=Y FULL=Y
it's successfully imported..
kindly correct me if its wrong or any other steps is their ..
as per your first method.
you took backup
you deleted not commited.
took export from toys and imported into toys without fromuser & touser
after correction.
============
you mentioned
you took backup
you deleted toy.himen (again not commited)
exported toy.himen
imported toy.himen
check you might have got the duplicate records also
when you delete any records its a dml operation which does not auto commit you need to commit it.
hope you got the point.
Regards
Kaleem.
Similar Messages
-
Importing (imp) a dump (exp) from a schema into another schema
Hello
-I know I should read the manual-
-I also know that there are some experts here who only need two lines to explain it- :)
I have a dump file from a complete schema (lets call it xx).
I habe another schema (yy) in the same database and:
I would like to put that dump file into the schema yy.
How does the imp command looks like?
Thank you in advance!How does the imp command looks like? To get help say at OS prompt.
imp help=y
-aijaz -
Importing schema into another schema using enterprise manager on 11.2.0.3
I am using OEM database control not Grid Control.
I am exporting a schema using OEM Data Movement and I want to REMAP it to another schema.
But it does not populate the Destination Schema with any other schemas other than the Source Schema.
I only get one item in Destination Schema dropdown which is the same as the Source Schema.
Any ideas why the Destination Schema dropdown is not populated with all the schemas?
This is on Windows 2008 R2 64-bit
This worked fine in 10g versions.
Edited by: user563987 on Feb 20, 2012 1:48 PMI have confirmed with Oracle support that it is a bug which was suppose to have been fixed in this version but obviously is not. They have opened a new bug.
When you are you are on Grid Control 11.2.0.5? I am not seeing this version? Or am I missing something?
Thanks. -
How to load data from one Infobject into another in the same system??
Hello All,
i need to load hierarchy data (already existing in 1 Infobject) into another newly created Infobject in the same BW system.Is there a way to do it without involving flat files??
Thanks soo much in advance
Regards,
Priyahi
say there are two infoobjects X and Y.
X is existing infoobject and Y in new one.
go to infosurce-search for X-create export datasource - map the rules and load the data.
This is one way.
Other way is u can use X as a reference object of Y so that both of them have same structure and both objects will share common database tables in BW which are exsting for X.
Hope this helps.
Kindly assign the points if it helps. -
How do i transfer funds from one account to another in the same table?
Say for example i want to transfer funds from UserID 1111101 to UserID 1111103.
Anyone know the procedure for this. I use php/mysql and dreamweaver.Here's a very basic method. Note that this is just pseudocode - you'll need to work out the actual code (I assume you've learned how in your course studies). Keep in mind this is a very simplified workflow - a real bank transaction would be MUCH more complex.
Create a form that has fields for debit account, credit account, amount
In your script, assign the values from the form to local variables
$debit_acct
$credit_acct
$amount
I'll assume you have an account balance table 'acct_bal'. Have a journal table to store those values along with the date and autonumber transaction id.
Begin Trans
INSERT into journal (credit_acct, debit_acct, amount, trans_date) VALUES ($credit_acct, $debit_acct, $amount, NOW())
Get the transaction_id ($trans_id) from the INSERT statement- the method depends on which MySQL interface you are using.
UPDATE acct_bal SET balance = (balance + $amount) WHERE acct_id = $debit_acct
UPDATE acct_bal SET balance = (balance - $amount) WHERE acct_id = $credit_acct
Rollback on any SQL error else Commit Trans. -
How to copy one schema into another
I need to copy one schema into another. That means, all the tables, views, constraints, etc, and all the data as well.
I have a dmp file of source-schema (created daily with expdp by our backup schedule).
Can I use impdp to import this dmp file into dest-schema? I'm thinking about something like this:
The dmp file was created with:
expdp source-schema/pwd DIRECTORY=dmpdir DUMPFILE=myproject.dmp
Create the copy on dest-schema with:
impdp dest-schema/pwd DIRECTORY=dmpdir DUMPFILE=myproject.dmp
(dest-schema is an existing schema on the same machine. I'll drop all the tables before executing the command. Is there anything else I should do first?)
If this approach is not feasible, kindly suggest me an alternative.
Thank you.
Edited by: mgro on Apr 16, 2010 3:22 AM (changed 2nd command: expdp to impdp)Thank you both. Dean, I've made a note of your proposed command. May use it next time.
In the end I used the following command and it worked for me. I added TABLE_EXISTS_ACTION=REPLACE since the destination was not empty.
First I ran these command logged in as SYS
GRANT Import Full Database TO dest-schema;
GRANT Create Any Directory TO dest-schema;
GRANT Unlimited Tablespace TO dest-schema;
impdp
dest-schema/pwd
DIRECTORY=dmpdir
DUMPFILE=myproject.dmp
REMAP_SCHEMA=source-schema:dest-schema
TABLE_EXISTS_ACTION=REPLACE
LOGFILE=implog.log
There were some errors though. The import process complained about constraints referencing non-existent primary keys.
It turns out that the source schema has some constraints that are marked with status DISABLED. These constraints either:
- are not part of the DUMP file
or
- are in the DUMP file but skipped during import
Don't know if this is a bug or by design behavior. -
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> -
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 -
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 -
How can i access all the objects of one schema from another schema
Dear All,
How can i access all the objects(Tables,Views,Triggers,Procedures,Functions,Packages etc..) and do the modifications of one schema from another schema (Without using synonyms concept).
Thanks in advance,
MahiFirst of all, synonyms only help you easy reference the object. It doesn't have any implication of object privilege.
As long as you have proper privilege on target object. You can access it with or without synonyms.
Assuming you have proper privilege of objects, you can use following command to assume schema owner.
ALTER SESSION SET CURRENT_SCHEMA = Schema_owner -
Export One Schema to Another Schema
Hi
I would like to export some of my tables from one schema to another schema.
Can you help me on this
regards
GhouseHere you resuire two steps EXPORT AND IMPORT
STEP-1
First run the export utility (name EXP80.EXE) in the ORANT\BIN directory and make the .DMP file.
STEP-2
Secondly run the import utility (name IMP80.EXE) in the ORANT\BIN directory and call the above .DMP file
===============
THE END
=============== -
How to import an in-line schema from a wsdl into another schema
I am using SOA Suite 11g (11.1.1.1.0) and JDev 11
I have a wsdl from a vendor that includes several in-line schemas. Included in the schema is a complexType that I'd like to use as an element. I can easily drop an element into the vendor's wsdl, since I have my own copy. But I'd prefer to leave the vendor's wsdl untouched as I anticipate having to replace it occasionally. But I don't know how to go about importing an schema in-line in a wsdl, into another schema. Is that even possible? Comments most welcome.
- CrisActually, I think I may have solved my own problem and it wasn't all that difficult. I simply created a reference wsdl, imported the vendor wsdl and created another in-line schema. Seems to work well enough. For anyone who can offer a better approach, please do share.
- Cris -
Moving audit Records from one database to another database using dblink
i got five database, i have to move sys.aud$ records from five databases to one centralized database into another schema every day at 10:00 clock, i have to use a dblink for this, i have to create same table as sys.aud$ with different schema in centralized database with one extra column db_unique_name,by using db_link how i need to move records from all the five databases to one centralized database, can anyone help me here how to create a db_link from to move records from five database to one centralized database, due to maintainance perspective i have to move the records from all the five databases to one centralized database. i have to write a script for moving the audit records from all the five databases to one centralized database, can anyone help me how to write the script, or if you have any related scripts , can u post here, it will helpful for me.
spool audit.log
--"Auditing Initialisation Parameters: check initialization parameter"
select name || '=' || value from v$parameter where name like '%audit%'
---"if auditing is disabled then issue this command and bounce"
alter system set audit_trail=db,extended scope = spfile
shutdown immediate
startup
create tablespace ORDER_DATA datafile '+DDATA' size 50m;
create user INFO identified by INFO;
Grant connect,resource to INFO;
Alter user INFO quota unlimited on ORDER_DATA;
create table INFO.ORDER as select * from sys.aud$;
alter INFO.ORDER add db_unique_name varchar2(50);
create table INFO.ORDER
partition by range (Timestamp#)
subpartition by hash(dbid)
subpartition template
(subpartition sp1 tablespace users,
subpartition sp2 tablespace users)(
partition p1 values less than (TO_DATE('07/29/2010','MM/DD/YYYY')),
partition p2 values less than (TO_DATE('07/29/2011','MM/DD/YYYY')),
partition p3 values less than (MAXVALUE)) tablespace BGORDER_DATA as select * from sys.aud$
spool off;
exit
BEGIN
DBMS_SCHEDULER.create_job(
job_name => 'Move Aud$ records',
job_type => 'PLSQL_BLOCK',
job_action => 'CREATE OR REPLACE PROCEDURE bgorder_aud
AS
ts TIMESTAMP;
BEGIN
ts := SYSTIMESTAMP;
insert into info.order select * from sys.aud$ where timestamp# < ts;
delete sys.aud$ where timestamp# < ts;
commit;
END;
start_date => TRUNC(SYSDATE) + 22 / 24,
repeat_interval => 'FREQ=daily;BYHOUR=22;BYMINUTE=0;BYSECOND=0',
enabled => TRUE,
comments => 'Move records');
END;
/ -
ABAP Function Module Example to move data from one Cube into Another
Hi experts,
Can any please help out in this ..?
A Simple ABAP Function Module Example to move data from one Cube into Another Cube
(How do i send the data from one client to another client using Function moduel).
Thanks
-Upen.
Moderator message: too vague, help not possible, please describe problems in all technical detail when posting again, BI related? ("cube"), also search for information before asking.
Edited by: Thomas Zloch on Oct 29, 2010 1:19 PMThis is the start routine to duplicate records in two currencies.
DATA: datew TYPE /bi0/oidateto,
datew2 TYPE rsgeneral-chavl,
fweek TYPE rsgeneral-chavl,
prodhier TYPE /bi0/oiprod_hier,
market TYPE /bic/oima_seg,
segment TYPE /bic/oizsegment.
DATA: BEGIN OF S_DATA_PACK OCCURS 0.
INCLUDE STRUCTURE /BIC/CS8ZSDREV.
DATA: END OF S_DATA_PACK.
S_DATA_PACK[] = DATA_PACKAGE[].
REFRESH DATA_PACKAGE.
LOOP AT S_DATA_PACK.
move-corresponding s_data_pack to DATA_PACKAGE.
if DATA_PACKAGE-loc_currcy = 'EUR'.
DATA_PACKAGE-netval_inv = DATA_PACKAGE-/bic/zsdvalgrc.
DATA_PACKAGE-CURRENCY = 'USD'.
APPEND DATA_PACKAGE.
DATA_PACKAGE-netval_inv = DATA_PACKAGE-/bic/zsdvalloc.
DATA_PACKAGE-CURRENCY = 'EUR'.
APPEND DATA_PACKAGE.
else.
DATA_PACKAGE-netval_inv = DATA_PACKAGE-/bic/zsdvalgrc.
DATA_PACKAGE-CURRENCY = 'USD'.
APPEND DATA_PACKAGE.
endif.
ENDLOOP.
This is to load Quantity field
RESULT = COMM_STRUCTURE-BILL_QTY.
This is to load Value field
RESULT = COMM_STRUCTURE-NETVAL_INV.
UNIT = COMM_STRUCTURE-currency. -
Administrate Objects in Schema by Another Schema
Hi,
I am in a scenario to give administer privilege on one schema to another schema only.
Let me exxplain my scenario with an example.
I have a schema named HR in my database. Now I have create another schema named SH.
Now I need to do all operations like create table, create procedure etc on HR schema from SH schema.
And please note that I can't give create any table, create any procedure etc as it will be a big security breach.
Please help me to sort out this issue.
Regards,
Savaduser9292816 wrote:
Hi,
I am in a scenario to give administer privilege on one schema to another schema only.
Let me exxplain my scenario with an example.
I have a schema named HR in my database. Now I have create another schema named SH.
Now I need to do all operations like create table, create procedure etc on HR schema from SH schema.
And please note that I can't give create any table, create any procedure etc as it will be a big security breach.
AFAIK , without create any table/ or any any super privilege like DBA etc , you cannot achieve this.
Regards
Rajesh
Maybe you are looking for
-
Report with a Download link for a Pdf stored in Blob in database FND tables
We attach a pdf file in the Receivables invoices in Oracle EBS. We use APEX to report from EBS tables. We have a requirement to have a APEX report to display the pdf attached to the invoices with a capability to download the pdf. These pdf are stored
-
Crackling, Popping, Buzzing Noises in Audio
Recently (within the past week) my audio has started to crack, skip, pop, buzz, and all sorts of things. I have a Pavilion g6 1d08dx laptop with Windows 7 64-Bit, 4 GB RAM, and it's about 2 years old now, but I recently re-installed the OS, about 2 o
-
Batch-specific Unit of Measure
Hi, What is Batch specific UOM? How do we configure in ECC 5.0? My requirement is as follows - 1. GR qty should be in Base UOM (Kg) and Bags 2. The qty/bag = 95 Kg (standard / Alt UOM) for material 3. However, for shipment received Qty/Bag may very (
-
Problem with html:select field
I have two forms A and B, which I open from A. In B I have an <html:select property="X" and in A I have <html:text property="Y". In the javascript in B, I am trying to assign the document.B.Y.value as follows: opener.document.A.X.value = document.B.Y
-
Starting sql agent manually - operating rules
Hi We run std 2008 r2. Today after overriding the 1st step's behavior in a sql agent job to end and report success after completing successfully, I 1) rt clicked "start at step..." (saw the turning green arrow on rt pop up immediately) 2) highlight