重庆思庄Oracle、Redhat认证学习论坛

标题: 事务的独立级别。(在另一个会话中读读取未提交的数据) [打印本页]

作者: jikcheng    时间: 2014-11-5 13:47
标题: 事务的独立级别。(在另一个会话中读读取未提交的数据)
环境:必须关闭二进制日志。否则无法更新表。
配置文件里设置:/etc/my.cnf
命令行配置 :
SET GLOBAL TRANSACTION ISOLATION LEVEL  READ-UNCOMMITTED

以下是各个事务独立的参数。
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
System Variable Name tx_isolation
Variable Scope Global, Session
Dynamic Variable Yes
Permitted Values
Type enumeration
Default REPEATABLE-READ
READ-UNCOMMITTED
READ-COMMITTED
REPEATABLE-READ
Valid
Values
SERIALIZABLE

配置文件:

[mysqld]
autocommit=0
transaction-isolation=READ-UNCOMMITTED
expire_logs_days=1
#log_bin
#skip-grant-tables
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.

还要设置自动提交参数为OFF 否则。不能 体现。在另一个会话中读 未提交的数据。
设置 :
mysql> set mysql> select @@autocommit;
+--------------+
| @@autocommit |
+--------------+
|            0 |
+--------------+
1 row in set (0.00 sec)

mysql> set global autocommit=0;
Query OK, 0 rows affected (0.00 sec)

mysql>



作者: 郑全    时间: 2014-11-5 14:15

语法和 mssqlserver相似呀


作者: bikong123    时间: 2014-11-6 09:25

再次证实,Oracle数据库具有代表性。要想当好DBA,目前一定先全面系统学习Oracle数据库,要透!






欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2