To multiplex a control file: 1. Set the new location. Example: SQL> alter system set control_files='/u01/app/control04.ctl', '/u01/app/control01.ctl','/u01/app/control02.ctl', '/u01/app/control03.ctl' scope=spfile; 2. Shutdown the database 3. Copy a already existing controlfile to the above locatons and rename it. 4. Startup the database.
Search This Blog
Thursday, December 29, 2011
How to Multiplex Control Files ?
Types of Checkpoints in Oracle.
Checkpoint types can be divided as INCREMENTAL and COMPLETE. Also COMPLETE CHECKPOINT can be divided further into PARTIAL and FULL. In Incremental Checkpoint,checkpoint information is written to the datafile header and controlfile In the following cases:
Wednesday, December 28, 2011
Oracle 10g BigFile Tablespace.
One of the new features in oracle 10g is the introduction of bigfile tablespace. A bigfile tablespace is a tablespace which basically consists of one and only one datafile which can be as large as 128 Terabytes in size depending upon the block size of the tablespace. Following is the list of block sizes and maximum sizes for bigfile tablespaces.
Oracle Database Tablespace Management.
To check for all the tablespaces in your database issue the following query. SQL> select tablespace_name from dba_tablespaces; TABLESPACE_NAME ------------------------------ SYSTEM SYSAUX UNDOTBS1 TEMP USERS EXAMPLE 6 rows selected.
Oracle Database Read Only Mode.
Opening a database in read only mode Opening a database in read only mode enables you to query an open database. Read only mode guarantees nothing is written to the datafiles and redo log files.
Oracle Database Startup Restricted Feature.
STARTUP RESTRICTED
when to use 1. perform import or export of data 2. Data load using sql*loader 3. temporarily prevent users from accessing the data. 4. Migration or upgrade operations.
Sunday, December 25, 2011
Oracle 11g RMAN Active Database Duplication Feature.
Earlier in pre Oracle 11g releases in order to clone or
duplicate a database, we had to take backups with RMAN
of the source database and copy the backup files to
the destination server as well. But with 11g database duplication
or cloning has gone one step further. With the new RMAN active
database duplication feature taking backups and staging them
is no longer required. RMAN can now directly clone the database
from the source without the need for backups. The only
criteria are that the source database should be in archivelog mode.
Thursday, December 22, 2011
Oracle 11g I/O Calibration Feature.
Earlier in order to assess the I/O capabilities of the system on which you would install Oracle database, there were two options. 1)Use third party tools (Mercury loadRunner, Benchmark Factory etc). 2)Use ORION from Oracle.
Oracle 11gR2 Deinstall tool.
Before 11gR2 Uninstalling the Oracle software was really a pain both on windows as well as on linux platforms. But now Oracle 11gR2 with comes with aa awesome tool 'Oracle Deinstall utiliy'. Just execute one simple command answer a couple of questions and you can remove your whole Oracle software along with your database and listeners.
Oracle 11g create spfile from memory.
In pre Oracle 11g releases we had the feature of conversion from SPFILE to
PFILE and vice versa.
But Oracle 11g has gone one step further, SPFILE can now be created directly from memory.
SQL> create spfile=’/u01/app/spfileorcl.bak’ from memory;This command will capture all the settings from the memory and dump them to an SPFILE. This is a very useful utility to take backup of your SPFILE before any changes are made using ‘alter system’ command. In order to check and read the new created file the following command can be used : -
SQL>!strings /u01/app/spfileorcl.bak
Friday, December 16, 2011
Oracle 11g Memory Advisor feature.
Among many dynamic views oracle has added a new view, V$MEMORY_TARGET_ADVICE. The purpose of this view is to give recommendations related to the sizing of the memory_target parameter. Before going further please make sure that memory management is set to automatic in your database, otherwise this feature will not work.
Sunday, November 27, 2011
SQL*LOADER
This example illustrates how to insert data from a text file to a table
in the HR schema using SQL loader.
The data file is named as “records.dat”. The controlfile file is named as “records.ctl”. The logfile is named as “records.log”. 1)Connect to the HR schema and create a tables as “TEST”.
Sunday, November 6, 2011
How to repair broken MBR in RHEL 6 ?
1) Go to the grub command line when the system boots up.
2) Find the partition which contains the grub.conf file.
2) Find the partition which contains the grub.conf file.
grub> root (hd0,0): Filesystem type is unknown, partition type 0x8e3) Reinstall grub on the returned partition.
grub> setup (hd0)4) The above command should fix your broken MBR, now reboot the system.
grub> reboot
Monday, October 24, 2011
How to enable grouplist in yum : RHEL 6 ?
You may encounter an error in yum if you type the following command : [root@ora ~]# yum grouplist Error: No group data available for configured repositories.
Saturday, October 22, 2011
How to configure Samba Server in RHEL 6 ?
# 1 Configuring a shared directory which can be accessed by anyone. Server Settings [root@ora ~]# yum –y install samba* [root@ora ~]# mkdir /home/share [root@ora ~]# chmod 777 /home/share [root@ora ~]# vi /etc/samba/smb.conf
Thursday, October 13, 2011
How to configure PXE Server in RHEL 6 ?
Saturday, October 8, 2011
How to restore Spfile from autobackup ?
Login to your database through RMAN prompt.
[oracle@ora ~]# export ORACLE_SID=orcl [oracle@ora ~]# rman target=/ # Shutdown your database if it is open.
Friday, October 7, 2011
How to configure FTP Server (vsftp) in RHEL 6 ?
This article contains instructions to configure a basic FTP Server.
Let us begin. Install the necessary packages.
Let us begin. Install the necessary packages.
[root@ora ~]# yum –y install vsftp*
Open the file and edit and add as mentioned below:
Wednesday, October 5, 2011
Wednesday, September 28, 2011
How To Configure SSH Server in RHEL 6 ?
Open the SSH configuration file.
[root@ora ~]# vi /etc/ssh/sshd_config # on line 42: uncomment and change the value to ‘no’ PermitRootLogin no
Sunday, September 25, 2011
Automatic Memory Management in Oracle 10g and 11g.
Automatic Memory Management in Oracle 11g.
Assuming our required memory requirement is 3G, we might issue the following statements.
Assuming our required memory requirement is 3G, we might issue the following statements.
CONN / AS SYSDBA ALTER SYSTEM SET STATISTICS_LEVEL=TYPICAL SCOPE=SPFILE; #Leave some room for possible future memory growth #without instance restart. ALTER SYSTEM SET MEMORY_MAX_TARGET=5G SCOPE=SPFILE; -- Set the dynamic parameters. ALTER SYSTEM SET MEMORY_TARGET=3G SCOPE=SPFILE; ALTER SYSTEM SET PGA_AGGREGATE_TARGET=0 SCOPE=SPFILE; ALTER SYSTEM SET SGA_TARGET=0 SCOPE=SPFILE; ALTER SYSTEM SET DB_CACHE_SIZE=0 SCOPE=SPFILE; ALTER SYSTEM SET SHARED_POOL_SIZE=0 SCOPE=SPFILE; ALTER SYSTEM SET LARGE_POOL_SIZE=0 SCOPE=SPFILE; ALTER SYSTEM SET JAVA_POOL_SIZE=0 SCOPE=SPFILE;
How to recover root password in RHEL 6 ?
Saturday, September 24, 2011
Monday, July 11, 2011
How to change an Oracle Database password temporarily.
Lets unlock the hr user and give it a password.
SQL> alter user hr identified by hr account unlock; User altered.
Undo tablespace recovery in case of no backups.
This method to recover Undo tablespace is not a substitute for recovery procedures
through backups as mentioned in the official Oracle documentation.
But if you get stuck in a situation where you don’t have any backups and need to
recover your Undo tablespace , then use this method as a last resort.
through backups as mentioned in the official Oracle documentation.
But if you get stuck in a situation where you don’t have any backups and need to
recover your Undo tablespace , then use this method as a last resort.
Friday, April 8, 2011
Drop a Target Database Using RMAN in Oracle 10g.
Beginning with Oracle 10g Release 1 onwards, A database can be dropped
by executing few simple statements.
With this method all datafiles, controlfiles, Redo log files, Spfile, Archived
Redo log files, backups will be dropped along with the target database.
by executing few simple statements.
With this method all datafiles, controlfiles, Redo log files, Spfile, Archived
Redo log files, backups will be dropped along with the target database.
Friday, February 25, 2011
Oracle 10g Clone database using Rman.
Clone Database on the same machine (locally).
1) First make sure your database is in archivelog mode. 2) Make a fresh backup of your database using Rman. 3) The SID of the database which I have is “orcl”. The cloned database name will be “dup”. 4) Add the following lines to listener.ora file.
Subscribe to:
Posts (Atom)