Setup database: Oracle Database
Requirements
-
Oracle 7 or later may work. Oracle 9i or later is recommended.
-
Install DBD-Oracle package.
General instruction
-
Ensure that
sympa.conf
includes appropriate values for these parameters:db_type
,db_name
,db_host
(optional),db_port
(optional),db_user
,db_passwd
anddb_env
.-
db_type
must beOracle
. -
db_name
and related parameters may be chosen with one of following three methods (a) to (c):(a) Specifying instance with system identifier (SID):
db_name
specifies SID.db_host
must be set (ifdb_port
is not set,1521
is used as port).Example:
db_name ORCL db_host localhost
(b) Specifying instance(s) with local naming:
Note
- Local naming is available on Sympa 6.2.37b.2 or later.
db_name
specifies net service name.db_host
must benone
or must not be set.Example:
db_name net_service_name
tnsnames.ora
file on Sympa server has to include an entry for specified net service name.tnsnames.ora
file is usually placed in the directory$ORACLE_HOME/network/admin
(If you want to use this file in another place, specify the directory by addingTNS_ADMIN
environment variable todb_env
parameter described in below).(c) Specifying connection with easy connection identifier:
Note
- Use of connection identifier is available on Sympa 6.2.37b.2 or later.
db_name
specifies easy connection identifier.db_host
must benone
or must not be set.Examples:
db_name db.example.org/service_name
db_name db.example.org:1521/name.dom.ain
-
db_env
should include definition of NLS_LANG and ORACLE_HOME. Character set should beAL32UTF8
.
Example:
db_type Oracle db_name ORCL db_host localhost db_user sympa db_passwd (secret) db_env NLS_LANG=American_America.AL32UTF8;ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
-
-
Create database user:
$ NLS_LANG=American_America.AL32UTF8; export NLS_LANG $ ORACLE_HOME=<Oracle home>; export ORACLE_HOME $ ORACLE_SID=<Oracle SID>; export ORACLE_SID $ sqlplus <system login>/<password> SQL> CREATE USER <db_user> IDENTIFIED BY <db_passwd> 2 DEFAULT TABLESPACE <tablespace> 3 TEMPORARY TABLESPACE <tablespace>; SQL> GRANT CREATE SESSION TO <db_user>; SQL> GRANT CREATE TABLE TO <db_user>; SQL> GRANT CREATE SYNONYM TO <db_user>; SQL> GRANT CREATE VIEW TO <db_user>; SQL> GRANT EXECUTE ANY PROCEDURE TO <db_user>; SQL> GRANT SELECT ANY TABLE TO <db_user>; SQL> GRANT SELECT ANY SEQUENCE TO <db_user>; SQL> GRANT RESOURCE TO <db_user>; SQL> QUIT
-
Create table structure:
# sympa.pl --health_check
Instruction for earlier releases of Sympa
Note
- This section describes instruction with Sympa prior to 6.2.
-
Set appropriate parameters in
sympa.conf
as described in above. -
Edit
$SCRIPTDIR
``/create_db.Oracle` to fit in your environment. -
Create user and table structure (Note: replace
$SCRIPTDIR
):$ sh $SCRIPTDIR/create_db.Oracle