15 septembre 2010

Create an Ubuntu VM with Sun's VirtualBox (with Oracle XE)

sudo mkdir /mnt/cdrom
sudo mount /dev/cdrom /mnt/cdrom
cd /mnt/cdrom/
sudo ./VBoxLinuxAdditions-x86.run

sudo mkdir /mnt/downloads
sudo mount.vboxsf Downloads /mnt/downloads/

sudo cp /mnt/downloads/oracle-xe-universal_10.2.0.1-1.0_i386.deb

sudo apt-get install bc
sudo apt-get install libaio1

#expand swap:
sudo dd if=/dev/zero of=/swapfile bs=1M count=1024
sudo mkswap /swapfile
sudo vi /etc/fstab and add at the bottom:
/swapfile none swap sw 0 0

dpkg -i oracle-xe-universal_10.2.0.1-1.0_i386.deb

sudo /etc/init.d/oracle-xe configure

Export from another machine:
exp full=y file=shi.dump
(you are prompted for username/pwd, use sys as sysdba)

Increase the number of processes available to Oracle:
ALTER SYSTEM SET PROCESSES=150 SCOPE=SPFILE;

MAKE SURE that:

* SID in tnsnames.ora is the same as ORACLE_SID in environment variables (it is case sensitive!)

* ORACLE_HOME doe NOT end with a /

in Oracle:
CREATE USER reb identified by reb;
GRANT CREATE SESSION TO reb;
GRANT UNLIMITED TABLESPACE TO reb;


imp fromuser=reb commit=y ignore=y file=shi.dump

Same for users: SEL1, SEL2, SEL3, IDCX, LEB, STATIC, RMSAUTO, RMSMAN

For RAD, users are: RMSUSER, RMSMAN, RMSAUTO, IDCX, NMS, NMSGSYS

Grant special privileges to users that need to create tables and sequences:
GRANT CREATE TABLE TO nmsgsys;
GRANT CREATE SEQUENCE TO nmsgsys;
GRANT CREATE TABLE TO nms;
GRANT CREATE SEQUENCE TO nms;

Create user NMS_USER (same syntax as above) and grant privileges:

sqlplus sys/sysdba@ctbtoenv/xe as sysdba @grant_privileges NMS NMSUSER
sqlplus sys/sysdba@ctbtoenv/xe as sysdba @grant_sequence_privileges NMS NMSUSER
sqlplus sys/sysdba@ctbtoenv/xe as sysdba @grant_privileges NMSGSYS NMSUSER
sqlplus sys/sysdba@ctbtoenv/xe as sysdba @grant_sequence_privileges NMSGSYS NMSUSER

sudo adduser nmsuser (pwd: nmsuser)

Aucun commentaire:

Enregistrer un commentaire