아래는 Goodus라는 업체에서 교육한 것을 하이라이터가 노트 삼아 막우잡이(?)로 기록한 것이다. 본인이 그냥 참고하기위해 남겨두는 것이다. 뭐 유심히 보실 필요는 없을 듯 하다.
*오라클 Admin 교육
1. 04/12
[root@park ~] #id
[root@park ~] #su - oralce
park:/oracle:park>$ls -alrt
park:/oracle:park>$vi .bash_profile
park:/oracle:park>$which gcc
park:/oracle:park>$which gcc
park:/oracle:park>$echo $ORACLE_HOME
park:/oracle:park>$ls -all
park:/oracle:park>$export DISPLAY=61.250.99.196:0.0
park:/oracle:park>$echo $DISPLAY
park:/oracle:park>$xclock
ps -ef | grep lsnr
lsnrctl status
2. 04/13
*export 백업
1. export 백업
1) 특정 user export 백업
C:\> exp system/oracle file=exp_xosl2_d_p.dmp log=exp_xosl2_d_p_exp.log owner=exp_xosl2_d_p
2) 전체 db export 백업
C:\> exp system/oracle file=exmp_xosl2_d_p.dmp log=exp_xosl2_d_p_exp.log feedback=10000 buffer=10240000
2. User 생성 후 테이블 스페이스 생성
3. imp system/oracle file=exp_xosl2_d_p.dmp log exp_xosl2_d_p_imp.log fromuser=exp_xosl2_d_p touser=exp_xosl2_d_p
-------------------------------------------------------------------------------------------
smon 프로세스가 작동중인지 확인 명령어(윈도우에서는 services.msc와 동일함)
ps -ef | grep smon
echo $ORACLE_SID
export ORACLE_SID=goodus2
$su -oralce
export ORACLE_SID=goodus2
! ls -alter
alter system switch logfile;
select * from v$log;
set lines 180
select * from v$log;
alter system switch logfile;
! ls /oracle/oradata/arch
select file_name from dba_data_files;
FILE_NAME
-------------------------------------------------------------------------------------------/oracle/oradata3/TEST3/users01.dbf
/oracle/oradata3/TEST3/sysaux01.dbf
/oracle/oradata3/TEST3/undotbs01.dbf
/oracle/oradata3/TEST3/system01.dbf
/oracle/oradata3/TEST3/example01.dbf
/oralce/offbackup/
alter tablespace system begin backup;
! cp /oracle/oradata/system.dbf /oralce/onbakcup;
alter tablespace system end backup;
alter database begin backup;
! cp /oracle/oradata/*.dbf /oralce/onbakcup;
alter database end backup;
dbv file=/oracle/oradata3/TEST3/system01.dbf logfile=dbv.log
dbv를 확인하여 복구(?)하는 것은 BBED를 사용하여...
http://support.oralce.com
park:/oracle:park>$./runInstaller
park:/oracle:park>$source .bash_profile
(source .bash_profile 와 ./.bash_profile 은 같은 명령어)
ls -alrt
park:/oracle:park>$unzip linux_11gR2_database_1of2.zip
park:/oracle:park>$unzip linux_11gR2_database_2of2.zip
./runInstaller
오라클 메타링크에서 필요로 하는 OS 확인 문서
169706.1
#버젼 확인
select * from v$version;
#복구 필요 유무
select * from v$recover_file;
col comp_name fro a40
set lines 250
#컴포넌트 버전 상태 확인
select comp_name, version, status from dba_registry;
show parameter comp
alter system set compatible='11.2.0.1.0' scope=spfile;
http://www.cyworld.com/butterfly1472/4623347
sqlplus "/as sysdba"
3. 04/14
HOST=192.681.22.200
ORACLE_HOME=/home2/product/11.2.0/dbhome_1
SID=park
ADD_BASE_LISTENER= /home2
umount /dev/shm
mount -t tmpfs shmfs -o size=1g /dev/shm
-------------------------------------------------------------------------------------------
adrci>
adrci> show parameter
adrci> show home
adrci> set homepath diag/rdbms/park/park
adrci> show alert -tail -f
show incident
CREATE TABLESPACE "RMANCATALOG"
LOGGING
DATAFILE
'/home2/product/11.2.0/dbhome_1/rman/rmancatalog.dbf' SIZE 100M
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO;
alter user rman default tablespace rmancatalog;
-------------------------------------------------------------------------------------------
*bash_profile 설정
[oracle@park ~]$ ls -alrt
total 2208048
drwxr-xr-x 3 oracle dba 4096 Dec 24 16:09 .kde
-rw-r--r-- 1 oracle dba 120 Dec 24 16:09 .gtkrc
-rw-r--r-- 1 oracle dba 383 Dec 24 16:09 .emacs
-rw-r--r-- 1 oracle dba 124 Dec 24 16:09 .bashrc
-rw-r--r-- 1 oracle dba 304 Dec 24 16:09 .bash_logout
drwxr-x--- 2 oracle dba 4096 Dec 24 17:11 flash_recovery_area
drwxr-x--- 4 oracle dba 4096 Jan 3 15:17 admin
-rw-r--r-- 1 oracle dba 1099 Jan 11 09:56 .bash_profile.bak
drwxrwxr-x 3 oracle dba 4096 Jan 11 10:06 product
drwxr-x--- 6 oracle dba 4096 Jan 11 10:07 oraInventory.bak
drwxr-xr-x 3 oracle dba 4096 Jan 13 14:32 new
-rw-r--r-- 1 oracle dba 604584 Jan 19 16:41 patch.log
drwxr-xr-x 2 oracle dba 4096 Jan 20 18:47 dump
-rw-r--r-- 1 oracle dba 36 Jan 21 10:49 abc.log
drwxr-xr-x 3 oracle dba 4096 Jan 21 16:48 goodus
-rw-r--r-- 1 oracle dba 5379 Feb 10 09:44 upgrade_info.log
-rw-r--r-- 1 oracle dba 555 Feb 20 10:21 off!ls.lst
-rw-r--r-- 1 oracle dba 1148 Feb 20 10:27 parfile_index_table.lst
-rw-r--r-- 1 oracle dba 118349824 Feb 20 10:45 test.dmp
-rw-r--r-- 1 oracle dba 18 Feb 20 10:55 table.par
-rw-r--r-- 1 oracle dba 24576 Feb 20 12:44 off!.lst
-rw-r--r-- 1 oracle dba 0 Feb 20 17:54 park1.dmp
-rw-r--r-- 1 oracle dba 0 Feb 20 18:00 PARK.dmp
-rw-r--r-- 1 oracle dba 16384 Feb 20 18:20 ts_tts.dmp
-rw-r--r-- 1 oracle dba 585 Feb 20 18:20 tp_tts.log
drwxr-xr-x 2 oracle dba 4096 Feb 20 20:33 tts
drwxr-xr-x 2 oracle dba 4096 Feb 20 23:50 wonbum
drwxr-xr-x 2 oracle dba 4096 Feb 23 15:12 tts2
drwxr-xr-x 2 oracle dba 4096 Feb 23 15:13 cron
drwxr-xr-x 2 oracle dba 4096 Feb 23 22:20 dict
drwx------ 2 oracle dba 4096 Mar 2 18:14 .ssh
drwxr-xr-x 2 oracle dba 4096 Mar 2 18:20 test
drwxr-xr-x 2 oracle dba 4096 Mar 2 18:21 exp
drwxr-xr-x 3 oracle dba 4096 Mar 3 21:22 oradata
drwxr-xr-x 2 oracle dba 4096 Mar 4 18:02 target
-rw-r--r-- 1 oracle dba 125134 Mar 10 22:23 vsftpd-2.0.1-7.el4.i386.rpm
-rw-r--r-- 1 oracle dba 163571 Mar 10 22:23 vsftpd-2.0.1-5.src.rpm
-rw-r--r-- 1 oracle dba 2138931200 Apr 3 22:43 full.dmp
-rw-r--r-- 1 oracle dba 223754 Apr 3 22:43 full.log
-rw-r--r-- 1 oracle dba 185438 Apr 3 23:07 index.sql
-rw-r--r-- 1 oracle dba 48 Apr 7 09:39 afiedt.buf
drwxr-xr-x 3 oracle dba 4096 Apr 12 14:50 opatch
-rw-r--r-- 1 oracle dba 0 Apr 13 16:05 bash_profile
drwxrwx--- 7 oracle dba 4096 Apr 13 17:17 oraInventory
-rw-r--r-- 1 oracle dba 1197 Apr 13 17:41 .bash_profile
drwxr-xr-x 28 root root 4096 Apr 14 11:41 ..
drwxr-xr-x 2 oracle dba 4096 Apr 14 16:41 awr
-rw------- 1 oracle dba 13577 Apr 14 19:12 .bash_history
drwxr-xr-x 23 oracle dba 4096 Apr 14 19:23 .
[oracle@park ~]$ cat .bash_profile
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.
export PATH
if [ -s "$MAIL" ] # This is at Shell startup. In normal
then echo "$MAILMSG" # operation, the Shell checks
fi # periodically.
umask 022
export ORACLE_BASE=/home2
#export ORACLE_HOME=$ORACLE_BASE/product/10g
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=park
export TNS_ADMIN=$ORACLE_HOME/network/admin
export UDUMP=$ORACLE_BASE/admin/oracle/udump
export BDUMP=$ORACLE_BASE/admin/oracle/bdump
export NLS_LANG=American_America.KO16KSC5601
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
#export ORA_NLS10=$ORACLE_HOME/nls/data
export CLASSPATH=$ORACLE_HOME/jdbc/lib/classes12.zip:
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32:/usr/lib:/usr/local/lib
#PS1=`hostname`'[$PWD]$'
export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/sbin:/usr/ccs/bin:.:/usr/X11R6/bin:$PATH:/oracle/opatch/OPatch
stty erase ^?
stty erase ^H
export EDITOR=vi
export PS1=`hostname`':$PWD:$ORACLE_SID>$'
export DISPLAY=61.250.99.196:0.0
alias oh='cd $ORACLE_HOME'
alias on='cd $ORACLE_HOME/network/admin'
alias ou='cd $UDUMP'
alias ob='cd $BDUMP'
[oracle@park ~]$ pwd
/oracle
[oracle@park ~]$ cd /etc
[oracle@park etc]$ dir
a2ps.cfg fb.modes krb5.conf openldap rpm
a2ps-site.cfg fdprm krb.conf opt samba
acpi filesystems krb.realms oraInst.loc sane.d
adjtime firmware ksysguarddrc oratab scrollkeeper.conf
alchemist fonts ldap.conf pam.d scsi_id.config
aliases foomatic ld.so.cache pam_smb.conf securetty
aliases.db fstab ld.so.conf pango security
alsa gconf ld.so.conf.d paper.config selinux
alternatives gnome ld.so.preload passwd sensors.conf
anacrontab gnome-vfs-2.0 lftp.conf passwd- services
asound.state gnome-vfs-mime-magic libsdp.conf pbm2ppa.conf sestatus.conf
at.deny gnopernicus-1.0 libuser.conf pcmcia setuptool.d
auditd.conf gpm-root.conf lilo.conf.anaconda Pegasus sgml
audit.rules gre.d lisarc pinforc shadow
auto.master group localtime pnm2ppa.conf shadow-
auto.misc group- log.d ppp shells
auto.net grub.conf login.defs prelink.cache skel
bashrc gshadow logrotate.conf prelink.conf smartd.conf
blkid.tab gshadow- logrotate.d printcap smrsh
blkid.tab.old gssapi_mech.conf lsb-release.d profile sound
bluetooth gtk ltrace.conf profile.d ssh
bonobo-activation gtk-2.0 lvm protocols stunnel
cdrecord.conf hal mail pwdb.conf sudoers
cipe host.conf mailcap quotagrpadmins sysconfig
cpuspeed.conf hosts mail.rc quotatab sysctl.conf
cron.d hosts.allow makedev.d racoon sysctl.confe
cron.daily hosts.deny man.config rc syslog.conf
cron.deny hotplug mgetty+sendfax rc0.d termcap
cron.hourly hotplug.d mime-magic rc1.d udev
cron.monthly idmapd.conf mime-magic.dat rc2.d updatedb.conf
crontab iiim mime.types rc3.d vfontcap
cron.weekly im_palette.pal minicom.users rc4.d vimrc
csh.cshrc im_palette-small.pal modprobe.conf rc5.d vsftpd
csh.login im_palette-tiny.pal modprobe.conf~ rc6.d vsftpd.ftpusers
cups imrc modprobe.conf.dist rc.d vsftpd.user_list
dat.conf init.d motd rc.local warnquota.conf
dbus-1 initlog.conf mtab rc.sysinit wgetrc
default inittab mtools.conf readahead.early.files wvdial.conf
dev.d inputrc my.cnf readahead.files X11
DIR_COLORS iproute2 netplug redhat-lsb xdg
DIR_COLORS.xterm isdn netplug.d redhat-release xinetd.conf
diskdump issue nscd.conf request-key.conf xinetd.d
dumpdates issue.net nsswitch.conf resolv.conf xml
enscript.cfg java ntp resolv.conf.predhclient yp.conf
environment jwhois.conf ntp.conf rhgb yum
esd.conf kde odbc.ini rmt yum.conf
exports kderc odbcinst.ini rpc yum.repos.d
[oracle@park etc]$ cd group
bash: cd: group: Not a directory