Differences between revisions 42 and 43

Deletions are marked like this. Additions are marked like this.
Line 30: Line 30:
As root add the following to /etc/profile:

 {{{
export ORACLE_SID=XE
export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
PATH=$ORACLE_HOME/bin:$PATH
}}}

Then be sure to ''source /etc/profile''

Create environment files in /etc/profile.d/

oraenv.sh
{{{
ORACLE_SID=XE;export ORACLE_SID
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server;export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$PATH;export PATH
}}}


gnwenv.sh
{{{
VIEWPOINT=/home/vwpoint/viewPoint; export VIEWPOINT
LD_LIBRARY_PATH=/home/vwpoint/viewPoint/lib:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
}}}

Installing Oracle XE on Nodes


Oracle References


Now install the Oracle RPM (copy to /tmp on the server) and answer the installation questions appropriately.

  • # cd rpms
    # yum -y --nogpgcheck localinstall oracle-xe*
    ......
    Executing Post-install steps...
    You must run '/etc/init.d/oracle-xe configure' as root user to
    configure the database.
    
    # /etc/init.d/oracle-xe configure
    -- accept all defaults but set password appropriately
    

Make sure that any hostnames located in file /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora are changed to "localhost" - if this is not changed a reconfigure of oracle is required if the application or server is cloned.


Verify Oracle XE Installation

Use your favorite internet browser and goto http://<newnode>:8080/htmldb

Once you get the Oracle login prompt then enter sys and the password.


Create users and roles

Create environment files in /etc/profile.d/

oraenv.sh

ORACLE_SID=XE;export ORACLE_SID
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server;export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$PATH;export PATH

gnwenv.sh

VIEWPOINT=/home/vwpoint/viewPoint; export VIEWPOINT
LD_LIBRARY_PATH=/home/vwpoint/viewPoint/lib:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH

Login to sqlplus as SYSTEM (remember password from installation above) and execute the following commands.

  • create user dvpointp identified by dvpointp;
    grant resource,connect to dvpointp;
    grant DBA to dvpointp;
    create user vwpoint identified by vwpoint;
    grant resource,connect to vwpoint;
    create role DVENTURE;
    grant DVENTURE to vwpoint;
    


Extract live data from Production Node

Login to an existing production node (cablegnw is usually used) as the vwpoint user and extract the current database contents with the following command. Then copy the expDat.dmp file to the new node under the /usr/lib/oracle/xe folder.

  • [vwpoint@cablegnw vwpoint]$ exp  FILE=expDat.dmp FULL=Y DIRECT=Y RECORDLENGTH=70000 CONSISTENT=Y 
    
    Export: Release 8.0.5.0.0 - Production on Fri Mar 10 15:20:27 2006
    
    (c) Copyright 1998 Oracle Corporation.  All rights reserved.
    
    
    Username: dvpointp
    Password:
    
    Connected to: Oracle8 Release 8.0.5.0.0 - Production
    PL/SQL Release 8.0.5.0.0 - Production
    EXP-00023: must be a DBA to do Full Database export
    (2)U(sers), or (3)T(ables): (2)U > u
    
    Export done in US7ASCII character set and US7ASCII NCHAR character set
    . exporting foreign function library names for user DVPOINTP
    . exporting object type definitions for user DVPOINTP
    About to export DVPOINTP's objects ...
    . exporting database links
    . exporting sequence numbers
    . exporting cluster definitions
    . about to export DVPOINTP's tables via Direct Path ...
    . . exporting table                       BROWSERS          3 rows exported
    . . exporting table                  DNSISPSERVICE         34 rows exported
    . . exporting table                     DNSSERVICE        709 rows exported
    . . exporting table                   EMAILSERVICE        269 rows exported
    . . exporting table                     FTPSERVICE         81 rows exported
    . . exporting table                   HTTPFSERVICE        451 rows exported
    . . exporting table                   HTTPRSERVICE         51 rows exported
    . . exporting table                    HTTPSERVICE       8472 rows exported
    . . exporting table                   HTTPTSERVICE       1158 rows exported
    . . exporting table                    MONITORNODE         39 rows exported
    . . exporting table                    PINGSERVICE       7561 rows exported
    . . exporting table                   RSERVICELIST        111 rows exported
    . . exporting table                    SERVICELIST      19063 rows exported
    . . exporting table                   SERVICEMAINT       1712 rows exported
    . . exporting table                    SERVICENODE      59458 rows exported
    . . exporting table                    SERVICETYPE         10 rows exported
    . . exporting table              TRACEROUTESERVICE        277 rows exported
    . . exporting table                   TSERVICELIST       8814 rows exported
    . exporting synonyms
    . exporting views
    . exporting stored procedures
    . exporting referential integrity constraints
    . exporting triggers
    . exporting posttables actions
    . exporting snapshots
    . exporting snapshot logs
    . exporting job queues
    . exporting refresh groups and children
    Export terminated successfully with warnings.
    


Import live data from Production Node

Back on the new node login as the oraclexe user and cd to the folder called /usr/lib/oracle/xe.

  • -bash-3.00$ imp USERID=dvpointp/dvpointp FILE=expDat.dmp IGNORE=Y COMMIT=Y FULL=Y RECORDLENGTH=70000
    
    Import: Release 10.2.0.1.0 - Beta on Fri Mar 10 09:23:57 2006
    
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    
    
    Note: RECORDLENGTH=70000 truncated to 65535
    
    Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Beta
    
    Export file created by EXPORT:V08.00.05 via direct path
    import done in US7ASCII character set and AL16UTF16 NCHAR character set
    import server uses WE8MSWIN1252 character set (possible charset conversion)
    export server uses US7ASCII NCHAR character set (possible ncharset conversion)
    . importing DVPOINTP's objects into DVPOINTP
    . importing DVPOINTP's objects into DVPOINTP
    . . importing table                     "BROWSERS"          3 rows imported
    . . importing table                "DNSISPSERVICE"         34 rows imported
    . . importing table                   "DNSSERVICE"        709 rows imported
    . . importing table                 "EMAILSERVICE"        269 rows imported
    . . importing table                   "FTPSERVICE"         81 rows imported
    . . importing table                 "HTTPFSERVICE"        451 rows imported
    . . importing table                 "HTTPRSERVICE"         51 rows imported
    . . importing table                  "HTTPSERVICE"       8472 rows imported
    . . importing table                 "HTTPTSERVICE"       1158 rows imported
    . . importing table                  "MONITORNODE"         39 rows imported
    . . importing table                  "PINGSERVICE"       7561 rows imported
    . . importing table                 "RSERVICELIST"        111 rows imported
    . . importing table                  "SERVICELIST"      19063 rows imported
    . . importing table                 "SERVICEMAINT"       1712 rows imported
    . . importing table                  "SERVICENODE"      59458 rows imported
    . . importing table                  "SERVICETYPE"         10 rows imported
    . . importing table            "TRACEROUTESERVICE"        277 rows imported
    . . importing table                 "TSERVICELIST"       8814 rows imported
    About to enable constraints...
    Import terminated successfully without warnings.
    


If you have integrity constraint problems importing data into new production node, then run the following commands from sqlplus as the dvpointp user to delete all the old data.

  • delete from TRACEROUTESERVICE;
    delete from DNSISPSERVICE;
    delete from DNSSERVICE;
    delete from EMAILSERVICE;
    delete from FTPSERVICE;
    delete from HTTPFSERVICE;
    delete from RSERVICELIST;
    delete from HTTPRSERVICE;
    delete from HTTPSERVICE;
    delete from TSERVICELIST;
    delete from HTTPTSERVICE;
    delete from PINGSERVICE;
    delete from SERVICEMAINT;
    delete from SERVICENODE;
    delete from SERVICELIST;
    delete from SERVICETYPE;
    delete from MONITORNODE;
    delete from BROWSERS;
    

Log out of sqlplus. Then as the oraclexe user begin importing 1 table at a time. You can do more than 1 at a time, but they must be in this relative order.

  • imp USERID=dvpointp/dvpointp FILE=expDat.dmp  RECORDLENGTH=70000 IGNORE=Y DESTROY=Y TABLES=browsers
    imp USERID=dvpointp/dvpointp FILE=expDat.dmp  RECORDLENGTH=70000 IGNORE=Y DESTROY=Y TABLES=monitornode
    imp USERID=dvpointp/dvpointp FILE=expDat.dmp  RECORDLENGTH=70000 IGNORE=Y DESTROY=Y TABLES=servicetype
    imp USERID=dvpointp/dvpointp FILE=expDat.dmp  RECORDLENGTH=70000 IGNORE=Y DESTROY=Y TABLES=servicelist
    imp USERID=dvpointp/dvpointp FILE=expDat.dmp  RECORDLENGTH=70000 IGNORE=Y DESTROY=Y TABLES=servicenode
    imp USERID=dvpointp/dvpointp FILE=expDat.dmp  RECORDLENGTH=70000 IGNORE=Y DESTROY=Y TABLES=servicemaint,pingservice
    imp USERID=dvpointp/dvpointp FILE=expDat.dmp  RECORDLENGTH=70000 IGNORE=Y DESTROY=Y TABLES=httptservice,tservicelist
    imp USERID=dvpointp/dvpointp FILE=expDat.dmp  RECORDLENGTH=70000 IGNORE=Y DESTROY=Y TABLES=httpservice,httprservice,rservicelist
    imp USERID=dvpointp/dvpointp FILE=expDat.dmp  RECORDLENGTH=70000 IGNORE=Y DESTROY=Y TABLES=httpfservice,emailservice,dnsservice,dnsispservice,tracerouteservice,ftpservice
    


Create Public Synonyms

Obtain a copy of the createNodeSynonyms.sql file (copy to /tmp on the server) and load this into the database as the dvpointp user.

  • sqlplus dvpointp/dvpointp @/tmp/createNodeSynonyms.sql
    


Set Oracle File Permissions

For FC9 the file permissions need to be changed for the Oracle executable. As root:

  • cd /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin
  • chmod 6751 oracle

Installing Oracle XE on Nodes (last edited 2019-11-08 00:26:53 by EricC)