课后 复习1

来源:互联网 发布:手机访问mac本地网站 编辑:程序博客网 时间:2024/05/29 16:47

临时表空间:排序时用,临时表

undo表空间:存放undo数据

 

对A执行完后未commit,原始数据放在UNDO表空间中,则B查找时从undo表空间中取出仍然为a

 

A:update user1 set name='b' where no = 1;

B:select * from user1;

 

show parameters undo:

 

undo_management

 

undo_retention:数据在提交后,要保留多长时间,单位是s[ flashback时用到它]

 

alter table user1 enable row movement (行能移动)

 

flashback table user1 to timestamp to_timestamp('2011-05-04 08:12:30','yyyy-mm-dd hh24:mi:ss')

 

undo_tablespace:

创建 undo

 

SQL:create undo tablespace=undotest2 datafile 'undotest2.dbf' size 100m

 

 

alter system set undo_tablespace = undotest2

 

临时表空间

 

desc dba_temp_files;

 

blocks:临时表空间的临时文件大小

user_blocks:临时文件能用的大小

 

create temporary tablespace temp02 tempfile 'temp02.dbf'

 

size 2m autoextend on next 1m

 

alter user test default tablespace users temporary tablespace temp02

 

临时表空间组

 

 

用户:

create user test1 identified by test1

 

database_properties

 

alter database default temporary tablespace temp02

 

alter database default tablespace test

 

 

 

创建用户:

 

create user 用户名 identified {by 密码|externally|globally as external name}

[default tablespace 缺省表空间]

[default temporary tablespace 默认临时表空间]

[quota {n{k|m}} on 表空间]

[password expire] 第一次登陆必须修改密码

[profile{概要文件|default}]

 

profile :开启参数 alter system set resource limit = true

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

原创粉丝点击