1、在AIX系统上创建简单的定时任务
任务名称:定时删除某个目录下的所有dbf文件
步骤一:创建脚本mydel.sh,放在home/目录下,脚本内容如下
#! /bin/sh rm /orabak/archive/*.dbf
步骤二:加入定时执行的任务
#crontab -e
内容如下:
59 15 28 * * /bin/sh /home/mydel.sh
基本格式 :
* * * * * command
分 时 日 月 周 命令
第1列表示分钟1~59 每分钟用*或者 */1表示
第2列表示小时1~23(0表示0点)
第3列表示日期1~31
第4列表示月份1~12
第5列标识号星期0~6(0表示星期天)
第6列要运行的命令
查看定时任务的命令为:crontab -l
另:vi编辑器中的简单命令
插入:i
删除:x
退出保存:wq!
2、文件系统中目录扩容
故障描述:
Connect /as sysdba
ERROR:
ORA-09817:write to audit file failed
IBM AIX RISC system/6000 Error:28:no space left on device
ORA-09945:unable to initialize the audit trail file
IBM AIX RISC system/6000 Error:28:no space left on device
扩展oracle安装目录空间大小
[p550:/]#df -g
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 10.00 7.06 30% 6300 1% /
/dev/hd2 8.00 5.83 28% 43178 4% /usr
/dev/hd9var 2.00 1.85 8% 4628 2% /var
/dev/hd3 8.00 6.43 20% 1112 1% /tmp
/dev/hd1 1.00 1.00 1% 7 1% /home
/proc - - - - - /proc
/dev/hd10opt 4.00 3.90 3% 2110 1% /opt
/dev/hd11app 10.00 0.02 100% 58681 91% /app
/dev/hd12media 10.00 4.69 54% 7761 1% /media
/dev/data1lv 980.00 236.64 76% 2652 1% /oradata1
/dev/data2lv 195.00 27.89 86% 59274 1% /oradata2
[p550:/]#
[p550:/]#d
ksh: d: not found.
[p550:/]#f -g
f: Not a recognized flag: g
Usage: finger [-bfhilmpqsw] [login1 [login2 ...] ]
[p550:/]#df -g
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 10.00 7.06 30% 6300 1% /
/dev/hd2 8.00 5.83 28% 43178 4% /usr
/dev/hd9var 2.00 1.85 8% 4628 2% /var
/dev/hd3 8.00 6.43 20% 1112 1% /tmp
/dev/hd1 1.00 1.00 1% 7 1% /home
/proc - - - - - /proc
/dev/hd10opt 4.00 3.90 3% 2110 1% /opt
/dev/hd11app 10.00 0.02 100% 58685 91% /app
/dev/hd12media 10.00 4.69 54% 7761 1% /media
/dev/data1lv 980.00 236.64 76% 2652 1% /oradata1
/dev/data2lv 195.00 27.89 86% 59274 1% /oradata2
[p550:/]#smit chfs
Change / Show Characteristics of an Enhanced Journaled File System
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
File system name /app
NEW mount point [/app]
SIZE of file system
Unit Size Gigabytes +
Number of units [20] #
Mount GROUP []
Mount AUTOMATICALLY at system restart? yes +
PERMISSIONS read/write +
Mount OPTIONS [] +
Start Disk Accounting? no +
Block Size (bytes) 4096
Inline Log? no
Inline Log size (MBytes) [0] #
Extended Attribute Format [v1]
ENABLE Quota Management? no +
Allow Small Inode Extents? no +
F1=Help F2=Refre+------------------------------------------------------+ F4=List
Esc+5=Reset Esc+6=Co| Running command... | Esc+8=Image
Esc+9=Shell Esc+0=Ex+------------------------------------------------------+
COMMAND STATUS
Command: running stdout: yes stderr: no
Before command completion, additional instructions may appear below.
Filesystem size changed to 41943040
COMMAND STATUS
Command: OK stdout: yes stderr: no
Before command completion, additional instructions may appear below.
Filesystem size changed to 41943040
F1=Help F2=Refresh F3=Cancel Esc+6=Command
Esc+8=Image Esc+9=Shell Esc+0=Exit /=Find
n=Find Next
[p550:/]#df -g
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 10.00 7.06 30% 6300 1% /
/dev/hd2 8.00 5.83 28% 43178 4% /usr
/dev/hd9var 2.00 1.85 8% 4628 2% /var
/dev/hd3 8.00 6.43 20% 1112 1% /tmp
/dev/hd1 1.00 1.00 1% 7 1% /home
/proc - - - - - /proc
/dev/hd10opt 4.00 3.90 3% 2110 1% /opt
/dev/hd11app 20.00 10.02 50% 58685 3% /app
/dev/hd12media 10.00 4.69 54% 7761 1% /media
/dev/data1lv 980.00 236.64 76% 2652 1% /oradata1
/dev/data2lv 195.00 27.89 86% 59274 1% /oradata2
[p550:/]#