[Spacewalk-list] fix oracle SID/HOST/tnsnames ?
Michael Mraka
michael.mraka at redhat.com
Tue Jul 27 08:31:26 UTC 2010
Jan-Frode Myklebust wrote:
% During the installation I pointed spacewalk against DB SPACEWALK1 running
% on server1 on our Oracle RAC, and now that we're having some downtime on
% server1 that's causing us some hopefully unneccessary downtime.
%
% Could someone help us configure spacewalk talk to database "SPACEWALK",
% as defined by this tnsnames.ora:
%
% SPACEWALK =
% (DESCRIPTION =
% (ADDRESS = (PROTOCOL = TCP)(HOST = oracledb1-vip.example.net)(PORT = 1521))
% (ADDRESS = (PROTOCOL = TCP)(HOST = oracledb2-vip.example.net)(PORT = 1521))
% (LOAD_BALANCE = yes)
% (CONNECT_DATA =
% (SERVER = DEDICATED)
% (SERVICE_NAME = spacewalk)
% )
% )
...
The easy part is to change SPACEWALK1 -> SPACEWALK in
db_name
default_db
in /etc/rhn/rhn.conf and (if using monitoring) also
LocalConfig.0.dbname
/etc/rhn/cluster.ini.
Moreover there is one more place
hibernate.connection.url
in /etc/rhn/rhn.conf which is tough one :). You can either use
jdbc:oracle:thin and copy whole connect string there so it will look like
hibernate.connection.url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracledb1-vip.example.net)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=oracledb2-vip.example.net)(PORT=1521))(LOAD_BALANCE=yes)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=spacewalk)))
or switch to jdbc:oracle:oci which understands /etc/tnsnames.ora so
configuration is much simple
hibernate.connection.url=jdbc:oracle:oci:@SPACEWALK
but(!) it needs libocijdbc10.so from /usr/lib/oracle/10.2.0.4/client64/lib so
any java component (tomcat, taskomatic, searchserver) have to have
LD_LIBRARY_PATH=/usr/lib/oracle/10.2.0.4/client64/lib set in its
environment.
Regards,
--
Michael Mráka
Satellite Engineering, Red Hat
More information about the Spacewalk-list
mailing list