当前位置:   article > 正文

ORACLE 上机操作3-1

ORACLE 上机操作3-1
sqlplus / as sysdba

  1. 显示parameter结构
  2. SQL> set pause on
  3. SQL> desc v$parameter

  1. 显示系统静态参数
  2. SQL> select name from v$parameter where isses_modifiable = 'FALSE';

  1. 显示db_files是否可以用命令修改
  2. SQL> select isses_modifiable, issys_modifiable, ismodified from v$parameter where name = 'db_files';

  1. 先查看db_files的原值,再用alter system修改,在显示修改后的值。
  2. 静态参数需要关闭实例重启后生效。
  3. SQL> show parameter db_files

  1. 无法修改
  2. SQL> alter system set db_files = 300;

  1. 并没有成功修改
  2. SQL> alter system set db_files = 300 scope = spfile;
  3. SQL> show parameter db_files

  1. 关闭实例后重启,修改成功
  2. SQL> show parameter db_files
  3. SQL> conn / as sysdba
  4. SQL> startup

  1. 查看db-files的值
  2. SQL> show parameter db_files

  1. 以下操作我还不清楚
  2. SQL> conn scott/tiger
  3. SQL> conn / as sysdba
  4. SQL> alter user scott account unlock;
  5. SQL> alter user scott identified by tiger;

  1. 显示startup命令的帮助信息
  2. SQL> help startup

  1. SQL> shutdown immediate
  2. SQL> startup nomount
  3. SQL> alter database mount;
  4. SQL> alter database open;

  1. SQL> shutdown immediate
  2. SQL> startup mount

  1. 切换首先状态(首先状态只有有权限的管理员权限的用户才能访问数据库),分别尝试用scott和sys用户登录,观察系统提示的信息
  2. SQL> shutdown immediate
  3. SQL> startup restrict
  4. //SQL> conn scott/tiger
  5. SQL> conn / as sysdba
  6. SQL> select * from scott.emp;

  1. 转为受限状态,权限不足
  2. SQL> alter system disable restricted session;
  3. SQL> conn scott/tiger
  4. SQL> alter system enable restricted session;

  1. SQL> shutdown immediate
  2. SQL> conn / as sysdba
  3. SQL> startup mount
  4. SQL> alter database open read write;
  5. SQL> delete from scott.emp where empnn = 7369;

  1. SQL> select instance_name, active_state from v$instance;
  2. SQL> alter system quiesce restricted;

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/280403
推荐阅读
相关标签
  

闽ICP备14008679号