oracleÊý¾Ý¿âʱ³£ÓõIJÙ×÷ÃüÁîÕûÀí
µÇ¼oracleÊý¾Ý¿âʱ³£ÓõIJÙ×÷ÃüÁîÕûÀí
1¡¢su – oracle ²»ÊDZØÐ裬ÊʺÏÓÚûÓÐDBAÃÜÂëʱʹÓ㬿ÉÒÔ²»ÓÃÃÜÂëÀ´½øÈësqlplus½çÃæ¡£
2¡¢sqlplus /nolog »òsqlplus system/manager »ò./sqlplus system/manager@ora9i
;
3¡¢SQL>connect / as sysdba ;£¨as sysoper£©»ò
connect internal/oracle AS SYSDBA ;(scott/tiger)
conn sys/change_on_install as sysdba;
4¡¢SQL>startup; Æô¶¯Êý¾Ý¿âʵÀý
5¡¢ ²é¿´µ±Ç°µÄËùÓÐÊý¾Ý¿â: select * from v$database;
select name from v$database;
desc v$databases; ²é¿´Êý¾Ý¿â½á¹¹×Ö¶Î
7¡¢ÔõÑù²é¿´ÄÄЩÓû§ÓµÓÐSYSDBA¡¢SYSOPERȨÏÞ:
SQL>select * from V_$PWFILE_USERS;
Show user;²é¿´µ±Ç°Êý¾Ý¿âÁ¬½ÓÓû§
8¡¢½øÈëtestÊý¾Ý¿â£ºdatabase test;
9¡¢²é¿´ËùÓеÄÊý¾Ý¿âʵÀý£ºselect * from v$instance£»
È磺ora9i
10¡¢²é¿´µ±Ç°¿âµÄËùÓÐÊý¾Ý±í£º
SQL> select TABLE_NAME from all_tables;
select * from all_tables;
SQL> select table_name from all_tables where table_name like '%u%';
TABLE_NAME
------------------------------
_default_auditing_options_
11¡¢²é¿´±í½á¹¹£ºdesc all_tables;
12¡¢ÏÔʾCQI.T_BBS_XUSERµÄËùÓÐ×ֶνṹ£º
desc CQI.T_BBS_XUSER;
13¡¢»ñµÃCQI.T_BBS_XUSER±íÖеļǼ£º
select * from CQI.T_BBS_XUSER;
14¡¢Ôö¼ÓÊý¾Ý¿âÓû§£º(test11/test)
create user test11 identified by test default tablespace users Temporary TABLESPACE Temp;
15¡¢Óû§ÊÚȨ:
grant connect,resource,dba to test11;
grant sysdba to test11;
commit;
16¡¢¸ü¸ÄÊý¾Ý¿âÓû§µÄÃÜÂ룺(½«sysÓësystemµÄÃÜÂë¸ÄΪtest.)
alter user sys indentified by test;
alter user system indentified by test;
oracle
¹ÜÀí¿ØÖÆ̨ÎÞ·¨µÇ¼µÄ½â¾ö°ì·¨
½â¾ö²½Ö裺
oracle
10gÖؽ¨em db control
Oracle
10GÖؽ¨EM DB Control.
1.drop configuration files and repository run :
emca -deconfig dbcontrol db -repos drop
oracle
10gÖؽ¨em db control
Oracle
10GÖؽ¨EM DB Control.
1.drop configuration files and repository run :
emca -deconfig dbcontrol db -repos drop
2. Logon SQLPLUS as user SYS or SYSTEM, and drop the sysman account and mangement objects:
a. drop user sysman cascade;
b. d
Ïà¹ØÎĵµ£º
extent--×îС¿Õ¼ä·ÖÅ䵥λ --tablespace management
block --×îСi/oµ¥Î» --segment management
create tablespace james
datafile '/export/home/oracle/oradata/james.dbf'
size 100M ¡¡¡¡¡¡¡¡¡¡¡¡--³õʼµÄÎļþ´óС¡¡
autoextend On¡¡¡¡¡¡¡¡ --×Ô¶¯Ôö³¤
next 10M¡ ......
ÓÐʱºòÎÒÃÇ¿ÉÄܲ»ÖªµÀÒ»¸öÓû§µÄÃÜÂ룬µ«ÊÇÓÖÐèÒªÒÔÕâ¸öÓû§×öһЩ²Ù×÷£¬ÓÖ²»ÄÜÈ¥Ð޸ĵôÕâ¸öÓû§µÄÃÜÂ룬Õâ¸öʱºò£¬¾Í¿ÉÒÔÀûÓÃһЩСÇÏÃÅ£¬À´Íê³É²Ù×÷¡£
¾ßÌå²Ù×÷¹ý³ÌÈçÏ£º
SQL*Plus: Release 9.2.0.5.0 - Production on ÐÇÆÚÈÕ 11ÔÂ 21 13:32:34 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reser ......
Select to_char(sysdate,'ss') from dual;--È¡µ±Ç°Ê±¼äÃ벿·Ö
Select to_char(sysdate,'mi') from dual;--È¡µ±Ç°Ê±¼ä·ÖÖÓ²¿·Ö
Select to_char(sysdate,'HH24') from dual;--È¡µ±Ç°Ê±¼äÃëСʱ²¿·Ö
Select to_char(sysdate,'DD') from dual;--È¡µ±Ç°Ê±¼äÈÕÆÚ²¿·Ö
Select to_char(sysdate,'MM') from dual;--È¡µ±Ç°Ê±¼ ......
ÔÎĵØÖ·£ºhttp://www.cnblogs.com/chinhr/archive/2009/04/22/1440914.html
·½·¨Ò»£º
ÔÚÄ¿Ç°¾ø´ó²¿·ÖÊý¾Ý¿âÓзֲ¼Ê½²éѯµÄÐèÒª¡£ÏÂÃæ¼òµ¥µÄ½éÉÜÈçºÎÔÚoracleÖÐÅäÖÃʵÏÖ¿ç¿â·ÃÎÊ¡£
±ÈÈçÏÖÔÚÓÐ2¸öÊý¾Ý¿â·þÎñÆ÷£¬°²×°ÁË2¸öÊý¾Ý¿â¡£Êý¾Ý¿âserver AºÍB¡£ÏÖÔÚÀ´ÊµÏÖÔÚA¿âÖзÃÎÊBµÄÊý¾Ý¿â¡£
µÚÒ»²½¡¢ÅäÖÃA·þÎñÆ÷¶ËµÄtnsnam ......