Two database within...
Hello there,
Thank you for reading this question. I have a server Sun box that have 2 oracle
instance version 7.3.4 DE01 and DE02.
My WLS needs to establish a jdbc connection pool to DE01. If the connection was
made within the same box (WLS installed within), then it is working fine.
After that I tried to connect from a different Sun box, but is failed. I attached
the error log, please have a peak, TQ.
I also tried to get the remote jdbc connection to DC01, a separate box which only
have 1 database instance, then is ok for the WLS.
Can anyone help?
TQ
Neo
[jdbc-startup.txt]
Hi Neo,
Make sure that you can connect to the the questionable dabase instance
from outside of the box using any legacy tool like SQLPlus and check
connection pool definition for being valid.
Regards,
Slava Imeshev
"Neo" <[email protected]> wrote in message
news:[email protected]..
>
Hello there,
Thank you for reading this question. I have a server Sun box that have 2oracle
instance version 7.3.4 DE01 and DE02.
My WLS needs to establish a jdbc connection pool to DE01. If theconnection was
made within the same box (WLS installed within), then it is working fine.
After that I tried to connect from a different Sun box, but is failed. Iattached
the error log, please have a peak, TQ.
I also tried to get the remote jdbc connection to DC01, a separate boxwhich only
have 1 database instance, then is ok for the WLS.
Can anyone help?
TQ
Neo
Similar Messages
-
If I have an EntityBean that mappes to two tables within one database, when I create
that EJB, whoes reponsibilty to generate the primary key in database table? The
RDBMS or EJB?
Thanks,
JWRefer to http://e-docs.bea.com/wls/docs81/faq/ejb.html/#257430
"Jingwei Zhang" <[email protected]> wrote:
>
If I have an EntityBean that mappes to two tables within one database,
when I create
that EJB, whoes reponsibilty to generate the primary key in database
table? The
RDBMS or EJB?
Thanks,
JW -
Can I compare two databases from within SQL Server Management Studio
Hi everyone. I haven't found anything online, so I wanted to ask here. I have two SQL Server databases running on our server. One is the production database, and another is my development database that I use when I'm working on the program.
I add tables and columns and stuff to my development database, and was wondering if anyone knew of an easy way to from within Management Studio or something to compare the two databases to make sure that they are the same and show me any differences.
I generally add tables or columns to both databases at the same time, but I worry that one time I might forget, so I would like to be able to run some sort of compare / check to make sure before releases...
Thanks everyone for your help. I greatly appreciate it.There is a command line utility that is with Microsoft SQL Management Studio called
tablediff:
http://msdn.microsoft.com/en-us/library/ms162843%28v=sql.105%29.aspx
An example:
http://www.mssqltips.com/sqlservertip/1073/sql-server-tablediff-command-line-utility/
And using it with multiple tables at once looks like some work but doable:
http://blogs.msdn.com/b/repltalk/archive/2010/02/21/how-to-run-tablediff-utility-for-all-replicated-published-tables-in-sql-2005-or-sql-2008.aspx
...and some custom code to implement in an answer at StackOverflow:
http://stackoverflow.com/questions/10688/best-tool-for-auto-generating-sql-change-scripts-for-sql-server?rq=1 -
Hyperion- Can it Connect to two database at a time
Hi All,
I am new to Hyperion Reporting and Analysis. Kindly help me in the following Scenario.
Consider two database 'A' and 'B'
I want to create a report from tables from Database "A" and "B"
How to do that.
Kindly Help me out
Thanks in advance
Regards
GathaFor Interactive Reporting there are a couple options.
1. Us the OBIEE BI Server and model your semantic layer with the connections. The Product is designed for Federated Queries.
2. Build within Client
- Query 1 for Database A
- Query 2 for Database B
- Qyery 3 using local results build the data model from Query Results A and B - Joined appropriately
3. Depending on the Database - SQLServer, Oracle, DB2 etc you could connect to multiple DB within one OCE - You will need to look at Mark Ostroff's tips and tricks guide from previous Hyperion Conference for how to do it.
Hope this is Helpful
Wayne Van Sluys
TopDown Consulting -
SELECT data from two databases
I have two databases that I need to select data from in a
single SELECT. Using DWs Advanced window for creating the select I
don't see any way to select more than 1 Connection. Both databases
have unique user and passwords but reside on the same server. Any
idea how I can write a single SELECT to get data from both dbs. I
assumed it would be similar to selecting data from multiple tables
within the same db but the connection part is stumping me. Any
ideas would be greatly appreciated.TouchstonePress wrote:
> Page 48, Developing a Web Database Application . . .
speaks about making a
> database with two related TABLES each with the same
PRIMARY KEY column with
> which to identify a customer using their unique number.
That's the basic technique for joining two tables in the same
database.
The original poster has tables in different databases that
have
different user accounts and passwords.
Although it's possible to join two databases, you cannot do
it unless
you have one user account with the same privileges on both
databases.
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/ -
Generate query at a time & connect two database ?
Hi
Could u help me? it is necessary that
I have two database ( RSHPL,RSPL) and both data base have same table name and same fieldname (Table Name :-OITM, Fieldname :ONHAND ,pk- ITEMcode,)
At first I tell u what I want?
I want to generate query at a time & connect two database and same table name(OITM) to select the TOTAL VALUE of this field(ONHAND) and pk-key is Itemcode.
Is it Possible? If Possible plz write this query and send me.Hi,
I don't think its possible to write a query from within SAP that allows you to get data from another SAP database.
I have used SQL Reporting Services to report on data from multiple databases, and this works very well for many of my clients. It depends on what you want to do with the data, do you need to display it on the screen in SAP and it to a field or will a report suffice?
Regards,
Adrian -
A dimension table outer join across two databases
I have two databases of the same schema but may have different data that I would like to do comparisons on. For this discussion, each has two tables, Dimension and Fact. I created a common dimension which would show dimension data that exists on both databases. However, I want a common dimension which is a full outer join of the two Dimension tables that can be used to view data on the Fact tables on the two databases; this seems to be a little difference than a fact which may having missing value, isn't it? should this outer join occurs at the physical or logical? Can I even do it at physical if the data are from two different source? Any recommendation on what is the best way to do so? Thanks
It depends on how you are defining your BM. Always, BM is for creating joins on folders within BM, in the sense that each folder can contain data from within multiple databases. So, create it in Physical layer and also create new joins for your defined facts dimensions in BM. But remember, cross database joins are not recommended. If both your schemas reside on 2 different oracle databases, you would be better off creating a single view (by creating a dblink between these 2 databases). So, create a single view and include that in the physical layer.
Thanks,
Venkat
http://oraclebizint.wordpress.com -
I want to populate data from two database tables into a BAM report. I have created two data objects for the tables and want to create 3rd data object so that it can take the data from the other data objects automatically. Is there any such facility within BAM?
Hi
1. I am not sure if you have option to combine multiple DataObjects like that.
2. For your scenario, on Database side itself, I would recommend Create a VIEW that joins these 2 Tables and pull the required Columns and add required conditions. Verify the VIEW has all the rows expected.
3. Then create DataObject for this View. Once you have DataObject, create the Report.
Thanks
Ravi Jegga -
SQL referencing Two database instances
I have searched through most of the posts regarding this subject so please bear with me.
I have created two views in two database instances. Dev and prd.
I am attempting to execute a simple query from Dev within TOAD.
select * from [view_Name]
minus
select * from [view_Name]@PRD
When I execute this I receive an error that the remote connection cannot be found.
Do I have to create a database link using the TNS connection string, or is there another way to reference another database instance within the SQL?
Any help is appreciated.You need to create a database link (see [url http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_5005.htm#i2061505]Oracle® Database SQL Reference).
But I would not refer to other database objects directly like that. Should the link name change, or the remote object name's change, then each and every reference to those needs to be updated in all SQL and PL/SQL code.
When dealing with foreign databases (like Informix for example), objects are case sensitive. Which means ample use of quotes to enforce case on the Oracle side.
All this gets to be quite messy - especially during the maintenance of the code.
Thus, instead of "hard references", use "soft references". Create local views on remote objects. Use those local views in all SQL and PL/SQL code. Any change to database link or remote object now only requires the applicable view to be updated - no hunting for code that needs to be changed. -
How to configurate system for two database under one server
Hi Friends,
I installed abd created A database by oracle 10GR4 in window 32 bit 2003.
it works.
Then i created other B database by DBCA under this server.
When I shutdown immediate database.
it works well. But I can not startup mount ot startup A database again,
I got below message as
SQL> startup mount;
ORA-24324: service handle not initialized
ORA-01041: internal error. hostdef extension doesn't exist
SQL> startup;
ORA-24324: service handle not initialized
ORA-01041: internal error. hostdef extension doesn't exist
SQL> startup;
ORA-24324: service handle not initialized
ORA-01041: internal error. hostdef extension doesn't exist
From EM, I saw as
A listen Status Up
LISTENER
Oracle Home
C:\oracle\product\10.2.0\db_1\BIN
Location
C:\oracle\product\10.2.0\db_1\BIN\network\admin
BUT agent connect Status
Failed
Details ORA-12505: TNS:listener does not currently know of SID given in connect descriptor (DBD ERROR: OCIServerAttach)
A database instance down
Host salerpt.net
Port 1521
SID SALERPT
Oracle Home C:\oracle\product\10.2.0\db_1\BIN
Also I try to connect as
SQL> connect sys/salel@salerpt as sysdba;
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor
Form EM, I saw listen start up.
Then I stop it. then restart it
I can saw B db listen and can not see A db listen.
also
I saw that other B database works.
My listen info as***************
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oracle\product\10.2.0\db_1\BIN)
(PROGRAM = extproc)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = SALERPT.NET)(PORT = 1521))
I check physical, two database use one common bin directory .
I do not have any experience to handle two database under one oracle server.
How to check and configurate DB server system?
Thanks for help.
Edited by: user589812 on Jan 4, 2009 8:17 AMJim,
Before starting the database A, did you set ORACLE_SID=A from command line? You can run as many instances you want from single server provided you enough memory, processing power. Also try starting your instances usign window services and check and post some lines from alert.log for database A.
tnsnames.ora entry
DATABASE_A =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = salesrpt.net)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DATABASE_A)
DATABASE_B =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = salesrpt.net)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DATABASE_B)
)Regards
Edited by: OrionNet on Jan 5, 2009 10:55 AM -
One instance and two databases?
Hello, I've installed oracle database on my server. I've read a lot of documentation to learn the basic concepts.
Ok, I have a question. I have read that one instance only can manage ONE database. Is it true? If it's true, how on earth I can create two database? for example, I want to create database-one and database-two.
I would create these with CREATE DATABASE command. How does Instance know if I want to access to database-one or database-two. How I indicate it in initilitation parameter file of my instance?
In sumary, Can one instance works with two databases?Look at the following output. If I do not set my ORACLE_SID variable, the 9.2.0.7 client connects to the 9.2.0.7 database instance. If I set my ORACLE_SID , the same 9.2.0.7 client now connects to the 10.2.0.1 database (the database specified in the ORACLE_SID variable).
C:\>set ORACLE_SID=
C:\>sqlplus kkishore/kkishore
SQL*Plus: Release 9.2.0.7.0 - Production on Mon Jul 17 09:27:55 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production
C:\>set ORACLE_SID=ORA10GR2
C:\>sqlplus kkishore/kkishore
SQL*Plus: Release 9.2.0.7.0 - Production on Mon Jul 17 09:29:31 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> disconnect
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL>Message was edited by:
Kamal Kishore -
How can i compare two databases and their tables
i have a text.txt file then
i will insert it into db_header and db_details
db_header has tbl_pcountheader with fld_Rack_No(char) PK and fld_DateAdded(date) PK
db_details has tbl_pcountdetails with fld_Rack_No(char) PK, fld_Barcode(char) PK and fld_Quantity(int)
then i will lookup in db_products
db_products has tbl_products and tbl_barcodes
tbl_products has fld_ItemCode
tbl_barcodes has fld_Barcode and fld_ItemCode
now i want to make a prompt contains
Rack No: Date:
Counter No:
Barcode | Item Code | Item Description | Quantity
how can i fill up this by comparing db_details and db_products?
Private Sub bt_upload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_upload.Click
If saveCheckBox.Checked = False Then
MsgBox("Please click the box to continue.")
Return
End If
If lb_file.SelectedItem Is Nothing Then
MessageBox.Show("Please select a file.")
Exit Sub
End If
' Obtain the file path from the list box selection.
Dim filePath = lb_file.SelectedItem.ToString
' Verify that the file was not removed since the Browse button was clicked.
If System.IO.File.Exists(filePath) = False Then
MessageBox.Show("File Not Found: " & filePath)
Exit Sub
End If
' Obtain file information in a string.
Dim fileInfoText As String = GetTextForOutput(filePath)
'LookUP db_header, db_details and db_products
Dim cs As String = "Database=;Data Source=localhost;" _
& "User Id=root;Password=1234"
Dim conn As New MySqlConnection(cs)
Dim ds As New DataSet
Dim da As New MySqlDataAdapter
Dim cmd As New MySqlCommand
Dim dt As New DataTable
Dim stm As String = "SELECT tbl_pcountheader.fld_Rack_No, tbl_pcountheader.fld_DateAdded, tbl_pcountdetails.fld_Barcode, tbl_products.fld_ItemCode, tbl_products.fld_ItemDesc, tbl_pcountdetails.fld_Quantity FROM db_header.tbl_pcountheader INNER JOIN db_details.tbl_pcountdetails ON db_details.tbl_pcountdetails.fld_Rack_No = db_header.tbl_pcountheader.fld_Rack_No INNER JOIN db_products.tbl_barcodes ON db_details.tbl_pcountdetails.fld_Barcode = db_products.tbl_barcodes.fld_Barcode INNER JOIN db_products.tbl_products ON db_products.tbl_barcodes.fld_ItemCode_fk = db_products.tbl_products.fld_ItemCode GROUP BY tbl_pcountheader.fld_Rack_No, tbl_pcountheader.fld_DateAdded ORDER BY tbl_pcountheader.fld_Rack_No"
ds = New DataSet
Try
conn.Open()
da = New MySqlDataAdapter(stm, conn)
da.Fill(ds, "tbl_pcountheader")
DataGridView1.DataSource = ds.Tables("tbl_pcountheader")
Dim headers = (From header As DataGridViewColumn In DataGridView1.Columns.Cast(Of DataGridViewColumn)() _
Select header.HeaderText).ToArray
Dim rows = From row As DataGridViewRow In DataGridView1.Rows.Cast(Of DataGridViewRow)() _
Where Not row.IsNewRow _
Select Array.ConvertAll(row.Cells.Cast(Of DataGridViewCell).ToArray, Function(c) If(c.Value IsNot Nothing, c.Value.ToString, ""))
Using sw As New IO.StreamWriter("c:\report.txt", append:=True)
sw.WriteLine(String.Join(",", headers))
For Each r In rows
sw.WriteLine(String.Join(",", r))
Next
End Using
ds.WriteXmlSchema("Sample.xml")
Dim cr As New CrystalReport1()
cr.SetDataSource(ds)
CrystalReportviewer1.ReportSource = cr
CrystalReportviewer1.Refresh()
Catch ex As MySqlException
MsgBox("Error: " & ex.ToString())
Finally
conn.Close()
End Try
' Show the file information.
Dim PrintPrompt As String
PrintPrompt = MsgBox(fileInfoText, MsgBoxStyle.YesNo, "ProofList")
If PrintPrompt = vbYes Then
'fileInfoText.print()
If saveCheckBox.Checked = True Then
' Place the log file in the same folder as the examined file.
Dim bakFolder As String = System.IO.Path.GetDirectoryName(filePath)
Dim bakFilePath = System.IO.Path.Combine(bakFolder, "back-up.bak")
Dim bakText As String = "Backed-Up: " & Date.Now.ToString & vbCrLf & fileInfoText & vbCrLf & vbCrLf
' Append text to the log file.
'System.IO.File.AppendAllText(bakFilePath, bakText)
My.Computer.FileSystem.WriteAllText(bakFilePath, bakText, append:=True)
'My.Computer.Network.UploadFile(bakFilePath, "C:\Documents and Settings\SAPC-TECH\My Documents\back-up file.bak", "", "", False, 1000)
'My.Computer.FileSystem.DeleteFile(bakFilePath)
'Form2.Show()
End If
'Note: This message box shows that you've uploaded a file and back up it.
MessageBox.Show("Already backed-up to ")
Else
'Me.Close()
'Application.Exit()
'End
End If
'Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
'Form2.Close()
'Me.Close()
End Sub
here's my final code that solves my problem.
i just make the environment of vb into mysql console
so that i can call all the database that i wanted.Private Sub bt_upload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_upload.Click
If saveCheckBox.Checked = False Then
MsgBox("Please click the box to continue.")
Return
End If
If lb_file.SelectedItem Is Nothing Then
MessageBox.Show("Please select a file.")
Exit Sub
End If
' Obtain the file path from the list box selection.
Dim filePath = lb_file.SelectedItem.ToString
' Verify that the file was not removed since the Browse button was clicked.
If System.IO.File.Exists(filePath) = False Then
MessageBox.Show("File Not Found: " & filePath)
Exit Sub
End If
' Obtain file information in a string.
Dim fileInfoText As String = GetTextForOutput(filePath)
'LookUP comparison db_details to db_products
'Dim connString As String = "Database=db_products;Data Source=localhost;" & "User Id=root;Password=1234"
'Dim conn As New MySqlConnection(connString)
'Dim cmd As New MySqlCommand()
'Try
' conn.Open()
' cmd.Connection = conn
' cmd.CommandText = "SELECT Database1.dbo.TableName.ColumnName, Database2TableName.Name, 'The reason why Database 2 isnt defined is the fact that it has been defined in the connection" _
' FROM Database2TableName INNER JOIN _
' Database2TableName2 INNER JOIN _
' WHERE (Database1.dbo.TableName.ColumnName = '')"
' cmd.Prepare()
' cmd.ExecuteNonQuery()
' conn.Close()
'Catch ex As Exception
'End Try
' Show the file information.
Dim PrintPrompt As String
PrintPrompt = MsgBox(fileInfoText, MsgBoxStyle.YesNo, "ProofList")
If PrintPrompt = vbYes Then
'fileInfoText.print()
If saveCheckBox.Checked = True Then
' Place the log file in the same folder as the examined file.
Dim bakFolder As String = System.IO.Path.GetDirectoryName(filePath)
Dim bakFilePath = System.IO.Path.Combine(bakFolder, "back-up.bak")
Dim bakText As String = "Backed-Up: " & Date.Now.ToString & vbCrLf & fileInfoText & vbCrLf & vbCrLf
' Append text to the log file.
'System.IO.File.AppendAllText(bakFilePath, bakText)
My.Computer.FileSystem.WriteAllText(bakFilePath, bakText, append:=True)
'My.Computer.Network.UploadFile(bakFilePath, "C:\Documents and Settings\SAPC-TECH\My Documents\back-up file.bak", "", "", False, 1000)
'My.Computer.FileSystem.DeleteFile(bakFilePath)
Form2.Show()
End If
'Note: This message box shows that you've uploaded a file and back up it.
MessageBox.Show("Already backed-up to ")
Else
Me.Close()
Application.Exit()
End
End If
Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
Form2.Close()
Me.Close()
End Sub
here's my code wherein i have to compare the two database and save it into .txt file
i just have to get this items
Rack No:
Date:
Counter No:
Barcode:
Item Code:
Item Description:
Quantity:
as a prooflist to be print out. -
Creation of two databases in oracle 11g on linux
HI,
I need to create two databases in oracle 11g on linux.
how to set SID'S in .bash_profile and change the init.ora file.
pls anyone let me know
thanks
srinivasIf you have different databases on same node you could choose to not set ORACLE_SID in shell init file but use instead interactive oraenv Oracle script to set the right ORACLE_SID.
Please read Configuring the Operating System Environment Variables in http://download.oracle.com/docs/cd/E11882_01/server.112/e10897/em_manage.htm#ADMQS12369
To create easily a database (ie without using your own scripts) try to use DBCA that will automatically take care of database initialization file: http://download.oracle.com/docs/cd/E11882_01/server.112/e10897/install.htm#BABEIAID
Edited by: P. Forstmann on 5 août 2011 12:01 -
Need help in merging two database
Dear All,
Can any one please let me know the methodology/Best practices for merging two databases.
We are having two oracle Database A and B, the data from
Database A has to be migrated to Database B using PL/SQL scripting.
it will be a great help,Thanks in advance!Hi,
Use the DB Links and try to use the "MERGE" that is better.
you can clone it right, almost you are getting the same data from A to B and then you are going to Update is I am correct. Does the "B" consist the data, If yes then you can't clone on exiting DB, As i said above go for DB links and write custom scripts as per your requirement.
Refer for DB links
http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/ds_admin.htm#sthref4108
- Pavan Kumar N -
I want to connect two database in Oracle
Dear All
I want to connect two database in Oracle ver-10.2.0.1.0 ,And fetch data from 2nd table.
OS - XP Pro.
Regards,
ParwezConfigure remote DB in TNS first.
Create DB link.
CREATE {PUBLIC} DATABASE LINK "DBLINKNAME" CONNECT TO "remoteuser" IDENTIFIED BY "remotepwd" USING 'REMOTEDBTNSALIAS';Query remote tables using
select * from remotetable@DBLINKNAME;
Maybe you are looking for
-
Any way to get frame accurate in icon view mode?
Does anyone know if there is a way set frame accurate in points in icon view mode? I know that if you are "hover scrubbing" a clip, and then click on it you can use the JKL keys to shuttle through the footage. But is there any way to go frame-by-fr
-
Error while creating billing document using VF04 transaction
Hi All, User is trying to create billing document using VF04 with ference to delivery number. When pressing save in invoice creation system SAP gives invoice document number (No accouting document generated). but no documents are actually created. Wh
-
Location to download IPS software upgrade Version 7.1(5)E4
Hi, In last month I found latest released IPS software version 7.1(5)E4 for IPS appliance 4260 on cisco site. However it is no more available over there now can I have exact download location of the software upgrade as I want to upgrade my device wit
-
I want to make a report that gives the user the option to do one of following: (1) Select Top 5 Used Profile IDs (2) Select Top 5 Random Profile IDs (3) Choose Up to 5 Desired Profile IDs How can I make a parameter that once selected will either, wit
-
Daisy-chaining remote object calls
If you want to get data from a series of CFCs using remote object, and each call depends on data received from the previous call, you have to daisy-chain the functions making the calls, otherwise there is no way to guarantee that the data is availabl