oracle sequenceÖµÖØÖûØ1
declare
n number(10);
tsql varchar2(100);
begin
select test_seq.nextval into n from dual;
n:=-(n-1);
tsql:='alter sequence test_seq increment by'|| n;
execute immediate tsql;
select test_seq.nextval into n from dual;
tsql:='alter sequence test_seq increment by 1';
execute immediate tsql;
end;
Ïà¹ØÎĵµ£º
ÎÒÏàÐÅÎÒÃǸÕѧoracle£¬¶ÔÊý¾Ý¿âµÄ²Ù×÷£¬¶¼ÊÇÔÚ±¾µØ½øÐеģ¬Ö»Òª±£Ö¤¼àÌý·þÎñÆô¶¯£¬ÄÇôÎÒÃǾͿÉÒÔÕý³£Ê¹ÓÃsqlplus¶ÔÊý¾Ý¿â½øÐвéѯ£¬µ«ÊǼÙÈçÎÒÃÇÏ£Íûͨ¹ýÔ¶³Ì¶ÔÊý¾Ý¿âÀ´·ÃÎÊÄØ£¬´ËʱÎÒÃǾÍÒª¶Ôoracle¼àÌý½øÐÐÅäÖá£
oracle¼àÌýÅäÖÃÓÐÈý¸öÎļþ£¬ÎªÁË·½±ãÃèÊö£¬ÎÒÓÃserverºÍclientÀ´Çø·Ö£ ......
²é¿´±»ËøµÄ±í
select p.spid,a.serial#,
c.object_name,b.session_id,b.oracle_username,b.os_user_name from
v$process p,v$session a, v$locked_object b,all_objects c
where p.addr=a.p ......
ʹÓÃÊý¾Ý¿âÊÓͼͨ³£³öÓÚÒÔÏÂÁ½¸öÄ¿µÄ£º1¡£½µµÍ²Ù×÷¸´ÔӶȣ»ÊÓͼÊÇÔ¤±àÒëµÄ²éѯ²Ù×÷£¬Ò»´Î¶¨Ò壬֮ºó¿É¿ìËÙµ÷Óã»2¡£Ìá¸ßϵͳ°²È«¡£ÊÓͼ×÷ΪÊý¾Ý¿â¶ÔÏ󣬿ÉÒÔ½«ÆäȨÏÞ¶ÀÁ¢³öÀ´¸³¸øÓû§£¬¿É±ÜÃâÓû§¶Ô»ù±íµÄäĿΣÏÕ²Ù×÷£¬Í¬Ê±Ò²¿ÉÆÁ±ÎÒ»²¿·Ö˽ÃܵÄÊôÐÔÁС£
¶¨ÒåÓï¾ä£º
CREATE
[OR REPLACE
]
[FORCE
|NOFORCE
......
Oracle 9i±È8i¶àÁËÄÄЩÐÂÌØÐÔ£¿
¼òҪ˵£º
9i¸üÒ×ÓÚ¹ÜÀí¡£
Ïêϸ˵£º
²¢·¢¼¯Èº£¬8i OPSÉý¼¶Îª9i RAC£¬8i½áµã¼äÓÃÓ²Å̽»»»ÐÅÏ¢£¬9i½áµã¼ä²ÉÓøßËÙÍøÏߵĻº´æÈÛºÏ(Cache Fusion)¼¼Êõ½»»»ÐÅÏ¢£¬½»»»ËÙ¶ÈÌá¸ß100±¶ÒÔÉÏ¡£
9i¿ÉÒÔÔÚÏßÐÞ¸ÄÄں˲ÎÊýºÍÄÚ´ ......
½«±í¿Õ¼äºÍÊý¾ÝÎļþ´ÓÒ»¸öλÖÃÒƶ¯µ½ÁíÒ»¸öλÖõIJÙ×÷·½·¨
Ò»£® OFFLINE
OFFLINE ·ÖΪALTER DATABASE Óë ALTER TABLESPACE OFFLINE£¬
ËûÃǵÄÇø±ð²Î¿´blog£ºhttp://blog.csdn.net/tianlesoftware/archive/2009/11/29/4898800.aspx
°´Êý¾ÝÎļþÀ´£º
1.ÏȽ«ÏàÓ¦µÄÊý¾ÝÎļþ offline
ALTER DATABASE DATAFILE 'D:\OR ......