浏览 2141 次
锁定老帖子 主题:Oracle之DBA入门一
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2009-09-21
interactive: ./runInstaller SQL*Plus sqlplus /nolog connect / as sysdba startup ------------------ Review: select * from dual; Managing an Oracle Instance Objectives: Create and manage initialization parameter files Start up and shut down an instance Monitor and use diagnostic files Initialization Parameter Files connect / as sysdba startup Two types of parameters: Explicit: Having an entry in the file Implicit: sqlplus /nolog conn / as sysdba startup ! ps -ef | grep oracle desc v$parameter; col name format a20 col value format a30 -- 查参数 show paramter pga_ag; env | grep ORACL ------------------------------------ Chapter 3 Managing an oracle Instance SID : Site Identifier create spfile from pfile; Strings xx | more xx Modify Parameters in SPFILE alter system set parameter=value <comment="text"> <deferred> <scope="memery|spfile|both"> <sid='sid|*'> SPFILE vs PFILE SPFILE is better than PFILE! Startup Command Behavior Order of precedence: spfileSID.ora Default SPFILE -> spfile.ora initSID.ora ( is a PFILE) Default PFILE -> ??? startup pfile = $oracle_home/dbs/initDBA1.ora Who can start the DB? SYSDBA, SYSOPER Starting Up a Database shutdown -> nomount -> mount -> open startup nomount; alter database db01 mount; alter database db01 open; startup [formce] [restrict] [pfile=<file_name>] open <read {only|write[recover]} | recover> <database_name>] alter database db01 open read only; sqlplus /nolog conn / as sysdba startup mount; alter database nomount; // error alter database open; Restricted Model startup restrict alter system enable restricted session; conn / as sysdba create user boobooke identified by bbk; grant connect, resource to boobooke; sqlplus boobooke/bbk@oracle9ivm quit alter system enable restricted session; sqlplus boobooke/bbk@oracle9ivm // error desc v$session; select saddr,sid,serial# from v$session; select sid, serial#, username from v$session; alter system kill session '15,6'; Read-Only Model startup mount alter database open read only; shutdown imediate startup mount; alter database open read only; sqlplus boobooke/bbk@oracle9ivm Shutting Down the Database Close a Database -> Unmount a Database -> shut down an instance Shutdown mode: abort, immediate, transactional, normal ---------------------- Diagnostic Files alertSID.log show parameter dump 17:37 2009-9-8 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |