Oracle DBA | Exadata | Azure | AWS | OCI | PostgreSQL | MSSQLSERVER| Database_Migration | AI
Tuesday, 12 August 2025
Convert oracle standalone database to oracle ASM
Here is the sequence of operations to migrate an Oracle database from a file system to ASM (Automatic Storage Management) and register it with Oracle Clusterware.
1. Initial State & Failed Backup Attempt
First, the database instance is started in MOUNT mode. An initial attempt to back up the database using RMAN fails because the database is running in NOARCHIVELOG mode. An online backup cannot be performed on active datafiles in this state.
# Connect to the idle instance
[oracle@node1 dbs]$ sqlplus / as sysdba
Connected to an idle instance.
SQL> startup mount
Database mounted.
# Attempt backup using RMAN
[oracle@node1 dbs]$ rman target /
connected to target database: ORADB (DBID=2803372975, not open)
RMAN> BACKUP AS COPY DATABASE FORMAT '+DATA';
...
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 08/12/2025 14:20:46
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
...
2. Enabling ARCHIVELOG Mode
To resolve the backup failure, ARCHIVELOG mode must be enabled. An initial attempt fails with error ORA-00265, indicating that instance recovery is required due to the previous unclean state. A clean shutdown and restart in MOUNT mode resolve this, allowing ARCHIVELOG and FORCE LOGGING to be successfully enabled.
# Attempt to enable archivelog mode fails
SQL> alter database archivelog;
*
ERROR at line 1:
ORA-00265: instance recovery required, cannot set ARCHIVELOG mode
# Perform a clean shutdown and restart
SQL> shutdown immediate;
ORACLE instance shut down.
SQL> startup mount;
Database mounted.
# Successfully enable archivelog and force logging
SQL> alter database archivelog;
Database altered.
SQL> alter database force logging;
Database altered.
3. Successful Backup and Switch to ASM
With the database in ARCHIVELOG mode, the RMAN backup to the +DATA ASM disk group now succeeds. The BACKUP AS COPY command creates an image copy of the datafiles directly in ASM. Afterward, the SWITCH DATABASE TO COPY command updates the control file to point to these new datafile locations on ASM, effectively migrating the datafiles.
[oracle@node1 trace]$ rman target /
RMAN> BACKUP AS COPY DATABASE FORMAT '+DATA';
Starting backup at 12-AUG-2025 14:27:48
...
output file name=+DATA/ORADB/DATAFILE/system.261.1208960879
...
Finished backup at 12-AUG-2025 14:29:15
# Switch database to use the new datafile copies in ASM
RMAN> SWITCH DATABASE TO COPY;
datafile 1 switched to datafile copy "+DATA/ORADB/DATAFILE/system.261.1208960879"
...
# Open the database
RMAN> ALTER DATABASE OPEN;
Statement processed
4. Relocating Redo Log Files to ASM
The final migration step is moving the online redo log files from the local file system to ASM. This is done by adding new log groups in ASM, switching log files until the old ones are no longer active, and then dropping the old log files.
-- Verify datafiles are now in ASM
SQL> SELECT name FROM V$DATAFILE;
NAME
--------------------------------------------------
+DATA/ORADB/DATAFILE/system.261.1208960879
+DATA/ORADB/DATAFILE/sysaux.262.1208960903
...
-- Add new redo log groups in the '+FRA' disk group
SQL> alter database add logfile group 4 ('+FRA/redo1.log') size 500M;
SQL> alter database add logfile group 5 ('+FRA/redo2.log') size 500M;
SQL> alter database add logfile group 6 ('+FRA/redo3.log') size 500M;
-- Switch logfiles to make old groups inactive
SQL> alter system switch logfile;
-- Drop old file system-based redo log groups
SQL> alter database drop logfile group 2;
SQL> alter database drop logfile group 3;
-- The current log group cannot be dropped immediately
SQL> alter database drop logfile group 1;
*
ERROR at line 1:
ORA-01623: log 1 is current log for instance oradb (thread 1) - cannot drop
-- Switch again to make group 1 inactive, then drop it
SQL> ALTER SYSTEM SWITCH LOGFILE;
SQL> ALTER SYSTEM SWITCH LOGFILE;
SQL> alter database drop logfile group 1; 5. Registering and Managing with Oracle Clusterware
Finally, the database is registered with Oracle Clusterware using the srvctl utility. This allows the cluster to manage the database startup, shutdown, and monitoring.
# Add the database and instance to the Clusterware configuration
[oracle@node1 ~]$ srvctl add database -d oradb -o /u01/app/oracle/product/19.0.0/db_1
[oracle@node1 ~]$ srvctl add instance -d oradb -i oradb1 -n node1
# Start the database using srvctl
[oracle@node1 dbs]$ srvctl start database -d oradb
# Verify the status
[oracle@node1 dbs]$ srvctl status database -d oradb
Instance oradb1 is running on node node1
# Final check of the running processes
[oracle@node1 ~]$ ps -ef|grep pmon
oracle 21502 1 0 15:57 ? 00:00:00 ora_pmon_oradbWednesday, 10 December 2014
Is C Still Relevant in the 21st Century?
Thursday, 10 July 2014
15 Body language blunders to watch out....
Watch:https://www.linkedin.com/today/post/article/20140707061900-64875646-the-15-biggest-body-language-mistakes-to-watch-out-for?goback=.mpd2_*1_*1_*1_*1_*1_*1_20140707061900*564875646*5the*515*5biggest*5body*5language*5mistakes*5to*5watch*5out*5for&trk=prof-post
Tuesday, 10 June 2014
Secret Codes
PROGRAMMER CODES!
*#06# displays phones IMEI NO.
*#9999# SW Version.
*#8888# HW Version.
*#0842# Vibrator.
*#0289# Buzzer.
*#0228# Battery Stat.
*#0782# RTC Display (?¿)
*#0523# LCD Contrast.
*#0377# NVM error log (?¿)
*#5646# GSM Logo Set.
*#0778# Sim Serv, Table. (?¿)
*#0638# SIM Network ID.
*#0746# SIM info.
*#0076# Production No.
*#3323# Forced Crash (?¿ don't know, but dose not sound good)
*#2576# SIM error.
*#4357# This screen ( the actural help screen)
*#9324# Netmon <> press the hung up key to exit.
*#0778# To see what your SIM suportes.
*#0746# Your sim type.
*#32439483 Digital Audio Interference off.
*#32436837# Digital Audio Interference on.
*#9998*JAVA# Edit GPRS/CSD settings (S100 only).
*#9998*Help# Screen / List of codes.
*#9998*RTC# RTC Display.
*#9998*bat# Battery Status.
*#9998*buz# Turns Buzzer On.
*#9998*vub# Turns Vibator On.
*#9998*LCD# LCD Contrast.
*#9998*9999# Sotfware Version.
*#9998*8888# Hardware Version.
*#9998*377# Non Volatile Merory Error Log.
*#9998*NET# SIM NEtwork ID
*#9998*778# SIM Serv. Table.
*#9998*968# Remider Tune.
*#9998*NVM# Displays Non-Volitile Mermory Status.
*#9999*C# Netmon.
*#9998*2576# Forces SIM Error.
*#9998*DEAD# Forces Phone Crash.
*#9998*533# (LED).
*#999* Show date and alarm clock.
*#8999*638# show network information.
*#9998*5646# change operator logoat startup.
*#9998*968# View melody alarm.
*2767*MEDIA# Resets the media on phone <>DELETES all downloaded PICS/TONES <>
*2767*FULL# Resets the EEPRON* <>°DANGEROUS°<>
*2767*CUST# Resets the sustom EEPRON.
*2767*JAVA# Resets JAV downloads ( dealets all downloaded midits)
*2767*STACKREST# RESETS STACK.
*2767*225RESET# * VERY Dangerous.
#0111*0000000# Removes SIM Lock.
*2767*66335#
*2767*3700#
*2767*7100#
*2767*8200#
*2767*7300#
*2767*2877368#
*2767*33927#
*2767*85927#
*2767*48927#
*2767*37927#
*2767*28927#
*2767*65927#
*2767*29927#
*2767*78927#
*2767*79928#
*2767*79928#
*2767*82927#
*2767*787927#
*2767*73738927#
*2767*33667#
*2767*85667#
*2767*688# = Unlocking code
*#8999*8378# = All in one code
*#4777*8665# = GPSR Tool
*#8999*3825583# = External Display
*#8999*377# = Errors
*#2255# = call list
#*5737425# = JAVA Something chouse 2and it chrashed.
#*536961# = Java Status Code
#*536962# = Java Status Code
#*536963# = Java Status Code
#*53696# = Java Status Code
#*1200# = AFC DAC Val
#*1300# =IMEI
#*1400# = IMSl
#*2562# ?¿ white for 15 sec than restarts.
#*2565# Check Blocking
#*3353# check code
#*3837# = ?¿ White for 15 secs than restarts.
#*3849# = ?¿ white for 15 secs than restarts.
#*7222# = Operation Typ ( class C GSM)
#*7224# = I got ERROR !
#*7252# = Operation Typ ( Class B GPRS)
#*7271# Multi Slot ( Class 1 GPRS)
#*7271# Multi Slot ( Class 4 GPRS)
#*7337# = EEPROM Reset ( unlock and resets Wap settings)
#*2787# CRTP ON/OFF
#*3737# L1 Dbg Data
#*5133# L1 Dbg Data
#*7288# GPRS Attached
#*7287# GPRS Detached
#*7666# SrCell Data
#*7693# Sleep Act/Deact ( enable or disable the black screen after doing nothen for a while)
#*7284# Class B/C Or GPRS
#*2256# Calibration Info
#*2286# Battery Data
#*2679# Copycat Feature (Activate or deactavite)
#*3940# External loop 9600 bps
#*8462# sleeptime
#*5176# L1 Sleep
#*5187# L1C2G Trace ( activate or deactivate)
#*3877# Dump Of spy trace
5/31/2006 12:15 PM
*#8999*636# Have no clue i see 20 lines
*#8999*8376263# HW Ver SW Ver and build date
*#746565# Checks the locks
*7465625*638*Code# Enables Network lock
#7465625*638*Code# Disables Network lock
#7465625*782*code# Disables Subset lock
*7465625*782*code# Enables subset lock
*7465625*746*code# Enables SIM lock
#7465625*746*code# disables SIM lock
*7465625*28746# Auto SIM lock On
#7465625*28746# Auto SIM lock Off
(*Known Unlock CODES*)
S500/ P400/ E500/ E700/ X100/ X600/ E100/
Enter *2767*3855# with and accepted SIM card If this codes fails, Enter *2767*688# or #*
7337#
A300/ A400 / A800
*2767*637#
Enter code above with an accepted SIM card.
INVENTORS
(1) Key board — Herman Hollerith, first keypunch device in 1930’s
(2) Transistor — John Bardeen, Walter Brattain & Wiliam Shockley (1947 - 1948)
(3) RAM — An Wang and Jay Forrester (1951)
(4) Trackball — Tom Cranston and Fred Longstaff (1952)
(5) Hard Disk — IBM , The IBM Model 350 Disk File (1956 )
(6) Integrated Circuit— Jack Kilby & Robert Noyce (1958)
(7) Computer Mouse — Douglas Engelbart (1964)
(8) Laser printer— Gary Stark weather at XEROX in 1969.
(9) Floppy Disk— Alan Shugart & IBM( 1970)
(10) Microprocessor — Faggin, Hoff & Mazor – Intel 4004
Wednesday, 13 November 2013
Tracing facebook user
First you got to find out the IP address of that User.
To Do so we will be using “netstat” command in windows. If you want to know the IP address of a specific person on facebook or orkut or any chat service, there is only one way: Just invite or ping him for a chat and while chat is ON open ‘Command Prompt‘ on your PC (Start >Run>cmd).
note: before trying this make sure you close all the other tabs in your browser. and only facebook is open. also if possible delete all the history and cache from your browser.
When command prompt opens Type the following command and hit Enter.
netstat -an
And you will get all established connections IP addresses there. Note down all the suspicious IP’s.
The Next Step is to Trace that user using his IP address.
To do so we will be using IP tracer service. Go to the below address and paste the IP address in the box that says “lookup this ip or website”. and it will show you the location of the user.
http:// www.ip-adress.com/ip_tracer/
It will show you all the information about that user along with his ISP and a Location in the MAP. Now in the MAP Just click on “click for big ip address location” in the big picture you can actually zoom in. and try to recognize the area. If any serious matter just note down the ISP details in that page and contact them about the IP. they will respond you.
Other netstat commands:
-a Displays all connections and listening ports.
-e Displays Ethernet statistics. This may be combined with the -s option.
-n Displays addresses and port numbers in numerical form.
-p proto Shows connections for the protocol specified by proto; proto may be TCP or UDP.
-s option to display per-protocol statistics, proto may be TCP, UDP, or IP.
-r Displays the routing table.
-s Displays per-protocol statistics. By default, statistics are shown for TCP, UDP and IP; the
-p option may be used to specify a subset of the default.

