Monday, July 4, 2011
Thursday, June 16, 2011
Sunday, May 29, 2011
Saturday, May 28, 2011
MoidIITDocID-502: How to create a password file? --Moid
Starting from 19c, atleast 8 bytes are required for SYS password.
Thursday, May 26, 2011
Wednesday, May 25, 2011
Saturday, May 21, 2011
Friday, May 20, 2011
Tuesday, May 17, 2011
Sunday, May 15, 2011
Friday, May 13, 2011
Tuesday, May 10, 2011
Monday, May 9, 2011
Sunday, May 8, 2011
Monday, May 2, 2011
11g GoldenGate Installation (High Level steps) v1.4 --Moid
Click here for the document.
--Moid
Golden Gate
GoldenGate
uni-directional
unidirectional
GG
Thursday, April 28, 2011
Tuesday, April 26, 2011
Monday, April 18, 2011
Sunday, April 10, 2011
Saturday, April 9, 2011
Sunday, April 3, 2011
Friday, April 1, 2011
Friday, March 25, 2011
Thursday, March 24, 2011
How to unregister database from OCR after dropping the db from dbca?
--Moid Muhammad
Keywords:
crs_unregister unregister remove ocr cleanup "srvctl remove database"
Tuesday, March 22, 2011
Sunday, March 20, 2011
Friday, March 18, 2011
How to recover Oracle database without any archivelogs?
--Moid Muhammad
Keywords:
Missing archivelogs
no archivelogs
archive logs
archivelogs are not backed up
Thursday, March 17, 2011
Monday, March 14, 2011
Sunday, March 6, 2011
Thursday, March 3, 2011
Monday, February 28, 2011
10g RAC using openfiler (Jeff Hunter's Document)
Build Your Own 10g R2 Oracle RAC Cluster on Oracle Enterprise Linux and iSCSI Part-2
Build Your Own 10g R2 Oracle RAC Cluster on Oracle Enterprise Linux and iSCSI Part-3
Also the cached pages are at my network at the following location:
\\192.168.0.61\lsi_shared_files\Build_10g_RAC_(Jeff_Hunter_Oracle_Document)
--Moid
Sunday, February 27, 2011
Saturday, February 26, 2011
How to build an Oracle VMware machine and install 10g R2 (Part-2)?
Part-II Prepare Linux for Oracle (all prerequisites) v1.3
--Moid Muhammad
Thursday, February 24, 2011
Tuesday, February 22, 2011
Friday, February 11, 2011
Friday, February 4, 2011
Thursday, February 3, 2011
Wednesday, February 2, 2011
How to change the protection mode from "maximum performance" to "maximum availability" in a 10g Data Guard environment?
Maximum Protection—This mode offers the highest level of data protection. Data is synchronously transmitted to the standby database from the primary database and transactions are not committed on the primary database unless the redo data is available on at least one standby database configured in this mode. If the last standby database configured in this mode becomes unavailable, processing stops on the primary database. This mode ensures no-data-loss.
Maximum Availability—This mode is similar to the maximum protection mode, including zero data loss. However, if a standby database becomes unavailable (for example, because of network connectivity problems), processing continues on the primary database. When the fault is corrected, the standby database is automatically resynchronized with the primary database.
Maximum Performance—This mode offers slightly less data protection on the primary database, but higher performance than maximum availability mode. In this mode, as the primary database processes transactions, redo data is asynchronously shipped to the standby database. The commit operation of the primary database does not wait for the standby database to acknowledge receipt of redo data before completing write operations on the primary database. If any standby destination becomes unavailable, processing continues on the primary database and there is little effect on primary database performance.
How to change from "maximum performance" to "maximum availability"? Click here for the instructions.
--Moid
Keywords:
Data Guard Protection Mode.
Monday, January 24, 2011
Wednesday, January 19, 2011
How to duplicate VMWare machine from an existing VMWare Machine v1.1
--Moid Muhammad
Keyword: VMWare Cloning with screenshot, VMWare Duplicate, VMWare Oracle Database Cloning, step-by-step VMWare Cloning, VMWare image, VM Machine Image
Wednesday, January 12, 2011
Wednesday, December 29, 2010
11g R2 (11.2.0.2) -- Script to Auto Start/Shutdown databases during reboots.
Step 1:
Login as root and create a file called /etc/init.d/oracle. Add the following lines in the script.
#!/bin/bash
#######################################################################
#
# Run-level Startup script for the Oracle Instance and Listener
#
# chkconfig: 345 98 34
# description: Startup/Shutdown script for 11g Oracle instances
#
#######################################################################
#######################################################################
#
# Note:
# cp $ORACLE_HOME/bin/dbstart $ORACLE_HOME/bin/dbstart.orig
# Make the following changes in $ORACLE_HOME/bin/dbstart
#
# Line#80 has the following:
# ORACLE_HOME_LISTNER=$1
#
# Replace it with the following two lines:
# export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
# ORACLE_HOME_LISTNER=$ORACLE_HOME
#
# cp $ORACLE_HOME/bin/dbshut $ORACLE_HOME/bin/dbshut.orig
# Make the following changes in $ORACLE_HOME/bin/dbshut
#
# Line#50 has the following:
# ORACLE_HOME_LISTNER=$1
#
# Replace it with the following two lines:
# export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
# ORACLE_HOME_LISTNER=$ORACLE_HOME
#
# save the file and proceed with the steps below
#
#######################################################################
#######################################################################
#Instructions to start start isntances manually
#
# To Start --> /etc/init.d/oracle start
# To Stop --> /etc/init.d/oracle stop
# To restrart --> /etc/init.d/oracle restart
#
#######################################################################
ORA_HM="/u01/app/oracle/product/11.2.0/db_1"
ORA_OWNR="oracle"
# if the executables do not exist -- display error
if [ ! -f $ORA_HM/bin/dbstart -o ! -d $ORA_HM ]
then
echo "Oracle startup: cannot start"
exit 1
fi
# depending on parameter -- startup, shutdown, restart
# of the instance and listener or usage display
case "$1" in
start)
# starting Oracle instances
echo -n "starting Oracle Instances"
su - $ORA_OWNR -c $ORA_HM/bin/dbstart
touch /var/lock/subsys/oracle
ps -ef |grep pmon |grep -v grep
ps -ef |grep lsnr |grep -v grep
echo "OK"
;;
stop)
# Oracle listener and instance shutdown
su - $ORA_OWNR -c $ORA_HM/bin/dbshut
rm -f /var/lock/subsys/oracle
ps -ef |grep pmon |grep -v grep
ps -ef |grep lsnr |grep -v grep
echo "OK"
;;
reload|restart)
$0 stop
$0 start
ps -ef |grep pmon |grep -v grep
ps -ef |grep lsnr |grep -v grep
echo "OK"
;;
*)
echo "Usage: $0 start|stop|restart|reload"
exit 1
esac
exit 0
clear
###################### END of SCRIPT ##############################
Step-2:
Change the permission of the script
chmod 750 /etc/init.d/oracle
Step-3:
Execute the following so that runlevel 3,4 & 5 will execute the script during system reboots.
chkconfig --level 345 oracle on
Step-4
Execute the script and verify everything is working as expected. Alternatively, you can download the script directory from here.
Additionally you can turn on and turn on with the following.
[root@bl-mm-db-dev ~]# /sbin/chkconfig oracle off
[root@bl-mm-db-dev ~]# /sbin/chkconfig --levels 345 oracle on
That's it. We are done.
--Moid
Monday, December 20, 2010
Wednesday, December 15, 2010
Tuesday, December 14, 2010
Sunday, December 12, 2010
Saturday, December 11, 2010
Tuesday, November 23, 2010
Oracle Support Policy and Product Expiration Dates
--Moid
http://www.oracle.com/us/support/library/lifetime-support-technology-069183.pdf
How to mount the CDROM in Linux? --Moid
[root@chicago /]# mkdir -p /mnt/cdrom
[root@chicago /]# mount -t iso9660 -r /dev/cdrom /mnt/cdrom
[root@chicago /]# cd /mnt/cdrom
[root@chicago /]# ls -ltr
to unmount
# umount /mnt/cdrom
# cd /
eject
--Moid
My page is here.
Monday, November 15, 2010
MoidIITDocID-637: How to find out the Oracle port numbers (used for isqlplus, DBConsole, Grid Control [OMS], OM agent etc)? --Moid
iSQL*Plus HTTP port number =5561
iSQL*Plus HTTP port number =5560
Enterprise Manager Console HTTP Port (FlashDB) = 5501
Enterprise Manager Agent Port (FlashDB) = 1831
Enterprise Manager Console HTTP Port (kaleemdba) = 5502
Enterprise Manager Agent Port (kaleemdba) = 1832
Enterprise Manager Console HTTP Port (RecoCAT) = 5503
Enterprise Manager Agent Port (RecoCAT) = 3938
Enterprise Manager Console HTTP Port (STAR) = 5504
Enterprise Manager Agent Port (STAR) = 1830
Enterprise Manager Console HTTP Port (MarsDB) = 5500
Enterprise Manager Agent Port (MarsDB) = 1830
Enterprise Manager Console HTTP Port (alidb) = 5505
Enterprise Manager Agent Port (alidb) = 1831
Enterprise Manager Console HTTP Port (PrimeDG) = 5506
Enterprise Manager Agent Port (PrimeDG) = 3938
Enterprise Manager Console HTTP Port (TRYDB) = 5507
Enterprise Manager Agent Port (TRYDB) = 1832
Hope this helps.
--Moid
Wednesday, November 10, 2010
Thursday, November 4, 2010
Wednesday, November 3, 2010
How to write DBID to alert long on a regular basis? --Moid
as follows:
SQL> select dbid from v$database;DBID------------------------------1794272723
RMAN uses the DBID to uniquely identify databases. The DBID helps RMAN identify the
correct RMAN backup piece from which to restore the control file. If you don’t use a flash
recovery area or a recovery catalog, then you should record the DBID in a safe location and
have it available in the event you need to restore your control file.
Writing the DBID to the Alert.log File
Another way of recording the DBID is to make sure that it is written to the alert.log file on a
regular basis using the DBMS_SYSTEM package. For example, you could have this SQL code execute as part of your backup job
COL dbid NEW_VALUE hold_dbidSELECT dbid FROM v$database;exec dbms_system.ksdwrt(2,'DBID: '||TO_CHAR(&hold_dbid));
After running the previous code, you should see a text message in your target database
alert.log file that looks like this:
==> alert_PrimeDG.log <==Wed Nov 3 03:06:47 2010DBID: 1794272723You can easily put this in a cron job to write on a daily or weekly basis.Extracting of DBID from Redo Log fileAnother way of getting DBID is possible by getting the dump of the any availabe datafile, redolog or archvied log. I chosed to take a dumpfile of the online redolog and following are the steps I have taken.
SQL> ALTER SESSION SET sql_trace = true;Session altered.SQL> ALTER SESSION SET tracefile_identifier=Moid_Logfile_dump;Session altered.SQL> alter system dump logfile '/u15/oradata/Prime/redo01a.rdo';System altered.At this point, I changed my directory to the user dump destination and dumpfile is available to be skinned.
Linux-223:(PrimeDG)$ pwd/u01/app/oracle/admin/PrimeDG/udumpLinux-223:(PrimeDG)$ ls -ltrhtotal 203M-rw-r----- 1 oracle oinstall 948 Nov 3 03:39 primedg_rfs_8676.trc-rw-r----- 1 oracle oinstall 947 Nov 3 03:44 primedg_rfs_8809.trc-rw-r----- 1 oracle oinstall 135M Nov 3 03:49 primedg_ora_8712.trc-rw-r----- 1 oracle oinstall 947 Nov 3 03:49 primedg_rfs_8979.trc-rw-r----- 1 oracle oinstall 68M Nov 3 03:49 primedg_ora_8712_MOID_LOGFILE_DUMP.trcA simple cat of the file, provided me what I was looking for, DBID of my database.
Linux-223:(PrimeDG)$ cat primedg_ora_8712_MOID_LOGFILE_DUMP.trc |grep "Db ID" Db ID=1794272723=0x6af26dd3, Db Name='PRIME'
--Moid
The above instructions can also be found here.
Sunday, October 31, 2010
How to add a number to null in Oracle?
Click here for the screenshot.
--Moid
Friday, October 29, 2010
How to Install Oracle 11g R1 Software and configure database on Windows Vista?
--Moid
How to Install Oracle 10g database on XP?
--Moid
Thursday, September 30, 2010
Sunday, September 26, 2010
Saturday, September 25, 2010
How to display the output of the query vertically?
It uses authid_current user so you can install it ONCE per database and many people can use it (with roles and all intact):
Procedure and display instructions are here.
Reference: http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:1035431863958
Google Key words: "Tom Kyte Print_Table"
--Moid
Thursday, September 23, 2010
How to subscribe to free monthly edition of Oracle Magazine? --Moid
Monday, September 20, 2010
Find the last recovery time/date of the Oracle database when "resetlogs" option was used to open the database (or when incarnation took place)?
Have you ever been asked when was the database restored/reopened (with resetlog options)? It is a simple thing but sometimes a time consuming task especially if you are not very familiar with Oracle DBA dictionary or if you are a Jr. DBAs. Well, the answer can be found here. Hope this comes handy to someone in need.
--Moid
Keywords:
Last recovery date
Last restore date
Last recovery time
last restore time
Sunday, September 19, 2010
How to Migrate Single Standalone to 2-node RAC Cluster
--Moid
Friday, September 10, 2010
How to get the client's machine name and their IP Address in Oracle 10g?
I was recently asked to spool out the client’s machine, their IP addresses and the service_name they are using to connect to RAC DB into a text file. I came up with the following queryand it worked like a charm. Although I tested it on a non-RAC db server, I have no doubt it will work on any RAC cluster.
--Moid
Monday, August 23, 2010
Saturday, July 31, 2010
Tuesday, July 13, 2010
My Notes on building ASM server and migrating databases to ASM on VMWare.
--Moid Muhammad