I have two oracle databases. Database A and Database B. Database B should be in sync with Database A. Data within DB- B wont be altered, it is only for view purpose. All the data change in DB- A should reflect in DB- B. After googling, I found db link and Materialized view
could help but I am not clear how to use them. Please give any idea.
I think you need to read the following:
http://docs.oracle.com/cd/B19306_01/backup.102/b14191/rcmdupdb.htm
http://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_overview.htm#SUTIL100
A materialized view can be used for replication purposes but what you are referring to is duplication not replication.
If you all have a DBA in your org most definitely hand this task over to them. These are the kind of problems they eat for breakfast.
Best of luck.
Related
Trying to understand if there is any such concept like this in Oracle Database.
Let's say I have two Databases, Database_A & Database_B
Database_A has schema_A, is there a way I can attach this schema to Database_B?
What I mean by this is if there is a job populating a TABLE_A in schema_A, I can see that read-only view in Database_B. We are trying to split a big Oracle database into two smaller databases and have a vast PL/SQL code, and trying to minimize the refactoring here.
Sharding might be what you're looking for. The schemas and tables will still logically exist on all databases, but you can arrange the data to be physically stored in specific databases. There might be a way to setup shardspaces, tablespaces, and user default tablespaces in a way where each schema's data is automatically stored in a specific database.
But I haven't actually used sharding. From what I've read, it seems to be designed for massive distributed OLTP systems, and it is likely complicated to administer. I'd guess this feature isn't worth the hassle unless you have petabytes of data.
We have transaction tables in Oracle and for reporting purposes we need this data transfered in real time to another flat Oracle table in another database. The performance of the report is great with table placed in this flat table.
Currently we are using golden gate for replication to the other database and using materialized view for this but due to some problems we need to switch to some other way of populating/maintaining this flat table. What options do we have?
It is a pretty basic requirement but the solutions I can see are for batch processing. Also if there are any other solutions you feel would better serve this purpose. Changing the target database to something other is also an option as there might be more such reports coming ahead.
I need to clone (make a 1to1 copy of) several Tables in our Oracle DB into another Oracle DB.
Both DBs are running under Oracle version 11.2.0.3
Problems are:
Tables (together) are quite large (> 20gb)
Must be a real "Snapshot". DB may change during cloning process
Realisation must be (of course) damn quick
I came across the DB-Link technology, which seems feasible here. But my question is: How can I make sure, that ALL Tables are consistent after the cloning process? I mean this scenario:
Copy Table A
Copy Table B
Source Table A and Table C changes
Copy Table C
Then my copy Table C contains data, which is NOT present in copy Table A, which might be a constraint violation (logically). How can I avoid this? How do I make a real snapshot of 40 Tables? Is there something like a "revision" of the whole DB? How would the DB-Link-Query then look like?
I suggest you investigate the export utility of Oracle itself. You can impose that the "dump" of the set of tables you are interested in is consistent in terms of transaction, too.
More details here.
Considering you are using 11g I suppose that with "exp tool" you mean the "Data Pump Exp" and not the "legacy exp/imp Utility"?
See the differences here.
If this is not the case try switching to the Data Pump which was designed specifically to cope with large datasets, and may be further tuned to squeeze some extra performance.
I have a problem with 2 databases that I have created on my local machine. I keep changing one of the database instances(say SID A) and the other instance(say SID B) is only changed once every 2-3 weeks. I want to find out all the changes that I have done on the local DB (Procedures, inserts, deletions, functions etc.) in SID A. Both the instances have 10 users, and the changes are present across all the 10 users.
I have tried to do a "diff" in sqldeveloper, but I end up getting a list of all the tables, procedures etc. - all to be created in SID B.
I have seen some tools, ready made scripts etc.
Is there a definite way that I am missing - I dont want to do a database export and import every time I want to migrate the changes.
Database: Oracle 10G
Thanks in advance for helping out.
Thanks,
Contrib
One option is to use a tool like Red Gate's "Schema Compare for Oracle"; it's rock solid and will do exactly what you need it to, pretty much out of the box.
Before going down this sort of route though, I would suggest that you think about how you are deploying changes to your environments. For example, if you stored the incremental DML and DDL changes you made to schema A in source control, you could then play those in against schema B very easily.
Is it possible to create a view in a database A of tables of another database B? If possible, can somebody please help me, I'm totally clueless.
Of course, just use a database link. So, your view would be:
create or replace view my_view as
select some_columns
from my_table#the_other_database
Beware though it's not always that efficient and you may have some problems with queries doing things you don't expect. If there's any volume to the data you're trying to select it might be worth using a materialized view instead to take data cross server. Then you can select data from the server you're on currently, which'll probably be a lot quicker.