网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > 数据库 > Oracle教程
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
数据库:数据库教程,数据库技巧,Oracle教程,MySQL教程,Sybase教程,Access教程,DB2教程,数据库安全,数据库文摘
本月文章推荐
.OracleDBA讲座笔记 -oracle运行.
.Oracle的2005年种种事件的巧问妙.
.使用Oracle9i数据库的九大注意事.
.关于logmnr的相关的表.
.数据库手册:速查Oracle函数列表.
.Oracle 10G新特性之闪回查询深入.
.Oracle两个基本概念了解体系结构.
.Oracle 基础和管理.
.Oracle10g 数据的导入导出 给数据.
.ORACLE 8i,9i 表连接方法全介绍.
.结构化查询语言(SQL)原理.
.KDD-数据库中的知识发现.
.从纵横五个方面精细优化你的Orac.
.(原创)oracle数据库备份与恢复 a.
.SQL基本语句.
.ORACLE性能调整--统计信息的迁移.
.Oracle存储过程中去掉重复字符串.
.移动LOB类型数据段.
.Oracle 10g数据库中如何分析响应.
.如何在Windows 2000下将Oracle完.

用一个实例讲解如何生成autotrace权限

发表日期:2008-4-3


生成autotrace权限的示例:

一、配置autotrace

1、cd [ORACLE_HOME]/rdbms/admin;

2、以system用户登陆;

3、执行@utlxplan;

4、执行create public synonym plan_table for plan_table;

5、执行 grant all on plan_table to public;

二、创建plustrace角色

1、cd [ORACLE_HOME]/sqlplus/admin;

2、以sys或sysdba登陆;

3、运行@plustrce;

4、执行grant plustrace to public;

注:也可以将public指定为某个用户。

[oracle@olivenan oracle]$ cd $ORACLE_HOME/rdbms/admin/

[oracle@olivenan admin]$ sqlplus system/oracle

SQL*Plus: Release 9.2.0.4.0 - Production on Wed Jun 27 11:00:20 2007

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to:

Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.4.0 - Production

SQL> @utlxplan

Table created.

SQL> create public synonym plan_table for plan_table;

Synonym created.

SQL> grant all on plan_table to public;

Grant succeeded.

SQL> exit

Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.4.0 - Production

[oracle@olivenan admin]$ cd $ORACLE_HOME/sqlplus/admin

[oracle@olivenan admin]$ sysplus "/as sysdba"

-bash: sysplus: command not found

[oracle@olivenan admin]$ sqlplus "/as sysdba"

SQL*Plus: Release 9.2.0.4.0 - Production on Wed Jun 27 11:04:55 2007

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to:

Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.4.0 - Production

SQL> @plustrce

SQL>

SQL> drop role plustrace;

drop role plustrace

*

ERROR at line 1:

ORA-01919: role 'PLUSTRACE' does not exist

SQL> create role plustrace;

Role created.

SQL>

SQL> grant select on v_$sesstat to plustrace;

Grant succeeded.

SQL> grant select on v_$statname to plustrace;

Grant succeeded.

SQL> grant select on v_$mystat to plustrace;

Grant succeeded.

SQL> grant plustrace to dba with admin option;

Grant succeeded.

SQL>

SQL> set echo off

SQL> grant plustrace to public;

Grant succeeded.

SQL>

至此,执行成功。

上一篇:用show parameter直接显示Oracle隐含参数 人气:1276
下一篇:轻松掌握Oralce数据库常用预定义的例外 人气:837
浏览全部ORACLE的内容 Dreamweaver插件下载 网页广告代码 祝你圣诞节快乐 2009年新年快乐