While connecting to more than one database
what shold i do while connecting to more than database...
shold i implement it using serializable class
or shold i pass the connection object a session variable
give me some exaple for connecting to more than one database..
sreekanth
Sometimes you can use Connection.setCatalog(...) to switch.
Similar Messages
-
Connect to more than one database?
Hi,
Is there a way to connect to more than one database from Oracle form (one form)? If yes, what's the best practice to do it?
Saad,hi
u can modify Tnsnames.ora for that
example:
test1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = IP Address)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = test1)
test2=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = IP Address)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = test2)
) -
VS 2005 CR integrated report connection with more than one database
Hello,
I am using VS 2005 to make a reporting application. I am using the Crystal Reports Viewer and I need to know how to integrate the report login information for more than one database. Here is the VB code I have for one connection:
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
ConfigureCrystalReports()
End Sub
Private Sub ConfigureCrystalReports()
Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo()
myConnectionInfo.DatabaseName = ""
myConnectionInfo.UserID = ""
myConnectionInfo.Password = ""
myConnectionInfo.ServerName = ""
Dim reportPath As String = Server.MapPath("CleaningReport.rpt")
CrystalReportViewer1.ReportSource = reportPath
SetDBLogonForReport(myConnectionInfo)
End Sub
Private Sub SetDBLogonForReport(ByVal myConnectionInfo As ConnectionInfo)
Dim myTableLogOnInfos As TableLogOnInfos = CrystalReportViewer1.LogOnInfo
For Each myTableLogOnInfo As TableLogOnInfo In myTableLogOnInfos
myTableLogOnInfo.ConnectionInfo = myConnectionInfo
Next
End Sub
End Class
I am new to visual basic and really appreciate any help.
ThanksHi Steve,
Test by creating one more function ConfigureCrystalReport1() and pass the details for database 2.
I am not sure there is any sample for this however you can have a look to samples [here|https://www.sdn.sap.com/irj/boc/samples]
Regards,
Shweta -
Connect to more than one Database from portal
I need to reach more than one database from my portal. How is this done?
You have several options depending on what you want to do with the data.
1) Omniportlet: you can specify on a per portlet instance basis to what DB you want to connect (JDBC).
2) Programmatic Java portlet: you can create as many JDBC connections as you like.
3) DB links: you can build data-driven portlets on database objects, accessed via DB links.
4) Programmatic PL/SQL portlet: you can build programmatic PL/SQL portlets on database objects, accessed via DB links.
Peter -
Unable to connect error while connecting to more than one server in a cluster
hi,
I have a weblogic cluster of two servers. The stateless session bean is deployed
on both these servers as well as the cluster. The weblogic used is 6.0 sp2. I'm
using a custom router class which redirects the calls to bean's business methods
in a round-robin fashion to all the servers in the cluster.
When both the servers (say s1 and s2) are up and running a request comes from
a servlet deployed on admin server, the request is first sent to s1 which is fulfilled
but in the same servlet a second call is made to the bean which the custom router
class directs to s2, but here the exception comes as, unable to connect to JVM
of the remote server s2.
Now if I shutdown s1 and retry then, the request is nicely routed to s2 and fulfilled.
And if s1 is up again and request is sent to it, this time it gives same error
for the s1.
So on the whole the admin is able to talk only to one of the servers. why is this
happening ?
Here all the three servers s1, s2 and admin server are on different physical machines.
any pointers ?
regards,
Nikhil.
Opps!
Sorry, I had an error in the 3rd SQL statement. Works fine
PP -
Can I use more than one database connections in a jdeveloper project?
I use jdeveloper version 9.0.4.0 (build 1407),Can I use more than one database connections in one jdeveloper project?
9.0.4 is a fairly old version, so you may only find a few people who know how it worked.
Assuming you're using ADF BC, once known as BC4J, once know as JBO, in the project, and that the architecture hasn't changed much, then the answer is only 1 connection per project.
Programmatically you're free to use as many connections via JEE as you see fit, but ADF BC is limited to one connection.
CM. -
How can i connect more than one database
i would like to connect more than one database one my laptop
now i have database one and sid=ddms
and i would another such as sid=ddmf
how can i connect two database on the same my laptopI am not sure what you mean by after built? Are you trying to export data from one database and import it into another? If so, export it using data pump making sure you have the correct ORACLE_SID. Also be sure both database have to same character set. Then change the ORACLE_SID to other database, and run data pump to import the data into the other database. Hope that makes any sense...
-
Creating more than one database user in oracle cloud
I hv created an adf application, in which there are 4 models. each model is connected to different database user, where SID is same for all user. These users have some number of tables, which are used as entity and view in model project in adf application. My query is:
I hv activated oracle cloud service for database and java. i want to deploy my adf application on cloud. so, how can i create more than one database user in cloud as i do in oracle db 11gr2? So that my all models will be connected to different database user in cloud.
Also, which service name should i use in model.jpx? I hv used mydb as service name on my local machine.
pls, help me to go ahead!!!!!!!!Hi Ajaykumar,
To ensure you receive an accurate response to your query, I believe it would be best raised on the Oracle Java Cloud Service forum, here:
Oracle Java Cloud Service
Regards,
Hilary -
Startup issue when having more than one database on machine
Startup issue when having more than one database on machine:
I’ve installed two databases.
When I shutdown one of the database and try to start it up using
Startup pfile=’…location..’;
I get ora-12514: TNS: listener does not currently know of service rquirest in connect descriptor
when I try it again after 3 seconds, I get a new error, ora-01041: internal error. Hostdef extension doesn’t exist
Shutdown and Startup gave no problems when I had one database. Why am I getting problems when I have two databases?
I’m using: show parameter pfile|spfile; to make sure I have the right parameter locations, so the error shouldn’t be from location.
I’ve never installed two databases on one machine, so maybe I’m making a first-timer’s error.
Anyone know how to get this working, i.e. starting and stopping DB without issues?
Using oracle 11gR2 on Windows 7 64bit, all is working normal.
Thanks,
Ayman
Edited by: aymanzone on Jun 15, 2011 9:27 AMaymanzone wrote:
my oracle_sid is set to the name of one of my databases
echo %oracle_sid%
shows me the name of my first database.
Still not working though.
When I start the services of both databases using Services, I can connect and run queries from both of the database.
Edited by: aymanzone on Jun 15, 2011 11:47 AMFirstly ... the Oracle Service for the instance should be started for the DB you are trying to connect or start.
Next ... from the command prompt:
set oracle_sid=<Instance_Name>
sqlplus sys as sysdba
startup pfile='location of the respective db pfile'
Now, if you want to start or connect to another DB which is on the same server (again assuming the Service is STARTED) ...
From the same command prompt session or other ....
set oracle_sid=<Other_Instance_Name>
sqlplus sys as sysdba
startup pfile='location of the respective db pfile'
Edited by: Srikanth on Jun 16, 2011 12:27 AM -
How to configure html db on more than one database
Hi
how can we configure one html db on more than one database.
I have tried to configure the DAD.conf file. Also i have tried to do it by virtual hosting.
can anyone mail a DAD.conf file.
Ahanks
AmeyaThis is easy and the internet is full of examples. Here is what I used (replace the strings in ## with your values):
CREATE LINK STATEMENT:
create database link #YOUR_LINK_NAME#
connect to #USER_WITH_REQUIRED_ROLES_ON_REMOTE_DB# identified by #USER_PASSWORD#
using ' #TNS_NAMES_ENTRY_FOR_THAT_CONNECTION#';
ALTERNATIVELY:
create database link #YOUR_LINK_NAME#
connect to #USER_WITH_REQUIRED_ROLES_ON_REMOTE_DB# identified by #USER_PASSWORD#
using '(DESCRIPTION =
(ADDRESS = (PROTOCOL = tcp)(HOST = #YOUR_HOST#)(PORT = 1531))
(CONNECT_DATA =
(SID = #YOUR_TNS_SID#)
After creating a link you reference the tables using the following syntax:
table_name@link_name
Denes Kubicek -
Can printer connect to more than one network?
Hello.
I just bought the wireless HP deskjet 3050 printer. I've connected it to the internet (network) and it's working perfectly. Is it possible to connect to more than one network? We have more than one internet line in the house so I was wondering if I can set it up for both lines. I understand that I can print with multiple computers on the same network (and I am able to do so), but how about on different networks?
Thanks.No, it only has one network connection device so can only connect to one at time, sorry.
Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
I am employed by HP -
How to backup more than one database using powershell
I am Trying to backup more than one database using the following script but no luck. I want user to type on command line the database they want to backup, e.g all databases that have "test" at the front like test.inventory, test.sales so i want
user to type test.* and it backs up all databases related to test. Here is the script
#$date = Get-Date -Format yyyyMMddHHmmss
#$dbname = 'test.inventory'
$dbToBackup = "test.inventory"
cls
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | Out-Null
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SmoExtended") |
Out-Null
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.ConnectionInfo")
| Out-Null
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SmoEnum") | Out-
Null
Add-Type -AssemblyName "Microsoft.SqlServer.Smo, Version=10.0.0.0, Culture=neutral,
PublicKeyToken=89845dcd8080cc91"
$server = New-Object Microsoft.SqlServer.Management.Smo.Server($env:ComputerName)
$server.Properties["BackupDirectory"].Value = "C:\_DBbackups"
$server.Alter()
$backupDirectory = $server.Settings.BackupDirectory
#display default backup directory
"Default Backup Directory: " + $backupDirectory
$db = $server.Databases[$dbToBackup]
$dbName = $db.Name
$timestamp = Get-Date -format yyyyMMddHHmmss
$smoBackup = New-Object ("Microsoft.SqlServer.Management.Smo.Backup")
#BackupActionType specifies the type of backup.
#Options are Database, Files, Log
#This belongs in Microsoft.SqlServer.SmoExtended assembly
$smoBackup.Action = "Database"
$smoBackup.BackupSetDescription = "Full Backup of " + $dbName
$smoBackup.BackupSetName = $dbName + " Backup"
$smoBackup.Database = $dbName
$smoBackup.MediaDescription = "Disk"
$smoBackup.Devices.AddDevice($backupDirectory + "\" + $dbName + "_" + $timestamp +
".bak", "File")
$smoBackup.SqlBackup($server)
#let's confirm, let's list list all backup files
$directory = Get-ChildItem $backupDirectory
$backupFilesList = $directory | where {$_.extension -eq ".bak"}
$backupFilesList | Format-Table Name, LastWriteTimeOr i am using this script which backs up everything except tempdb but dont know how to modify this so that it backs up up all test related databases
Is there a way that i use test.*
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | out-null
$s = new-object ("Microsoft.SqlServer.Management.Smo.Server") $instance
$bkdir = "C:\_DBbackups" #We define the folder path as a variable
$dbs = $s.Databases
foreach ($db in $dbs)
if($db.Name -ne "tempdb") #We don't want to backup the tempdb database
$dbname = $db.Name
$dt = get-date -format yyyyMMddHHmm #We use this to create a file name based on the timestamp
$dbBackup = new-object ("Microsoft.SqlServer.Management.Smo.Backup")
$dbBackup.Action = "Database"
$dbBackup.Database = $dbname
$dbBackup.Devices.AddDevice($bkdir + "\" + $dbname + "_db_" + $dt + ".bak", "File")
$dbBackup.SqlBackup($s) -
HT5622 Can Face Time be used to connect with more than one person at a time?
Can I connect with more than one person at a time when using Face Time?
You mean like a conference call? No, unfortunately.
-
More than one database driver has been used
Hi everyone, I just want to link 2 tables, one in Oracle and the second is in Access, is this possible? Please help, tahnks a lot.
I got this message:
"More than one database driver has been used in this report. If you want to change the database drivers use Database/Set Location.
Please make sure that no SQL Expression is added and no server-side group-by is performed"
This is the query generated:
SELECT "A"."Field_in_A"
FROM "OracleDB"."A" "A"
SELECT `B`.`Field_in_B`
FROM `AccessDB` `B`The above suggestions are good. You might also consider using a link table from MS Access to have the linking done right inside MS Access.
If you can store your access mdb file on the server where your Oracle database resides this will greatly reduce your network traffic. If the MS Access database must reside on a different machine it can still work but the gains won't be as great. Still, this is an efficient way to do this if you can.
To create a link table in MS Access choose, New, then 'Link Table'. In the Link dialog that appears you can choose ODBC. I recommend using the SQORA driver from Oracle that is installed with SQL Plus.
If you have to link in Crystal Reports instead you still can. However, all data from the Oracle table and Access table will be pulled to the client that hosts Crystal Reports and sorting will be done on the Crystal client.
You definitely have some good options though. -
Can I connect with more than one iTunes acct
Can I connect with more than one iTunes acct
Laxman25 wrote:
If its multiple apple id's on one computer you can't because you have to log out of one and login on another.
I've only got one ID so I can't test but Winston says you can be signed into iTunes with multiple AppleIDs (i.e authorise iTunes for more than one ID content) at the same time, and that even different account content will stream so long as Home Sharing ID in iTunes matches AppleTV Home Sharing ID.
AC
Maybe you are looking for
-
How can i change the Layout of the standard Discussion iVIew
Hello all, Most of my questions still remain unanswered.But this time i hope i will get some satisfactory reply. I want to create a Discussion iView(not Discussion group or Admin Discussion Group iViews) . However i am not getting the la
-
Hi all, I m using interactive ALV grid with 1 column editable with some default values, When i m clicking on SAVE button, only the values which are changed by the user in that column are coming in the internal table, & the default values are automati
-
APEX - BI publisher dynamic image not shown
Hi, I've developed a BI RTF report layout within my APEX application. I need to show external dynamic images stored into apex image files, but I have some problem. BI manul says I should include into the report layout a dummy image with the following
-
Is it safe to use ThreadLocal objects in a J2EE component?
I've heard that many J2EE containers implement some form of thread pooling. Depending on how this is implemented, the same session bean or servlet instance could run on a different thread each time a request is made, making ThreadLocal usage unsafe (
-
I have a re-furbished Mac Book 2011. It's version 10.8.5. Processor - 2.4 GHz Intel Core 2 Duo. Memory - 4 GB 1067 MHz DDR3. Startup disk - Mac HD. I want to do a complete re-install of the operating system. I have followed the instructions in the on