jump to navigation

Reset System Parameter June 9, 2009

Posted by Ida Bagus Enderajana in Sun Solaris.
add a comment

sys-unconfig

Mount Tape Device June 9, 2009

Posted by Ida Bagus Enderajana in Sun Solaris.
add a comment

mt -f /dev/rmt/0

Check Swap Size June 9, 2009

Posted by Ida Bagus Enderajana in Sun Solaris.
add a comment

Swap -s

Check user Quota June 9, 2009

Posted by Ida Bagus Enderajana in Sun Solaris.
add a comment

quota -v username

Check reboot Information June 9, 2009

Posted by Ida Bagus Enderajana in Sun Solaris.
add a comment

last -5 reboot

Remove pakage June 9, 2009

Posted by Ida Bagus Enderajana in Sun Solaris.
add a comment

pkgrm  package name

Sar Utility June 9, 2009

Posted by Ida Bagus Enderajana in Sun Solaris.
add a comment

Here the folowing the description of  sar utility :

sar -a  Monitor file access
sar -b    Monitor buffer activity
sar -c    Monitor call activity
sar -d     Monitor disk activity
sar -g    Monitor page out and memory
sar -k    Checking kernel memory allocation
sar -m    Monitor Interproses comunication
sar -p    Monitor page-in activity
sar -q    Monitor queue activity
sar -r    Monitoring unused memory
sar -u    Monitoring CPU utilize
sar -v    Monitoring system table
sar -w    Monitoring swap activity
sar -y    Monitoring terminal activity
sar -A    Monitoring overall system performnce

Function Decrypt and Encrypt June 9, 2009

Posted by Ida Bagus Enderajana in Oracle PL-SQL.
add a comment

This function is useful for encrypt  the secret data,an example thif function can be used to encrypt the “sensitive” filed in the table :

CREATE OR REPLACE function f_decrypt( p_str in raw ) return
varchar2
as
begin
return utl_raw.cast_to_varchar2(
dbms_obfuscation_toolkit.DESdecrypt
( input => p_str,
key   => utl_raw.cast_to_raw(’MagicKey’) ) );
end;
/

CREATE OR REPLACE function F_Encrypt( p_str in varchar2 )
return raw
as
l_data  varchar2(255);
begin
l_data := rpad( p_str, (trunc(length(p_str)/8)+1)*8, chr(0) );
return dbms_obfuscation_toolkit.DESEncrypt
( input => utl_raw.cast_to_raw(l_data),
key => utl_raw.cast_to_raw(’MagicKey’) );
end;
/

Make Read Only Table June 9, 2009

Posted by Ida Bagus Enderajana in Oracle Admin.
add a comment

This script is used for protect table from modification (read only) :

CREATE TRIGGER tab_readonly
BEFORE DELETE OR INSERT OR UPDATE
ON emp
FOR EACH ROW
BEGIN
RAISE_APPLICATION_ERROR(-20201, ‘Table Status: READ ONLY.’);

END;

RAC Installation oracle 10g2 using Sun Cluster 3.2 June 9, 2009

Posted by Ida Bagus Enderajana in Oracle Real Application Cluster.
add a comment

PREPARING RAC INSTALLATION

————————————————–

This section describes how to prepare a system for Oracle RAC installation with Oracle Clusterware
(formerly called CRS for “Cluster Ready Services”). If other clusterware is being used, please follow
the specific documentation for that product. Before proceeding with the installation steps make sure
that the following hardware requirements are satisfied.
Unless otherwise stated, all the commands described here must be executed as root.

1. Clean up OCR and voting devices.
If you are not placing the OCR and voting devices in the QFS file system, do the following in
the raw devices that will be used for this purpose:
# dd if=/dev/zero of=ocr_dev bs=1024k count=120
# dd if=/dev/zero of=voting-dev bs=1024k count=120
# chown -R oracle:dba voting-dev
# chown -R root:dba ocr-dev
# chmod -R 660 voting-dev
# chmod -R 640 ocr-dev

2. Allow Oracle users to use rsh on all systems.
Execute this command as Oracle user on all the servers that will be part of the RAC cluster.
# echo “+ oracle” > /export/home/oracle/.rhosts

3. Confirm that you can use rsh as Oracle.
For all nodes, execute the following command as Oracle user against all other nodes and
confirm that there are no problems reported:
# rsh other-node hostname

INSTALLING ORACLE CRS

—————————————

1. Obtain the Oracle Clusterware tarball (for x86/x64 or SPARC systems) and place it in /stage/crs.
2. For x86/x64 systems, run the rootpre.sh script as root on each node:
# /stage/crs/rootpre/rootpre.sh
2. Run the following command.
# su – oracle
3. Change to the /stage/crs/ directory.
4. Set the display to the system where you want to display the installer GUI.
5. Run the installer.
# ./runInstaller
6. Accept the path for the inventory directory and the group (dba), and click Next.
7. Set the name to crs and the path to /export/home/oracle/crs, and click Next.
8. See if there are any failures, and then click Next.
9. Verify that public, virtual, and private names resolve in /etc/hosts, NIS, or Sun Cluster
database, and then click Next.
10. Set the public IP/device to public. Set the private IP/device to private. Select clprivnet0
device for private and leave the ones used by the Sun Cluster software as “do not use.”
11. Set OCR to the device selected in the storage table using the DID identifier (or the QFS file). Use
external redundancy if possible.
12. Set voting to the device selected in the storage table using the DID identifier (or the QFS file). Use
external redundancy of possible.
13. Click Install.
14. Run scripts as root in the order and on the nodes indicated.
15. If VIP fails while running scripts on the last node (known bug), do the following:
a) Set the DISPLAY variable appropriately.
b) Execute # /export/home/oracle/crs/bin/vipca.
c) Fill in again the VIP information, and vipca creates and starts the VIP, GSD (global
services daemon), and ONS (Oracle name server) resources under Oracle Clusterware.

INSTALLING THE ORACLE RDBMS SERVER

—————————————————————–
1. Obtain the Oracle database 10.2.0.1.
2. Create the directory /stage/10gdb on the database server and place the database installation
software there.
3. Change to the /stage/10gdb directory and unpackage the tarball.
4. Run the following command:
# su – oracle
5. Change to the /stage/10gdb directory.
6. Set the display to the system where you want to display the installer GUI.
7. Run the installer with the following command:
# ./runInstaller
8. Select Enterprise Edition, and click Next.
9. Define Oracle home as /export/home/oracle/db. Clear the check box for “create starter
database,” and click Next.
10. Select all nodes, and click Next.
11. Leave the inventory in /export/home/oracle/oraInventory and leave the operating
system group name as dba. Click Next.
12. Disregard the failure for nonexec_user_stack=1. If there are no other warnings, click Next
and click Yes in the warning popup dialog.
13. Select the option “install database software only” and click Next.
14. Click Install and wait until the installation finishes.
15. As root, execute the two commands presented by the installer, and click OK.
16. Exit the installer.
17. Now it is necessary to install the patchset 2. Obtain the tarball for this patchset. For x86/64 systems,
get Oracle 10.2.0.2 Database Patchset. For SPARC systems, get Oracle 10.2.0.2 Patchset.
18. Create the directory /stage/ps2 and place the tarball in it.
19. Unpackage the tarball.
20. Run the following command:
# su – oracle
21. Set the display to the system where you want to display the installer GUI.
22. Change to the /stage/ps2/Disk1 directory.
23. Install the patch on CRS home first, and then install it again on database home.
24. Execute the following command.
# ./runInstaller
25. Click Next.
26. Select CRS or db for the database (first install on Oracle Clusterware and then on database).
27. Click Install.
28. Repeat installation of patch 10.2.0.2 on database home.
29. As Oracle user, add the following entries to the file /export/home/oracle/.cshrc.
setenv ORACLE_BASE $HOME
setenv ORACLE_HOME $ORACLE_BASE/db
setenv CRS_HOME $ORACLE_BASE/crs (if RAC present)
setenv PATH $ORACLE_HOME/bin:$PATH
setenv LD_LIBRARY_PATH $ORACLE_HOME/lib
setenv ORACLE_SID SID_for_your_database
30. (SPARC only) Install patch 5117016 after patch 10.2.0 on Oracle home only (mandatory).