Sunday, December 28, 2014

How to make backup using RMAN.

How to make backup using RMAN.
At first, go to cmd with “run as administrator” mode.
Ø  SET ORACLE_SID=target_db_name
Go to sqlplus:
Ø  shutdown immediate;
Ø  startup mount;
Ø  alter database archivelog;
Ø  alter database flashback on;
Ø  alter database open;
Ø  select name from v$database;
Ø  select name from v$datafile;
(here shows all datafile file location)
now Again go to CMD with run as administrator” mode.
Ø  SET ORACLE_SID=target_db_name
Ø  rman target /
(by typing this rman is now on)
rman:
Ø  show all;
(all parameter is shows )
Ø  backup as copy datafile ‘data_file_location’;
(data file is now in backup, and by default it is on the flash recovery area/target_db/backupset)
Ø  backup database plus archivelog;
(Full database backup now)
Ø  list backup; (to show all backup)
Ø  list copy of database; (to show image copy of database)
sqlplus:
Ø  show parameter recovery;
(its shows all backup file location with detail)

Can Take Backup of that file:
1.      control file
2.      data file
3.      archivelog file
4.      sp file

5.      password file

Wednesday, December 17, 2014

How to break root password in Redhat linux 7.

HOW TO BREAK root PASSWORD in REDHAT 7
Step 1: power on your pc and go to the graph page. Press ‘e’ 
Graph/kernel has three information: 1. HDD info(MBR) 2. Kernel location 3. Image
Figure: Graph page
Step 2: go to the kernel location line which start with “linux ….” At the end of this line give a space and type “rd.break”. then for exit/begin press “ctrl+x”.
Step 3: Now you are in maintenance/emergency mode, where shows “switch-root#”.
Note: ‘/’ is always in read only mode. So we have to move ‘/’ data to ‘/sysroot’ directory for temporary purpose. And convert ‘/sysroot’ to read-write mode and also give the total power of ‘/’ to ‘/sysroot’.
Step 4: now type “mount –o remount,rw /sysroot” note: ‘-o’ means option.
Step 5: type” chroot /sysroot”
Note: By using chroot, we can give the power of root to ‘/sysroot’. By giving that command the shall is now change.
Step 6: now change the password of root by typing “passwd”
Note: type the new passwd for 2 times.
Step 7: now type: “touch /.autorelabel”
Note: By the creating this file, it makes relabel the change to the total system.
Step 8: now press “exit” for exit from the 1st shell.
Step 9: now press “exit” for exit from the 2nd shell.
Note: after exit the pc will reboot, and u will see the checking percentage, it means the autorelabel is works.
Enjoy

Monday, December 15, 2014

Oracle database architecture Snapshot

Oracle database architecture Snapshot

Basic linux command for oracle

Basic Linux Commands for Oracle:
Listed down some of the basic commands which will help you while administering or implementing Oracle on linux.
Password Files: ‪#‎cat‬ /etc/passwd

Group File: #/etc/group
Create User: ‪#‎useradd‬
Delete User: ‪#‎userdel‬
Modify User Account : ‪#‎usermod‬
Performance Monitor: ‪#‎top‬
System Activity Reporter: ‪#‎sar‬
Virtual Memory Statistics: ‪#‎vmstat‬
IO Statistics: ‪#‎iostat‬
Display Swap Size: ‪#‎free‬
Activate Swap: ‪#‎swapon‬ -a
Network IP configuration files: ‪#‎cd‬ /etc/sysconfig/network-scripts/
Host file : #cat /etc/hosts
NIC Configuration: ‪#‎ifconfig‬ -a
File system table: # cat /etc/fstab
Check free disk: ‪#‎df‬ -k
Disk label: ‪#‎fdisk‬ -l
Display Volume Group: ‪#‎vgdisplay‬ -v
Physical volume list: ‪#‎pvdisplay‬
List logical volume: ‪#‎lvdisplay‬
Check physical RAM: #free
NTP configuration file: #cat /etc/ntp.conf
Install RPM: ‪#‎rpm‬ -i rpm_name
Uninstall RPM: #rpm -e rpm_name
List installed RPM: #rpm -qa
CPU info: #cat /proc/cpuinfo
Get OS kernel: ‪#‎uname‬-r

Oracle ASM configuration on linux

Oracle ASM on Linux

ASM RPMs would be required to configure ASM utility on Linux.
This demo has been done on RHEL 5 x86_64 bit.
1. Install RPMs.
‪#‎rpm‬ -ivh oracleasm-2.6.18-238.el5-2.0.5-1.el5.x86_64.rpm
#rpm -ivh oracleasm-2.6.18-238.el5debug-2.0.5-1.el5.x86_64.rpm
#rpm -ivh oracleasm-2.6.18-238.el5xen-2.0.5-1.el5.x86_64.rpm
#rpm -ivh oracleasm-support-2.1.4-1.el5.x86_64.rpm
2. Configure ASM
#/etc/init.d/oracleasm configure
Here we have to provide which user and group would be configured for ASM disk. Also it required to mention whether ASM driver should be auto-start or not.
Now ASM utility has been installed and configured on Linux.
You can also configure YUM Repository to install rpms for ASM utility.
YUM Configuration in Linux
Installing RPMs in Linux is very smooth but many times it headache to install all the dependency.
To remove this headache, RHEL comes with YUM utility which automatically takes all the dependency RPMs and installs it smoothly.
Step by step procedure to configure YUM
1. Mount REDHAT Operating System DVD/ISO on the server
2. Make a directory to store rpms from REDHAT DVD/ISO and copy Server directory from mounted DVD/ISO to folder created folder, which will copy all RPMs to local system.
3. Install createrepo RPM which required for YUM repository creation.
4. Create new repository.
5. Remove/move old repo files from /etc/yum.repos.d and create new repo file.
gpgcheck - This is to check the authentication of the repository, which is disabled in this case.
6. Check Configuration
Note:In-order to use yum repository we have to clean the yum meta data, so before installing any package first time, use yum clean all.
Installing vsftpd RPM through YUM

ORACLE 11g DATABASE Primary Architecture

Oracle Database 11g Primary Architecture Components which includes
- Memory Components
- Background Processes
- Logical Structure
- Physical Structure

Oracle TNS problem

TNS ERROR LIST


Go to that  link. 
http://docs.oracle.com/cd/B10501_01/server.920/a96525/tnsus.htm

MY LEARNING

Hi, This is "Asraful Azim Al Khalil". I am starting to learn oracle database and redhat linux.