Saturday, July 16, 2011

Membuat database standby

Pada database primary:
1. database harus pada archive log mode
2. memastikan database yang memiliki orapw (passwordfile)
   cd $ORACLE_HOME/dbs orapwd file=orapw[database_name] password=oracle entries=5 force=y
3. mengubah parameter:
   * db_file_name_convert='/path/','/path/'
   * log_file_name_convert='/path/','/path/'
   * dg_broker_start='TRUE'
   * standby_file_management='AUTO'
4. membuat stanby controlfile
   alter database create standby controlfile as '/path/controltsstandby.ctl';


Schema database sales

schema_sales.sql

CONN / AS SYSDBA
DROP USER SALES CASCADE;
SPOOL C:\SCRIPT-SQL11G.LOG

CREATE USER SALES IDENTIFIED BY ORACLE
DEFAULT TABLESPACE USERS
QUOTA UNLIMITED ON USERS;


Thursday, July 14, 2011

Command Unix DBA

The following is a list of commonly used Unix command:
      • ps - Show process
      • grep - Search files for text patterns
      • mailx - Read or send mail
      • cat - Join files or display them
      • cut - Select columns for display
      • awk - Pattern-matching language
      • df - Show free disk space
Here are some examples of how the DBA uses these commands:

Command Unix

#Cek available instance di server process
   bash$ ps –ef | grep pmon

#Cek listener di server process
   bash$ ps –ef | grep lsnrctl

#Mengetahui jumlah line di dalam alert.log
   bash$ cat alert.log | wc –l