Halim, a Georgia Tech graduate Senior Database Engineer/Data Architect based in Atlanta, USA, is an Oracle OCP DBA and Developer, Certified Cloud Architect Professional, and OCI Autonomous Database Specialist. With extensive expertise in database design, configuration, tuning, capacity planning, RAC, DG, scripting, Python, APEX, and PL/SQL, he combines technical mastery with a passion for innovation. Notably, Halim secured 16th place worldwide in PL/SQL Challenge Cup Playoff on the year 2010.
Tuesday, January 31, 2012
Where is the location of alert log file in oracle 11g ?
just show the value of "background_dump_dest"
example:-
SQL>
SQL>
SQL> select * from v$version ;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL>
SQL>
SQL> show parameter background_dump_dest
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
background_dump_dest string g:\oracle11gr2\app\administrat
or\diag\rdbms\halimdb1g\halimd
b1g\trace
SQL>
so i will get my alert log in this loacation.
g:\oracle11gr2\app\administrator\diag\rdbms\halimdb1g\halimd b1g\trace
Monday, January 9, 2012
How to recover oracle database if the archive log/redo log file is missing ?
1) Set _ALLOW_RESETLOGS_CORRUPTION=TRUE in init.ora file.
2) Startup Mount
3) Recover database
4) Alter database open resetlogs.
5) reset undo_management to "manual" in init.ora file.
6) startup database
after then
I) perform a full-database export,
II) create a brand new and separate database, and finally
III) import the export dump.
7) Create new undo tablespace
changed undo_management to "AUTO" and undo_tablespace to "New undo tablespace"
9) restart the database.
How to Change ADMIN user of internal Workspace password and port in oracle apex ?
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Administrator> G:
G:\cd G:\app\apex_4_install\apex
G:\app\apex_4_install\apex>
G:\app\apex_4_install\apex>
G:\app\apex_4_install\apex>
G:\app\apex_4_install\apex>sqlplus /nolog
SQL*Plus: Release 11.1.0.6.0 - Production on Tue J
Copyright (c) 1982, 2007, Oracle. All rights rese
SQL>
SQL> conn / as sysdba
Connected.
SQL>
SQL>
SQL>
SQL> @apxconf.sql
PORT
----------
8080
Enter values below for the XDB HTTP listener port and the password for the Appli
cation Express ADMIN user.
Default values are in brackets [ ].
Press Enter to accept the default value.
Enter a password for the ADMIN user []
Enter a port for the XDB HTTP listener [ 8080]
...changing HTTP Port
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Session altered.
...changing password for ADMIN
PL/SQL procedure successfully completed.
Commit complete.
SQL>
Sunday, January 8, 2012
how to show a string as a ROW in oracle database query?
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jan 9 10:10:57 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn scott@orcl105
Enter password:
Connected.
SQL>
SQL>
SQL> variable a varchar2(4000) ;
SQL>
SQL> exec :a:='MUHAMMADABDULHALIM' ;
PL/SQL procedure successfully completed.
SQL> SELECT SUBSTR (:a, LEVEL, 1)
2 FROM DUAL
3 CONNECT BY LEVEL <= LENGTH (:a);
S
-
M
U
H
A
M
M
A
D
A
B
D
S
-
U
L
H
A
L
I
M
18 rows selected.
SQL>
SQL>
SQL> exec :a:='MUHAMMAD ABDUL HALIM' ;
PL/SQL procedure successfully completed.
SQL>
SQL>
SQL> SELECT SUBSTR (:a, LEVEL, 1) FROM DUAL CONNECT BY LEVEL <= LENGTH (:a);
S
-
M
U
H
A
M
M
A
D
A
B
S
-
D
U
L
H
A
L
I
M
20 rows selected.
SQL>
in a contrary of this, is here...
http://halimdba.blogspot.com/2009/11/use-of-vmconcat.html
Thursday, January 5, 2012
What to Do If the Root Password Is Lost in sun solaris operating system?
1) Insert the Solaris Operating System CD-ROM into the CD-ROM drive.
2) Once the CD-ROM is in the drive, perform a stop-a command. This brings the system down to the ok prompt.
3) From the ok prompt, perform a single-user boot from the Solaris 2.x installation CD-ROM.
ok boot cdrom -s
4) At the "#" prompt, try to determine which disk is the system's boot disk (containing the root file system).
There are several Sun architectures and various configurations of the systems when it comes to a boot disk. As a general rule, most boot disks are attached to controller 0 (c0). Usually, their SCSI target is either 3 (t3) or 0 (t0). However, because Sun machines are very flexible, the boot disk could be at a different location.
NOTE: If your boot disk is MIRRORED using Solaris Disksuite[TM] or Solaris[TM] Volume Manager software, "Solaris[TM] Volume Manager software and Solstice DiskSuite[TM] software: Mounting metadevices" This article explains how to mount a metadevice without breaking the integrity of the mirrored data.
5) At the "#" prompt, enter the following:
# eeprom boot-device
The output might appear to be simple, such as "disk" or "disk1," or as a pathname "/iommu/sbus/espdma@4,8400000/...../sd@3,0:a". Make note of the boot-device. If the boot-device is a pathname, it is beyond the scope of this Technical Instruction to provide the location of the customized boot disk. However, for most configurations, you can find the location easily.
6) The "Format" command shows you all available disks:
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0
/pci@1f,0/pci@1,1/ide@3/dad@0,0
Specify disk (enter its number):
7) Press
Now, you will have an idea what disks are on the system. If the boot-device is "disk" and the format shows "c0t0d0" (or on some systems "c0t3d0"), then that is a boot device. If the boot-device shows "disk1" and the format shows "c0t1d0," then that is the boot device. If format shows multiple disks, then based on what the "eeprom boot-device" command shows, the boot disk would be:
boot-device format
disk c0t0d0 or c0t3d0 (machine dependent)
disk1 c0t1d0
disk2 c0t2d0
disk3 c0t3d0 or c0t0d0 (machine dependent)
and so on ....
8) Because the system was not brought down gracefully (no root password, means having to use the Stop-a keystroke to "crash" the system), you should run "fsck" to clean the root partition (slice). Fsck also confirms that you selected the proper slice:
# fsck /dev/rdsk/cXtYd0s0
where the X and Y are determined by the previous procedure . It is also possible to have a root partition that is not on slice 0 (s0), but, again, that is not a standard configuration. The output of "fsck" will look like this:
** /dev/rdsk/c0t0d0s0
** last mounted on /
** Phase 1 .....
.....
The second line "** Last mounted on /" confirms that this is the correct root fs partition.
9) Answer "y" to any questions fsck asks. There shouldn't be too many items needing repair. If there are numerous items needing repair, then there could be a corrupted root fs.
10) After fsck is finished, you can mount the root partition:
# mount /dev/dsk/cXtYd0s0 /a
Again, X and Y are same as for the fsck command.
Example:
# mount /dev/dsk/c0t0d0s0 /a
11) From the root prompt, enter the following command:
# TERM=sun; export TERM
12) Edit the /etc/shadow file:
# vi /a/etc/shadow
The first line of the file is almost always the one you want to modify. The first line looks like this:
root:c3.yAVmYodWsc:6445::::::
13) Delete every character between the first and second colons in the first line.
When you finish the process, the first line should look like this:
root::6445::::::
14) After you delete the characters in the first line, enter the following (in the command mode) to perform a write force quit to exit the document and save the changes:
:wq!
15) Unmount the file system, as follows:
# cd /
# umount /a
16) Reboot the system:
# reboot
The preceding command shuts down the system and brings it back up in multi-user mode.
17) At the login window, log in as root. You should get in automatically.
18) Change the root password immediately.
My Blog List
-
-
-
Savepoint Funny3 months ago
-
-
-
-
-
-
-
-
-
Moving Sideways10 years ago
-
-
Upcoming Events...12 years ago
-