ORACLE³£ÓÃÃüÁî
ORACLE³£ÓÃÃüÁî
Ò»¡¢ORACLEµÄÆô¶¯ºÍ¹Ø±Õ
1¡¢ÔÚµ¥»ú»·¾³ÏÂ
ÒªÏëÆô¶¯»ò¹Ø±ÕORACLEϵͳ±ØÐëÊ×ÏÈÇл»µ½ORACLEÓû§£¬ÈçÏÂ
su - oracle
a¡¢Æô¶¯ORACLEϵͳ
oracle>svrmgrl
SVRMGR>connect internal
SVRMGR>startup
SVRMGR>quit
b¡¢¹Ø±ÕORACLEϵͳ
oracle>svrmgrl
SVRMGR>connect internal
SVRMGR>shutdown
SVRMGR>quit
Æô¶¯oracle9iÊý¾Ý¿âÃüÁ
$ sqlplus /nolog
SQL*Plus: Release 9.2.0.1.0 - Production on Fri Oct 31 13:53:53 2003
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup^C
SQL> startup
ORACLE instance started.
2¡¢ÔÚË«»ú»·¾³ÏÂ
ÒªÏëÆô¶¯»ò¹Ø±ÕORACLEϵͳ±ØÐëÊ×ÏÈÇл»µ½rootÓû§£¬ÈçÏÂ
su £ root
a¡¢Æô¶¯ORACLE ϵͳ
hareg £y oracle
b¡¢¹Ø±ÕORACLEϵͳ
hareg £n oracle
Oracle Êý¾Ý¿âÓÐÄļ¸ÖÖÆô¶¯·½Ê½
˵Ã÷£º
ÓÐÒÔϼ¸ÖÖÆô¶¯·½Ê½£º
1¡¢startup nomount
·Ç°²×°Æô¶¯£¬ÕâÖÖ·½Ê½Æô¶¯Ï¿ÉÖ´ÐУºÖؽ¨¿ØÖÆÎļþ¡¢Öؽ¨Êý¾Ý¿â
¶ÁÈ¡init.oraÎļþ£¬Æô¶¯instance£¬¼´Æô¶¯SGAºÍºǫ́½ø³Ì£¬ÕâÖÖÆô¶¯Ö»ÐèÒªinit.oraÎļþ¡£
2¡¢startup mount dbname
°²×°Æô¶¯£¬ÕâÖÖ·½Ê½Æô¶¯Ï¿ÉÖ´ÐУº
Êý¾Ý¿âÈÕÖ¾¹éµµ¡¢
Êý¾Ý¿â½éÖʻָ´¡¢
ʹÊý¾ÝÎļþÁª»ú»òÍÑ»ú£¬
ÖØж¨Î»Êý¾ÝÎļþ¡¢ÖØ×öÈÕÖ¾Îļþ¡£
Ö´ÐÐ “nomount”£¬È»ºó´ò¿ª¿ØÖÆÎļþ£¬È·ÈÏÊý¾ÝÎļþºÍÁª»úÈÕÖ¾ÎļþµÄλÖã¬
µ«´Ëʱ²»¶ÔÊý¾ÝÎļþºÍÈÕÖ¾Îļþ½øÐÐУÑé¼ì²é¡£
3¡¢ startup open dbname
ÏÈÖ´ÐГnomount”£¬È»ºóÖ´ÐГmount”£¬ÔÙ´ò¿ª°üÀ¨Redo logÎļþÔÚÄÚµÄËùÓÐÊý¾Ý¿âÎļþ£¬
ÕâÖÖ·½Ê½Ï¿ɷÃÎÊÊý¾Ý¿âÖеÄÊý¾Ý¡£
4¡¢startup£¬µÈÓÚÒÔÏÂÈý¸öÃüÁî
startup nomount
alter database mount
alter database open
5¡¢ startup restrict
Ô¼Êø·½Ê½Æô¶¯
ÕâÖÖ·½Ê½Äܹ»Æô¶¯Êý¾Ý¿â£¬µ«Ö»ÔÊÐí¾ßÓÐÒ»¶¨ÌØȨµÄÓû§·ÃÎÊ
·ÇÌØȨÓû§·ÃÎÊʱ£¬»á³öÏÖÒÔÏÂÌáʾ£º
ERROR£º
ORA-01035: ORACLE Ö»ÔÊÐí¾ßÓÐ RESTRICTED SESSION ȨÏÞµÄÓû§Ê¹ÓÃ
6¡¢ startup force
Ç¿ÖÆÆô¶¯·½Ê½
µ±²»ÄܹرÕÊý¾Ý¿âʱ£¬¿ÉÒÔÓÃstartup forceÀ´Íê³ÉÊý¾Ý¿âµÄ¹Ø±Õ
ÏȹرÕÊý¾Ý¿â£¬ÔÙÖ´ÐÐÕý³£Æô¶¯Êý¾Ý¿âÃüÁî
7¡¢startup pfile=²ÎÊýÎļþÃû
´ø³õʼ»¯²ÎÊýÎļþµÄÆô¶¯·½Ê½
ÏȶÁÈ¡²ÎÊýÎļþ£¬ÔÙ°´²ÎÊýÎļþÖеÄÉèÖÃÆô¶¯Êý¾Ý¿â
Àý£ºstartup
Ïà¹ØÎĵµ£º
Æäʵ´´½¨dgÍøÂçÉϵÄÎĵµºÜ¶à£¬ÎÒÊÇ¿´Ð¡²¼ÀÏʦÊÇÊÓƵѧϰµÄ
ÓÃÐéÄâ»ú×ö²âÊÔ£¬ÅªÁ˺ü¸Ì죬ÏÂÃæ¼Ç¼һÏÂÔø¾×ö¹ýÓ¡Ïó±È½ÏÉîµÄµØ·½
1.½«Primary·þÎñÆ÷´¦Óڹ鵵ģʽºÍForce Loggingģʽ
SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP MOUNT;
SQL> ALTER DATABASE ARCHIVELOG;
SQL> ALTER DATABASE OPEN;
S ......
ORACLEµÄѧϰÒѾ¸æÒ»¶Î茖£¬½ñÌìÒѾ¿ªÊ¼HIBERNATEµÄѧϰ£¬×ÜÌå¸Ð¾õͦÁ¼ºÃµÄ£¬ËäÈ»ºÜ¶àµÄ֪ʶ²»ÄܼÇס£¬µ«ÊÇÔÚʹÓõÄʱºòÄܹ»Ñ¸ËÙµÄÕÒ¶Ô·½·¨À´½â¾öÏàÓ¦µÄÎÊÌ⣬ֻҪÇÚ¼ÓÁ·Ï°£¬¾Í¿ÉÒÔ¼Çס¡£Ö»²»¹ý£¬Ê±¼äÓÐ珢£¬HIBERNATEµÄ¿Î³ÌÒ²Ö»ÓÐÈýÌìµÄʱ¼ä£¬ËùÒÔÔÚÕâÆÚ¼äÎÒµÄÈÎÎñÊǾ¡Á¿ÎüÒý£¬ÔÚ»¨·Å¼ÙµÄʱºòÀ´¸´Ï° ......
RAC£¬ Data Gurad£¬ Stream ÊÇOracle ¸ß¿ÉÓÃÐÔÌåϵÖеÄÈýÖÖ¹¤¾ß£¬Ã¿¸ö¹¤¾ß¼´¿ÉÒÔ¶ÀÁ¢Ó¦Óã¬Ò²¿ÉÒÔÏ໥ÅäºÏ¡£ ËûÃǸ÷×ԵIJàÖص㲻ͬ£¬ÊÊÓó¡¾°Ò²²»Í¬¡£
RAC ËüµÄÇ¿ÏîÔÚÓÚ½â¾öµ¥µã¹ÊÕϺ͸ºÔؾùºâ£¬Òò´ËRAC ·½°¸³£ÓÃÓÚ7*24 µÄºËÐÄϵͳ£¬µ«RAC ·½°¸ÖеÄÊý¾ÝÖ»ÓÐÒ»·Ý£¬¾¡¹ ......
ÒÔÏÂÎÒ×östreammͬ²½Á½Ì¨»úÆ÷¼äµÄijһ¸öÓû§µÄ²Ù×÷²½Öè¡£ºÜ¼òµ¥,¿´µ½stream
»¹
ÓкܶàÒª¿´µÄ¡£
1.»·¾³½éÉÜ
Ö÷Êý¾Ý¿âSID : obpm
²Ù×÷ϵͳ : win 2003
IPµØÖ· : 192.168.0.1
Global_name :
oracle
version: 10.2.0.1
´ÓÊý¾Ý¿âSID ......
£¨1 £© ×¢ÒâÔö¼ÓÔ¼ÊøʱµÄд·¨£¬ºÍORACLE ÂÔÓв»Í¬
Oracle £º
ALTER TABLE SCHEMA.PREFIX_INFO ADD (
CONSTRAINT PK_PREFIX_INFO PRIMARY KEY (INFO_ID));
PostgresQL £º
alter table schema.prefix_info add constraint prefix_info_pkey primary key(info_id);
£¨2 £©ÏµÍ³Ä¬ÈϵÄ×î´óÖµÓëORACLE ²»Í¬
Oracle £ ......