Oracle中使用unix命令
(Unix) To see errors from Alert log file
cd alertlogdirectory;
grep ORA- alertSID.log
To see the name of a user from his unix id (Provided your UNIX admin keeps them!)
grep userid /etc/passwd
To see if port number 1521 is reserved for Oracle
grep 1521 /etc/services
To see the latest 20 lines in the Alert log file:
tail -20 alertSID.log
To see the first 20 lines in the Alert log file:
head -20 alertSID.log
To find a file named "whereare.you" under all sub-directories of /usr/oracle
find /usr/oracle -name whereare.you -print
To remove all the files under /usr/oracle which end with .tmp
find /usr/oracle -name "*.tmp" -print -exec rm -f {} ;
To list all files under /usr/oracle which are older than a week.
find /usr/oracle -mtime +7 -print
To list all files under /usr/oracle which are modified within a week.
find /usr/oracle -mtime -7 -print
To compress all files which end with .dmp and are more than 1 MB.
find /usr/oracle -size +1048576c -name "*.dmp" -print -exec compress {} ;
To see the shared memory segment sizes
ipcs -mb
To see the space used and available on /oracle mount point
df -k /oracle
To see the users logged in to the server and their IP address
who -T
To change passwd of oracle user
passwd oracle
To convert the contents of a text file to UPPERCASE
tr "[a-z]" "[A-Z]" < filename > newfilename
To convert the contents of a text file to lowercase.
tr "[A-Z]" "[a-z]" < filename > newfilename
To kill a process from Unix.
kill unixid
OR
kill -9 unixid
To see the oracle processes
ps -ef | grep SIDNAME
To see the number of lines in a text file (can be used to find the number of records while loading data from text file).
wc -l filename
To change all occurrences of SCOTT with TIGER in a file
sed 's/SCOTT/TIGER/g' filename > newfilename
To see lines 100 to 120 of a file
head -120 filename | tail -20
To truncate a file (for example listener.log file)
rm filename; touch filename
To see if SQL*Net connection is OK.
tnsping SIDNAME
To see if the server is up.
ping servername
OR
ping IPADDRESS
To see the versions of all Oracle products installed on the server.
$ORACLE_HOME/orainst/inspdver
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35489/viewspace-84243/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle DBA常用Linux,Unix命令(不斷更新中)OracleLinux
- hp unix cluster使用的命令
- hp-unix 命令使用方法
- 需要注意的unix命令使用
- Unix下打包命令的使用(轉)
- Unix系統中的dot命令的使用方法詳解
- Unix/Linux中nohup命令講解Linux
- unix下 nohup 命令使用方法(轉)
- UNIX VI命令
- 常用UNIX命令
- unix命令1
- Linux 中 RPM 命令引數使用詳解 [其它Linux/unix]Linux
- UNIX基本命令
- unix date命令解疑
- unix at命令詳解
- 常用UNIX命令(轉)
- Unix 高階使用者命令 lsof 和 fuser (zt)
- UNIX 常用命令
- dos2unix命令
- UNIX常用命令
- HP-UNIX 命令大全
- unix系統命令大全
- UNIX 常用命令
- unix常用系統命令
- linux/unix find命令Linux
- UNIX命令詳解(轉)
- Unix中Vi編輯常用命令總結(轉)
- Unix 下使用 Find 命令查詢需要清理的檔案
- 剖析Oracle中oerr命令Oracle
- linux/unix命令參考Linux
- Unix 檔案查詢命令
- [轉]UNIX find命令實踐
- UNIX系統操作命令(轉)
- Unix kernel parameters for OracleOracle
- echo命令在Unix中的作用以及其常見用法?
- oracle set 使用命令Oracle
- Unix系統中常用內建工具的命令使用指南
- 提升 UNIX 中檔案系統使用效率(轉)