ORACLEʹÓÃEXCEPTIONS±í²éѯ³ö±íÖÐÖظ´¼Ç¼
SQL> conn system/oracle
Connected.
SQL> create table scott.t1(id number primary key,name varchar2(10)); --´´½¨²âÊÔ±í
Table created.
SQL> select constraint_name,table_name,constraint_type, --²é¿´ÏàÓ¦ÍêÕûÐÔÔ¼ÊøµÄ״̬
2 status,deferrable,deferred,validated
3 from dba_constraints
4 where owner='SCOTT' and table_name='T1';
CONSTRAINT_NAME TABLE_NAME C STATUS
------------------------------ ------------------------------ - --------
DEFERRABLE DEFERRED VALIDATED
-------------- --------- -------------
SYS_C0023319 T1 P ENABLED
NOT DEFERRABLE IMMEDIATE VALIDATED
SQL> insert into scott.t1 values(1,'tt');
1 row created.
SQL> insert into scott.t1 values(1,'hh'); --²åÈëidÁÐÖظ´µÄ¼Ç¼ʧ°Ü
insert into scott.t1 values(1,'hh')
*
ERROR at line 1:
ORA-00001: unique constraint (SCOTT.SYS_C0023319) violated
SQL> alter table scott.t1 disable novalidate constraint SYS_C0023319; --ÐÞ¸ÄÔ¼Êø״̬
Table altered.
SQL> select constraint_name,table_name,constraint_type, --²é¿´ÏàÓ¦ÍêÕûÐÔÔ¼ÊøµÄ״̬
2 status,deferrable,deferred,validated
3 from dba_constraints
4 where owner='SCOTT' and table_name='T1';
CONSTRAINT_NAME TABLE_NAME C STATUS
--------
Ïà¹ØÎĵµ£º
oracle±í¿Õ¼ä²Ù×÷Ïê½â
1
2
3×÷Õߣº À´Ô´£º ¸üÐÂÈÕÆÚ£º2006-01-04
5
6
7½¨Á¢±í¿Õ¼ä
8
9CREATE TABLESPACE data01
10DATAFILE '/ora ......
ѧϰOracle DBAÒ²°ë¸ö¶àѧÆÚÁË£¬½ñÌìÃÍÈ»²Å·¢ÏÖ£¬ÔÀ´ÎÒµÄÊ黹ÊǺÜеģ¬ÉϿβÙ×÷ʱºòÒ²Ö»ÊÇÖªµÀ´ó¸ÅÔõô×ö£¬µ«ÊÇÒªÕæµÄÈ«²¿×Ô¼º×ö£¬¶ø²»È¥·Ê黹ÊÇÓÐÒ»¶¨µÄÄѶȵģ¬ËùÒÔÄØ£¬½ñÌ쿪ʼ½«DBA´ÓÍ·¸´Ï°Ò»±é£¬Í¬Ê±ÔÙ²Ù×÷Ò»±é¡£
µÚÒ»Õ£¬Ñ§µÄÊÇOracleµÄÌåϵ½á¹¹£ ......
--Ê×Ïȼì²éÊý¾Ý¿âÖÐÊÇ·ñÓÐCTXSYSÓû§ºÍCTXAPP½ÅÉ«¡£
--Èç¹ûûÓÐÕâ¸öÓû§ºÍ½ÇÉ«£¬Òâζ×ÅÄãµÄÊý¾Ý¿â´´½¨Ê±Î´°²×°intermedia¹¦ÄÜ¡£
--Äã±ØÐëÐÞ¸ÄÊý¾Ý¿âÒÔ°²×°ÕâÏÄÜ¡£
--ÓÃsysÓû§ÎªÁËÓû§gzinfo·ÖÅäȨÏÞ
grant
CTXAPP
to
gzinfo;
grant
execute
on
ctx_ddl
to
......
Ò»¡¢Ê¹ÓÃsrvctl¹ÜÀíRACÊý¾Ý¿â
[root@NODE01 bin]# pwd
/orac/crs/bin # srvctlÔÚ$CRS_HOME/binĿ¼Ï£¬Ëü¿ÉÒÔÔÚÈκνڵãÉÏά»¤¡£
[root@NODE01 bin]# ./srvctl
Usage: srvctl <command> <object> [<options>]
command: enable|disable|start|stop|relocate|status| ......