SQL & PL/SQL :: Transferring Data From One To Another Database

Dec 15, 2012

In production database 30 tables are there in different schemas.

In some tables data is existed for 5 years
in some tables data is existed 8 years
in some tables data is existed for 6 years.

And all these tables are having billions and millions of records.Let us assume the tables in the production database are

Table1 -- 8 years data -- No. Of Records 3538969000
Table2 -- 6 years data -- No. Of Records 592844435
Table3 -- 3 years data -- No. Of Records 33224993
Table4 -- 4 years data -- No. Of Records 52361756
Table5 -- 5 years data -- No. Of Records 8948567
Table15 -- 6 years data -- No. Of Records 308476987

Now I want to trnasfer these 15 tables data to test database.Based on the following conditions.

For Table1 I want to transfer 6 years data to test database, keeep 2 years data in production and delete all 6 years data from production databse.

For Table2 I want to transfer 4 years data to test database, keeep 2 years data in production and delete all 4 years data from production databse.

For Table3 I want to transfer 2 years data to test database keeep 1 years data in production and delete all 2 years data from production databse.

This will be done periodically.

I.e. suppose if we run the script now and transfer the requested data to test database,again after one year the data got increased in production then again we have to run the script and transfer data to test database based on some conditions,so it should work for long time. what is the good and fast process to transfer the data.

View 31 Replies


ADVERTISEMENT

Server Utilities :: Transferring Changed Data From Database A To B By Data Pump?

Apr 1, 2011

I have database A (Working in Live environment) and Database B copy of Database (Not live) I have Restored whole database (A) RMAN backup file on Database (B) Previous week now i don't want to change anything in any schema and want to import only updated and new records in the table in Database B

There are around 20 schema If for example i have everything in new database B all required database objects like Procedure,functions, packages with indexes in all tables and data in tables, i just want to add new data and updated data.

IF i do following in source database

expdp directory=dpump_dir dumpfile=table_data.dmp content=data_only schemas=ACCMAIN,HRMAIN,..... include=TABLE

AND Import in destination database B, will it add new data and update existing one in table and not touch the table structure and indexes.

View 5 Replies View Related

PL/SQL :: Transferring Database From One Computer To Another

Oct 1, 2012

Im doing a project for my college and i need to transfer database. The thing is that i have created tables with databases and linked it to VB using ADODC.

I have done all this in the Computer at my home. So i have done all the project in my computer. I want to show the same project in my college, but i cant do it as the database is stored in my personal computer at home. Is there any ways i could transfer the database from my house to college like storing it in a pendrive. I used sqplus
oracle 9i to create the tables.

View 15 Replies View Related

Server Administration :: Transferring Database From 11.1.0 Windows 32 Bit To 11.2.0 64 Bit

Mar 30, 2011

I wanted to transfer my database from Oracle 11.1.0. on windows 2003 server 32 bit to Oracle 11.2.0. windows server 2008 64 bit

i have done following

1)On new server of 11.2.0 windows 2008 64 bit use rman backup from Oracle 11.1.0. on windows 2003 server 32 bit to restore the database and recover the database when i try to open the database Alter database open it gave me message that i should start my database as upgrade I start the database with upgrade

STARTUP UPGRADE and then run following

@?/rdbms/admin/utlirp.sql

and then run following

@?/rdbms/admin/utlu112i.sql

and then run

@?/rdbms/admin/catupgrd.sql

during run of catupgrd.sql after around 30 minutes of run, i got error
ORA-03113: end-of-file on communication channel

but i reconnected myself with database again and shutdown the database and open it in normal mode and it has opened there were thousands of uncompiled objects and i recompiled them.

Only uncompiled objects left 60 are 'OLAPSYS' (Locked user) USER and 30 of PUBLIC user (all Synonyms)

Have i taken correct steps?

What should i do now to check that everything will be alright in future

View 6 Replies View Related

Precompilers, OCI & OCCI :: Transferring Data Between Two Databases

Apr 18, 2009

I am current using Pro*C to upload data from a flat file to database.

Now I have to transfer information(data) between databases. As a rookie, I do not know an efficient of way doing it.

View 4 Replies View Related

PL/SQL :: Transferring Data From Oracle Table To A File On A Windows Server

Nov 12, 2013

I have an oracle DB version 11.2 running on oracle enterprise linux 5.9. How to transfer data from the oracle DB to a flat file on a windows server. What i have done so far is to use utl_file to create a csv file on the oracle server and am now attempting to transfer this file.

I was going to use scp or rcp but am unable to get this to work(was looking at filezilla). Another option i can use is ftp as i have a UNIX script which i can run to do this. All this is done through an oracle package which is run hourly through dbms_scheduler. I have been using sp_host_command to run unix commands directly from pl/sql so can use this to run a unix script for last resort if i cant find an easier way to automate this. 

View 1 Replies View Related

Server Administration :: Validate OLAPSYS Schema Objects After Transferring Database

Apr 21, 2011

We transferred our Oracle database 11.1.0.7 from windows 2003 enterprise edition 32 bit to windows 2008 enterprise edition server 64 bit.Database is working fine but we have 53 uncompiled objects which are related to OLAPSYS and public as follows

OLAPSYSALL$OLAP2_AW_CUBE_AGG_LVLVIEW
OLAPSYSALL$OLAP2_AW_CUBE_AGG_MEASVIEW
OLAPSYSMRAC_OLAP2_AW_DIMENSIONS_VVIEW
OLAPSYSALL$OLAP2_AW_CUBE_AGG_OPVIEW
OLAPSYSALL$OLAP2_AW_CUBE_AGG_SPECSVIEW
[code]....

Our business objec is working fine and all other schema does not have any uncompiled objects.How can we validate the OLAPSYS and PUBLIC schema.

View 11 Replies View Related

SQL & PL/SQL :: Transferring Many Files Through DBMS_FILE_TRANSFER?

Sep 19, 2011

Need a clarification on the below query.

I want to transfer more than one archived log files from LIVE to DR through DBMS_FILE_TRANSFER.

1) Is there anyway to transfer all the Archived log files together.

2) Is there any chances of using the keyword like APPEND/REPLACE, in case the target location is having the same file already?

View 3 Replies View Related

ORA-22621 - Error Transferring Object From Agent

Jan 3, 2013

While returning array from external function i am getting error as below:

Oracle Error: ORA-22621

Error Description: Error transfering an object from the agent
Error Cause: Any error returned from pickler routines on the agent side.

Action: Contact Oracle Support.

View 3 Replies View Related

SQL & PL/SQL :: Move Data From One Data To Another Database Using Database Link

Mar 19, 2010

I have written a Database procedure to move data from one data to another database using Database link. When i run that procedure on Sql it is running fine, but i use same procedure in a button in form using "When-Button-Pressed" trigger it generates error, error code is ORA-02055 and ORA-02067.

View 8 Replies View Related

Data Guard :: Apply Patches On Oracle Database With Logical Standby Database?

Apr 22, 2011

I got a primary database with a logical standby database running Oracle 11g. I got two client applications, one is the production site pointing to the primary one, another one is just a backup site pointing to the logical one.Things will only be written into the primary database every mid night and client applications can only query the database but not add, update nor delete.And now, I want to apply the latest patch on both of my databases. I am also the DNS administrator, I can make the name server pointing to the backup site instead of the production one.I want to firstly apply the patch on the logical one, and then the physical one.

I found some reference which explains how to apply patches by adopting "Rolling Upgrade Method". however, I want to avoid doing any "switch over" mentioned in the reference because I can make use of name server. Can I just apply patches as the following way?

1)Stop SQL apply
2)Apply patches on logical standby database
3)let the name server point to the backup site
4)Apply patches on the primary database
5)Start SQL apply
6)Let the name server point back to the production site

View 2 Replies View Related

Data Guard :: Flashback Snapshot Standby Database Or New Primary Database After Failover?

Aug 30, 2013

If flashback is enable in physical standby database 1. If we failover at 11AM can I flash back NEW primary database to 6 AM ? 2. if I convert physically standby database to snapshot standby database at 11AM ,  Can I  flashback snapshot standby database to 6 AM and do some works on it (DML operations)  then   converting the snapshot standby database into physical standby database ?  

View 1 Replies View Related

Data Guard :: Creating Standby Database From Active Database Using RMAN

Dec 21, 2012

creating the standby database from Active database using RMAN and getting the below issue after i executed the duplicate command.

Version of Database:11g(11.2.0.1.0)
Operating System:Linux 5
Error:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 12/21/2012 17:26:52
RMAN-03015: error occurred in stored script Memory Script
RMAN-04006: error from auxiliary database: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
[code]....

provide any work arounds to proceed further in creating the standby database.

View 1 Replies View Related

Data Guard :: Switch (convert) Primary Database To Standby Database?

Jan 30, 2013

I have installed oracle 11g standard edition one and created both primary and standby database. now i want to know how to switch(convert) primary database to standby database.

View 8 Replies View Related

Data Guard :: Unable To Get Data Of Primary In Standby Database (dataguard)

Jan 16, 2013

i have configured physical standby in my local system, to check logshipping i created a table at primary db, wen i tried to check in standby, it says table does not exist..below are primary & standby alert entries..

Primary alert log

Fatal NI connect error 12514, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.0.98)(PORT=1522))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=STAND)(SERVER=dedicat ed)(CID=(PROGRAM=d:oracle11gappadministratorproduct11.1.0db_1inORACLE.EXE)(HOST=A960M)(USER=SYSTEM))(SERVER=dedicated)))
VERSION INFORMATION:
TNS for 64-bit Windows: Version 11.1.0.6.0 - Production

[code]....

View 1 Replies View Related

Convert Oracle Database (schema Data) To Postgresql Database

Oct 11, 2012

i want to convert oracle database(schema data) to postgresql database

which tool would be best and url to download and steps to convert from one database to another ?

View 2 Replies View Related

Data Guard :: Registering Primary Database To Catalog Database

Oct 9, 2012

Here we have a data guard environment with db1(db_unique_name) as primary and db2(db_unique_name) as physical standby database. Also we configured one schema on a third machine as catalog database using following steps. The steps executed in catalog database(appsdb):

SQL> create tablespace rmancatlog_tbs datafile '/u01/app/oracle/oradata/NEW/rman_catalog.dbf' size 500M autoextend off extent management local segment space management auto;

SQL> create user rman identified by oracle
2 default tablespace rmancatlog_tbs
3 quota unlimited on rmancatlog_tbs
4 ;SQL> GRANT connect, resource, recovery_catalog_owner TO rman;

RMAN> create catalog;
recovery catalog created

Added tns entries of catalog database in primary and standby. Then from primary database we tried to register to catalog database. It is showing that it is registering. But every query afterwards in rman is throwing the error. Below are the steps and error:

[oracle@db1 ~]$ rman target sys/oracle catalog rman/oracle@appsdb
Recovery Manager: Release 10.2.0.3.0 - Production on Mon Aug 13 21:39:32 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: NIOS (DBID=1589015669)
connected to recovery catalog database
[code]....

View 4 Replies View Related

Precompilers, OCI & OCCI :: Data Lost After Adding Null Terminator For VARCHAR Data Received From Database

Dec 13, 2010

We are migrating a proc application as described below.

Old Env: UNIX
Old DB: Oracle 8i

New Env: Linux
New DB: Oracle 11g

New modules are successfully compiled in Linux environment. But we are facing issues in writing the output of VARCHAR datatype to a file.

find below the extract of code.
EXEC SQL BEGIN DECLARE SECTION;
varchar mcolmnvarchar[4];
EXEC SQL END DECLARE SECTION;

EXEC SQL DECLARE crs CURSOR FOR
SELECT NVL(colmn,' ') FROM table1

memset(mcolmnvarchar.arr,'�',4); //Was added for only Linux migration. Not present in unix env.

EXEC SQL FETCH c1 INTO :mcolmnvarchar;

cout << "Data at Stage one"<< mcolmnvarchar << endl;
mcolmnvarchar.arr[mcolmnvarchar.len]='�';
cout << "Data at Stage two"<< mcolmnvarchar << endl;
fprintf(fptr,"%-4s",mcolmnvarchar.arr);

Above code works absolutely fine in Unix env with Oracle 8i. But with Linux env & Oracle 11g it is not working. No compilation or run time errors. Data at Stage one prints the output of database properly. But after null terminator code, Data at Stage two statement prints without any value. Value is lost after null terminator code.

View 7 Replies View Related

Data Guard :: Unable To Get Data Of Primary In Standby Database

Jan 16, 2013

I configured dataguard in my local system.

1) scn differs wrt primary in standby (i checked, 1day difference), how to make scn same?

2)i created a table in primary, its not refelecting in standby, (below i ve pasted alertlog entries)

ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified.
Errors in file d:oracle11gappadministratordiag
dbmsstandstand racestand_dbw0_6916.trc:
ORA-01157: cannot identify/lock data file 2 - see DBWR trace file
ORA-01110: data file 2: 'D:ORACLE11GAPPADMINISTRATORORADATASTANDSYSAUX01.DBF'

[code]....

3)wen i try to open standby database in read only mode gives below error..

ERROR at line 1:
ORA-16004: backup database requires recovery
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1:
'D:ORACLE11GAPPADMINISTRATORORADATASTANDSYSTEM01.DBF'

View 31 Replies View Related

Migrate Data From MySQL Database To 11g Database

Nov 5, 2008

I need to migrate data from Mysql database to Oracle11g database.

a) is there any method available to import the all the sqls like table script,constraint scripts,data(insert ) script from Mysql.so that we can apply the sql directly to the oracle schema after making necessary changes(like datatype).

b) Is there any free tool available for the migration.

View 2 Replies View Related

Migrate Data From Old To New Database

Apr 2, 2008

I need to migrate the data from old to new database. In the old database i have table t_emp

create table t_emp(
EMP_YYYY VARCHAR2(4 BYTE),
EMP_MM VARCHAR2(2 BYTE),
EMP_DD VARCHAR2(2 BYTE),
EMP_HH VARCHAR2(2 BYTE),
EMP_TIME_MN VARCHAR2(2 BYTE),
EMP_TIME_SS VARCHAR2(2 BYTE),
EMP_TIME_HS VARCHAR2(2 BYTE),
EMP_NO);

ex:
1998 02 23 12 01 29

now i have one more new table in new database which contains

Create table t_emp_new
(start_date date);

i need to load all the old historical data into new table using PL/SQL. How can i combine YYYY,MM,DD,HH,MN,SS,HS and insert as a single date.

02:23:1998 12:01:29

View 4 Replies View Related

SQL & PL/SQL :: Update Data In Database

Jun 26, 2013

I want to replace a word with another word in all tables data with varchar2 datatype that I have in my database .Is there a solution to update data at once instead of update all column data Separately.

View 8 Replies View Related

SQL & PL/SQL :: INSERT Data Into Database

Nov 22, 2011

I have a question how to do this.

I'm using JAVA class. I'm try to put "data" to database(INSERT data to database - PL/SQL).

I have simple JDBC problem:

Steps.
1) SELECT table_seq.NEXTVAL FROM DUAL;
(Question: How can I make sequence to table ? I see lot of examples on google but all is just to create sequence but not for table. Maybe sequence can be put on table ?)

2) INSERT table_seq.....

3) INSERT table (values) values ('data')

Tables look like this:

table1 [Where I need to take `id`]
------------
id .....
------------

table2 [Where I need this sequence to be taken]
------------
seq_id .....
------------

table2 [Where I need to put `seq_id` into table2.id and data]
------------
id data
------------

I don't get it why can't I just do this ?:
INSERT table2 (data) values ("this is data");

View 6 Replies View Related

XML Data Into Table Within Database

Jun 6, 2013

With no oracle or database background, I have been tasked to figure out how to analyze reading values within xml files. I initially started by writing c# code to read through the xml files, pull out the values I need and summarize the results. Unfortunately, this took atleast 5 hours to open all the xml files and summarize the results for a small portion of EndPointChannelId's and xml files. I decided to store all the reading values within the xml files into a table so I can use SQL queries to do the analysis instead of having to process through all the files each time.

Using the same c# code as before, I have used insert and update sql statements to insert the reading values into a table. To my dismay, it takes about 3 and a half hours to import 1 file where there is 20 files a day :S. There are over 19,000 ChannelID's per file. I am currently using SQL Developer to view the data and have noticed XML Schemas and XML DB Repository but am not sure if that would be the best approach to my problem. I need to increase the efficiency of the import process but I am having difficulties. What is the most efficient way you have used to import xml files into a table structure. !

Below is a portion of the xml file that I am working with.

- <Channel ReadingsInPulse="false" IsRegister="false" IsReadingDecoded="true" MarketType="Electric" IntervalLength="60">
<ChannelID EndPointChannelID="57432:1" />
- <ContiguousIntervalSets>
- <ContiguousIntervalSet NumberOfReadings="6">
<TimePeriod EndRead="22467.80" EndTime="2013-05-09T13:00:00Z" StartTime="2013-05-09T07:00:00Z" />

[Code].....

View 1 Replies View Related

Data Insert In Database

Jul 12, 2013

I have a database rac with two nodes. While inserting a row in the database, I am getting the following error: Error starting at line 1 in command:

INSERT INTO DocMeta(dID,xComments,xExternalDataSet,xIdcProfile,xPartitionId,xWebFlag,xStorageRule,xCpdIsTemplateEnabled,.........,xPageID,xNDDate) VALUES(7897,'','','WebStyle','','','default',0,.........,'',null)

Error report:SQL Error: ORA-29875: failed in the execution of the ODCIINDEXINSERT routineORA-20000: Oracle Text error:DRG-50857: oracle error in textindexmethods.ODCIIndexInsertORA-00604:

error occurred at recursive SQL level 1ORA-01950: no privileges on tablespace 'SYSAUX'ORA-06512: at "CTXSYS.DRUE", line 160ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 75129875. 00000 -  "failed in the execution of the ODCIINDEXINSERT routine"*Cause:   

Failed to successfully execute the ODCIIndexInsert routine.*Action:   Check to see if the routine has been coded correctly. If I try inserting in the nodes individually, sometimes it gets inserted in one node. The other node gives above error. And at times, both nodes give the same error.

View 0 Replies View Related

Backup All Data From Database?

Jun 27, 2012

how can i take backup my all data from database with large object library (blob)

when i want back up i writing this statement on "cmd"
exp dbas/dbas@ddds file=D:dmsddfm.dmp

so it's only just backup data without large object library, any table contain large object library it can't take it

so i would like take backup all data from database

View 18 Replies View Related

PL/SQL :: Data Partitioning In Database

Feb 4, 2013

I have little bit confuse in data partitioning in database, I have read about it and i understand that there ate two type called vertical partitioning and another horizontal partitioning...I have three questions are

1- is data partitioning used of in networks or can be in one PC?
2- the data partitioning divided data that in table to partitions (groups) , according what ??? is to quantity or meaning of data that inside table?
3- Is clustering that can be execute by Oracle using CTX_CLS.CLUSTERING type of it or partitioning not related to it?

View 3 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

Displaying Specific Data From Database

Apr 5, 2008

i have columns called data_received(data received from server) , URL (sites visited)

now i want to display top 50 sites based on highest data_received.URL column will have some sites repeated.

View 1 Replies View Related

Data Migration From MySQL Database

Oct 31, 2008

I need to migrate data from Mysql database to Oracle11g database.

a) is there any method available to import the all the sqls like table script,constraint scripts,data(insert ) script from Mysql.so that we can apply the sql directly to the oracle schema after making necessary changes(like datatype).

b) Is there any free tool available for the migration.

View 1 Replies View Related







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