DB Link vs Direct Database Connection
Hi All,
We have two database, for the purpose of this example PROD and DEV, being a production and devlopment database respectively.
We have noticed developers logging into the PROD database, doing their query development. We have asked them to do their query developement
on the DEV database. We have created a DB Link in the DEV database to the PROD database to allow them to query up-to-date data.
My question is... What is the performance benefit of a direct connection into the PROD database querying data as opposed to a connection into the DEV
database querying data on PROD using the DB Link.
thanks
Melvyn
Hi..
We have noticed developers logging into the PROD database, doing their query development. We have asked them to do their query developementon the DEV database. We have created a DB Link in the DEV database to the PROD database to allow them to query up-to-date data.>
Thats very wrong.The dev team can do any thing on production and if somethings does wrong blames will be on you.SO don't provide any access to the dev team.Right now i can think of 2 options as you want to give the dev taem up-to-date data
1. Use oracle streams.The best replication method.Go for uni-directional oracle stream replication from prod. to dev.
2. If the dev team need to do select only on the prod. tables then create a new schema, give that schema only select privilege on main schema's table and then create the dblink from that user
HTH
Anand
Similar Messages
-
ADF BC and direct database call from ActionListener Method
Hi
I have an ADF BC application which generates a simple form . In the submit button I am calling a Java method which makes a direct database connection. The application hangs when the method does the executeUpdate() method
public void onSubmit(ActionEvent actionEvent) {
DBSequence prdSequenct=((DBSequence) resolveExpression("#{bindings.ProductId.inputValue}"));
int productId = new Integer(prdSequenct.toString()).intValue();
String productName = (String) resolveExpression("#{bindings.ProductName.inputValue}");
update(productName,productId);
public void update(String productName,int productId) {
String str ="update products set product_name=? where product_id =?";
Connection con=null;
PreparedStatement pstmt= null;
try {
con = new DatabaseConnection().getConnection();
pstmt= con.prepareStatement(str);
pstmt.setString(1, productName)
pstmt.setInt(2, productId)
pstmt.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
}finally {
try
pstmt.close();
con.close();
}catch(SQLException sqle) {
sqle.printStackTrace();
when I submit the form the update() method hangs at executeUpdate();
If I run the update() method from a standalone java its works fine.Can anybody tell what could be the issue ?
Thanks
Suneesh
Edited by: Suneesh Raman on Aug 18, 2010 10:14 AMI am using jDev Studio Edition Version 11.1.1.2.0 . Infact I need to call a PL/SQL api from the onSubmit method which I set in the action listener of submit button of the form.
My getConnection method is :
public Connection getConnection() throws SQLException {
DriverManager.registerDriver(new OracleDriver());
Connection con =
DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","rme_pbkr", "rme_pbkr");
OracleDataSource ods = new OracleDataSource();
ods.setUser("rme_pbkr");
ods.setPassword("rme_pbkr");
ods.setURL("jdbc:oracle:thin:@localhost:1521:XE");
System.out.println("::: con = :::"+con);
return ods.getConnection();
Does that mean we cannot make a db connection from the actionlistener implementation method ?
How to put the method in AM implementation class ? Just write a public void method there and call from onSubmit button actionlistener through some binding ?
Thanks
Suneesh -
MI Client & database connectivity
Hi,
I'm developing an MI based demo application and want to connect to database db2 on the mobile device. In the cilent APIs I could not find anything where I can specify the database or option for using serialization for that matter. Has anybody tried to connect with database? Please guide.
Regards,
Ravi Sharma
HCL Technologies
SAP Netweaver COEYou can't do it from the API.
MobileInfrastructure (former MobileEngine) is a <i>framework</i> used for <b>connecting to</b> and <b>extracting data from</b> R/3 backend. There are just two ways to do it - Generic Sync or Smart Sync.
If you want to do direct database connection, you have to use the Java Platform features, JDBC or what driver you have on the mobile device. Howsoever, this is little wrongly.
Just curious, what for mobile device you bear in mind? SAPDB and MobileEngine are not designed for PocketPC. )
Anyway, this is a funny problem, please share your experience about it, when you establish the connection.
Good luck,
Todor -
Set SSIS variable = database connection manager name
Is it possible to set a SSIS string to only the name of a database connection manager or even the connection string it uses ? I don't see an option for that in Evaluate as expression property of ssis variable.
This is what I mean -
SSIS Connection manager name = SQL_DBASE
SSIS String str_managerName = SSIS Connection manager name: Can you do this dynamically in SSIS ?I'm guessing what they really want to do is evaluate some indicator (some input from a user or an infrastructure setting) and then dynamically connect to any one of 10 (arbitrary example) database servers based on what they get as input. They
don't care about the connection manager per se. What seems reasonable is the that the Connection Manager might take a server variable but if they wanted to do things like that they would have bought Datastage.
You might try attacking this problem at the Control Level and then connect to the database you want based on a variable you set. I'm seeing that a Sequence Container can branch on the contents of a variable.
Or if the dba is your friend you might get the dba to add all your servers as linked servers to a central connection machine and then you might be able to do this by putting the ssis variable in a "Sql Command from a Variable" variable.
It might look something like this:
Server is designated in ssis var @[User::Machine]
then executing from a variable
"select top 100 * from " + @[User::Machine] + ".mydb.dbo.mytable"
Be careful as hades about levels of indirection and what quotes you want at what level. Evaluate Expression in ssis helps with this. The syntax I show works only with an ms sql connection server to a remote ms sql server. This is what a
dynamic connection to a linked server connection to Oracle would look like:
"select * from
openquery("+ @[User::Machine] + ",'select * from oradb.oratable where rownum < 100')"
When ever a thousand of your best friends are helping you connect to your database (using tools like linked servers as opposed to direct connections) it's probably best to use with only small specific updates or queries, large queries or large
updates would probably take a long time and or might not finish. But try it before you give up. We are actually doing fairly large Oracle queries (5-10 million rows) through ms sql linked server. -
I get the above error within CR XI Developer when I try to connect an ODBC link to a Visual FoxPro database (.DBC).
The full messsage is:
Database Connection Error: '42S02:[Microsoft][ODBC Visual FoxPro Driver] Not a table. [Database Vender code: 123]'
This is a headache and any assistance in solving this problem would be greatly appreciated.Hi Bob,
First you should go to this link: http://www.sdn.sap.com/irj/boc and download the trial version of CR XI R2 and use your XI keycode, then apply the patches which you can get to by clicking on the BusinessObjects tab above, then Downloads.
Direct link to the Trial version: http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx
Download SP5 and then test again. If it's still an issue we can at least escalate the problem. CR Xi is past it's supported life cycle meaning no patches will be released.
Have you tried using any other database connection methods to see if those work? May be an issue with the ODBC driver. Try downloading the latest MDAC from microsoft also.
Thank you
Don -
Updating a biar file - database connection
Hi,
I would like to know if there is a way of doing the following:
I have a biar file that was exported from a universe that I don't have access anymore. This original biar file doesn't have database connections set.
I am not able to connect directly to the machine I want to import the biar file using Designer, I can just use an alternative IP that is not the main one linked to machine's hostname (that is the Enterprise name). This alternative IP is the only one I have access to all ports, as you already know, I am not able to connect to it using Designer because it is not the CMS name.
I imported the biar file using command line.
Now I want to update database connection, how can I perform that? Is it there a way?
Thank you in advance,
A.Hi there,
the full path on the system where it is running must be provided.
The 'Update a Sequencing File' is good for development but storing the value in a file somewhere on your system can quickly become a problem. The option 'Update a Sequencing Table in Another Database' gives you the non-obtrusiveness of the file based approach but stores the value in a database table. It is a little bit more work to set up but likely worth it over time.
Thanks
Steve -
Ask help About Create Direct Database Request
Hi, all.
When I using the Create Direct Database Request, how can I specify a variable which can used to receive multiple input value?
My SQL like this:
select... from table t1 where t1.c1 in('@{v_c1}{001})
where, v_c1 is the variabe name, 001 is the defaut value of the variable.
But, it doesn' work.
If it's the systax error, then how can I correct it?
Thank you in advance.Hi katherine,
Your connection pool should look like this "DEV_BI"."Connection Pool"
Second thing is go to Administration/Manage privileages/Direct database privileage is there.
If you want to use variables into your SQL query follow this link
http://bintelligencegroup.wordpress.com/2010/08/26/how-to-use-the-presentation-variable-in-direct-database-request/
Hope it helps you.
By,
KK -
Hi All,
We were using Hyperion reports 7.x version, and recently we migrated it to new version 9.3.1
so, now my query is.... if user login to older version of reports 7.x using old version of
link, it should re-direct to new version of reports 9.3.1 link
is it possible to do in Hyperion if so can any one plz help me in this.
Vijay.....Hi Ryno,
Thx for ur replay.......
if I'm not wrong DNS connections are used for connection Database ..... but how is it related to link Re-Direction...
if it is possible, can you tell me te procedure or any doc related to this how to tht,.......here in our porjecct we don't have any network admin..
Thanks
Vijay.... -
Installation problem with NW'04 SR1: database connection failed
Hi all,
while installing NW '04 SR1 on Windows Server 2003 SP1 and MS SQL Server 2000 SP4 I ran into an error related to the database connection. While performing the step "Load Java Database content" SAPinst crashes with the message
com.sap.sql.log.OpenSQLException: Could not load class com.ddtek.jdbc.sqlserver.SQLServerDriver.
The connection to the SLQ Server with e.g. the Query Analyzer is OK. I had a problem with this installation setup before (have a look at the corresponding <a href="https://forums.sdn.sap.com/thread.jspa?threadID=338638&tstart=0">thread</a> ), the JDBC drivers where missing on the installation master but after copying them in the right direction the installation went on with no problem up to this point...
Has anybody an idea what could have happened here? Is this maybe a problem connected to the one I recently had
Below I attached the sapinst.log and jload.log with more detailed messages.
sapinst.log ###########
INFO 2007-03-12 22:06:24
Working directory changed to C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_~1\ONE_HOST.
INFO 2007-03-12 22:06:24
Output of D:\Java/bin/java.exe '-classpath' './sharedlib/antlr.jar;./sharedlib/exception.jar;./sharedlib/jddi.jar;./sharedlib/jload.jar;./sharedlib/logging.jar;./sharedlib/offlineconfiguration.jar;./sharedlib/opensqlsta.jar;./sharedlib/tc_sec_secstorefs.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\base.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\util.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\sqlserver.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\spy.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_jce_export.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_jsse.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_smime.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_ssl.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/w3c_http.jar' '-showversion' '-Xmx512m' 'com.sap.inst.jload.Jload' '-sec' 'WPT,jdbc/pool/WPT,D:\usr\sap\WPT\SYS\global/security/data/SecStore.properties,D:\usr\sap\WPT\SYS\global/security/data/SecStore.key' '-dataDir' 'S:/D51030724\J2EE_OSINDEP\J2EE-ENG/JDMP' '-job' 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/IMPORT.XML' '-log' 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.log' is written to the logfile C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_~1\ONE_HOST/jload.java.log.
WARNING 2007-03-12 22:06:26
Execution of the command "D:\Java/bin/java.exe '-classpath' './sharedlib/antlr.jar;./sharedlib/exception.jar;./sharedlib/jddi.jar;./sharedlib/jload.jar;./sharedlib/logging.jar;./sharedlib/offlineconfiguration.jar;./sharedlib/opensqlsta.jar;./sharedlib/tc_sec_secstorefs.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\base.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\util.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\sqlserver.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\spy.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_jce_export.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_jsse.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_smime.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_ssl.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/w3c_http.jar' '-showversion' '-Xmx512m' 'com.sap.inst.jload.Jload' '-sec' 'WPT,jdbc/pool/WPT,D:\usr\sap\WPT\SYS\global/security/data/SecStore.properties,D:\usr\sap\WPT\SYS\global/security/data/SecStore.key' '-dataDir' 'S:/D51030724\J2EE_OSINDEP\J2EE-ENG/JDMP' '-job' 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/IMPORT.XML' '-log' 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.log'" finished with return code 1. Output:
java version "1.4.2_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_13-b06)
Java HotSpot(TM) Client VM (build 1.4.2_13-b06, mixed mode)
12.03.2007 22:06:25 com.sap.inst.jload.Jload main
INFO: Jload -sec WPT,jdbc/pool/WPT,D:\usr\sap\WPT\SYS\global/security/data/SecStore.properties,D:\usr\sap\WPT\SYS\global/security/data/SecStore.key -dataDir S:/D51030724\J2EE_OSINDEP\J2EE-ENG/JDMP -job C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/IMPORT.XML -log C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.log
12.03.2007 22:06:26 com.sap.inst.jload.Jload main
SCHWERWIEGEND: couldn't connect to DB
com.sap.sql.log.OpenSQLException: Could not load class com.ddtek.jdbc.sqlserver.SQLServerDriver.
ERROR 2007-03-12 22:06:26
CJS-20065 Execution of JLoad tool 'D:\Java/bin/java.exe '-classpath' './sharedlib/antlr.jar;./sharedlib/exception.jar;./sharedlib/jddi.jar;./sharedlib/jload.jar;./sharedlib/logging.jar;./sharedlib/offlineconfiguration.jar;./sharedlib/opensqlsta.jar;./sharedlib/tc_sec_secstorefs.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\base.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\util.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\sqlserver.jar;D:\usr\sap/WPT/JC10/j2ee\jdbc\spy.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_jce_export.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_jsse.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_smime.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/iaik_ssl.jar;D:/usr/sap/WPT/SYS/global/security/lib/tools/w3c_http.jar' '-showversion' '-Xmx512m' 'com.sap.inst.jload.Jload' '-sec' 'WPT,jdbc/pool/WPT,D:\usr\sap\WPT\SYS\global/security/data/SecStore.properties,D:\usr\sap\WPT\SYS\global/security/data/SecStore.key' '-dataDir' 'S:/D51030724\J2EE_OSINDEP\J2EE-ENG/JDMP' '-job' 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/IMPORT.XML' '-log' 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.log'' aborts with returncode 1. Check 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.log' and 'C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.java.log' for more information.
jload.log ###########
12.03.07 22:06 com.sap.inst.jload.Jload main
INFO: Jload -sec WPT,jdbc/pool/WPT,D:\usr\sap\WPT\SYS\global/security/data/SecStore.properties,D:\usr\sap\WPT\SYS\global/security/data/SecStore.key -dataDir S:/D51030724\J2EE_OSINDEP\J2EE-ENG/JDMP -job C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/IMPORT.XML -log C:\PROGRA1\SAPINS1\NW04SR1\WEBAS_1\ONE_HOST/jload.log
12.03.07 22:06 com.sap.inst.jload.Jload main
SEVERE: couldn't connect to DB
com.sap.sql.log.OpenSQLException: Could not load class com.ddtek.jdbc.sqlserver.SQLServerDriver.
Best regards,
BerndHello Kairat,
Please follow the below mentioned guide to install it.
Check all the parameters to set and run pre requisite checker before starting installation.
Keep in mind that before starting any SAP installation you should always run prerequisite checker.
https://websmp205.sap-ag.de/instguides --> SAP Netweaver -->SAP Netweaver 7.0 -- > Installations --> EHP2
Regards,
Amit Barnawal -
New database connection failed with oepe
Hi everybody,
@http://docs.oracle.com/cd/E27086_02/help/oracle.eclipse.tools.common.doc/html/install.html#install_oepe
Oracle Enterprise Pack for Eclipse Installation Guide says:
"You can install OEPE using any of the following ways:
Download, and then unzip OEPE plugins directly into the Eclipse dropins folder and restart Eclipse."
This is what I have done,
then when I create a new database connection, and I press the button "test connection" i got a pop up saying "Ping failed" giving details:
java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.net.FactoryURLClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at oracle.eclipse.tools.database.connectivity.db.OracleJDBCConnection.createConn(OracleJDBCConnection.java:198)
at oracle.eclipse.tools.database.connectivity.db.OracleJDBCConnection.createConnection(OracleJDBCConnection.java:149)
at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:105)
at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:54)
at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.open(JDBCConnection.java:73)
at oracle.eclipse.tools.database.connectivity.db.OracleJDBCConnectionFactory.createConnection(OracleJDBCConnectionFactory.java:26)
at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:83)
at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:359)
at org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection(PingJob.java:76)
at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.java:59)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Did I miss something?The documentation is out of date. The unzip to dropins method is no longer supported. The OEPE zip you downloaded is actually an archived repository. You can follow the instruction for installing using Eclipse Update Manager and point to the downloaded zip instead of the online repository.
I will follow up to get the docs updated.
- Konstantin -
How to reuse a 9iAS Portal database connection in a BC4J application?
Hi,
I have a 9iAS Portal 9.0.2 application, and I want to call a BC4J/UIX application from the Portal application. Ideally I would like to reuse the database connection already established within Portal, because it has authenticated the user with the SSO, and has all of the Portal and VPD settings already in the environment. I don't want to ask the users to re-log in.
I have looked at the Portal Java PDK and cannot find anything appropriate - has anyone accomplished this, or is there another way of doing this?
Thanks,
SteveBC4J supports JAAS authentication.. look at the jazn stuff. When u deploy your application on 9ias one of the pages in the wizard asks what kind of authenticatoin you would like to use, you might be able to set something up there...
Also you an secure the URL in the httpd.conf file so that if a user directly attemps to access that application they are presented with the SSO log in screen. -
How can I use SQL TOOLKIT concurrently with Database Connectivity ?
I have installed LabVIEW 6.1 with the Database Connectivity Toolkit and the SQL Compatibility Toolkit (e.g. _SQL folder). I am trying to make the transition from the SQL Toolkit VIs to the Database Connectivity toolkits, but for compatability with existing systems I would like to be able to run the two sets of VIs concurrently (but not in the same app).
When I read into 6.1 a connection VI that I wrote with LabVIEW 6.0 and the SQL toolkit the connection reference type gets changed from a number to type connection (see attachments) . Does compatbility mean that my SQL toolkit VIs are converted to a form compatible with the new ADO ?
Can I use the SQL Toolkit VIs or the Database connectivit
y VIs in the same installation of 6.1 ?
Can I have the SQL Toolkit VIs appear on the functions pallette and function as they did when only the SQL toolkit was installed ?
Attachments:
CNNCT.vi 20 KB
CNNCT.vi 22 KBIn response to your #2 below:
Actually it is possible to have the old SQL Toolkit and new Database
connectivity in the same installation of LabVIEW. I have only tried it on
6i, but don't see why it wouldn't work on 6.1. The trick is not to install
the SQL toolkit compatabitily VI's. The old SQL toolkit uses the Intersolve
dll through ODBC while the new Database connectivity uses ADO so it is
possible to use both methods not only in the same LabVIEW install, but it
the same running application. It has been a while since I originally did
this, so I am posting only to mention that it is possible and not exactly
how to do it. If anyone is interested in more details just respond.
Brian
"Jeff B" wrote in message
news:[email protected]...
> First, direct answers to your direct questions:
>
> 1. Does compatbility mean that my SQL toolkit VIs are converted to a
> form compatible with the new ADO ?
>
> Yes
>
> 2. Can I use the SQL Toolkit VIs or the Database connectivity VIs in
> the same installation of 6.1 ?
>
> No
>
> 3. Can I have the SQL Toolkit VIs appear on the functions pallette
> and function as they did when only the SQL toolkit was installed ?
>
> No
>
>
> Now an elaboration:
>
> Having the old SQL Toolkit and the new Database Connectivity Toolset
> installed on the same version of LabVIEW on the same computer is not
> supported.
>
> Once you install the Database Connectivity Toolset, any VIs written
> with the SQL Toolkit will run, but with the ADO layer, as you
> suspected.
>
> Internally, the only way we can have both the SQL Toolkit and the
> Database Connectivity Toolset installed on the same computer for
> troubleshooting customer issues is to have them installed on different
> versions of LabVIEW. I, for example, have LabVIEW 5.1.2, 6.0.3, and
> 6.1 all installed on my computer, and I have the SQL Toolkit install
> on LabVIEW 5.1.2, and the Database Connectivity Toolset installed on
> LabVIEW 6.0.3. In this configuration I can still run SQL Toolkit VIs
> independent of the Database Connectivity Toolset if I open and run
> them in LabVIEW 5.1.2. -
Using database connection in a servlet and get errors after 8 hours
Hey,
I'm running a poker script using applet/servlets and it works great. But for some reason about about 8 hours that database layer stops working. At first I thought it was the connections to mySQL that were timing out (because im using connection pooling) but after turning pooling off (I now create the connection each time) I'm still seeing that same error (I can create a connection but when I do an action ex. like a select statment I get an error). What i'm wondering could it be that the driver I load with Class.forName() some how unloads it's self after x amount of time not being used? Not sure if that is it but if anyone could give me some insight that would be great. The Error i recieve is below:
INFO: Database Event:DatabaseController: Error executing database query.
ERROR: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: Software caused connection abort: recv failed
STACKTRACE:
java.net.SocketException: Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:104)
at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:144)
at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:172)
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1839)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2288)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2784)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1531)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1622)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2370)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2297)
at com.mysql.jdbc.Statement.executeQuery(Statement.java:1183)
at com.softnet.database.DatabaseController.executeDatabaseQuery(DatabaseController.java:190)
at com.softnet.games.GameServer.validateUser(GameServer.java:438)
at com.softnet.games.GameServer.handleData(GameServer.java:113)
at com.softnet.network.HttpConnectionThread.run(HttpServletListener.java:191)
** END NESTED EXCEPTION **
I know the query is good because it works all other times just not after about 8 hours.
--Z3r0CooLHey,
Thanks for the responces. For the connection pooling I would open 5 connections and keep them open. So i though maybe after 8 hours after not being used they would timeout. Thats why i turned off conection pooling and create a new connection each time. Anyways i'll post the code below incase i made a mistake somewhere.
package com.softnet.database;
/************************ DatabaseControler **************************/
import java.sql.*;
import java.util.*;
import com.softnet.database.DatabaseConnectionPool;
import com.softnet.database.DatabaseSettings;
public class DatabaseController
implements DatabaseListener
//Used to make sure the database driver is loaded
private boolean databaseDriverState = false;
//Used to store a database connection
private Connection databaseConnection = null;
//If to user connection pooling or not
private boolean useConnectionPooling = false;
//Used to hold the connection pool varible
private DatabaseConnectionPool connectionPool = null;
//Used to store database settings
private DatabaseSettings databaseSettings;
//Used to hold the DatabaseController listeners
private List databaseControllerListeners = new ArrayList();
//min number of connections for connection pool
private int minNumberOfConnections = 1;
//max number of connections for connection pool -1 is unlimited
private int maxNumberOfConnections = -1;
//DatabaseController Constructors
public DatabaseController(DatabaseSettings databaseSettings)
this.databaseSettings = databaseSettings;
databaseDriverState = loadDatabaseDriver(databaseSettings.getDatabaseDriver());
public DatabaseController(DatabaseSettings databaseSettings, boolean useConnectionPooling, int minNumberOfConnections, int maxNumberOfConnections)
this.databaseSettings = databaseSettings;
this.useConnectionPooling = useConnectionPooling;
this.minNumberOfConnections = minNumberOfConnections;
this.maxNumberOfConnections = maxNumberOfConnections;
if(useConnectionPooling == true)
connectionPool = new DatabaseConnectionPool(databaseSettings, minNumberOfConnections, maxNumberOfConnections);
connectionPool.addDatabaseListener(this);
else
databaseDriverState = loadDatabaseDriver(databaseSettings.getDatabaseDriver());
public DatabaseController() {}
//Database Settings Get/Set
public DatabaseSettings getDatabaseSettings()
return databaseSettings;
public void setDatabaseSettings(DatabaseSettings databaseSettings)
this.databaseSettings = databaseSettings;
//Connection Pooling Get/Set
public boolean getConnectionPooling()
return useConnectionPooling;
public void setConnectionPooling(boolean useConnectionPooling, int minNumberOfConnections, int maxNumberOfConnections)
this.useConnectionPooling = useConnectionPooling;
this.minNumberOfConnections = minNumberOfConnections;
this.maxNumberOfConnections = maxNumberOfConnections;
if(useConnectionPooling == true)
if(connectionPool == null)
connectionPool = new DatabaseConnectionPool(databaseSettings, minNumberOfConnections, maxNumberOfConnections);
connectionPool.addDatabaseListener(this);
else
if(connectionPool != null)
connectionPool.destroyConnections();
connectionPool.removeDatabaseListener(this);
connectionPool = null;
//Return if there connected
public boolean isConnected()
boolean isConnected;
if(databaseConnection != null)
isConnected = true;
else
isConnected = false;
return isConnected;
//Used to connect to database or get a connection for the connection pool
public void connect()
if(databaseDriverState == false)
databaseDriverState = loadDatabaseDriver(databaseSettings.getDatabaseDriver());
//If we dont have a current connection, make one
if(databaseConnection == null && databaseDriverState == true)
if(useConnectionPooling == false)
try
databaseConnection = DriverManager.getConnection(databaseSettings.getDatabaseURL(), databaseSettings.getUserName(), databaseSettings.getUserPassword());
catch (SQLException sqle)
//Raise event
raiseDatabaseEvent("DatabaseController: Error connecting to database. \nERROR: " + sqle.getMessage());
databaseConnection = null;
else
databaseConnection = connectionPool.getConnection();
//Used to disconnect from the database or give back the connection to the connection pool
public void disconnect()
if(databaseConnection != null)
if(useConnectionPooling == false)
try
//Close DB Connection
databaseConnection.close();
catch(SQLException ignore) {}
finally
databaseConnection = null;
else
connectionPool.returnConnection(databaseConnection);
databaseConnection = null;
public ResultSet executeDatabaseQuery(String sSQL)
ResultSet databaseResult = null;
if(databaseConnection != null)
try
Statement databaseStatement = databaseConnection.createStatement();
databaseResult = databaseStatement.executeQuery(sSQL);
catch(SQLException sqle)
//Raise event
raiseDatabaseEvent("DatabaseController: Error executing database query.\nSQL: " + sSQL + "\nERROR: " + sqle.getMessage());
return databaseResult;
public int executeDatabaseUpdate(String sSQL)
int rowsAffected = -1;
if(databaseConnection != null)
try
Statement databaseStatement = databaseConnection.createStatement();
rowsAffected = databaseStatement.executeUpdate(sSQL);
catch(SQLException sqle)
//Raise event
raiseDatabaseEvent("DatabaseController: Error executing database update.\nSQL: " + sSQL + "\nERROR: " + sqle.getMessage());
return rowsAffected;
//Used to load the Database Driver
private boolean loadDatabaseDriver(String databaseDriver)
boolean driverLoaded;
if(databaseDriver.equals("") == false)
try
//Load Database Driver
Class.forName(databaseDriver).newInstance();
driverLoaded = true;
catch (Exception e)
//Raise event
raiseDatabaseEvent("DatabaseController: Error loading database driver. \nERROR: " + e.getMessage());
driverLoaded = false;
else
driverLoaded = false;
return driverLoaded;
//Wrap the DatabaseConnectionPool Error to the DatabaseController
public void databaseEventOccurred(DatabaseEvent de)
raiseDatabaseEvent(de.getErrorMessage());
//Event Handling Code
//Used to add database listeners (Its sync'd so you can change the listeners when firing an event)
public synchronized void addDatabaseListener(DatabaseListener databaseControllerListener)
databaseControllerListeners.add(databaseControllerListener);
//Used to remove a listener from the list (Its sync'd so you can change the listeners when firing an event)
public synchronized void removeDatabaseListener(DatabaseListener databaseControllerListener)
databaseControllerListeners.remove(databaseControllerListener);
//Used to send the raise event to the listeners
private synchronized void raiseDatabaseEvent(String databaseError)
DatabaseEvent databaseEvent = new DatabaseEvent(this, databaseError);
Iterator listeners = databaseControllerListeners.iterator();
while(listeners.hasNext())
DatabaseListener listener = (DatabaseListener) listeners.next();
listener.databaseEventOccurred(databaseEvent);
/********************* DatabaseConnectionPool **************/
package com.softnet.database;
import java.io.*;
import java.sql.*;
import java.util.*;
import com.softnet.database.*;
import com.softnet.database.DatabaseSettings;
public class DatabaseConnectionPool
//min number of connections
private int minNumberOfConnections = 1;
//max number of connections -1 is unlimited
private int maxNumberOfConnections = -1;
//Store the connections
protected Hashtable databaseConnections = null;
//Database Info
protected DatabaseSettings databaseSettings;
//to hold Driver state
private boolean databaseDriverState = false;
//To hold connection checker
private DatabaseConnectionCheck connectionChecker = null;
//Used to hold the DatabaseConnectionPool listeners
private List databaseConnectionPoolListeners = new ArrayList();
public DatabaseConnectionPool(DatabaseSettings databaseSettings, int minNumberOfConnections, int maxNumberOfConnections)
this.databaseSettings = databaseSettings;
this.minNumberOfConnections = minNumberOfConnections;
this.maxNumberOfConnections = maxNumberOfConnections;
//Load Driver
databaseDriverState = loadDatabaseDriver(databaseSettings.getDatabaseDriver());
//Create connection
createConnections();
public DatabaseConnectionPool(int minNumberOfConnections, int maxNumberOfConnections)
this.minNumberOfConnections = minNumberOfConnections;
this.maxNumberOfConnections = maxNumberOfConnections;
//Database Settings Get/Set
public DatabaseSettings getDatabaseSettings()
return databaseSettings;
public void setDatabaseSettings(DatabaseSettings databaseSettings)
this.databaseSettings = databaseSettings;
//Driver State Get
public boolean getDatabaseDriverState()
return databaseDriverState;
public void createConnections()
if(databaseDriverState == false)
databaseDriverState = loadDatabaseDriver(databaseSettings.getDatabaseDriver());
//Create all connections and load the minimum in the Hashtable
if(databaseConnections == null)
if(databaseDriverState == true && minNumberOfConnections != 0)
databaseConnections = new Hashtable();
for(int i = 0; i < minNumberOfConnections; i++)
try
databaseConnections.put(DriverManager.getConnection(databaseSettings.getDatabaseURL(), databaseSettings.getUserName(), databaseSettings.getUserPassword()), Boolean.FALSE);
catch(SQLException sqle)
//Problem break loop and destroy any connections
destroyConnections();
//Raise event
raiseDatabaseEvent("DatabaseConnectionPool: Error creating database connections. \nERROR: " + sqle.getMessage());
break;
//If no connection check exists create one
if(connectionChecker == null)
connectionChecker = new DatabaseConnectionCheck(this);
connectionChecker.start();
public Connection getConnection()
Connection connection = null;
boolean errorWithConnection = false;
Enumeration connections = databaseConnections.keys();
synchronized (databaseConnections)
while(connections.hasMoreElements())
errorWithConnection = false;
connection = (Connection) connections.nextElement();
Boolean state = (Boolean) databaseConnections.get(connection);
//If connection is not used, use it.
if(state == Boolean.FALSE)
try
connection.setAutoCommit(true);
catch(SQLException e)
//Problem with connection remove connection and replace it
databaseConnections.remove(connection);
try
connection = DriverManager.getConnection(databaseSettings.getDatabaseURL(), databaseSettings.getUserName(), databaseSettings.getUserPassword());
catch(SQLException sqle)
errorWithConnection = true;
if(errorWithConnection == false)
// Update the Hashtable to show this one's taken
databaseConnections.put(connection, Boolean.TRUE);
// Return the connection
return connection;
//All connections being used check to max to see if we can make a new one
if(maxNumberOfConnections == -1 || maxNumberOfConnections > databaseConnections.size())
try
connection = DriverManager.getConnection(databaseSettings.getDatabaseURL(), databaseSettings.getUserName(), databaseSettings.getUserPassword());
catch(SQLException sqle)
errorWithConnection = true;
if(errorWithConnection == false)
databaseConnections.put(connection, Boolean.TRUE);
return connection;
//If not connections free and max connections reached wait for a free connection
return getConnection();
public void returnConnection(Connection connection)
boolean errorWithConnection = false;
//Make sure connection still works
try
connection.setAutoCommit(true);
catch(SQLException e)
//Problem with connection remove connection and replace it
databaseConnections.remove(connection);
try
connection = DriverManager.getConnection(databaseSettings.getDatabaseURL(), databaseSettings.getUserName(), databaseSettings.getUserPassword());
catch(SQLException sqle)
errorWithConnection = true;
if(errorWithConnection == false)
databaseConnections.put(connection, Boolean.FALSE);
public void destroyConnections()
Connection connection = null;
if(databaseConnections != null)
//Close all connections
Enumeration connections = databaseConnections.keys();
while (connections.hasMoreElements())
connection = (Connection) connections.nextElement();
try
connection.close();
catch(SQLException ignore) {}
//Free up hashtable
databaseConnections = null;
private boolean loadDatabaseDriver(String databaseDriver)
boolean driverLoaded;
if(databaseDriver.equals("") == false)
try
//Load Database Driver
Class.forName(databaseDriver);
driverLoaded = true;
catch (ClassNotFoundException cnfe)
//Raise event
raiseDatabaseEvent("DatabaseController: Error loading database driver. \nERROR: " + cnfe.getMessage());
driverLoaded = false;
else
driverLoaded = false;
return driverLoaded;
//Event Handling Code
//Used to add database listeners (Its sync'd so you can change the listeners when firing an event)
public synchronized void addDatabaseListener(DatabaseListener databaseConnectionPoolListener)
databaseConnectionPoolListeners.add(databaseConnectionPoolListener);
//Used to remove a listener from the list (Its sync'd so you can change the listeners when firing an event)
public synchronized void removeDatabaseListener(DatabaseListener databaseConnectionPoolListener)
databaseConnectionPoolListeners.remove(databaseConnectionPoolListener);
//Used to send the raise event to the listeners
private synchronized void raiseDatabaseEvent(String databaseError)
DatabaseEvent databaseEvent = new DatabaseEvent(this, databaseError);
Iterator listeners = databaseConnectionPoolListeners.iterator();
while(listeners.hasNext())
DatabaseListener listener = (DatabaseListener) listeners.next();
listener.databaseEventOccurred(databaseEvent);
class DatabaseConnectionCheck extends Thread
private DatabaseConnectionPool connectionPool;
DatabaseConnectionCheck(DatabaseConnectionPool connectionPool)
this.connectionPool = connectionPool;
public void run()
try
while(true)
//check threads every 30 seconds
this.sleep(300000);
if(connectionPool.databaseConnections != null)
Connection connection = null;
Enumeration connections = connectionPool.databaseConnections.keys();
synchronized (connectionPool.databaseConnections)
while(connections.hasMoreElements())
connection = (Connection) connections.nextElement();
Boolean state = (Boolean) connectionPool.databaseConnections.get(connection);
//If connection is not used, use it.
if(state == Boolean.FALSE)
try
connection.setAutoCommit(true);
catch(SQLException e)
//Problem with connection remove connection and replace it
connectionPool.databaseConnections.remove(connection);
try
connection = DriverManager.getConnection(connectionPool.databaseSettings.getDatabaseURL(), connectionPool.databaseSettings.getUserName(), connectionPool.databaseSettings.getUserPassword());
catch(SQLException sqle)
connection = null;
// Update the Hashtable with new connection if its not null
if(connection != null)
connectionPool.databaseConnections.put(connection, Boolean.FALSE);
catch(InterruptedException ignored) {}
Basicly the why it works is the connection pool hold the database connections. When the user needs a connection they use the database controller to request a connection (By create a instance and called the connect() method) and the connection is either created or grabed from the connection pool. After the user is done with the connection they call the disconnect() method which closes the connection or returns it to the connection pool.
--Z3r0CooL -
Error While creating new database connection from HFM workspace
Hi,
We have recently installed HFM and was trying to create database connection from database connection manager in HFM workspace.
I am getting below error:
"Error connecting to database connection : no HssJNIDriver950 in java.library.path" initially and later
"Error connecting to database connection : com/hyperion/ap/adm/HssConn".
Any information in this direction would helpful.
Thanks,
Bhargav
Edited by: bhargavr on Jan 24, 2011 6:55 PMHi bhargavr,
We came accross the same issue. Try the following solution below for this 'KNOWN ISSUE' and let me know how you get on. Drop me a note if you have any questions regarding this post.
Error: *"Error connecting to database connection: com/hyperion/ap/adm/HssConn" While Creating a Financial Management Database Connection* [ID 1102697.1]
Modified 04-JAN-2011 Type PROBLEM Status PUBLISHED
Applies to:
Hyperion BI+ - Version: 11.1.2.0.00 and later [Release: 11.1 and later ]
Microsoft Windows x64 (64-bit)
Symptoms:
You are running the Financial Reporting Web Server on a 64-bit server.
When you try to create a new Financial Management (HFM) database connection using the Database Connection Manager in Workspace you receive the following message:
“Error connecting to database connection <connection_name>: com/hyperion/ap/adm/HssConn”
You can create a database connection in Financial Reporting Studio. When you refresh a report with a Financial Management database connection, you receive one of the following messages:
“1001: Error connecting to database connection <DATABASE_CONNECTION_NAME>: com/hyperion/ap/adm/HssConn”
or
“1001: Error connecting to database connection <DATABASE_CONNECTION_NAME>: no HssJNIDriver950 in java.library.path”
Cause:
The issue is documented in unpublished bug 9537050, and in Known Issues in the 11.1.2 Reporting and Analysis Readme. Cross-reference unpublished bug 9707353.
Solution:
In the Windows registry, take the following steps:
Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\HyperionSolutions\FinancialReporting0\HyS9FRReports.
For each of the following entries, prefix the contents with text in the blue box: Env2, JVMOption13, and JVMOption17 (note that the JVMOption numbers might be slightly different in your environment).
C:\Oracle\Middleware\EPMSystem11R1\common\ADM\11.1.2.0\bin-64
If your EPM_ORACLE_HOME is not located at C:\Oracle\Middleware\EPMSystem11R1, replace that location with your location.
Restart the server.
G'Luck,
-David -
Error during database connection to the database : MS SQL Server 2008 R2
Hi All,
I am working with ABAP Proxy to Rec JDBC( Integrating XI with MS SQL Server 2008 R2). I am using SAP PI 7.0
I am getting error in RWB at communication channel monitoring :
Error during database connection to the database URL 'jdbc:microsoft:sqlserver://10.1.92.111:1433;database=XONTUSERVENTURA_ORG_TEST' using the JDBC driver 'com.microsoft.jdbc.sqlserver.SQLServerDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:microsoft:sqlserver://10.1.92.111:1433;database=XONTUSERVENTURA_ORG_TEST': SAPClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver'
I have given Connection details at Rec JDBC Communication channel as :
JDBC Driver as : com.microsoft.jdbc.sqlserver.SQLServerDriver
Connection : jdbc:sqlserver://10.1.92.111:1433;database=XONTUSERVENTURA_ORG_TEST.
Please help me in this regard. I really appreciate your valuable information and time.
Thanks and Regards,
Ayub.
Edited by: Ayubsajjid on Feb 15, 2012 8:49 AMHi All,
Thanks for all your valuable inputs on my question...
As per all your inputs, we have to install/Deploy the below required jar files in the aii_af_jmsproviderlib.sda file
ojdbc14.jar
msbase.jar
mssqlserver.jar
msutil.jar
Can you please tell me from where we will exact this .jar file, bcoz we have search lotzz but we helpless.
We install from this link http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=21599--> we download sqljdbc_3.0.1301.101_enu file >sqljdbc_3.0>enu-->in that I find sqljdbc.jar and sqljdbc4.jar files only . I cant above said .jar files.
Please help me.
Regards,
Ayub.
Maybe you are looking for
-
Unable to log in to the FileVault user account
I was unable to log in to the FileVault user account at this time because an error occurred. Q.1: What is FileVault user account? I can't reset a new password and to unlock FileVault even my master password is correct. Q.2: What can I do to solve thi
-
MSI GE70 Apache Pro 0-61 msata SSD
Hello guyz, I have recently ordered the above mentioned MSI laptop. As it does not come with an ssd. So i thought of adding one to it. After searching google i found that an msata ssd can be added to this model. I wanted to confirm here on the offici
-
Managed Metadata Navigation not showing to users
I created a Managed Metadata service and created group, term-set and terms I gave full access to application pool service account. read access to all the users via AD Security Group. I set up navigation to use Managed Navigation (Managed Metadata Ser
-
How to import AVI files created in Adobe Premier Elements 2?
I have captured video in Adobe Premier Elements 2 on my PC from my Canon Optura camcorder. I have a few hundred small .avi files that I need a friend to import into his Final Cut Pro so they can be edited along with other footage that he has created.
-
How to make Department field in cost centre master data a required field?
Dear Experts, I want to make the Department field in the cost center master data as required field.....how do i do it? regards Suresh