Oracle介紹SVRMGRL命令
2024-08-29 13:35:26
供稿:網友
 
             
  啟動方法:
[Oracle@lin /ora]$ svrmgrl 
Oracle Server Manager Release 3.1.5.0.0 - PRodUCtion
Oracle8i Enterprise Edition Release 8.1.5.0.1 - Production
With the Partitioning and java options
                                                                                            PL/SQL Release 8.1.5.0.0 – Production
如何獲得使用幫助
打入help,得到: 下面是簡單的語法描述,具體資料請看Oracle Server Manager User's Guide.
SVRMGR> help
STARTUP      [DBA] [FORCE] [PFILE=filespec] [EXCLUSIVE  SHARED]
[MOUNT dbname  OPEN dbname] [NOMOUNT] 
SHUTDOWN     [NORMAL  IMMEDIATE  ABORT] 
MONITOR      For graphical modes only, bring up a monitor 
ARCHIVE LOG  [START] [STOP] [LIST] [NEXT] [] [ALL] ['destination'] 
RECOVER      { [DATABASE [MANUAL] ]  [TABLESPACE ts-name [,tsname]] } 
CONNECT      [username [/passWord] ] [INTERNAL] ['@'instance-spec]
DISCONNECT 
SET          options: INSTANCE, ECHO, TERMOUT, TIMING, NUMWIDTH, CHARWIDTH
SHOW         LONGWIDTH, DATEWIDTH, AUTOPRINT and for SHOW: ALL, SPOOL
EXIT
REM
SQL statements can also be executed.
以系統用戶oracle登錄:
SVRMGR> connect internal
Connected.
關閉數據庫,現在嘗試一下?!
SVRMGR> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
啟動數據庫吧, 我想給它指定參數,并且打開:
SVRMGR> startup pfile=/ora/dbs/initora8.ora open ora8
ORACLE instance started.
Total System Global Area                         23670160 bytes
Fixed Size                                          64912 bytes
Variable Size                                     6656000 bytes
Database Buffers                                 16777216 bytes
Redo Buffers                                       172032 bytes
Database mounted.
Database opened.
測試一下啦, 先看看數據庫的系統文件吧:
SVRMGR> select * from system.sysfiles;
TSNAME                         FNAME                                BLOCKS
------------------------------ -------------------------------------------------
SYSTEM             /u01/app/oracle/oradata/ora8/system01.dbf           89600
OEM_REPOSITORY     /u01/app/oracle/oradata/ora8/oemrep01.dbf           2560
RBS                /u01/app/oracle/oradata/ora8/rbs01.dbf              6144
TEMP               /u01/app/oracle/oradata/ora8/temp01.dbf             5120
USERS              /u01/app/oracle/oradata/ora8/users01.dbf            5120
INDX               /u01/app/oracle/oradata/ora8/indx01.dbf             5120
                         6 rows selected.
嗯, 感覺不錯, 我會了,謝謝。現在退出休息一下吧。
SVRMGR> exit
Server Manager complete.