EXPORT/IMPORT TABLE DATA FROM ONE SCHEMA TO ANOTHER ONE (S.O.S)
Hi,
I urgently need your help:(, I have two different instances, in each of them there are two schemas, A and B; which tables are the same, but I need to transfer JUST the table data from A's tables to B's tables, how can I do so??
Thanks in advance,
Isabel
The total number of tables is 989:(And how many do you want ? If 988, and if you're on a 10g db, you can use exclude parameter from expdp/impdp?
Nicolas.
Similar Messages
-
What is the easiest way to export all tables data from Oracle to MS SQL Server?
Hello MS,
I would like to export all tables from Oracle 11.2 to MS SQL Server 2012 R1.
Using the tool "Microsoft SQL Server Migration Assistant v6.0 for Oracle" did not work for me because there are too many warnings and errors regarding the schema creation (MS cannot know it because they are not the schema designer). My idea is
to leave/skip the schema creation to the application designer/supplier and instead concentrate on the Oracle data export and MS SQL data import.
What is the easiest way to export all tables data from Oracle to MS SQL Server quickly?
Is it:
- the „MS SQL Import and Export Data“ Tool
- the “MS SQL Integration Services” Tool
- not Oracle dump *.dmp format because it is a propritery binary format
- flat file *.csv (delimited format)
Thanks!Hi lingodingo,
If you want to directly export all tables from Oracle database to SQL Server, I suggest you use SQL Server Import and Export Wizard. Because you just need to follow the wizard with GUI, this is the easiest way.
If you want to make some modification for the tables‘ data before loading to SQL Server, I suggest you use SQL Server Integration Services package. For more details, please refer to the following similar thread:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/38b2bed2-9d4e-48d4-a33f-1d9eed1c062d/flat-file-to-sql-server?forum=sqldatamining
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Character problem in toad import table data from excel
Hi everybody,
I want to import data from an excel file to an Oracle table, so I'm using Toad's "Import Table Data" tool for this purpose.
The problem is Oracle doesn't import non-english characters properly.
My database is XE and character set is 'AL32UTF8'.
I searched web, but didn't find the solution.
Please help...Hi again,
Thank you for your reply Srini, but it is not about Toad.
Character encoding of Excel causes the problem.
I exported an unicode encoded csv file from excel and tried to load data from that file. It worked.
Thanks. -
How to copy table data from onde DB to another DB using clipboard
HI,
i copied table data from one DB to another DB, but it displays an error as "policy with check option violation" when inserting the table data.. so how to resolve the proble.. thanks in advance.DECLARE
log_utl_dir VARCHAR2(100) :=('/apps/home/cmsftp/log/gaa');
CURSOR tb_compy_cur is
select tb.compy_acronym
-- QC 158113 - added below
,tb.ivr_plan_num
from tb_fc_compy tb,tb_xop_entitlements te
where tb.grant_award_accept_flag = 'Y'
and tb.ivr_plan_num = te.ivr_plan_num
and te.entitle_name = 'GAA_RECONCILED'
union all
select compy_acronym
-- QC 158113 - added below
,tb.ivr_plan_num
from tb_fc_compy tb
where tb.res_stock_flag = 'Y'
--and (tb.res_auto_lapse_flag = 2 OR
--tb.res_auto_lapse_flag = 3)
and exists (select entitle_name from tb_xop_entitlements te
where tb.ivr_plan_num = te.ivr_plan_num
and te.entitle_name = 'GAA_RES_FLAG'
and te.optionee = 'Y'
and te.psrep = 'Y'
and te.sponsor = 'Y'
and te.advisor = 'Y');
v_xopgrantz_insertcount NUMBER := 0;
-- QC 158113 - added below
v_xopgrantz_accpt_count NUMBER := 0;
v_user_id VARCHAR2(30);
insert_file_id UTL_FILE.FILE_TYPE;
insert_log_file varchar2(45) := 'xop_grantz_insertstats.log';
BEGIN
DBMS_OUTPUT.PUT_LINE('success1');
insert_file_id := UTL_FILE.fopen(log_utl_dir,insert_log_file,'w');
UTL_FILE.put_line(insert_file_id,'Starting the Process at '|| CURRENT_TIMESTAMP);
UTL_FILE.put_line(insert_file_id,'INSERTING ROWS FOR Companies turned on for GAA_RECONCILE and GAA/RESSTOCK');
for compy_rec in tb_compy_cur loop
v_user_id := 'CMS'||compy_rec.compy_acronym||'_USER';
ctx_set_session.set_user_session(v_user_id);
dbms_output.put_line ('success2'||''|| v_user_id);
INSERT into xop_grantz(grant_num,
user_id,
last_user_id,
restrict_grant,
child_symbol,
parent_grant_flag,
bulking_overide_flag,
exerrestrict_code,
rounding_method,
exercisiable_dt,
def_res_units_flag,
opt_gain_def_elig_flag,
opt_gain_deferred_flag,
opt_gain_deferred_dt,
opts_accepted,
lst_updtby_usercd,
accepted_type,
GAA_eligible,
GAA_LST_UPDTBY)
select g.grant_num,
v_user_id,
'GRNTACCPT',
'N',
'N',
(sel ect code
from tb_xop_exerrestrict_codes
where cash_allowed = 'Y'
and cashlesshold_allowed = 'Y'
and cashlesssell_allowed = 'Y'
and stockswap_allowed = 'Y'
and restricted_allowed = 'Y'
and sar_allowed = 'Y'
and cashmargin_allowed = 'Y'
and cashpartial_allowed = 'Y'
and sarsale_allowed = 'Y'),
NULL,
'N',
'N',
'N',
NULL,
NULL,
NULL,
'N',
NULL,
NULL
from grantz g
where not exists(select 1
from xop_grantz xg
where xg.grant_num = g.grant_num);
v_xopgrantz_insertcount := SQL%ROWCOUNT;
dbms_output.put_line ('1');
-- QC158113 - Optimisation fix--starts
DELETE FROM gt_xop_grant_accpt_type;
INSERT INTO gt_xop_grant_accpt_type
SELECT g.grant_num,e.ivr_plan_num,
pk_xop_grntaccpt.fn_get_accpt_type (v_user_id,
g.plan_num,
g.grant_dt,
g.opt_num,
g.grant_cd,
g.plan_type,
'Y'
FROM grantz g,tb_xop_entitlements e
WHERE plan_type IN (2, 4, 5, 7, 8)
and g.user_id = v_user_id
and e.ivr_plan_num = compy_rec.ivr_plan_num
and entitle_name = 'GAA_RES_FLAG' ;
dbms_output.put_line ('success3');
v_xopgrantz_accpt_count := SQL%ROWCOUNT;
UTL_FILE.put_line(insert_file_id,'Inserted count in gt_xop_grant_acceptance '|| v_user_id||v_xopgrantz_accpt_count);
-- QC158113 - Optimisation fix--ends
COMMIT;
UTL_FILE.put_line(insert_file_id,'Inserted count in XOP_GRANTZ for USER_ID '|| v_user_id||v_xopgrantz_insertcount);
ctx_set_session.set_user_session('');
dbms_output.put_line ('process completed');
end loop;
UTL_FILE.fclose(insert_file_id);
EXCEPTION
when others then
rollback;
dbms_output.put_line ('Code '||SQLCODE||':'||SQLERRM||' at '||v_user_id||' .pr_xopgrantz_insert');
pr_xop_log_errors('Code '||SQLCODE||':'||SQLERRM||' at '||v_user_id||' .pr_xopgrantz_insert');
pr_xop_log_errors('Code '||SQLCODE||':'||SQLERRM||'INSERTING into xop_grantz for ALL grants');
END;
i received this error when running the procedure also, so the table gt_xop_grant_accpt_type is not populated
{Code -28115:ORA-28115: policy with check option violation at CMSFB_USER .pr_xopgrantz_insert} -
JDBC Lookup - Import table data from a different schema in same DB
Hi XI Experts,
We are facing an issue while importing a Database table into the external definition in PI 7.1.
The details are as below:
I have configured user 'A' in PI communication channel to access the database. But the table that I want to access is present in schema "B". Due to this, I am unable to view the table that I have to import in the list available.
In other words, I am trying to access a table present in a different schema in the same database. Please note that my user has been given all the required permissions to access different schema. Even then, I am unable to access the table in different schema.
Kindly provide your valuable suggestions as to how I can import table which is present in another schema but in the same Database.
Regards,
SubbuIf you are using PI 7.1, then you can do JDBC Lookup to import JDBC meta data (table structures from DB). Configure a jdbc receiver communication channel where you specify username and password which has permission to access schema A and Schema B of database. Specify database name in the connection string. Then you might have access to import both schema.
Please refer these links
SAP PI 7.1 Mapping Enhancements Series: Graphical Support for JDBC and RFC Lookups
How to use JDBC Lookup in PI 7.1 ? -
Importing table data from one schema to another schema
Hi All,
I exported tablerows only of Schema A, and same I am trying to imported in Schema B.
While importing I am getting oracle error "row rejected, Integrity constraint violated
parent key not found".
What I did is I disabled all the constraints through script in Schema B, and imported data. Data imported successfully, but while executing the enabling the constraints script in Schema B constraints are not enabled due to parent and chile relationship problems, even I executed this script many times.
Note:- Schema A and Schema B are same structure, Schema A contains data but
Schema B does not
Can any body have any idea on this?
Thanks,Hi,
But I want data to be completely imported without losing.
I am trying to disable the constraints using the following queries for enabling and
disabling
select 'ALTER TABLE '||A.TABLE_NAME||' DISABLE CONSTRAINT '||B.CONSTRAINT_NAME||';'
FROM user_constraints A, USER_CONSTRAINTS B
WHERE A.TABLE_NAME = B.TABLE_NAME
AND A.CONSTRAINT_TYPE = 'P'
Foreign constraints -
select 'ALTER TABLE '||A.TABLE_NAME||' DISABLE CONSTRAINT '||B.CONSTRAINT_NAME||';'
FROM user_constraints A, USER_CONSTRAINTS B
WHERE A.TABLE_NAME = B.TABLE_NAME
AND A.CONSTRAINT_TYPE = 'R'
-- Check constraints ---
select 'ALTER TABLE '||A.TABLE_NAME||' DISABLE CONSTRAINT '||B.CONSTRAINT_NAME||';'
FROM user_constraints A, USER_CONSTRAINTS B
WHERE A.TABLE_NAME = B.TABLE_NAME
AND A.CONSTRAINT_TYPE = 'C' -
How to export / import tables from UAT Environment to Devlopment in oracle
i wanted to share some points about export/import tables in oracle.
we have two environments one is development and integrated user acceptance test (UAT).
we have finalized table structures with data in UAT. i wanted to move from UAT to Development.
i found some commends in google. I tried but I am not able to export and then its throwing some errors.
i am explaining below what i want to do and what i want did.
Please provide solution what i need to do.
admin credentials in UAT
username :venkat_admin
password :venkat_admin
UAT user/schema
username : ods_inb_stg
password : ods_inb_stg
development environment credentials
admin user name : dev_admin
password : dev_admin
Development user/schema
username :ods_inb_dev
password :ods_inb_dev
Above mentioned schema names i want move data from UAT (ods_inb_stg) to development (ods_inb_dev)
I logged in uat ods_inb_stg user and then
I used this command
Exp ods_inb_stg/ods_inb_stg file=party_pt_address.expdat tables=(party,party_address)
log=party_pt_address.log;
getting error
Unknown command beginning "exp ods_inb_stg/..." - rest of line ignored.
What should I do any one help.
One more thing i have more than 100 tables how to export all tables and which is the easiest way and how to do it.
Thanks in Advance
VenkatHi,
based import and export we need to do.
suppose we think we have created tables in production and data also populated. we need to export the tables with data. i am able to export the tables with data some tables or full database.
suppose we have development environment. in development environment there is no tables. we can treat nothing in development. we have only username,password and hostname.
when you import the tables production to development automatically create the table structures with data.
where ever we wanted to import the tables no need to create table structures. thats why no need to think about table structures. -
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 -
Import some data from one oracle to another...
Hi Guys,
we have 2 oracle database servers on 2 different machines with schema.
I want to import some data from a specific table from one oracle into another oracle.
what is the way to do that.
Please help in details
Imran BaigHi,
Thanks for the reply.
Tables are already created in both of the oralce databases only the data varies. I just have to import only few records from one oracle to another with the same user name and table already existing.
I have tried using database link. I can view records from the other oracle database but as soon as i write an insert command oracle gets held. I cant do anything.
Is there any other way?
Imran -
Merging data from 2 schemas with same object structure into one schema
Hi
I want to merge data from 2 schemas in different environments ( say test1 and test 2) into 1 schema ( say Test_final) for testing. Both these schemas are having same structure, the data can be same or different.
What I did is that I took an export of schema on Test1 and then import it into Test_final. Now I need to merge/append data from Test2 into Test_final.
I can not merge the data with import due to primary key constraints and also import doesnt support this feature, so I tried SQL*Loader to "append" the data by using sequence to generate Primary key.
But my worries are that since new primary keys are generated so foreign keys will become invalidated and the data will not be consistent.
Is there any other way to do this task..
Regards
RamanThis approach might be better...
create table test_final
as
select *
from schema1.test1
insert into test_final
select t2.* from schema2.test1 , test_final tf
where t2.pk != tf.pk
/...assuming duplicate primary keys mean duplicate records. If that assumption is not the case then you have a more complex data migration exercise on your hands and you need to figure out some rules to determine which version of the data takes precedence.
Cheers, APC -
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 -
Import Meta Data from CSV - Export Meta Data to CSV
Ability to import meta data into selected images from CSV file containing a number of fields, one of which is file name. The other fields would be selected tags to import.
Import logic would be, Where file name in column 1 matches current selected filename, then take following fields 2, 3, etc and import into Bridge.
Export selected meta data from selected files to CSV to form reverse of above to allow edit of data in Excel etc.
Further enchancement on import would be to allow instead of just filename, but date/time range matching.
Logic would be, Where date/time in column 1 is within X hours of selected
image creation date/time then import following fields into image meta data.
Useful for example if you already have a GPS tracklog in CSV and want to try and update images with GPS. Assuming camera clock approx same as GPS clock.The issue was within the .csv file. There were duplicate records that were attempting to load as the ID value. After deleting the duplicate records, the transformation file ran successfully.
Debbie -
Export and import table data with Java
I need a library for simple exporting and importing table data.
The data should be exported to a SQL file with insert statements.
I just want to tell the library the table name, the connection and where to store the file. The usage should be very simple.
Are there any small libraries for this? Finished calsses and methods which I can just call?I need a library for simple exporting and importing
table data.
The data should be exported to a SQL file with insert
statements.Every database has utilities to export/import data from tables. Take a look at your database manual. -
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> -
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
Maybe you are looking for
-
HT5096 I need to transfer a time machine backup to a new drive. It keeps failing.
I have a 2TB Time Capsule that I was using for Time Machine for both a MacBook and an iMac. The iMac sparse bundle became corrupted earlier this spring and I was unable to delete it, so I need to reformat the TC. First, however, I need to move the T
-
Possible to change appearance in iCal, particularly the To Do Items?
Is it possible to change the appearance in iCal? I'm speaking about mostly the background? (I know you can change the "calendar" colors, but I'm looking for something else.) 1. For example, it is extremely difficult, almost impossible for me to deter
-
How do you prevent pages on iPad from skipping lines in a letter format?
I have copied my own data into a letter template. Whenever I try to add the recipients address, pages will skip a line between the street address and the city and state. This creates an out of place space like so: 12345 fake street Baltimore MD When
-
Hopefully some one can help me. I have comcast server, but i dont go on their site to check my email. I use my mail icon on my desktop dock to check it. So usually i click on the icon and check my email and when i go to send an email, a message comes
-
XMP metadata is lost while updating XMP using Exempi on linux
Hello, I'm using the library XMPFiles for Linux (Exempi) to update XMP metadata of a tiff file. As a result RichTiffIPTC Tag is being removed and Photoshop tag was changed (2 photoshop image resources are also being removed : IPTC metadata (ID=1028)