Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

oracle²»¿É¸üеÄÊÔͼ

¹Ø¼ü´Ê£ºwith read only
×÷ÓãºÓÃÓÚÖ¸¶¨Ëù´´½¨µÄÊÔͼ²»¿ÉÒÔͨ¹ý±¾ÊÓͼ¸üбí
Ö´ÐÐÒ»ÏÂSQL£¬´´½¨±íT£¬ºÍÁ½¸öÊÔͼV1£¬V2£º
CREATE TABLE T(ID INTEGER);
CREATE VIEW V1 AS SELECT * from T;
CREATE VIEW V2 AS SELECT * from T WITH READ ONLY;
Ö´ÐÐSQL:
INSERT INTO V1 VALUES(1);
--------------------
1 row created
Ö´ÐÐSQL:
INSERT INTO V2 VALUES(1);
--------------------
Ìáʾ´íÎó
µ¥¶ÀµÄSELECTÓï¾ä²»ÄÜʹÓÃWITH READ ONLY
SELECT * from T WITH READ ONLY;
½«²»ÄÜÔËÐС£


Ïà¹ØÎĵµ£º

Oracle Òì³£

OracleÒì³£·ÖΪ3ÖÖ:
(1)Ô¤¶¨ÒåÒì³£:no_data_foundµÈ,ÊÇOracleϵͳ¶¨ÒåµÄÒì³£.
declare
  s_test varchar2
begin
  select id into s_test from test; --´Ëʱtest±íÎÞÊý¾Ý
exception
  when no_data_found then
    raise_application_error(-20001, 'ûÓÐÊý¾Ý');
end;
(2)×Ô¶ ......

oracle±í¿Õ¼ä¹ÜÀí

--1²é¿´±í¿Õ¼äÒѾ­Ê¹ÓõİٷֱÈ
select   a.tablespace_name,a.bytes/1024/1024
"Sum MB",(a.bytes-b.bytes)/1024/1024   "used MB",b.bytes/1024/1024
"free MB",round(((a.bytes-b.bytes)/a.bytes)*100,2) "percent_used"
from
(select tablespace_nam ......

ÔÚLinuxϵͳÉÏʵÏÖÓÃPythonÔ¶³Ì·ÃÎÊOracleÊý¾Ý¿â

1¡¢ÏÂÔØoracleÈí¼þ
http://www.oracle.com/technology/software/tech/oci/instantclient/index.html
oracle-instantclient-basic-10.2.0.4-1.i386.rpm
oracle-instantclient-sqlplus-10.2.0.4-1.i386.rpm
oracle-instantclient-devel-10.2.0.4-1.i386.rpm
2¡¢°²×°rpm°ü
rpm -ivh oracle-instantclient-basic-10.2.0.4 ......

Oracle ÈÕÖ¾Îļþ´íÎóµÄ´¦Àí¡£

ת×Ô£ºhttp://hi.baidu.com/dashuaiwang/blog/item/47cc680ec35055c37acbe1f8.html
´ò¿ªoracle Êý¾Ý¿âʱ³öÏÖÁË´íÎó:
ORA-00313: ÎÞ·¨´ò¿ªÈÕÖ¾×é 1 (Ïß³Ì 1) µÄ³ÉÔ±
ORA-00312: Áª»úÈÕÖ¾ 1 Ïß³Ì 1: 'D:\ORACLE\ORADATA\GOCOM\REDO01.LOG'
SQL> connect / as sysdba;
ÒÑÁ¬½Ó¡£
SQL> shutdown immediate;
ORA- ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ