数据库

 首页 > 数据库 > MySql > OCP试题解析之052-- DROP PROFILE app_user

OCP试题解析之052-- DROP PROFILE app_user

分享到:
【字体:
导读:
         摘要:133.You created a profile APP_USER and assigned it to the users. After a month, you decide to drop theprofile. Some user sessions are currently connected to the...

OCP试题解析之052-- DROP PROFILE app_user

133.You created a profile APP_USER and assigned it to the users. After a month, you decide to drop the
profile. Some user sessions are currently connected to the database instance and are using the
APP_USER profile.
This command is used to drop the profile:
SQL> DROP PROFILE app_user;


Which statement describes the result?
A. The command produces an error.
B. The profile is dropped and current user sessions use the DEFAULT profile immediately.
C. The profile is dropped and only the subsequent user sessions use the DEFAULT profile.
D. The profile is dropped, the sessions are terminated, and the subsequent user sessions use the
DEFAULT profile.


Answer: A

 

【解析】

CREATE PROFILE profile1 LIMIT;
ALTER USER scott PROFILE profile1;

--此时查看用户SCOTT的default profile变为:profile1

SYS@orcl> drop profile profile1;
drop profile profile1
*
第 1 行出现错误:
ORA-02382: 概要文件 PROFILE1 指定了用户, 不能没有 CASCADE 而删除

SYS@orcl> drop profile profile1 cascade;

配置文件已删除。

 

--profile1删除后,scott的default profile自动变回default

 

答案一目了然!

 

 

 

 

 

 

OCP试题解析之052-- DROP PROFILE app_user
分享到:
解决MySQL出现大量unauthenticated user...
解决MySQL出现大量unauthenticated user的问题最近OJ及相关的打开站异常的慢,简直崩溃,一直没找着原因! 进入数据库服务器,进到mysql里,用show processlist命令查看一下,发现有很多的unauthenticated user google了一下, 发现这算属MySQL的一个bug,不管连接是通过hosts还是ip的方式,MySQL都会对DNS做反查,IP到DNS...
mongodb主从配置:副本集replica set
mongodb主从配置:副本集replica set1. 副本集 mongodb的主从部署,常用方式为副本集(replica set)方式。 replica set为多个mongod实例,组成一组group,包括一个主primary,多个从secondary。 这种一主多从的方式的好处是,mongodb自运维,如果主服务器挂了,会通过心跳自动检测,选举出一个新的主来。不需要人工处理。 ...
  •         php迷,一个php技术的分享社区,专属您自己的技术摘抄本、收藏夹。
  • 在这里……