Tuesday, November 23, 2010

Oracle Support Policy and Product Expiration Dates

Details can be accessed from here.

--Moid




http://www.oracle.com/us/support/library/lifetime-support-technology-069183.pdf

How to mount the CDROM in Linux? --Moid

create an empty directory called /mnt/cdrom

[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

MIITDocID-916: How to find the biggest / Largest table (row wise) from a schema (or all schemas)? --Moid

Click here for the query.

--Moid

MIITDocID-919: How to find out the used size of the schema? --Moid

Click here for the SQL.

--Moid

How to check the current size (given and used) of the database?

Click here for the query.

--Moid

MoidIITDocID-637: How to find out the Oracle port numbers (used for isqlplus, DBConsole, Grid Control [OMS], OM agent etc)? --Moid

moid@Linux-223:(PrimeDG)$ cat $ORACLE_HOME/install/portlist.ini
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

Wednesday, November 3, 2010

How to write DBID to alert long on a regular basis? --Moid

Every Oracle database has an internal unique DBID that can be queried from V$DATABASE
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: 1794272723
You 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.trc
A 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. 

Followers