Ïêϸ½éÉÜORACLE sqlplusÃüÁî
Ò»¡¢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
Ç¿ÖÆÆô¶¯·½Ê½ bitsCN.comÖйúÍø¹ÜÁªÃË
µ±²»ÄܹرÕÊý¾Ý¿âʱ£¬¿ÉÒÔÓÃstartup forceÀ´Íê³ÉÊý¾Ý¿âµÄ¹Ø±Õ
ÏȹرÕÊý¾Ý¿â£¬ÔÙÖ´ÐÐÕý³£Æô¶¯Êý¾Ý¿âÃüÁî
7¡¢startup pfile=²ÎÊýÎļþÃû
´ø³õʼ»¯²ÎÊýÎļþµÄÆô¶¯·½Ê½
ÏȶÁÈ¡²ÎÊýÎļþ£¬ÔÙ°´²ÎÊýÎļþÖеÄÉèÖÃÆô¶¯Êý¾Ý¿â
Àý£ºsta
Ïà¹ØÎĵµ£º
ËäȻѧϰJavaºÜ¾ÃÁË£¬×Ô¼ºÒ²Á¬½Ó¹ýһЩÊý¾Ý¿â£¬±ÈÈçmysqlÖ®ÀàµÄ£¬Èç½ñÄØ£¬Ò²Ñ§Ï°ÁËÒ»¶Îʱ¼äµÄOracle£¬È»¶øÄØ£¬½ñÌìÊÇÎÒµÚÒ»´ÎÁ¬½ÓOracle£¬ºÙºÙ£¬Ó¦¸Ã»¹²»ËãÌ«³Ù°É¡£
½ñÌìÄØ£¬Óе㱿׾£¬´ó¼ÒĪЦ£¡
ÎÒÕâÊÇÒ»¸ö²éѯÀý×Ó
Ê×ÏÈ£¬Ô ......
Oracle ×°Åä¹£¸Å
Òª²é¿´¿ÉÓà RAM ºÍ»¥»»¿Õ¼ä´óС£¬ÔË×÷ÒÔ´ÎÏÂÁ
grep MemTotal /proc/meminfo
grep SwapTotal /proc/meminfo
±ÈÈ磺
# grep MemTotal /proc/meminfo
MemTotal:512236 kB
# grep SwapTotal /proc/meminfo
SwapTotal:1574360 kB
½ÓÏÂÀ´£¬´´ÔìÓÃÀ´×°ÅäºÍά»¤ Oracle Ê®g Èí¼þµÄ Linux ×éºÍÓû ......
SQL> select dbms_metadata.get_ddl('PROCEDURE','PRO2','SCOTT') text from dual;
TEXT
----------------------------------------
CREATE OR REPLACE PROCEDURE "SCOTT"."P
RO2"
is
begin
dbms_output.put_line('wangpeng up');
end;
SQL> select dbms_metadata.get_ddl('PROCEDURE','PRO1','SCOTT') te ......
10ÔÂ10ÈÕµÄÃÀ¹ú¾É½ðɽһÏÂÓ¿ÈëÁË4ÍòÈËÁ÷£¬ËûÃǾۼ¯ÔھɽðɽµÄMoscone»áÕ¹ÖÐÐÄ£¬ÖÜΧ81000¸ö¾Æµê´²Î»±»¶©¹ºÒ»¿Õ£¬¾É½ðɽÊÐÕþ¸®×¨ÃÅ·âËøÁËÖܱßÈýÌõµÀ·µÄ½»Í¨£¬ÒÔΪÕâЩÅÓ´óÈËÁ÷Ìṩ±ãÀû¡£ÕâЩÈ˶¼ÊÇÈ«ÇòITÒµ½çµÄ¾«Ó¢——´ÓIT¾ÞÍ·µÄÁìÐäµ½ÆÕͨµÄÆóÒµIT¼¼ÊõÈËÔ±£¬´Ó×Éѯ»ú¹¹µÄ·ÖÎöÈËÊ¿µ½¸÷ÐÐÒµµÄÐÅÏ¢»¯Ö÷¹Ü£¬µ ......
ÊÇÏëÉú³ÉGUIDÂð£¿
SQL> select sys_guid() from dual ;
SYS_GUID()
--------------------------------
F18031C69D8345DEB305D4B2E796A282
Äã¿ÉÒ԰ѱíµÄÖ÷¼ü×ֶεÄȱʡֵÉèΪsys_guid()
insert into luxian_info (id) values(sys_guid()); ......