Consolidate multiple database
Hi,
I'm trying to load data from multiple database with the same structure.
Key are unique for a single database, but can have duplicates when merged, so i need to use a surrogate key.
Something like this
DB1
CustomerID CustomerName
1 John
2 Mark
DB2
CustomerID CustomerName
1 Paul
The target table should look like this
GlobalID OriginalID DatabaseName CustomerName
1 1 DB1 John
2 2 DB1 Mark
3 1 DB2 Paul
I cant figure out how to handle the "DatabaseName" source.
AFAIK it should be a Source column, but should be different any time I run the interface (a variable maybe)?
Can you point me the right way to handle a situation like this?
Regards,
Corrado
Hi Corrado,
Bit lengthy reply after a long.
You can handle this with 1 temp staging table, 3 interfaces and 2 Varaibles.
Variable 1:
Name : SRC_DB1
Schema : <logical schema points to DB1>
Query:
select '<%=odiRef.getInfo("DEST_SCHEMA")%>' from dual
Variable 2:
Name : SRC_DB2
Schema : <logical schema points to DB2>
Query:
select '<%=odiRef.getInfo("DEST_SCHEMA")%>' from dual
Temp Staging table structure let me say it as TEMP_CUST would be same as ur target table except Global Id column.
Interface 1:
Source : DB1.Sourcetable
Target : TEMP_CUST
Mapping:
OriginalID : Sourcetable.OriginalID
DatabaseName : '#SRC_DB1'
CustomerName : Sourcetable.CustomerName
KMs:
LKM : As u wish
IKM: IKM SQL Control Append (With Truncate yes, if required)
Interface 2:
Source : DB2.Sourcetable
Target : TEMP_CUST
Mapping:
OriginalID : Sourcetable.OriginalID
DatabaseName : '#SRC_DB2'
CustomerName : Sourcetable.CustomerName
KMs:
LKM : As u wish
IKM: IKM SQL Control Append (With Truncate NO)
Interface 3:
Source : TEMP_CUST
Target : TARGET_CUST
Mapping:
Global ID : sequence.nextval (execute on target)
OriginalID : TEMP_CUST.OriginalID
DatabaseName : TEMP_CUST.DatabaseName
CustomerName : TEMP_CUST.CustomerName
IKM: IKM SQL Control Append (With Truncate NO)
Create an Package and drag and drop ,
SRC_DB1 (refresh mode), SRC_DB2 (refresh mode), INterface1, interface 2 and Interface3.
Try this and let me know how its goes.
Thanks,
Guru
Similar Messages
-
Multiple databases in one single RAC cluster
Hi, I would like to know if one can have multiple databases running on a single RAC cluster, we have several databases in our shop and would like to consolidate all of them into a single 3-4 node RAC cluster running databases with 10.2 and 11.1 versions.
I am newbie to RAC and would like to get some clarification if anyone has done this, google search comes up with few hits on this topic, so obviously this is not doable.
In our case we have one database supporting critical applications and few other not so critical but are used very extensively between 9-5, so what is the use of RAC if I cannot consolidate all my databases into one cluster, or if I need a separate cluster for each of these critical databases?
I have been all the Oracle docs that keep repeating one database multiple instances and one instance-one machine-one node, they don't even advise running multiple instances on a single node?.
I appreciate any insight.
Thanks.ora-sql-dba wrote:
Can you give more details on how you would setup multiple databases running different versions on a single RAC cluster, I am yet to find any documentation that supports or even elaborates on this topic.You can configure a cluster with 12 nodes. Then, using dbca, configure a dev instance for nodes 1 and 2, a prod1 instance for nodes 3 to 6 and a prod2 instance for nodes 7 to 12.
You also can configure each of these instances for all 12 nodes. And use it on all 12 nodes.
Or, after configuring it for all 12 nodes, you can start the dev instance on nodes 1 and 2, prod1 on 3 - 6 and prod2 on the remaining nodes. If dev needs more power, you can for example shutdown prod2 on node 12 and start another dev instance there.
My issue is with the 2nd option - running more than one instance on the same node or server. Why? Each instance has a basic resource footprint ito shared memory needed, system processes required (like db writer, log writer, sys monitor) etc. It does not make sense to pay for that same footprint more than once on a server. Each time you do, you need to reduce the amount of resources that can be used by each instance.
So instead of using (for example) 60% of that server's memory as the SGA for a single instance, if you use 2 instances on that server you now have to reduce the SGA of each to 30% of system memory. Effectively crippling those instances by 50% - they will now have smaller buffer caches, require more physical I/O and be more limited in what they can do.
So unless you have very sound technical reasons for running more than one instance on a server (RAC or non-RAC), do not. -
Multiple databases on same server
we're planning to consolidate our SAP R/3 databases on a 64bit based cluster running Windows 2003/SQL Server 2005.
the "SAP with Microsoft SQL Server 2005: Best Practices for High Availability, Maximum Performance, and Scalability" document states "SAP products support multiple instances of SQL Server 2005 on the same server. However, running the database of the SAP production system together with other application databases on one server is not recommended." and "An alternative is to run two or three SAP databases on one SQL Server 2005 instance.".
giving this, I'd like to know if it's not recommended even if the 'other application databases' are related to other instances of SAP R/3 product.
it would be useful to know why one SQL Server instance with multiple SAP databases is better than multiple SQL Server instances with one SAP database for each.
thank you.Dear Matro,
Please review the following thread:
Multiple database instances on single server on SQL2005
I also note that you state your database server is clustered using MSCS. If this is the case you should not use a "Named Instance". If you download the latest Netweaver 2004s Installation guide (SR1) for Windows SQL you will note that on page 172 it specifically states that you must install a "default instance".
If you plan to consolidate several SAP database systems on one host and use a default instance you need to consider the fact that all databases running on this instance will share resources such a memory cache etc.
Factors such as the size of the SAP systems, whether the systems are OLTP will influence your decision
Please post if you have any additional questions.
Thanks
N.P.C -
Multiple database members in a single Grid Row
Hi All,
I have created an FR report (9.3x) and getting the below error while trying to run the report via Web Preview.
5217: Error Processing Results;hasPovDims=1;povXML=<?xml version="1.0"?><datasources><datasource name="FIN QA" dsid="-117fcde3_132fd17f2f6_-771b" allowEdit="1"><dim name="Versions" dimIndex="0" dsName="FIN QA" keyDimName="Versions" memberName="Versions" displayName="Versions: Versions"/><dim name="Scenarios" dimIndex="4" dsName="FIN QA" keyDimName="Scenarios" memberName="Scenarios" displayName="Scenarios: Scenarios"/><dim name="Components" dimIndex="5" dsName="FIN QA" keyDimName="Components" memberName="Components" displayName="Components: Components"/><dim name="Customers" dimIndex="6" dsName="FIN QA" keyDimName="Customers" memberName="Customers" displayName="Customers: Customers"/><dim name="Assets" dimIndex="7" dsName="FIN QA" keyDimName="Assets" memberName="Assets" displayName="Assets: Assets"/></datasource><datasource name="FINDEF QA" dsid="-607fb334_128b79d246e_-7d0a" allowEdit="1"><dim name="Time Periods" dimIndex="1" dsName="FINDEF QA" keyDimName="Time Periods" memberName="Time Periods" displayName="Time Periods: Time Periods"/><dim name="Scenario" dimIndex="3" dsName="FINDEF QA" keyDimName="Scenario" memberName="SC_Actual" displayName="Scenario: SC_Actual"/><dim name="Versions" dimIndex="4" dsName="FINDEF QA" keyDimName="Versions" memberName="VR_Input_Version" displayName="Versions: VR_Input_Version"/><dim name="Customers_Region" dimIndex="6" dsName="FINDEF QA" keyDimName="Customers_Region" memberName="CU_NA" displayName="Customers_Region: CU_NA"/><dim name="Assets" dimIndex="7" dsName="FINDEF QA" keyDimName="Assets" memberName="Assets_NA" displayName="Assets: Assets_NA"/></datasource></datasources>
In my report I have selected 2 rows where I have selected @descendants of ccounts from one database which is FIN QA and in the second row I have selected @children of Accounts from another database which is FINDEF QA. I am using only ONE GRID here.
Is it not possibe to run a FR report by select members from multiple databases in a single grid??
Please have your valuable inputs.Yes it possible to retrive data from multiple database using single grid.
Also there are few limitations namely:
Database connections must be of the same type (for example, both must be Essbase database connections or both must be Financial Management database connections).
Mismatched number of dimensions in the database connections may cause retrieval errors.
For more details refer to this link for details:-
http://www.oracle.com/technetwork/middleware/financial-management/tutorials/obe-multipledbs-086586.html
Cheers
Vikas Naidu -
Use 1 listener for multiple database in a server
hi guys,
just want to check whether this is the right way to configure my Listener.ORA . I am using 1 listener.ora to listen for incoming request connection from remote client. There are multiple databases installed in a server.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora03)(PORT = 1521))
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = O11R2)
(ORACLE_HOME = /oracle/app/oracle/product/11.2.0/db_1)
(SID_NAME = O11R2)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = O10G)
(ORACLE_HOME = /oracle/app/oracle/product/10.2.0/db_1)
(SID_NAME = O10G)
)sorry i am reading about it so did not install another database to test out. Just thinking in the line that it mention that the list of SID is refering to the multiple database that is installed in a server and i am using 1 listener.
Please further advice.Shivananda Rao wrote:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora03)(PORT = 1521))
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = O11R2)
(ORACLE_HOME = /oracle/app/oracle/product/11.2.0/db_1)
(SID_NAME = O11R2)
(SID_DESC =
(GLOBAL_DBNAME = O10G)
(ORACLE_HOME = /oracle/app/oracle/product/10.2.0/db_1)
(SID_NAME = O10G)
)Please use as above. You can have one listener for multiple databases.right right so it the pattern goes like this:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = AAAA)
(ORACLE_HOME = /oracle/app/oracle/product/11.2.0/db_1)
(SID_NAME = AAAA)
(SID_DESC =
(GLOBAL_DBNAME = BBBB)
(ORACLE_HOME = /oracle/app/oracle/product/10.2.0/db_1)
(SID_NAME = BBBB)
)thanks ! -
Multiple databases in one file: a small snafu
Hello everyone,
Opening multiple databases in a single file is an administrative convenience. It is well explained in the manual (see db/docs/ref/am/opensub.html). Normally, there is little difference between databases in their own physical files or grouped together in a single physical file. There is one small sentence in the manual that says the following:
(begin fragment)
However, since multiple databases in a file exist in a single physical file, opening two databases in the same file simultaneously requires locking be enabled unless all of the handles are read-only. As the locks for the two databases can only conflict during page allocation, this additional locking is unlikely to affect performance.
(end fragment).
I didn't pay attention to it, except the "unlikely to affect performance" part which told me that I wasn't to worry about it. The sun was shining. Life was good.
And I was wrong. It was one of those "epic bug quests" I had to embark on, only to realise that it may not be a BDB bug, but my carelessnes. Nevertheless, I'm left with an uneasy feeling which I would like to explain here.
Consider BDB configured as a concurrent data store.
There are 2 threads. The first thread has the following pseudocode:
cursor1 = db1->cursor(...)
while(cursor1->c_get(... DB_NEXT...))
// 1
cursor2 = db2->cursor(...)
while(cursor2->c_get(... DB_NEXT...))
The second thread does only the following:
db3->put(...)
db1, db2 and db3 are all distinct databases. All cursors are read-only (the cursor implicitly used in db3->put is of course a write cursor).
While the first thread is running, the second thread executes db3->put(...) at "//1".
Question: what happens?
Answer 1: if db1, db2 and db3 reside in different physical files, nothing special happens. Everything proceeds as it should.
Answer 2: if db1, db2 and db3 reside in the same physical file, both threads block "sometimes".
The "sometimes" used here means "when the put operation in thread 2 needs to allocate a new page".
Reading the BDB source code is extraordinarily difficult (which says more about my limitations than about the clarity of the code) but here is what happens, as far as I could determine:
(thread 1) cursor1 needs and acquires a read lock on db1
(thread 2) db3->put needs a write lock on db2 to allocate a new page. Since db2 is in the same physical file as db1 and thread 1 already has a read lock, thread 2 waits until the read lock is released. Thread 2 blocks.
(thread 1) cursor 2 needs a read lock on db3. For some reason, BDB detects that the another thread is waiting for a write lock on the physical file, and thread 1 blocks.
Both threads block waiting on each other to complete.
I suppose the system is the way it is to avoid starvation, but there you have it: be careful when you're lumping together multiple databases in one file!
Anyone who can clarify or confirm this is welcome.
VincentI had experienced a similar problem. I run multiple process. Each one of them starts a transaction that does db->put and db->pget to its own database (which also has a secondary index). When each database is in a separate physical file there is no problem but when I put all databases in a single file the processes start to dead-lock.
The following combination of options solved the deadlocking problem:
- use serializable isolation level instead of snapshot, i.e. do not pass DB_TXN_SNAPSHOT to txn_begin
- do not pass the DB_NO_WAIT option to txn_begin
- use Btree instead of a Hash
Hope that helps. -
How do I consolidate multiple iCloud IDs?
How do I consolidate multiple iCloud IDs?
In order to change your Apple ID or password for your iCloud account on your iOS device, you need to delete the account from your iOS device first, then add it back using your updated details. (Settings > iCloud, scroll down and hit "Delete Account")
Providing you are simply updating your existing details and not changing to another account, when you delete your account, all the data that is synced with iCloud will also be deleted from the device (but not from iCloud), but will be synced back to your device when you login again.
In order to change your Apple ID or password for your iCloud account on your computer, you need to sign out of the account from your computer first, then sign back in using your updated details. (System Preferences > iCloud, click the sign out button)
In order to change your Apple ID or password for your iTunes account on your iOS device, you need to sign out from your iOS device first, then sign back in using your updated details. (Settings > store, scroll down and tap your ID) -
Can you have multiple databases on the same LUN in Exchange 2010?
I'm sure you can but is it possible with exchange 2010 to have multiple databases on the same LUN. We currently have 8 DB's all writing to their own DB drive and separate log drive so 16 drives in total. I need to spin a new DB up this week and
wanted to double check this is possible. I've looked online and cant find anything that I've seen before that says this is possible.
Thanks.Hi,
Yes, multiple databases could be placed on the same LUN, but it's not recommended.
If you have 2 drives fail at the same time (it happens more than you think), then losing 100% of your DBs is a lot worse than losing one of them or some of them depending on where the failures are.
Here is a similar thread for your reference:
Multiple databases on the same LUN in Exchange 2010
Hope this helps!
Thanks.
Niko Cheng
TechNet Community Support -
How to access multiple database present in single instance
Hi Team,
In oracle 11.2, can there be multiple databases in an instance??? In one of our environment, I could see multiple databases in an instance. Could you please help me in giving the data dictionary or query to access those databases?
Actually, querying v$database, I could see only one database which is same as instance name. But in inventory, there are multiple database in an instance?
I am still not exactly clear about this. Can someone help me with this?
Thanks!
VidhyaIn Oracle one instance manages one (1) database. A database consists of multiple *schemas*.
Other vendors erroneously call a schema 'database'.
So, no, you didn't see multiple databases.
There is also one datadictionary, consisting of a set of views.
All views beginning with dba_ list the entire database, all schemas.
All views beginning with all_ list the objects you have access to.
All views beginning with user_ list your own objects.
The view DICT show you the contents of the datadictionary.
Oracle also has online documentation at http://docs.oracle.com
From your question it is clear you should read the document called the 'Oracle Concepts Manual'.
You can find all documentation for 11gR2 here Oracle Database Online Documentation 11g Release 2 (11.2)
Too many people here don't make any effort to read it. This is probably the reason why you got no response.
Sybrand Bakker
Senior Oracle DBA -
TDE Wallets & Multiple Databases on same Host
The Oracle TDE Best Practices (doc ID 130696) states this:
Multiple databases on the same host
If there are multiple Oracle Databases installed on the same server, they
must access their own individual TDE wallet. Sharing the same wallet between independent instances is not supported
and can potentially lead to the loss of encrypted data.
If the databases share the same ORACLE_HOME, they also share the same
sqlnet.ora file in $TNS_ADMIN . In order to access their individual wallet, the
DIRECTORY entry for the ENCRYPTION_WALLET_LOCATION
needs to point each database to its own wallet location:
DIRECTORY= /etc/ORACLE/WALLETS/$ORACLE_UNQNAME
The names of the subdirectories under /etc/ORACLE/WALLETS/ reflect
the ORACLE_UNQNAME names of the individual databases.
If the databases do not share the same ORACLE_HOME, they will also have their individual sqlnet.ora
files that have to point to the individual subdirectories.
What is the correct sqlnet.ora syntax to do this? I currently have what is below but it doesn't seem to be correct:
ENCRYPTION_WALLET_LOCATION =
(SOURCE = (METHOD = FILE)
(METHOD_DATA =
(DIRECTORY = /local/oracle/admin/wallet/DB#1)
(DIRECTORY = /local/oracle/admin/wallet/DB#2)Hi,
You can check this :Setting ENCRYPTION_WALLET_LOCATION For Wallets Of Multiple Instances Sharing The Same Oracle Home (Doc ID 1504783.1)
i haven't done this for multiple database, but as per Doc you can use the syntex like
ENCRYPTION_WALLET_LOCATION =
(SOURCE = (METHOD = FILE)
(METHOD_DATA =
(DIRECTORY = /local/oracle/admin/wallet/$ORACLE_UNQNAME)
Whenever you set the Environmnet with
export $ORACLE_UNQNAME=DB#1
it will choose the file from respective directory like /local/oracle/admin/wallet/DB#1
HTH -
How do i create multiple databases on the same unix box?
Hello experts.
Please send me some guidelines on how to create multiple databases on the same unix box and how to configure their startups including listeners.
Please also, list me the possible precautions to takes especially if the existing database is a production one!
thanks very much for you reply
Best Regards
YogeerajHello,
I tried the following:
svrmgrl> startup nomount pfile=I:\d01\oracle\admin\cmttest\pfile\init.ora
then
svrmgrl> CREATE DATABASE cmttest
LOGFILE 'i:\d01\oracle\oradata\cmttest\redo01.log' SIZE
1024K,'i:\d01\oracle\oradata\cmttest\redo02.log' SIZE 1024K
MAXLOGFILES 32
MAXLOGMEMBERS 3
MAXLOGHISTORY 1
DATAFILE 'i:\d01\oracle\oradata\cmttest\system01.dbf' SIZE 50M REUSE
MAXDATAFILES 254
MAXINSTANCES 1
CHARACTER SET WE8ISO8859P1
NATIONAL CHARACTER SET WE8ISO8859P1;
Then when i try to run both databases:
svrmgrl> set instance cmttest
ORA-12500: TNS: Listener failed to start a dedicated process
===================
I am doing something wrong.
please help
Regards
Yogeeraj -
Multiple databases in a single query
I need to query multiple databases in a single query.
e.g.
Database d1 contains table t1 with column id
Database d2 contains table t2 with column id
I need a query like
SELECT * FROM t1, t2 WHERE t1.id = t2.id;
is this possible in jdbc? if yes can anyone help with some sample code?
thanks,
Ashish SarafIt is not possible using the JDBC API to query tables in two or more databases using a single query. The reason is that a JDBC Connection is made to a single data source.
However, some databases support the idea of federations or linked tables. What you do is inside the database manager link or federate a table that is present in another DBMS. Then, pose a single JDBC query to the one DBMS which will have its own table and links to the external tables.
Another approach is to use a special JDBC driver with a built-in integration engine that will perform a query across multiple databases. In effect, the system poses separate queries to the different databases and integrates and joins the data together for you automatically on the client-side. That is much easier than doing it yourself in code, but that is also possible for simple queries.
As part of my research program, we have released a shareware version of the UnityJDBC driver that can query multiple databases using a single SQL query. For more information, see:
http://www.unityjdbc.com
http://www.cs.uiowa.edu/~rlawrenc/research/projects.html
Sincerely,
Dr. Ramon Lawrence
Assistant Professor
Department of Computer Science
University of Iowa
[email protected] -
Need to get data from multiple database instances in a single query
Hi,
I need a small favour from you guys. The prob is as follows:
I need to get name, row_id from table A from schema 1 and gbu_name, name from table B from schema 2 where a.name = b.name. I wrote the query in the following manner:
SELECT a.name, a.row_id, b.gbu_name
FROM Schema1.A as a, Schema2.B as b
Where a.name = b.name
But this query is not working and the error is like " The table does not exists".
Please update me how to avoid the error and get the right sort of result.
Thanks & Regards,
DebabrataAh, youre actually asking different things.
In your topic title, you say youre running separate instances
In your body text, you say you are under different user/schema
So tell me, do you have more than one database or not? How many entries in your TNS file?
I would say, for "multiple database instances"
SELECT
a.id, b.id
FROM
tableA a
INNER JOIN
tableB@OTHER_DATABASE_LINK_NAME b <--NOTE!
USING(id)And of course you will have to look up CREATE PUBLIC DATABASE LINK sql..
Message was edited by:
charred -
Multiple Database access in a single transaction
Hello All,
I have read in a book which states that "according to J2ee Specification,a single transaction(an EJB method for example) may not be provided access to multiple JDBC resource providers.."
Does it mean that i cannot access multiple databases from different vendors in a single EJB transaction??
Any help is very much appreciated
ThanksHello Sebastien,
Thanks for your response!!!
Let me make it bit more clear.In deploymewnt descriptor,we define jndi name for any resource and do a lookup on that resource from the code.
Let us consider that resource as JDBC data source for our discussion.usually you define any jdbc data source under a JDBC resource provider.
So my question is,in a single transaction can you access multiple data sources defines under multiple JDBC resource providers.
Ex:A datasource "x "defined under resource provider "A"[say DB2 jbdc provider] and a datasource "y" defined under respurce provider "B"[say mysql jdbc provider].
Thanks -
Multiple DataBase Connection in a Single Form
hi all
Is it Possible to have Multiple Database Connection With a Single Form
Block a : Retriving data from a database Service a/Schema A.
Block b : Retriving data from a Remote Database Service b / Schema B.
If yes how to do this.
regards
jai
email:[email protected]Sure you can access a database this way,
but can you base a block on this database connect? No you can't.
Frank
Maybe you are looking for
-
Problem with persistence in Generic Sync application
Hi: We are developing an application which runson SAP Mi 2.5, SP 18, Windows Mobile 5.0 and Generic Sync for PDAs. We need persistence in our application. We tried with persistence API but we found a problem and we send a message to SAP. Until we can
-
FM Cutover : Open PR, PO
Hello Experts We are planning to Go Live with FM module at the start of fiscal year. As part of Cutover Activity, how should open PO, PR and Invoices be treated if they are not to be short closed. Do we have to Reconstruct open PO, PR and Invoices us
-
How to use iMovie files in Powerpoint on PC
I have iMovie 11 and have created a movie that I would like to insert it into Powerpoint running on a PC (PP 2003 SP3). I assume I need to do a file conversion but would like advice on the best way to do this. Thanks, Rick
-
I cannot find where to launch Visual Studio 12 :(
Usually when I install a program, it has some sort of convenient way to get it up and running. But for some reason I cannot find such a thing with VS 12. There's nothing in the start menu, nothing on the desktop, and I have looked all over the VS 12
-
I love Mac's and am looking to buy a laptap. Is ipad or Mac better when looking for a laptop
I have a Mac at work and at home. I am looking to purchase either a Mac or iPad to use when on the road. In your opinion do I but a Mac or iPad?