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.confincludes appropriate values for these parameters:db_type,db_name,db_host(optional),db_port(optional),db_user,db_passwdanddb_env.-
db_typemust beOracle. -
db_nameand related parameters may be chosen with one of following three methods (a) to (c):(a) Specifying instance with system identifier (SID):
db_namespecifies SID.db_hostmust be set (ifdb_portis not set,1521is 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_namespecifies net service name.db_hostmust benoneor must not be set.Example:
db_name net_service_nametnsnames.orafile on Sympa server has to include an entry for specified net service name.tnsnames.orafile 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_ADMINenvironment variable todb_envparameter 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_namespecifies easy connection identifier.db_hostmust benoneor must not be set.Examples:
db_name db.example.org/service_namedb_name db.example.org:1521/name.dom.ain -
db_envshould 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.confas 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