The usage of SQLPATH
来源:互联网 发布:帝妃娇 梅雨知时节 编辑:程序博客网 时间:2024/06/11 10:40
1. create directory
mkdir /home/oracle/scripts
2. copy script to the directory
cp gettrc.sql /home/oracle/scripts
3. edit ./.bash_profile and add the following info into it
export SQLPATH=/home/oracle/scripts:$SQLPATH
4. Explanation:
sqlplus will find script default with SQLPATH parameter.
When you use @gettrc.sql,then the sqlplus can locate it and execute it successfully.
The following sql statement is the detail of gettrc.sql .
SELECT d.VALUE
|| '/'
|| LOWER (RTRIM (i.INSTANCE, CHR (0)))
|| '_ora_'
|| p.spid
|| '.trc' trace_file_name
FROM (SELECT p.spid
FROM v$mystat m, v$session s, v$process p
WHERE m.statistic# = 1 AND s.SID = m.SID AND p.addr = s.paddr) p,
(SELECT t.INSTANCE
FROM v$thread t, v$parameter v
WHERE v.NAME = 'thread'
AND (v.VALUE = 0 OR t.thread# = TO_NUMBER (v.VALUE))) i,
(SELECT VALUE
FROM v$parameter
WHERE NAME = 'user_dump_dest') d;
- The usage of SQLPATH
- The usage of finalize()
- usage of the serialVersionUID
- the usage of lucene
- the usage of sscanf()
- the usage of vim
- The usage of #pragma
- The usage of InjectView
- Usage of the vc timer
- The Usage of map::insert
- The Usage of Java Timer
- the usage of keyword const
- the usage of android viewpage
- The usage of V$PGA_TARGET_ADVICE
- the usage of String.trim()
- the usage of getClass().getName()
- The Usage of the volatile Keyword
- About the Usage of fseek and ftell
- TDD-测试驱动开发
- struts文件下载
- js取得gridview中获取checkbox选中的值
- Segment a long string into a set of valid words using a dictionary
- the project:mysql which is referenced by the classpath, does not exist
- The usage of SQLPATH
- Eclipse中修改Tomcat默认部署的路径
- 电子工程师必上的十大专业网站
- 记录----ubuntu上怎么安装Xwindow
- Mac查看开机时间
- Linux系统开机启动过程分析
- ZigBee各版本规范比较
- 豆子Qt Object-C BLOG<2012 年的简单计划>
- CentOs vsftp