Importing Data From Different Schema Without Duplicating Records

Apr 27, 2011

I'm trying to figure out how to import data from another schema for an oracle SQL project in an MIS Course.Each student/schema created the following tables STUDENT, FACULTY, COURSE, IS_QUALIFIED, SECTION, IS_REGISTERED. Each student was supposed to make up names and ID numbers for 20 different students, then use real university faculty, courses, and sections to populate the respective tables.

I need to import data from all of another student's tables, without duplicating any courses, faculty, etc I already have in my tables.

The other student already granted acess to her tables, so now I'm just having trouble with the insert statement. This is what I have so far for the first table.

INSERT INTO myschema.STUDENT
SELECT * FROM otherschema.STUDENT

I know i need to add a "WHERE" statement to successfully copy the other persons data into mine, without duplicating any results. This is the last part of this project and I'm having trouble finding the answer anywhere.

View 1 Replies


ADVERTISEMENT

Server Utilities :: Exported Data Of One User Importing Into Another Schema At Another Server

Sep 15, 2010

I have exported data of one user an importing into another schema at another server. when i am trying to imoport it is working fine for quite no of imports into tables, but after some time it starts giving me below mention error...

IMP-00008: unrecognized statement in the export file:
<
IMP-00008: unrecognized statement in the export file:
<
IMP-00008: unrecognized statement in the export file:
<‏ے
IMP-00008: unrecognized statement in the export file:
+A
IMP-00008: unrecognized statement in the export file:
[code]...

View 6 Replies View Related

Server Utilities :: Importing Other Schema Object

Sep 19, 2010

I have 2 users (scott and Krishnan).

Krishnan wants to import the table, which was exported by scott.

1) but we should not run the script file of CATALOG.SQL.
2) we can't give the rights of imp_full_database from outside.

Also how user Krishnan can import that table to another user's schema?

View 3 Replies View Related

Export/Import/SQL Loader :: Imp Records Of One Schema Into Another Schema Of Same Table

Nov 3, 2012

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.

View 3 Replies View Related

Server Utilities :: Data Pump For Exporting And Importing Extremely Large Data Files

Sep 24, 2010

I am considering all of the capabilities and benefits of using Data Pump for exporting and importing extremely large data files. Would like to know if importing to tape is possible? If so, would the data be accessible if needed later?

View 4 Replies View Related

Importing Data From XLS File

Oct 24, 2012

I need to import some data from an Excel file, but I don't know how.

View 14 Replies View Related

Server Utilities :: Importing Data From 10G To 8i

Nov 9, 2010

I would like to know if a dump file taken from 10G could be imported into to an Oracle 8I database.

View 1 Replies View Related

SQL & PL/SQL :: Importing To New Character Set And Its Affect On Encrypted Data

Nov 9, 2010

We are exporting from a 9i db to an 11g. During the migration, we are changing our character set from USASCII7 to AL32UTF8 so that the "extended" characters that our users like to put in text fields are stored and retrieved properly.

However, we've found a problem, and i'm not sure if Oracle has a method of dealing with. Searching this site and Oracle docs got me nowhere.

We store account #'s and credit card info in the DB encrypted with the dbms_obsfucation_tookit. We have an encryption key cross reference table that we use to store the key to un encrypt the data.

However, what we've found is that by importing these keys into our new character set database, the keys are no longer valid and can't be used with the DES3DECRYPT function to get the correct numbers out.

Is there a conversion utility or any tool that Oracle provides to maintain the encrypted datas "decrypt ability"? Worse comes to worse, we will have to write a script/procedure to decrypt everything on the 9i, import it to 11g, and then re-encrypt it.

View 8 Replies View Related

Server Utilities :: Getting Errors During Importing Data

Aug 14, 2012

I am getting following errors while importing data.

SCHEMA_EXPORT/TABLE/INDEX/DOMAIN_INDEX/INDEX
ORA-39083: Object type INDEX failed to create with error:
ORA-06550: line 2, column 1:
PLS-00201: identifier 'CTXSYS.DRIIMP' must be declared
ORA-06550: line 2, column 1:
[code]......

View 6 Replies View Related

Forms :: Data Is Not Importing To Table Through SQL Loader?

Mar 18, 2010

I have to load .csv file contents to table . I a m using Oracle Forms 10g, I have kept .csv file and .ctl file in application server c: DIRECTORY. In Form i have called host command to execute the batch file . But data is not loading as well as no error. Even i have batch file also in Application Server C: path .

Code i have used in Form is

HOST('C:TEST.BAT');

contents of the batch file are

C:oraclexeapporacleproduct10.2.0serverBINsqlldr.exe csd/a@iismig control=c:GL2009_TEST.ctl bad=C:GL2009_TEST.bad skip=1 log=c:gl2009_test.log

contents of the .ctl file is

LOAD DATA
INFILE 'C:GL2009.CSV'
REPLACE
INTO TABLE F_GL_SMRY_TEMP
FIELDS TERMINATED BY ","
(ref_id,tran_date,dr_amt,cr_amt,acct_code,sub_code,cctr_code,sundry_code,dept_code)

if i run test.bat in manual mode without Forms Application .. it works fine with no error. sqlloader is installed in application server .

View 6 Replies View Related

Server Utilities :: Importing Limited Data In Oracle

Jun 29, 2010

I have received a dump, which i need to put on a newly created schema, there is a particular table with more then 4 million rows, and other tables have hardly few thousand rows.

I want to import it in a way where only 1000 rows get imported for this table and other tables do not get affected. Is there a way to do it?

Note: Tables in dump are more then 200.

View 7 Replies View Related

Server Utilities :: Importing Table Data Is Not Coming?

May 10, 2010

i take export of one table (export complet successfully without warnings) when i am going to import into prduction databae the data in the table no coming i past the table structure and import command and logfile for import.

import command

imp user/user@database file=C:Tempuserdrop_id10g _id_rac_ra_headertables.dmp log=C:Tempuserdrop_id10g _id_rac_ra_headertablesimp.log tables=t_id_rac_ra_header fromuser=user touser=user statistics=none ignore=yes

my table structure in production database is

CREATE TABLE t_id_rac_ra_header
(ra_company VARCHAR2(10) NOT NULL,
ra_key NUMBER NOT NULL,
ra_doc_type VARCHAR2(50) NOT NULL,
ra_doc_number VARCHAR2(25) NOT NULL,
ra_doc_date DATE DEFAULT SYSDATE NOT NULL,
ra_reserve_key NUMBER,

[code].....

View 4 Replies View Related

Duplicating DB In 10gR2 With RMAN Without Target DB

Dec 2, 2011

I would like to have some inputs on RMAN backup that we are planning to perform for the database that has to be now discarded; and which may have have to be restored in distant future.

Current Env--
DB Ver: 10gR2
OS: Solaris
Backup mode: RMAN WITHOUT CATALOG(i.e. using controlfile for storing rman info)

From what I know(I might be wrong), that for duplicating the 10gR2 DB to another machine we have to have the target(original) database running and connected. In my case we need to take the rman backup and then use the target db for fresh installation and hence the db will be deleted.

View 2 Replies View Related

Duplicating Multiple Rows - Getting Error?

Sep 9, 2008

I'm getting an error "SQL command not properly ended" with the following complex delete duplicates query.

DELETE FROM A_EMIS_TOXIC_DTL
WHERE exists
(
select dcf.MASTER_AI_ID,
dcf.INT_DOC_ID,
txd.SUBJECT_ITEM_CATEGORY_CODE,

[code]...

View 2 Replies View Related

Export/Import/SQL Loader :: Importing Data In A Partitioned Table

Sep 18, 2012

I have a query regarding importing data in a partitioned table. let me make myself more clear with an example:

I have 1 month table that contains 30 partitions single partition for a single day on one machine say machine A. on another machine say machine B i create the same table with the same script which is on machine A for the same table. i loaded data till 1-15th of a month in Machine A table and rest of 15 -30 Days data into table on machine B at the end i want to import the data on partitioned table on machine B that is from 15th -30th to machine A table. I just want to know whether data is properly imported or not not or i need to specify something

I take export partition wise (15 -30th) 15 partitions dumps and imported into Machine A table. Is it possible that i can import day wise partition from 15th to 30th into a partitioned table which already contains data from 1st -15th partition.

I know this is possible

View 2 Replies View Related

Backup & Recovery :: Duplicating A Database With RMAN

May 6, 2013

I would like to duplicate to the different server Oracle Database with RMAN. I've configured flash recovery area for Oracle Database.
My questions are:

Source Server ( target ) : ORACLE_SID : DB11G
AUXILIARY Server (duplicate ): ORACLE_SID : CLONE

1- if backup files (autobackup and backup set)/ Archived Logs are in a different path on the source host (not default FRA Path) then how can I use the DUPLICATE command? BTW, only the flashback logs are in the default location (/u01/app/oracle/fra/flashback). Path: /u01/app/oracle/oradata/DB11G/autobackup and /u01/app/oracle/oradata/DB11G/backupset.

2 - Do I have to add *_CONVERT parameters for different SID as shown below? e.g. : DB_FILE_NAME_CONVERT , LOG_FILE_NAME_CONVERT.

DB11G.__java_pool_size=4194304
DB11G.__large_pool_size=4194304
DB11G.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
DB11G.__pga_aggregate_target=155189248
[code]......

View 2 Replies View Related

Export/Import/SQL Loader :: Grants And Synonyms While Importing Through Data Pump

Jul 22, 2012

OS: RHEL
DB: 11.2.0.2

Every time i try to refresh my production DB with the a old expdp dumpfile using data pump i always face the issue of grants and creation of synonym. I would like to tell you that my DB has three schemas which have lots of dependencies among them and before refreshing them i drop the schemas and recreate the same.

Drop user user_name cascade;So i want to know, is there a script from which i can get all the grants of the DB before dropping the schemas, so that after import i can grant the same and also a query with which i will be able to get all the synonyms of the DB.

View 8 Replies View Related

Application Express :: Looping Through Row Selector Exponentially Duplicating

Jul 15, 2013

Using Apex 4.2

 BackgroundCreated a Tabular Form based on a view. Removed all the default multi-row updates and deletions, buttons and processes.I am using a tabular form because of the fact that I can gain access to a row selector.The row data itself is all read only so in effect this is a report with a row selector.This is because I can't find a way to select a row an interactive report, well I can and did but this was a work around. ProblemI have created a button to process the selector to run the below code:

begin
kdm_adm_utils.log ('Page', 'XKDM: WF: Current Development', 'Selected Check Boxes:'||wwv_flow.g_f01(1)) ;
kdm_adm_utils.log ('Page', 'XKDM: WF: Current Development', 'Selected Check Boxes:'||wwv_flow.g_f02(1)) ;
   for i in 1..wwv_flow.g_f01.count
   loop
   kdm_adm_utils.log ('Page', 'XKDM: WF: Current Development', 'i:'||i) ;
      kdm_adm_utils.log ('Page', 'XKDM: WF: Current Development', 'WF ID:'|| wwv_flow.g_f02 (wwv_flow.g_f01.count)) ;
   end loop;
end;

I just wanted to see what would be output. For one row this works fantastically and I can find the ID based on the rowWhen I select more than one row the loop run's through for the number of rows but then also runs for the number of rows selected.So if I selected threee rows this above procedure would run three times, each times looping three times.I have set the execution scope to: For Created and Modified Rows in the button condition that appears.RequiredI only want to loop through the selected rows once per button clickORKnow which row I am currently looping through. 

View 3 Replies View Related

Export/Import/SQL Loader :: ORA-23327 / Imported Deferred RPC Data Does Not Match Platform Of Importing DB

May 10, 2013

I did import from 9i to 11gr2 , 1. i create 11gr2 DB , 2.created tablespace with 8kb block, 3 imported 9i dump to 11gr2 DB.

Now iam getting SOME ERRORS: In IMP LOG

1. ORA-29339: tablespace block size 4096 does not match configured block sizes == for all the tablespaces.(But i create TBS with 8kb block before IMPORT)

2. ORA-23327: imported deferred rpc data does not match platform of importing db

View 4 Replies View Related

Server Utilities :: Import A Schema From One Database Schema To Another Schema B?

Aug 10, 2010

I want to import a schema from one database schema to another schema b from db STBTST to STATST and from schema CMSSTAGINGB to CMSSTAGINGA

I first want to test this to my own schema (mvanmannekes) CMSSTAGINGA is filled at the moment.

So i've created a dump from STBTST-CMSTAGINGB For importing im using this statement:

impdp mvanmannekes/password schemas=cmsstagingb remap_tablespace=cmsliveb_data:cmslivea_data
remap_tablespace=cmsliveb_index:cmslivea_index
remap_schema=cmsstagingb:mvanmannekes directory=expdp_dir dumpfile=cmstagingb.dmp

I'm getting this:

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
Master table "MVANMANNEKES"."SYS_IMPORT_SCHEMA_01" successfully loaded/unloaded
Starting "MVANMANNEKES"."SYS_IMPORT_SCHEMA_01": mvanmannekes/********
schemas=cmsstagingb remap_tablespace=cmsliveb_data:cmslivea_data

[code]....

View 4 Replies View Related

Server Utilities :: Importing Data From SQL Server To Oracle?

Mar 7, 2011

I'm importing data from SQL Server to Oracle. I used BCP to export the data from SQL Server. Below is the 1st record of table trlc from the csv file.

trlc.CSV

11032|100|Wman| | |2008-02-08| |

Using SQL Loader to import into Oracle:

TRLC table in Oracle database:

est_no varchar2(10) default ' '
right_no number(4) default 0
maj_auth varchar2(15) default ' '
weight varchar2(10) default ' '
idm_ht varchar2(8) default ' '
c_date date
P_tkt varchar2(5) default ' '

sqlldr user/pwd@db02 control=trlc.ctl log=trlc.log

trlc.ctL:

load data
infile 'trlc.csv'
replace
into table trlc
fields TERMINATED BY '|'
TRAILING NULLCOLS
(est_no,right_no,maj_auth,weight,idm_ht,c_date,P_tkt)

The rows get inserted successfully. But the result sets are different, for example: When I do a select in SQL Server,'select len(weight) from trlc;' , I get the length as 0. But when I do a select in oracle database, I get the length as 1. Also, the result set varies for the query below:

select * from trlc where weight=' ';

(SQL Server returns 1 row but Oracle returns no rows)

Do I need to mention any conversion code for the weight field to accept ' ' value?

View 12 Replies View Related

SQL & PL/SQL :: Migrate Data From One Schema To Another

Jan 10, 2012

I have a requirement wherein I have to migrate the data from one schema(source) to another(target).The source and target schema contains 50 tables each.For testing purpose two table are shown below

SOURCE>
DROP TABLE anchor;
CREATE TABLE anchor
(
anchor_idNUMBER(5),
angleNUMBER(5,2),
acad_colorVARCHAR2(20),
att_blkVARCHAR2(20)
);
[code]...

I'm able to migrate the data. On an average the each source table contains 50k to 1 lakh records.

View 4 Replies View Related

SQL & PL/SQL :: Select Data Different Schema

Jan 12, 2011

I have 3 users in schema.

User09
User10
User11

Table Name PURCHASE exists in all above three schema with different data(according to date)

Like
User09 ----> purchase ---- data date Jan09 to Dec09
User10 ----> purchase ---- data date Jan10 to Dec10
User11 ----> purchase ---- data date Jan11 to Dec11

I want to select * from purchase, from above all three user with select statement.I can select data one by one with union all

select * from user09.pruchase Union all
select * from user10.pruchase Union all
select * from user11.pruchase

after creating this query I add another User User12 and that User has same purchase table so I will have to add one another line IN Union all Query. when I see this query. It gives me the all owner name of User09,User10,User11......

SELECT * FROM ALL_ALL_TABLES
WHERE OWNER LIKE 'USER%'
and table_name ='PURCHASE'

OWNER TABLE_NAME TABLESPACE_NAME
------------------------------ ------------------------------ ------------------------------
USER PURCHASE USERS
USER09 PURCHASE USERS
USER10 PURCHASE USERS
3 rows selected

Can I get data from Purchase Table of all users with select statement .

View 4 Replies View Related

Writing Same Data In Two Database Schema

Aug 3, 2011

I have two same DB schema (same structure, same data) and I need to provide update in one of them when data in the other one is updated. It is singe direction only (we change data in DB Schema A and synchronize data in the DB Schema B; there is not opposite direction). Only small portion of data (compared to the size of DB Schema) might be changed or added this way.

View 1 Replies View Related

SQL & PL/SQL :: Does Dropping Schema Purges Data

Oct 21, 2011

I am working on Oracle 10g. I want to drop a schema and I want to re use the space in data files to other schema.

If I drop the user by "DROP USER USERNAME CASCADE" , tables in that schema are purged by default or do I have to explicitly drop the tables , purge the re cycle bin and then drop the schema?

View 2 Replies View Related

Server Utilities :: Move Data From One Schema To Another

Feb 7, 2013

I am trying to move data from one schema in database A to another schema in database B and only move data not others (procedure, view, function). What is the best way to do it? I am thinking database link then insert into select from database link. Is there a better way?

View 8 Replies View Related

SQL & PL/SQL :: Insertion Of Data From One To Other Schema Table In Same Database

Aug 9, 2011

I need to insert data from one schema table to other schema's table in same database.The thing is columns are not equal.so when I am trying to use insert statement it is throwing error as not enough values. The situation is explained clearly below.The insert stmt is implemented in second schema whose table name is b.

SQL> create table a(ID_A NUMBER,Name varchar2(10),rollno NUMBER,address varchar2(10));
Table created.
SQL> insert into a(ID_A,Name,rollno,address)values(1,'ravi', 101,'hyd');

1 row created.

SQL> insert into a(ID_A,Name,rollno,address)values(2,'rav', 102,'delhi');

1 row created.
SQL> insert into a(ID_A,Name,rollno,address)values(3,'ra', 103,'chn');

1 row created.

SQL> create table b(ID NUMBER,Name varchar2(10),rollno NUMBER,address varchar2(1
0),route varchar2(10),direction varchar2(10));

Table created.
SQL> ALTER TABLE B ADD
2 CONSTRAINT B_PK1
3 PRIMARY KEY
4 (ID);

Table altered.
SQL> create sequence b_seg start with 1;

Sequence created.
SQL> insert into b select b_seg.nextval,lexcom.a.* from lexcom.a,dual;
insert into b select b_seg.nextval,lexcom.a.* from lexcom.a,dual
*
ERROR at line 1:
ORA-00947: not enough values

So,for table b in ID column sequence needed to be inserted and other columns need to be taken from table a.I can understand the error is because two tables are not having equal columns.So,the insert stmt is throwing error.

I can manually write by taking columns from a and b and write insert stmt as follows,but this is tedious process.

SQL> insert into b(ID,Name,rollno,address)select b_seg.nextval,lexcom.a.Name,lex
com.a.rollno,lexcom.a.address from lexcom.a,dual;

3 rows created.

But this is time taking and I had tables which has many columns to be inserted.So is there any other way to solve it and implement insert stmt.

View 6 Replies View Related

SQL & PL/SQL :: Format For Accessing Data From Other Database Or Schema?

Aug 25, 2011

Can we use this format for accesing data from other DB or Schema?

In From clause

database_name.schema_name.table_name

View 7 Replies View Related

Server Utilities :: Data Restore From One Schema To Another

Apr 19, 2013

This message for my clarification,we have two schemas MAD_LIVE and MAD_TEST we want to take data from MAD_LIVE to MAD_TEST for particular period of time. way to import data from MAD_LIVE to MAD_TEST for particular period

My SCHEMA MAD_LIVE using from year 2010 till now,we want to take only 2012 data from MAD_LIVE and restore it in MAD_TEST.

View 3 Replies View Related

Server Utilities :: Loading Data To Another Schema

Sep 5, 2010

How to load data to another schema's table through Sql*loader.

I tried the below things in the control file.

Load data
"
Into table scott.emp

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved