svn报错:This error was generated by a custom hook script on the Subversion server.
2015-05-08 15:39
411 查看
4、事务
4.1事务的概念
从第一个DML语句开始执行,以rollback或者commit为结束标记,之前所有的DML操作(insert,update,delete )都是属于这个事务的范围内。
4.2 事务的提交操作
(1)首先解锁一个用户并改密码
SQL> alter user scott account unlock;
User altered.
SQL> alter user scott identified by scott;
User altered.
(2)连接到scott用户
SQL> conn scott/scott;
Connected.
(3)创建一个tt的表
SQL> create table tt(
2 id number
3 );
SQL> insert into tt values(1);
1 row created.
SQL> select * from tt;
ID
----------
1
SQL> insert into tt values(2);
1 row created.
SQL> select * from tt;
ID
----------
1
2
SQL> commit; --这是一个事务的结束
Commit complete.
--------------------------------- 这是另外一个事务
SQL> update tt set id=3 where id=2;
1 row updated.
SQL> select * from tt;
ID
----------
1
3
SQL> rollback; --这个事务到这里结束
Rollback complete.
SQL> select * from tt;
ID
----------
1
2
两个问题:
(1).提交的事务是不是就一定会写磁盘里面
不一定 ? 因为系统的读写是异步的,提交了的数据有可能还在脏块列表中,等到有足够多脏块时
DBWn进程才会把一批次的脏块信息写进磁盘。
(2).没有提交的事务是不是就不会写到磁盘
不一定 ? 因为脏块链表的空间有限,如果一次性对数据进行大量的修改,会产生大量的脏块超出脏块
链表的长度,此时 DBWn进程会将脏块信息写进磁盘,如果用户提交了,数据已经写进磁盘,
如果用户进行回滚操作,也没问题,Oracle将会利用undo表空间回滚断的旧镜像将以前的信
息在磁盘中还原回去。
4.1事务的概念
从第一个DML语句开始执行,以rollback或者commit为结束标记,之前所有的DML操作(insert,update,delete )都是属于这个事务的范围内。
4.2 事务的提交操作
(1)首先解锁一个用户并改密码
SQL> alter user scott account unlock;
User altered.
SQL> alter user scott identified by scott;
User altered.
(2)连接到scott用户
SQL> conn scott/scott;
Connected.
(3)创建一个tt的表
SQL> create table tt(
2 id number
3 );
SQL> insert into tt values(1);
1 row created.
SQL> select * from tt;
ID
----------
1
SQL> insert into tt values(2);
1 row created.
SQL> select * from tt;
ID
----------
1
2
SQL> commit; --这是一个事务的结束
Commit complete.
--------------------------------- 这是另外一个事务
SQL> update tt set id=3 where id=2;
1 row updated.
SQL> select * from tt;
ID
----------
1
3
SQL> rollback; --这个事务到这里结束
Rollback complete.
SQL> select * from tt;
ID
----------
1
2
两个问题:
(1).提交的事务是不是就一定会写磁盘里面
不一定 ? 因为系统的读写是异步的,提交了的数据有可能还在脏块列表中,等到有足够多脏块时
DBWn进程才会把一批次的脏块信息写进磁盘。
(2).没有提交的事务是不是就不会写到磁盘
不一定 ? 因为脏块链表的空间有限,如果一次性对数据进行大量的修改,会产生大量的脏块超出脏块
链表的长度,此时 DBWn进程会将脏块信息写进磁盘,如果用户提交了,数据已经写进磁盘,
如果用户进行回滚操作,也没问题,Oracle将会利用undo表空间回滚断的旧镜像将以前的信
息在磁盘中还原回去。
相关文章推荐
- Error:svn: E175002: connection refused by the server svn: E175002: OPTIONS request failed on '
- An application error occurred on the server. The current custom error settings for this application
- Packet for query is too large (1029 > 1024). You can change this value on the server by setting the
- PHP zend framework The requested URL /XXX/public/index was not found on this server
- error This file was generated by a newer version of protoc
- Access denied error by access to a txt file on the sharepoint server
- [转] --- Error: “A field or property with the name was not found on the selected data source” get only on server
- laravel The requested URL /test was not found on this server.
- 有关 phpmyadmin登陆中遇到The requested URL /phpmyadmin was not found on this server的解决方法
- Mysql You can change this value on the server by setting the max_allowed_packet' variable. 异常
- mysql Packet for query is too large (5058927 > 4194304). You can change this value on the server by
- The requested URL /phpmyadmin was not found on this server.
- Mac OS build caffe2 Error:This file was generated by an older version of protoc which is
- 解决Mysql You can change this value on the server by setting the max_allowed_packet' variable. 异常
- Packet for query is too large (1986748 > 1048576). You can change this value on the server by setting the max_allowed_pa
- 访问本地环境时出现The requested URL / was not found on this server.
- linux中提示The requested URL *** was not found on this server
- The requested URL /**** was not found on this server
- packet for query is too large <1781> 1024 >. you can change this value on the server by setting the
- Not Found The requested url path was not fund on this server