create index IDX_F_DEP on T_DEPARTMENT (SUBSTR(C_INTER_CDE,1,2))
*
ERROR at line 1:
ORA-01031: insufficient privileges
确认需要有两个权限, 一个是create any index
另一个是global query rewrite
Popularity: 26% [?]
create index IDX_F_DEP on T_DEPARTMENT (SUBSTR(C_INTER_CDE,1,2))
*
ERROR at line 1:
ORA-01031: insufficient privileges
确认需要有两个权限, 一个是create any index
另一个是global query rewrite
Popularity: 26% [?]
官方的例子如下
One way to use sqlite3 in a shell script is to use “echo” or “cat” to generate a sequence of commands in a file, then invoke sqlite3 while redirecting input from the generated command file. This works fine and is appropriate in many circumstances. But as an added convenience, sqlite3 allows a single SQL command to be entered on the command line as a second argument after the database name. When the sqlite3 program is launched with two arguments, the second argument is passed to the SQLite library for processing, the query results are printed on standard output in list mode, and the program exits. This mechanism is designed to make sqlite3 easy to use in conjunction with programs like “awk”. For example:
$ sqlite3 ex1 'select * from tbl1' |
> awk '{printf "<tr><td>%s<td>%s\n",$1,$2 }'
<tr><td>hello<td>10
<tr><td>goodbye<td>20
$
Popularity: 47% [?]
vmstat命令用来获得有关进程、虚存、页面交换空间及 CPU活动的信息。这些信息反映了系统的负载情况。vmstat首次运行时显示自系统启动开始的各项统计信息,之后运行vmstat将显示自上次运行该命 令以后的统计信息。用户可以通过指定统计的次数和时间来获得所需的统计信息。
有关进程的信息有:
r :在就绪状态等待的进程数。
b :在等待状态等待的进程数。
有关内存的信息有:
avm :使用的页面数。
fre :空闲队列中的页面数。
有关页面交换空间的信息有:
re :在指定时间间隔内每秒要求收回的页面数。
po :在指定时间间隔内换入到页面交换空间的页面数。
pi :由页面交换空间换出的页面数。
fr :在指定时间间隔内释放的页面数。
sr :在指定时间间隔内检查的页面数(以确定该页面是否可以释放)。
cy :按时钟算法每秒扫描的页面数。
有关故障的信息有:
in :在指定时间内的每秒中断次数。
sy :在指定时间内每秒系统调用次数。
cs :在指定时间内每秒上下文切换的次数。
有关CPU的信息有:
us :在指定时间间隔内CPU在用户态的利用率。
sy :在指定时间间隔内CPU在核心态的利用率。
id :在指定时间间隔内CPU空闲时间比。
wa :在指定时间间隔内CPU因为等待I/O而空闲的时间比。
vmstat 可以用来确定一个系统的工作是受限于CPU还是受限于内存:如果CPU的sy和us值相加的百分比接近100%,或者运行队列(r) 中等待的进程数总是不等于 0,则该系统受限于CPU;如果pi、po的值总是不等于0,则该系统受限于内存。
vmstat运用举例:
vmstat –f : 显示系统中的子进程数。
vmstat –s : 显示系统中不同的事件。
vmstat –i : 显示系统的中断数。
vmstat hdisk0 hdisk1: 显示hdisk0 、hdisk1的使用情况。
vmstat 1 10 :每隔一秒显示一次系统的运行状况,共显示10次。
Popularity: 32% [?]