17.08.09

用户管理

AAA:

Authentication: 身份验证

Authorization: 权限管理

Audition: 审计

authentication

user 用户   schema 模式

 

预定义的系统用户:

SQL> select USERNAME, ACCOUNT_STATUS from dba_users;

open状态的用户:

SQL> select USERNAME, ACCOUNT_STATUS from dba_users ACCOUNT_STATUS='OPEN';

系统管理账号:

SYS           SYSTEM            DBSNMP          SYSMAN

3种身份验证方式:

password验证:

浏览器中创建用户user01

或者用命令创建:

SQL> create user user01 identified by password;

SQL> grant create session to user01;

 

测试:

$ sqlplus user01/password

 

external(os)验证:

操作系统中创建用户:

$ su -

Password:

[root@node1 ~]# useradd osuser

[root@node1 ~]# passwd osuser

$ sqlplus / as sysdba

外部用户使用固定的前缀:

SQL> show parameter os_auth

SQL> create user ops$osuser identified externally;

SQL> grant create session to ops$osuser;

不要su - osuser,环境变量保留:

$ su osuser

Password:

[osuser@node1 admin]$ sqlplus /

SQL> show user

USER is "OPS$OSUSER"

 

管理员的身份验证:

本地连接:

本地连接,预先设置ORACLE_SID,操作系统用户是dba群组的成员

 

$ unset ORACLE_SID

$ echo $ORACLE_SID

 

$ export ORACLE_SID=orcl

$ echo $ORACLE_SID

orcl

 

$ id

uid=1001(oracle) gid=1000(oinstall) groups=1000(oinstall),1031(dba),1032(oper)

$ sqlplus / as sysdba

SQL> show user

USER is "SYS"

$ su -

# usermod -G oper oracle 或

# gpasswd -d oracle dba

# exit

$ sqlplus / as sysdba

报错,权限不够

 

只要是dba群组中的成员,就可以不需要知道sys的口令,直接以sqlplus / as sysdba登录

并且身份为sys。

 

恢复:

# gpasswd -a oracle dba

 

远程客户端连接:

$ sqlplus sys/password@orcl as sysdba

$ ls $ORACLE_HOME/dbs/orapworcl

$ orapwd

authorization

系统权限:

sys执行授权:

预先创建测试表

SQL> create table t1(x int);

SQL> create user user01 identified by password;

SQL> grant create session to user01;

SQL> grant select any table to user01;

user01测试:

$ sqlplus user01/password

SQL> select count(*) from hr.employees(hr.departments scott.emp);

SQL> delete from scott.emp;          失败!

SQL> select * from sys.t1;                失败!

select any table    n-1模式  普通用户授权以后仍没有访问sys表的权限

sys再次授权:

SQL> grant select any dictionary to user01;

user01测试:

SQL> select * from sys.t1;    成功

select any table(n-1)+select any dictionary(1)

sys授权:

SQL> grant create table to user01;

user01测试:

SQL> create table t1(x int);

sys授权:

SQL> grant unlimited tablespace to user01;

user01测试:

SQL> insert into t1 values (1);

 

对象权限:

表的参照权限:

dept

deptno(pk)       dname

10                      sales

20                      market

 

my_emp

empno              deptno(fk)

100                    10

sys授权:

SQL> grant select on hr.employees to user01;

user01测试:

SQL> select count(*) from hr.employees;

SQL> delete from hr.employees;    失败

SQL> select count(*) from hr.departments;            失败

sys授权:

SQL> grant index on hr.employees to user01;

SQL> grant unlimited tablespace to user01;

user01测试:

SQL> create index emp_sal_idx on hr.employees(salary);

SQL> select index_name from user_indexes where table_name='EMPLOYEES';

 

create any table               create table

alter any table                  alter table

drop any table                  drop table

 

权限的级联删除:

系统权限:

sys准备工作:

SQL> drop user user01 cascade;

SQL> drop user user02 cascade;

SQL> create user user01 identified by password;

SQL> create user user02 identified by password;

SQL> grant create session to user01;

SQL> grant create session to user02;

sys授权:

SQL> grant select any table to user01 with admin option;

user01测试成功并授权给user02:

SQL> select count(*) from hr.employees;

SQL> grant select any table to user02 with admin option;

user02测试成功:

SQL> select count(*) from hr.employees;

sys收回权限:

SQL> revoke select any table from user01;

user01操作失败:

SQL> select count(*) from hr.employees;

user02测试成功:

SQL> select count(*) from hr.employees;

对象权限:

SQL> grant select on hr.employees to user01 with grant option;

 

 

dba+sysdba=sys

role

角色就是数据库中的群组!

角色的作用:简化权限的管理,动态更新用户的权限。

 

 

预定义的角色:

SQL> select role from dba_roles;

创建角色:

SQL> create role hr_mgr;

SQL> create role hr_clerk;

SQL> grant select any table to hr_mgr;

SQL> grant select on hr.employees to hr_clerk;

SQL> grant hr_mgr to user01;

SQL> grant hr_clerk to user02;

user01/user02测试:

角色生效必须重新登录

profile

profile主要控制两个方面:

1 用户的资源消耗

2 用户的口令安全

SQL> select * from dba_profiles where profile='DEFAULT';

SQL> select username, profile from dba_users;

SQL> show parameter resource_limit    资源管理的开关参数

查看复杂性函数的脚本:

$ cd $ORACLE_HOME/rdbms/admin

$ vi utlpwdmg.sql

$ cp utlpwdmg.sql /home/oracle/utlpwdmg.sql

$ vi /home/oracle/utlpwdmg.sql      只保留校验函数部分

$ sqlplus / as sysdba

SQL> @/home/oracle/utlpwdmg.sql

sys创建概要文件:

SQL> CREATE PROFILE HR_PROFILE LIMIT

PASSWORD_LIFE_TIME 30

PASSWORD_GRACE_TIME 7

PASSWORD_REUSE_MAX 3

PASSWORD_REUSE_TIME unlimited

PASSWORD_LOCK_TIME 5/1440

FAILED_LOGIN_ATTEMPTS 3

PASSWORD_VERIFY_FUNCTION verify_function_11G;

和用户关联:

SQL> ALTER USER HR PROFILE HR_PROFILE;

测试:

$ sqlplus hr/hr

SQL> alter user hr identified by password123 replace hr;

转载于:https://www.cnblogs.com/Zhang-x/p/7395191.html

1985年1月至2005年12月,原油现货交易价格如下。数据为:26.41 26.73 28.29 27.63 27.84 26.87 27.12 28.08 29.08 30.38 29.75 26.3 18.83 13.26 10.42 13.34 14.3 12.78 11.15 15.9 14.77 15.27 15 17.94 18.75 16.6 18.83 18.73 19.38 20.29 21.37 19.73 19.59 19.96 18.51 16.7 16.94 16.01 17.08 17.99 17.51 15.16 16.31 15.18 13.37 13.58 15.32 17.24 17.03 18.15 20.19 20.42 19.9 20.27 18.31 18.83 20.13 19.94 19.89 21.82 22.68 21.54 20.28 18.54 17.4 17.07 20.69 27.32 39.51 35.23 28.85 28.44 21.54 19.16 19.63 20.96 21.13 20.56 21.68 22.26 22.23 23.37 21.48 19.12 18.9 18.68 19.44 20.85 22.11 21.6 21.87 21.48 21.71 20.62 19.89 19.5 20.26 20.6 20.44 20.53 20.02 18.85 17.88 18.29 18.79 16.92 15.43 14.17 15.19 14.48 14.79 16.9 18.31 19.37 20.3 17.56 18.39 18.19 18.05 17.76 18.39 18.49 19.17 20.38 18.89 17.4 17.56 17.84 17.54 17.64 18.18 19.55 17.74 19.54 21.47 21.2 19.76 20.92 20.42 22.25 24.38 23.35 23.75 25.92 24.15 20.3 20.41 20.21 20.88 19.8 20.14 19.61 21.18 21.08 19.15 17.64 17.21 15.44 15.61 15.39 13.95 14.18 14.3 13.34 16.14 14.42 11.22 11.28 12.75 12.27 16.16 18.23 16.84 18.37 20.53 21.9 24.51 21.75 24.59 25.6 28.27 30.43 27.31 25.74 29.01 32.5 27.43 33.12 30.84 33.48 33.82 27.8 28.66 27.39 27.09 27.86 28.37 28.2 26.1 27.2 23.36 21.07 19.37 19.84 19.2 21.48 26.12 27.36 25.02 26.8 27.21 28.99 30.52 26.86 26.79 30.45 33.56 37.05 31.02 26.13 29.32 30.06 30.61 31.78 28.89 28.77 29.95 32.89 33.26 35.56 36.13 37.74 39.41 35.76 43.5 41.8 49.55 51.49 49.98 42.76 47.1 51.93 55.07 50.41 51.48 56.84 60.34 69.31 66.37 60.6 56.41 59.88 请回答:(1)研究1985-2005年原油现货价格的走势,对原油价格拟合 ARIMA模型。(2)研究原油现货价格的波动特征。如果存在条件异异方差,则拟合适当的条件异方差模型。 (3)预测2006-2007年月原油现货价格的走势及 95%的置信区间。
06-04
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值