Tuesday, 2 April 2013

Basics things DBA must know


Starting Oracle Single Node Instance.
su - oracle                     -- this is for switch user puprpose (oracle-Database user)
lsnrctl start orcl             -- lsnrctl means listener control starting (orcl- SID of database)
then we have to enter in sql prompt
sqlplus '/as sysdba' --sys-username sys-password sysdba previlege
startup -- to start instance
exit -- to exit sqlprompt
exit --to exit database
then we have to start application
su -applmgr  (applmgr- application user)
cd $COMMON_TOP/admin/scripts/SID_HOSTNAME/
ls --to view files inside scripts
./adstrtal.sh apps/apps  --to start application
NFS MOUNT FROM SERVER A to B
root@A ] scp -r Filename root@ipaddress B:/Location in B server 
root@A ] password for B:
(this should be run as root user from server A)
Nfs Mounting steps:-
*Source system A :-* commands are 1)vim /etc/exports -- to view already nfs mounted 2)/vin *(rw,rcync) 3)chkconfig portmap on --portmap on 4)service portmap restart --portmap restart 5)chkconfig nfs on --nfs on 6)service nfs restart --nfs restart 7)showmount -e 8)exportfs *Target System B :-* 9)mount ipaddress(A):/vin /mnt Linux Hard Disk Format Command
1.Partition the new disk using fdisk command
# fdisk -l | grep '^Disk' 

output
Disk /dev/sda: 251.0 GB, 251000193024 bytes
Disk /dev/sdb: 251.0 GB, 251000193024 bytes.

Step 1:Format the new disk using mkfs.ext3 command

# mkfs.ext3 /dev/sdb1 

step 2:To partition the disk - /dev/sdb, enter: 
# fdisk /dev/sdb 
The display shows the basic fdisk commands you need are:
  • m - print help
  • p - print the partition table
  • n - create a new partition
  • d - delete a partition
  • q - quit without saving changes
  • w - write the new partition table and exit
step 3: type n and enter
step 4:then it will ask the partition number , we have to set 1 , that is default one in starting ,
step 5:then it ask the first partition size , after we give partition sizeand pressed enter it will again show the basic fdisk commands ,
step 6:if u want to create a second partition then you have to repeat the same steps by using partition number 2 and partition size is from partition 1 end size to partition 2 size
step 7:finally we have to type w and press enter then quit otherwise the partition will not save
Source http://www.cyberciti.biz/faq/linux-disk-format/

No comments:

Post a Comment