Showing posts with label Installation. Show all posts
Showing posts with label Installation. Show all posts

Ownership and permissions for ASM devices

When preparing devices for ASM set the following ownership and permissions:

chown <asm owner>:<asmdba group> <device>
chmod 660 <device>


Example:

chown grid:oinstall c5t60060E8006CFCC000000CFCC00000204d0s0
chmod 660 c5t60060E8006CFCC000000CFCC00000204d0s0

Deinstall ASM on standalone

First deconfigure clusterware
Run as root

cd <GRID_HOME>/crs/install
perl rootcrs.pl -deconfig -force

Now Deinstall
Run as ASM owner

cd <GRID_HOME>/deinstall

./deinstall



If you want to reuse the ASM volumes under a different user name you can wipe the headers like this.

Script to create Standard Groups, Users, and Paths on Solaris 10

#!/bin/ksh
# Example of Creating Standard Groups, Users, and Paths
# From Oracle Grid Infrastructure Installation Guide 11g Release 2 (11.2) for Oracle Solaris E24616-01

groupadd -g 1000 oinstall
groupadd -g 1020 asmadmin
groupadd -g 1021 asmdba
groupadd -g 1031 dba
useradd -m -d /export/home/grid -s /bin/bash -u 1100 -g oinstall -G dba,asmadmin grid
passwd grid
useradd -m -d /export/home/oracle/ -s /bin/bash -u 1101 -g oinstall -G dba,asmdba oracle
passwd oracle
mkdir -p /u01/app/11.2.0/grid
mkdir -p /u01/app/grid
chown -R grid:oinstall /u01
mkdir /u01/app/oracle
chown oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/

mkdir /opt/oracle
mkdir /opt/oraInventory
chown oracle:oinstall /opt/oracle
chown oracle:oinstall /opt/oraInventory
chmod 755 /opt/oracle
chmod 755 /opt/oraInventory

Add swap space to Solaris 10 zfs


# zfs create -V 16gb rpool/newswap
# swap -a /dev/zvol/dsk/rpool/newswap

Oracle install ships with unzip

If you need unzip on a system where it is not installed, check $ORACLE_HOME/bin.

You can also use jar -xvf.

Determine what database components are installed


set pagesize 40

column componentName format a40 heading 'Component Name'
column version format a15 heading 'Version'
column status format a8 heading 'Status'

select COMP_NAME componentName,
VERSION version,
STATUS status
from dba_registry;

Example:

Component Name Version Status
---------------------------------------- --------------- --------
OWB 11.1.0.6.0 VALID
Oracle Application Express 3.0.1.00.08 VALID
Oracle Enterprise Manager 11.1.0.6.0 VALID
Oracle Ultra Search 11.1.0.6.0 VALID
OLAP Catalog 11.1.0.6.0 VALID
Spatial 11.1.0.6.0 VALID
Oracle Multimedia 11.1.0.6.0 VALID
Oracle XML Database 11.1.0.6.0 VALID
Oracle Text 11.1.0.6.0 VALID
Oracle Expression Filter 11.1.0.6.0 VALID
Oracle Rules Manager 11.1.0.6.0 VALID
Oracle Workspace Manager 11.1.0.6.0 VALID
Oracle Database Catalog Views 11.1.0.6.0 VALID
Oracle Database Packages and Types 11.1.0.6.0 VALID
JServer JAVA Virtual Machine 11.1.0.6.0 VALID
Oracle XDK 11.1.0.6.0 VALID
Oracle Database Java Packages 11.1.0.6.0 VALID
OLAP Analytic Workspace 11.1.0.6.0 VALID
Oracle OLAP API 11.1.0.6.0 VALID

Delete Oracle Database

Since 10g, It is possible to drop a database in Oracle 10g with the new SQL statement drop database.
The command gets rid of datafiles online redo log files, controlfiles and spfile.


shutdown abort;
startup mount exclusive restrict;
drop database;
exit


Requirements

* database must be closed,
* exclusively mounted,
* restricted


-------------------------------------------------------------------------
To delete a database Pre 10g

First:

select "rm -f "||name from v$controlfile
union
select "rm -f "||name from v4datafile
union
select "rm -f "||member from v$logfile;

Second:
Clean up above output & make it executable

Third:
If installation follows OFA standard:
remove directory $ORACLE_BASE/admin/$ORACLE_SID

Fourth:
Delete archive log directory (if archive mode)

or)

Depending on if OFA was followed in installation you can use the Oracle Database Configuration Assistant(DBCA). You can create and delete a database with this tool. Delete the database and then remove the files as noted in the previous response.

Set display for X emulation for installation

DISPLAY=[machine-name]:0.0; export DISPLAY


This may vary by server. A good way to determine the correct value is to connect to the server via Xstart and then to check the value of the DISPLAY variable.

(Telnet connection via Xstart)

Sun Microsystems Inc. SunOS 5.10 Generic January 2005
$ echo $DISPLAY
10.177.10.137:1.0