日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

在11g中alter system set recyclebin = off 报错 recyclebin 参数在11g和10g中的区别

發布時間:2024/8/26 编程问答 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 在11g中alter system set recyclebin = off 报错 recyclebin 参数在11g和10g中的区别 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
? 在Oracle 11g中,recyclebin參數發生了微小的變化.
This supported parameter was introduced in Oracle 10.2.0
VersionParameter NameData TypeSession ModifiableSystem Modifiable
10.2.0recyclebinStringTRUEIMMEDIATE
11.1.0recyclebinStringTRUEDEFERRED

從文檔上我們可以看到這個變化說明,到了11g中,這個參數在session依然可以理解修改并影響當前的session,但如果是在系統一級修改的話,那么就要加deferred參數,對當前已經連接的sesion沒有影響,但新連接的session將受到影響
SQL> select name,isses_modifiable,issys_modifiable from v$parameter where name='recyclebin';

NAME? ?? ???ISSES_MODIFIABLE ISSYS_MODIFIABLE
----------- ---------------- ----------------
recyclebin??TRUE? ?? ?? ?? ? DEFERRED
SQL>?

下面做一個測試看看:
一開始,我用study用戶分別發起2個session連接到到我的ora11g數據庫上
SESSION 1
Connected to Oracle Database 11g Enterprise Edition Release 11.1.0.6.0?
Connected as study

SQL> show parameter recyclebin
NAME? ?? ?? ???TYPE? ?? ???VALUE
-------------- ----------- --------------
recyclebin? ???string? ?? ?ON

SQL> alter system set recyclebin=off;
alter system set recyclebin=off

ORA-02096: 此選項的指定初始化參數不可修改

SQL> alter session set recyclebin=off;
Session altered

SQL> create table zrp(no int);
Table created

SQL> drop table zrp;
Table dropped

SQL> flashback table zrp to before drop;

flashback table zrp to before drop

ORA-38305: 對象不在回收站中

可以看到,在system一級,不加DEFERRED參數是不允許修改的,但在session一級可以修改.
SQL> alter system set recyclebin=off DEFERRED;
System altered

SQL>?

SESSION? 2
說明:在session 1中發出alter system set recyclebin=off DEFERRED;命令的時候,我的session 2已經連接到了ora11g上.在這個session中,我們用來體會
alter system set recyclebin=off DEFERRED;
命令對當前已經連接的session不影響

C:\Documents and Settings\zhangrp>sqlplus study/study

SQL*Plus: Release 11.1.0.6.0 - Production on 星期五 2月 20 16:20:50 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

連接到:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> show parameter recyclebin
NAME? ?? ?? ???TYPE? ?? ???VALUE
-------------- ----------- --------------
recyclebin? ???string? ?? ?ON

SQL> create table test_2(no int);
表已創建。

SQL> drop table test_2;
表已刪除。

SQL> flashback table test_2 to before drop;
閃回完成。

SQL> desc test_2
名稱? ?? ?? ?是否為空? 類型
------------ --------- -----------
NO? ?? ?? ?? ?? ?? ?? ?NUMBER(38)

SESSION 3

在session 1中完成alter system set recyclebin=off DEFERRED;命令以后,我們再發起一個新的連接,看看是不是對新的連接生效:
Microsoft Windows XP [版本 5.1.2600]
(C) 版權所有 1985-2001 Microsoft Corp.

C:\Documents and Settings\zhangrp>sqlplus study/study

SQL*Plus: Release 11.1.0.6.0 - Production on 星期五 2月 20 16:23:46 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.


連接到:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> show parameter recyclebin
NAME? ?? ?? ???TYPE? ?? ???VALUE
-------------- ----------- --------------
recyclebin? ???string? ?? ?OFF

總結

以上是生活随笔為你收集整理的在11g中alter system set recyclebin = off 报错 recyclebin 参数在11g和10g中的区别的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。