赞
踩
sqlplus / as sysdba
- 显示parameter结构
- SQL> set pause on
- SQL> desc v$parameter
- 显示系统静态参数
- SQL> select name from v$parameter where isses_modifiable = 'FALSE';
- 显示db_files是否可以用命令修改
- SQL> select isses_modifiable, issys_modifiable, ismodified from v$parameter where name = 'db_files';
- 先查看db_files的原值,再用alter system修改,在显示修改后的值。
- 静态参数需要关闭实例重启后生效。
- SQL> show parameter db_files
- 无法修改
- SQL> alter system set db_files = 300;
- 并没有成功修改
- SQL> alter system set db_files = 300 scope = spfile;
- SQL> show parameter db_files
- 关闭实例后重启,修改成功
- SQL> show parameter db_files
- SQL> conn / as sysdba
- SQL> startup
- 查看db-files的值
- SQL> show parameter db_files
- 以下操作我还不清楚
- SQL> conn scott/tiger
- SQL> conn / as sysdba
- SQL> alter user scott account unlock;
- SQL> alter user scott identified by tiger;
- 显示startup命令的帮助信息
- SQL> help startup
- SQL> shutdown immediate
- SQL> startup nomount
- SQL> alter database mount;
- SQL> alter database open;
- SQL> shutdown immediate
- SQL> startup mount
- 切换首先状态(首先状态只有有权限的管理员权限的用户才能访问数据库),分别尝试用scott和sys用户登录,观察系统提示的信息
- SQL> shutdown immediate
- SQL> startup restrict
- //SQL> conn scott/tiger
- SQL> conn / as sysdba
- SQL> select * from scott.emp;
- 转为受限状态,权限不足
- SQL> alter system disable restricted session;
- SQL> conn scott/tiger
- SQL> alter system enable restricted session;
- SQL> shutdown immediate
- SQL> conn / as sysdba
- SQL> startup mount
- SQL> alter database open read write;
- SQL> delete from scott.emp where empnn = 7369;
-
- SQL> select instance_name, active_state from v$instance;
- SQL> alter system quiesce restricted;
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。