Using two MySQL databases at once
I have a situation where one PHP page needs to access two
MySQL databases
for different functions (it's in integration thing). I don't
think I can
combine the databases because two different programs are set
up and using
them separately. Is there a way to do this without PHP
getting as confused
as it's getting? Obviously I'm no MySQL and PHP expert.....
Mad Dog
David Powers wrote:
> Mad Dog wrote:
>> That's the problem, both of these are programs that
automatically
>> set up their own MySQL databases and make the
connections (Wordpress
>> and EasyPHPCalendar), so it's not so easy to control
the
>> connections. Each works fine, but if I call the
calendar from within
>> Wordpress, it doesn't know to switch to another
connection and gets
>> all confused.
>
> It sounds as though one or both of those applications
has been badly
> set up (although not necessarily by you - it's more
likely the way it
> has been designed).
>
> Most programs, including Dreamweaver, use the original
MySQL extension
> within PHP to connect to MySQL. Specifying which
connection to use is
> optional with the original MySQL extension; if no
connection is
> specified, PHP uses whichever was opened last. To use
two separate
> connections, the correct connection must be specified.
Dreamweaver
> does this automatically. You need to look at the PHP
code in
> WordPress and EasyPHPCalender to see if either of them
specifies the
> connection. The easy way to tell is by looking at any
line containing
> mysql_query(). If it contains two arguments, the
connection is being
> properly specified. If it contains just one, that's the
program
> that's causing the problem.
I think I've got it. There might be other tweaks needed, but
I moved the
EasyPHPCalendar table into the same database as the Wordpress
table. With
luck (I'll know tomorrow when I mess with it) that should cut
the confusion
factor!
Thanks,
MD
Similar Messages
-
Can I use two different database with DBSystemLoginModule?
Finally I can login with Database user id by DBSystemLoginModule on Embedded oc4j server.
But I confused between [b]jazn-data.xml and system-jazn-data.xml.
Which xml do I have to edit for jdbcUrl and jdbcDriver?
Now I would like to use two different database(such as only sid is different).
In this case I want to show specific database name as realm name.
What should I do?
When I use DBSystemLoginModule, I edit JdbcUrl in system-jazn-data.xml.
So can I pass the parameter for sid programmatically?
And also I tried to run my application with other database with DBSystemLoginModule on Embedded oc4j server.
I changed few things(jdbcUrl at system-jazn-data.xml,jazn-data.xml in embedded-oc4j-server/config and database connection for BusinessComponents at Project Properties of Model/ViewController.
But I got some error.
Did I miss something?
----< my error messgae >------
500 Internal Server Error
JBO-30003: The application pool (customer.model.datamodel.CMAppModuleLocal) failed to checkout an application module due to the following exception:oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.NullPointerException, msg=null at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2002) Message was edited by:
Message was edited by:
sdcsdcI think I understand now, you are modifing the custom login modules configuration within the system-jazn-data.xml file. This is a bit dangerous! Didn't you register the login module in your orion-application.xml? For example, this is the way I do it:
<web-module id="customProv-web" path="customProv-web.war" />
<persistence path="persistence" />
<!--data-sources path="./data-sources.xml"/-->
<security-role-mapping name="sr_developer">
<group name="developers" />
</security-role-mapping>
<security-role-mapping name="sr_manager">
<group name="managers" />
</security-role-mapping>
<jazn provider="XML">
<property name="custom.loginmodule.provider" value="true"/>
<property name="role.mapping.dynamic" value="true"/>
<property name="role.compare.ignorecase" value="true"/>
</jazn>
<!-- Configuring a Login Module in an Application EAR file. -->
<jazn-loginconfig>
<application>
<name>customProv</name>
<login-modules>
<login-module>
<class>oracle.security.jazn.login.module.db.DBTableOraDataSourceLoginModule</class>
<control-flag>required</control-flag>
<options>
<option>
<name>data_source_name</name>
<value>jdbc/OracleDS2</value>
</option>
<option>
<name>roles_fk_column</name>
<value>userName</value>
</option>
<option>
<name>table</name>
<value>userinfo</value>
</option>
<option>
<name>groupMembershipTableName</name>
<value>groupinfo</value>
</option>
<option>
<name>groupMembershipGroupFieldName</name>
<value>role</value>
</option>
<option>
<name>usernameField</name>
<value>userName</value>
</option>
<option>
<name>user_pk_column</name>
<value>username</value>
</option>
<option>
<name>passwordField</name>
<value>passWord</value>
</option>
</options>
</login-module>
</login-modules>
</application>
</jazn-loginconfig>
<log>
<file path="application.log" />
</log>
<namespace-access>
<read-access>
<namespace-resource root="">
<security-role-mapping name="<jndi-user-role>">
<group name="administrators" />
</security-role-mapping>
</namespace-resource>
</read-access>
<write-access>
<namespace-resource root="">
<security-role-mapping name="<jndi-user-role>">
<group name="administrators" />
</security-role-mapping>
</namespace-resource>
</write-access>
</namespace-access>
</orion-application> -
How to use non-MySQL database with DW and PHP...???
I need to connect to a data-source that is not MySQL from
with my PHP scripts. The only option I get under the Databases tab
in the Application panel is MySQL Connection. What about just
standard ODBC connections? Will DW not handle those for me? Do I
have to do all of that by hand??
Any information would be greatly appreciated. Thanks!"Angell EYE" <[email protected]> wrote in
message
news:fc4eaj$fmn$[email protected]..
>I need to connect to a data-source that is not MySQL from
with my PHP
>scripts.
> The only option I get under the Databases tab in the
Application panel is
> MySQL
> Connection. What about just standard ODBC connections?
Will DW not
> handle
> those for me? Do I have to do all of that by hand??
>
> Any information would be greatly appreciated. Thanks!
There once existed an opensource servermodel called phakt
that used the
ADODB database abstraction library,
the company that created and supported it was bought by Adobe
and
subsequently the project was cancelled.
A group of people (including me) started a community
initiative@
http://openphakt.sourceforge.net
to continue distribution and development of
phakt, but unfortunately I don't have access to Dreamweaver
CS3 due to lack
of funding.
Phakt will almost certainly NOT run on CS3 in it's current
state, but is
should support previous versions.
Joris -
How to use two different database Drivers in one application ????
I want to select datas in a result set of a query on a ms access database table and insert these into a mysql table of a mysql database in one application.
Now my problem is that only on database driver is acceptet in the same application even it`s instanciatet in a completely different class !!!
Here's the structure of my program:
class one:
String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
database += filename.trim() + ";DriverID=22;READONLY=false}";
java.sql.Driver driver0=new sun.jdbc.odbc.JdbcOdbcDriver();
DriverManager.registerDriver(driver0);
DriverManager.getDriver(database);
con2=DriverManager.getConnection(database,"","");
DatabaseMetaData dmd2;
dmd2=con2.getMetaData();
stmt2=con2.createStatement();
rs2=("SELECT (.........
until here all values can be selected correctly from ms access
class2.get_gas_id(fla_gas);
Now I want to insert these values into mysql.
By despair i created a second class with another jdbc-method:
class2:
public class gas_select{
public static int fla_gas_id;
public static void get_gas_id(String fla_gas)
java.sql.Statement stmt3;
java.sql.Connection con3;
java.sql.ResultSet rs3;
FileWriter fout1;
try
java.sql.Driver driver1=new org.gjt.mm.mysql.Driver();
DriverManager.registerDriver(driver1);
DriverManager.getDriver(config.db_rge_stoffe); ==>
config.rge_stoffe="jdbc:mysql://192.168.10.101:3306/rge_stoffe?user=<user>";
con3=DriverManager.getConnection(config.db_rge_stoffe);
java.sql.DatabaseMetaData dmd3;
dmd3=con3.getMetaData();
stmt3=con3.createStatement();
rs3=stmt3.executeQuery("SELECT (Nr) from tblgaseliste where Gasart like "+"\'"+fla_gas+"\'");
while(rs3.next())
fla_gas_id=rs3.getInt("Nr");
fout1.write(fla_gas_id);
stmt3.close();
con3.close();
fout1.close();
There's no result and no error message. Idon't know what to do !
Has anyone an idea ???
Edited by: goberger on Mar 27, 2008 3:35 PMHi!
If I understand your problem correctly, you can create connections to as many databases as you want in one class. In one of my programs I have connection to 3 separate databases, but here is an example:
Connection mysql_con = DriverManager.getConnection("jdbc:mysql://localhost:3306/dbmysql", "root", "12345");
Connection pg_con = DriverManager.getConnection("jdbc:postgresql://127.0.0.1:5433/dbpgsql", "postgres", "12345");Then from mysql_con and pg_con create PreparedStatement or Statement then load selections into ResultSet and then use getString() to get a basic String type result that you want and so update table from each database.
HTH
Victor.
BTW Here I use port 5433 for PostgreSQL connection because I SSH tunnel it from 5432 to 5433
Edited by: vic_sk on Mar 27, 2008 4:23 PM -
Using iWeb to make a website that uses a mysql database
Hi there
i am trying to help out my friend. He has built a mysql database on his webserver, however he needs to create a page which allows him to filter and search through what is on the database.
at the moment he is trying to code the page himself but i am sure there is a program that he can use to create the user interface and link it to the mysql database, can iWEb do this?
or does anyone know of another website program that enables you to do this?He will need to hand code it.
If you're intelligent enough to create a MySQL database in the first place, then you're clever enough to code the interface I highly doubt that there is any software that will help with only one part of it. -
Howto use two Authentification Schemes at once?
I'm still new to certain Apex aspects. At the moment I'm struggeling with the implementation of different Authentification algorithms.
I currently have a small APEX application that does the user authentification by LDAP (AD). However I want to add a few special users (GUEST, ADMIN, etc.) that are not in the active directory/LDAP but that exists as "normal" APEX user.
Question is: How can I use two different Authentification schemas for one application at the same time?
So that a user with a valid windows login is authenficated by its windows username/pwd
and a guest user who is not in the LDAP but is configured as APEX user will be authorized too.
The order of the different authorization schemas might also play a certain role here.
Any hints/links how to achieve this are very welcome.
Edited by: Sven W. on Nov 6, 2009 12:49 PM: Changed Autorization to AuthentificationTogether with a fellow collegue we created a database function that checks for the application, fetches the current authentication schema and uses the LDAP information from there. It is not perfect, but serves our purpose well. Feel free to reuse or comment on it.
create or replace package body SYN_UTIL
as
FUNCTION apex_ldap_authenticate (
p_username in varchar2,
p_password in varchar2
) return boolean as
v_login_result boolean := false;
v_ldap raw(32);
v_ldapres binary_integer;
v_un varchar2(100);
v_ldap_port varchar2(100);
v_ldap_host varchar2(100);
v_app_id integer;
BEGIN
-- test for empty variables
if p_username is null then
raise_application_error(-20001, 'Please insert Username and Password!');
end if;
if p_password is null then
raise_application_error(-20001, 'Please insert Username and Password!');
end if;
-- check for APEX-workspace-users
if not v_login_result then
if APEX_UTIL.IS_LOGIN_PASSWORD_VALID(
P_USERNAME => p_username,
P_PASSWORD => p_password
) then v_login_result := true;
end if;
end if;
if not v_login_result then
-- LDAP-Login
dbms_ldap.use_exception :=true;
-- get application-id
v_app_id := NV('APP_ID');
-- get LDAP information from views
select auth.ldap_host, auth.ldap_port, auth.ldap_dn_string
into v_ldap_host,v_ldap_port,v_un
from APEX_APPLICATIONS ap
join apex_application_auth auth on ap.application_id = auth.application_id
and ap.AUTHENTICATION_SCHEME = auth.AUTHENTICATION_SCHEME_NAME -- current authentication
where ap.application_id = v_app_id;
-- LDAP init
v_ldap := DBMS_LDAP.INIT(
HOSTNAME => v_ldap_host
,PORTNUM => v_ldap_port
-- extract domain from v_un and add p_username
v_un := replace(v_un,'%LDAP_USER%',p_username);
-- connect to LDAP-server
begin
v_ldapres := DBMS_LDAP.SIMPLE_BIND_S(
LD => v_ldap,
DN => v_un,
PASSWD => p_password
exception
-- only handle defined exceptions
when others then
v_login_result := false;
end;
-- disconnect from LDAP
v_ldapres := DBMS_LDAP.UNBIND_S(LD => v_ldap);
v_login_result := true;
end if; -- not v_login_result
return v_login_result;
END;
end SYN_UTIL;THis function is put where usually the default LDAP logic is used.
In the field Authentication Function instead of -LDAP- this function is called.
return syn_util.apex_ldap_authenticate; A minor point still is that any entry in "LDAP Username Edit Function" is not considered.
But since we don't use that currenty we didn't made the effort to integrate it.
Edited by: Sven W. on Nov 10, 2009 3:20 PM -
How can I use a mySQL database schema with numeric auto increment primary key instead of GUID?
Hello!
I'm using the TestStand "MySQL Insert (NI)" database schema with GUID as primary key. So everything works fine.
But I prever using numeric values as primary key, because the database is in conjunction with another database which uses numeric values as primary key.
Is this possible?
Has anyone an idea how I can modify the "Generic Recordset (NI)" for use with MySQL?
Thanks!
Configuration:
Microsoft Windows XP
TestStand 3.1
MySQL 4.1.12a
MySQL ODBC 3.51 Driver
BrosigAdam -
The TestStand Database Logging feature does not allow you to run a separate SQL command after executing the command for a statement(table), so I do not think that you can use an auto incrementing column for the tables. There is just no way to get it back in a generic way. One option that I tried is something similar to the Oracle schema where you call a store procedure to return a sequence ID for each record that you want to add.
So you would have to create the following sequence table in MySQL:
CREATE TABLE sequence (id INT NOT NULL);
INSERT INTO sequence VALUES (0);
Then create a stored procedure as shown below that will increment the sequence value and return it in a recordset:
CREATE PROCEDURE `getseqid`()
BEGIN
UPDATE sequence SET id=LAST_INSERT_ID(id+1);
SELECT LAST_INSERT_ID();
END
Then update the MySQL tables to use INT primary and foreign key values, so the TestStand MySQL SQL file to create all tables would have text like this:
CREATE TABLE UUT_RESULT
ID INT PRIMARY KEY,
~
CREATE TABLE STEP_RESULT
ID INT PRIMARY KEY,
UUT_RESULT INT NOT NULL,
~
Then update the schema primary and foreign key columns in the TestStand Database Options dialog box to be INT to match the table. For the primary key columns, you will have to set the Primary Key Type to "Get Value from Recordset" and set the Primary Key Command Text to "call getseqid()". This will call the stored procedure to determine the next value to use as the ID value.
Hope this helps...
Scott Richardson
National Instruments -
How to use two Mac SuperDrives at once
Can you burn two blank CDs at once? Import two CDs at once?
I was searching the forums about and read something about a program called Toast and if you duplicate it you can use two SuperDrives at once. Where would I download toast and how would I duplicate it?
It possible to use more than two? (Not planning to do this just wondering)Hi Matt,
You can open more than document. Drag a document window by one edge or corner to resize if necessary, then drag the whole window by its title bar to one side of the screen. You should now be able to see the other document. Move that window beside the first.
You can switch between them by clicking on the one you want to be active.
Regards,
Ian. -
Hey guys, here's a weird one - I have a large library on my macbook for my DJ music. Now I want to convert all my old albums to AIFF for listening purposes, and not DJing, so I don't want to cram them all into the lappy HD.
I have a NAS, which shows up as a 'Shared' Library. Can I create a library on an external Thunderbolt portable HD and have it do the same? Or will that only work on Network HD's.
I know the trick to hold Option and select your library at startup for multiple librarys, however I want to use them both at once.
Any ideas?
Cheers!Thanks for the reply.
Basically, I want to plug in an external HD, and have it appear under 'Shared' Libraries, just like what happens when I'm connected to my NAS Server. If this is possible, of course.
See pic below. -
MySQL Database Connection (two databases at the same time)
I have never had to open more than one MySQL database from within the same website before, but I do now. The website I have is designed where all the content comes from within the main database. I am building an Inventory system that I want within it's own database, in the event I would ever need to move the application to another server or something, I don't want this data residing in the main database.
Currently, I open the database connection from within a file called "common.php" that resides in a directory called "lib" that can be accessed from the root directory. Below is the proposed code that would be placed within the "common.php" file:
// Define Database Variables
$dbserver = "127.0.0.1";
$dbuser = array('clevelan_user1', 'clevelan_user2');
$dbpass = array('P@ssw0rd', 'P@ssw0rd2');
$dbname = array('clevelan_database1', 'clevelan_database2');
// Start Session
session_start();
// Connect to Databases
connectdb($dbserver, $dbuser[0], $dbpass[0], $dbname[0]);
connectdb2($dbserver, $dbuser[1], $dbpass[1], $dbname[1]);
// Database 1 Connection
function connectdb($dbserver, $dbuser, $dbpass, $dbname) {
// connects to db
global $connection;
$connection = @mysql_connect($dbserver, $dbuser, $dbpass) or die ("could not connect to server");
$db = @mysql_select_db($dbname, $connection) or die ("could not select databsase");
return $connection;
// Database 2 Connection
function connectdb2($dbserver, $dbuser, $dbpass, $dbname) {
// connects to db
global $connection2;
$connection2 = @mysql_connect($dbserver, $dbuser, $dbpass) or die ("could not connect to server");
$db2 = @mysql_select_db($dbname, $connection2) or die ("could not select databsase");
return $connection2;
//End of Code Within the "common.php"
From within any page of the website, I want to access both connections by placing an include at the top of each page:
include_once("lib/common.php");
Currently, when I run the code above, any page within the website (the home page) provides error messages with regards to database connectivity (the pages are looking for there content from within the second database. It's as if the second database is the only database seen by the website.
I need help figuring out how I can have two MySQL databases open at the same time (the second database will only be open for short periods of time and then closed). But the main database is always open.Create one project using one copy of the exact tables.
create 2 different sessions.xml files each pointing to the same project. Set the login information in the sessions.xml files.
That should work fine.
Peter -
Using mysql database on another machine without having mysql installed
Hi...
I was wondering whether its possible to copy a Mysql database that I have created on my machine, take it to another machine which does not have Mysql command line stuff installed and use my own JDBC connection to the copied mysql database and start manipulating my data. I don't know if this is possible or not ..
The main purpose of doing this is I am creating a Java program which uses a Mysql database and I want to know if I give it to someone else to use it do they have to install Mysql and all the package or can they simply start using it.
Thanks a lot
Sassanmasijade. wrote:
TuringPest wrote:
masijade. wrote:
Sasanpad wrote:
Hi...
I was wondering whether its possible to copy a Mysql database that I have created on my machine, take it to another machine which does not have Mysql command line stuff installed and use my own JDBC connection to the copied mysql database and start manipulating my data. I don't know if this is possible or not ..No. Not only would it be in violation of the terms of your license, but a MySQL database is a client/server type setup. No MySQL binaries, no server, your client (jdbc) cannot connect.im just curious because im new to mysql myself, but what do you mean that its a violation of his license?
do you mean for the commercial version?If he licenses his application under GPL, okay, no problem. Otherwise I read this quote
Free use for those who never copy, modify or distribute. As long as you never distribute the MySQL Software in any way, you are free to use it for powering your application, irrespective of whether your application is under GPL license or not.
to mean that you are not allowed to distribute MySQL (or any part of it, unless your application is GPL licensed) with your application, and if he distributes even just the data directory, he is distributing at least a part of MySQL.
Other's may not see it that way, but do you want to take the chance?The critical element is the word distribute. If he tries to embed MySQL in the application he is giving to his users, he's distributing it. Hence a violation of the license. That does not in any way prevent him from including scripts that when the application is installed goes out and runs the script on the user's installation of MySQL and builds the databases and whatnot his application needs on their MySQL installation.
Now, for the OP. If all you're keeping up with is urls and such and you don't have hundreds of them. I wouldn't bother with a db at all. a properties file would actually serve your purposes, and xml would suit just fine. Of course you'd have to have access to the file system and such but no licensing issues at all.
PS. -
MySQL database - Recordset's echoing problem
Gary, David & any other PHP wizards, listen up -
Today I decided to use a MySQL database to hold my articles
in, and then
call them with a recordset when applicable. Everything works
really, really
nicely except for one thing.
If you go here:
http://sourtea.com/articles2.php
And select "Read this article" for any of the articles,
scroll down to the
bottom where the comment form is and you'll see some PHP code
being
echo'ed - which isn't supposed to be.
I've noticed in IE - it's always displayed with all articles,
but on
Firefox, it seems to only happen with the first article you
open up, then
all the others are fine.
I'm calling the recordsets inside of my php cases, for
example:
<?php
break;
case 10:
?>
<?php echo $row_getArticles['textfields']; ?>
<?php
break;
case 20:
?>
And so on.
Now, everything in the "textfields" row is the physical HTML
and PHP code
that will write and display the article and the comment form.
It seems that something is getting scrambled, or that I need
to write the
PHP code differently inside the table...
Help?
Thanks for your time,
Shane H
[email protected]
http://www.avenuedesigners.com
=============================================
Web Dev Articles, Photography, and more:
http://sourtea.com
=============================================
Proud GAWDS Member
http://www.gawds.org/showmember.php?memberid=1495
Delivering accessible websites to all ...
=============================================Hi Joe -
I did cut and paste the code from DW into the table. I just
finished up,
actually, with another solution. I entered the code for the
comment form
into a .txt file, and used it as a PHP include for the
articles.
Also, for the action of the form (since it's the same form
being used for
three different pages) - I set a variable when it calls a
certain Recordset,
and then did an "if, elseif" statement inside the .txt file
where it will
echo out the appropriate page, depending upon which article
the user is at.
For example (from my code):
<form id="contact_form" action="articles.php?ref=<?php
if($var == 10) { echo
'10'; } elseif($var == 20) { echo '20'; } elseif($var == 30)
{ echo '30'; }
?>" method="post">
That's was really the only problem I had to overcome because
I'm using the
same form for all three articles (assigning the proper
action).
Thanks for the help, Joe - though, I'm not sure if your
suggestion would
have worked! Maybe I'll try it sometime...
Shane H
[email protected]
http://www.avenuedesigners.com
=============================================
Web Dev Articles, Photography, and more:
http://sourtea.com
=============================================
Proud GAWDS Member
http://www.gawds.org/showmember.php?memberid=1495
Delivering accessible websites to all ...
=============================================
"Joe Makowiec" <[email protected]> wrote in
message
news:[email protected]...
> On Wed 30 Aug 2006 02:08:30p, Shane H wrote in
macromedia.dreamweaver:
>
>> Thanks for the prompt reply. Is there a way around
this (e.g., being
>> able to include the PHP code in the row)?
>
> Is the PHP code being pulled in from the database? I'm
not where I can
> test it right now, but I believe that it won't be
executed. The only way
> would be to have it in the page itself.
>
> For example:
>
> <input
> name="namefield"
> class="contactfield"
> id="namefield"
> value="<?php if(isset($_POST['namefield'])) echo
htmlentities($_POST
> ['namefield']);?>"
> tabindex="1"
> accesskey="1"
> type="text">
>
> You can't have that in the data. You could do this:
>
> <input
> name="namefield"
> class="contactfield"
> id="namefield"
> value="<?php if(isset($_POST['namefield'])) echo
htmlentities($_POST
> ['namefield']);?>"
> tabindex="1"
> accesskey="1"
> type="text">
>
> Or maybe you cut and pasted code, and got the character
entities <
> > rather than <>? -
ABAP-HR, using two LDB ie, PNP and PCH
Hi friends,
How can i use two logical database regarding to master data and organization managemnt. if i use PNP in Attributes LDB, how can i get tables regarding to organization mangent in reports, so that i can retrieve data from PNP and PCH.
Effecient answer will be rewarded points....
Thanks&Regards
Shiva PrasadHi Amit,
Thanks for yor valuable answer, i have tried it using 1st mentioned method, but i couldn't get. can u give me sample code.
i didn't try for the 2nd method.
i will try. -
MySQL database overflow??
I am using a MySQL database which contains data on bankaccounts. For example, person X has 4 accounts. These accounts are listed in a selectbox. By clicking on one of the accounts, the page is refreshed with the account ID. When an ID is set, more details about the account are displayed.
To retrieve the data, I am using a bean which has been created with a wizard. I have done some minor changes, but not to the database connection and processing of the query. It works properly, but I have the idea it opens more database connection than it should (ok, Im a Java n00b so I do not really know where to look).
The following error occurs when I select the 4 different accounts of person X a few times after eachother. I do this randomly, but after about 13 of 14 clicks, I get an error.
[4/4/03 13:28:43:436 CEST] 49e202dc WebGroup E SRVE0026E: [Servlet Error]-[Server configuration denies access to data source]: java.sql.SQLException: Server configuration denies access to data source
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java(Compiled Code))
at com.mysql.jdbc.Connection.createNewIO(Connection.java(Compiled Code))
at com.mysql.jdbc.Connection.<init>(Connection.java:485)
at com.mysql.jdbc.Driver.connect(Driver.java:341)
at java.sql.DriverManager.getConnection(DriverManager.java(Compiled Code))
at java.sql.DriverManager.getConnection(DriverManager.java:194)
at com.ibm.db.db.base.DatabaseConnection.connectToDataSource(DatabaseConnection.java)
at com.ibm.db.db.DatabaseConnection.connect(DatabaseConnection.java)
at com.ibm.db.db.Statement.connect(Statement.java)
at com.ibm.db.db.SelectStatement.execute(SelectStatement.java)
at com.ibm.db.beans.DBSelect.execute(DBSelect.java)
at ClientDataBean.execute(ClientDataBean.java:43)Does anyone know by this error what the problem is? As I said, I believe it has something to do with open database connections. But as it is a wizards code, I dont really know what to change.Yes, the problem was that the database was explicitly denying access, and your Bean could not handle that.
As guessed elsewhere, you probably had too many connections, and the database thought you might be trying to hack in so it panicked and closed off access.
The next time you do maintainence (don't bother now, since it's working, but on the next rainy day), you may want to add a try...catch clause that sends a proper error message to the user, something along the lines of "You have made too many attempts to fetch the data. Being security concious, we ask that you wait a few minutes before you try again". -
Cleaning VM Manager MySQL Database
Hi,
I am looking to clean a server pool completely and recreate it after some issues with heartbeating caused by a network fault caused all sorts of heartbeat / config problems. Have been working through a fix with Oracle support and have cleaned all VM servers in the pool.
The next step as advised by support is to clean the vm database using the the ovm_upgrade.sh script:
sh ./ovm_upgrade.sh dbuser=<user> dbpass=<passwd> dbhost=<hostname> dbport=1521 dbsid=<sid> deletedb
This fails when i run it with message:
"2013-03-20 09:24:34,847 ERROR Failed to connect to Database! Error: **
java.lang.StringIndexOutOfBoundsException: String index out of range: 14137"
The dbport number provided hints that this script is for an Oracle database which may be what is causing the error. Does anyone have any advice on cleaning the Oracle VM Manager db when using a mysql database?
We are running Oracle VM manager 3.2.1 on Scientific Linux release 6.3 (Carbon) x86_64.
Thanks,Fixed. I think it was a problem related to the hostname.
Maybe you are looking for
-
Hi Friends, we just want a report that shows the Document date, the Invoice date, the PO number, the vendor and the value if possible, Thanks in advance
-
Looking for a list of companies who use Oracle
Hi Everyone, I hope this is the correct forum to post this message. I was wondering if anyone knows how to find a list of companies in my area (the state of CT) that use Oracle so I can use it to find employment for myself. Thanks in advance. Emad
-
What are the infotypes in abap how to transport abap queries at the time of upgradation
-
Dialog missing jrootpane so gridbag constraints don't work
I have a dialog that is missing it's jrootpane so setting the gridbag constraints for resizing the dialog do not work. Does anyone know how to add a jrootpane in code?
-
Performance boost question for G5 Dual 2.3 PPC
I have a late '05 PPC G5 that has been giving me fits so I bought a Jupiter 1TB 7200 RPM 32 MB Cache drive from OWC (to replace the oem 250 gb HD) along with 4-2 GB ram modules to replace the 8-512 MB modules that came with the computer. I have been