ASMCMD簡介(1)
001、在ASM例項中,所有的儲存於ASM磁碟組中的檔案對於作業系統命令而言是不可訪問的,因此也無法使用常規的命令來操縱ASM磁碟中的檔案。如此一來,勢必要有可替代的工具來完成這部分操作,這個替代的工具就是asmcmd。
官方文件是這樣描述的:ASMCMD is a command-line utility that you can use to manage Oracle ASM instances, disk groups, file access control for disk groups, files and directories within disk groups, templates for disk groups, and volumes.意即:ASMCMD是一個命令列實用工具,你可以使用它來管理Oracle ASM例項,磁碟組,磁碟組的檔案訪問控制,磁碟組中的檔案和目錄,磁碟組的模板和卷。
下面是進入asmcmd後輸入help得到的幫助說明,幫助說明描述了asmcmd的一些基本語法和透過help能檢視具體用法的asmcmd命令。
2、如果在伺服器上有多個ASM例項,那麼在進入ASM之前需要用export ORACLE_SID=***,將ORACLE_SID變數設定為你想訪問的ASM例項。
3、ASMCMD中的命令分成如下幾類:
4、ASMCMD工具有兩種使用方式,一種是互動方式,即在命令列輸入ASMCMD後就可以進入到ASMCMD的互動模式,另一種則是在每次輸入ASMCMD的命令的開頭都加上一個asmcmd(必須是小寫,Linux上是區分大小寫),即非互動模式。互動模式提供了一個可以類似shell的供你輸入ASMCMD命令的環境;非互動式則適用於執行指令碼。
5、在ASM中經常出現的“+”號代表著ASM目錄層級中的根目錄,就像檔案系統中的根目錄“/”一樣,+data就等於檔案系統中的/data。
6、fully qualified filename:完全限定的檔名
7、在命令列輸入asmcmd -p,可以進入顯示當前目錄的asmcmd模式,如下圖:
8、在ASMCMD中,檔名對大小寫不敏感,但是是具記憶性的(retentive),ASMCMD中預設檔名和路徑都是大寫,但如果你輸入的路徑和檔名是小寫,也不會影響命令的執行 ,但是這個時候你用ls或pwd等命令檢視檔案或目錄時就會發現路徑及檔名全是你輸入的小寫,而不是系統預設的大小形式。
官方文件是這樣描述的:ASMCMD is a command-line utility that you can use to manage Oracle ASM instances, disk groups, file access control for disk groups, files and directories within disk groups, templates for disk groups, and volumes.意即:ASMCMD是一個命令列實用工具,你可以使用它來管理Oracle ASM例項,磁碟組,磁碟組的檔案訪問控制,磁碟組中的檔案和目錄,磁碟組的模板和卷。
下面是進入asmcmd後輸入help得到的幫助說明,幫助說明描述了asmcmd的一些基本語法和透過help能檢視具體用法的asmcmd命令。
點選(此處)摺疊或開啟
-
ASMCMD> help
-
-
asmcmd [-V] [-v <errors|warnings|normal|info|debug>] [--privilege ] [-p] [command]
-
asmcmd_no_conn_str
-
-
Starts asmcmd (if no parameters) or executes the command with given parameters
-
-
asmcmd [-V] [-v <errors|warnings|normal|info|debug>] [--privilege ] [-p] [command]
-
-
Specify the connect string after the -c option to use the listener to
-
connect. By default, ASMCMD asks for a password in a non-echoing
-
prompt, unless the password is specified as part of the connect string.
-
-
The connect identifier is in the form of "host:port:sid", with the
-
host and the port being option. Host defaults to "localhost" and port
-
to 1521. If the sid is not specified as a part of the connect
-
identifier, then it is read from the environment variable ORACLE_SID.
-
-
If no connect string is used, then environment variables
-
ORACLE_HOME and ORACLE_SID determine the instance to which the program
-
connects, and asmcmd establishes a bequeath connection to the it, in
-
the same manner as a SQLPLUS / AS SYSASM. The user must be a member
-
of the SYSDBA group to exercise this option.
-
-
Specifying the -V option prints the asmcmd version number and
-
exits immediately.
-
-
Specifying the -v option prints extra information that can help
-
advanced users diagnose problems.
-
-
Specify the --privilege option to choose the type of connection. There are
-
only two possibilities: connecting as SYSASM or as SYSDBA.
-
The default value if this option is unspecified is SYSASM:
-
-
Specifying the -p option allows the current directory to be displayed
-
in the command prompt, like so:
-
-
ASMCMD [+DATA/ORCL/CONTROLFILE] >
-
-
The parameter command specifies one of the following commands, along
-
with its parameters.
-
-
Type "help [command]" to get help on a specific ASMCMD command.
-
-
commands:
-
--------
-
-
md_backup, md_restore
-
-
lsattr, setattr
-
-
cd, cp, du, find, help, ls, lsct, lsdg, lsof, mkalias
-
mkdir, pwd, rm, rmalias
-
-
chdg, chkdg, dropdg, iostat, lsdsk, lsod, mkdg, mount
-
offline, online, rebal, remap, umount
-
-
dsget, dsset, lsop, shutdown, spbackup, spcopy, spget
-
spmove, spset, startup
-
-
chtmpl, lstmpl, mktmpl, rmtmpl
-
-
chgrp, chmod, chown, groups, grpmod, lsgrp, lspwusr, lsusr
-
mkgrp, mkusr, orapwusr, passwd, rmgrp, rmusr
-
-
volcreate, voldelete, voldisable, volenable, volinfo
- volresize, volset, volstat
2、如果在伺服器上有多個ASM例項,那麼在進入ASM之前需要用export ORACLE_SID=***,將ORACLE_SID變數設定為你想訪問的ASM例項。
3、ASMCMD中的命令分成如下幾類:
Category | Commands |
---|---|
|
, , , , , , , ,, , , , |
|
, , , , , , , , , |
|
, , , , , , , , ,, , , , , , , , |
|
, , , |
|
, , , , , , , , ,, , |
|
, , , , , , , |
4、ASMCMD工具有兩種使用方式,一種是互動方式,即在命令列輸入ASMCMD後就可以進入到ASMCMD的互動模式,另一種則是在每次輸入ASMCMD的命令的開頭都加上一個asmcmd(必須是小寫,Linux上是區分大小寫),即非互動模式。互動模式提供了一個可以類似shell的供你輸入ASMCMD命令的環境;非互動式則適用於執行指令碼。
5、在ASM中經常出現的“+”號代表著ASM目錄層級中的根目錄,就像檔案系統中的根目錄“/”一樣,+data就等於檔案系統中的/data。
6、fully qualified filename:完全限定的檔名
7、在命令列輸入asmcmd -p,可以進入顯示當前目錄的asmcmd模式,如下圖:
8、在ASMCMD中,檔名對大小寫不敏感,但是是具記憶性的(retentive),ASMCMD中預設檔名和路徑都是大寫,但如果你輸入的路徑和檔名是小寫,也不會影響命令的執行 ,但是這個時候你用ls或pwd等命令檢視檔案或目錄時就會發現路徑及檔名全是你輸入的小寫,而不是系統預設的大小形式。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29067253/viewspace-2088205/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 1 簡介
- asmcmd工具的詳細介紹ASM
- Flask(1)- 簡介Flask
- CPU簡介(1)
- 1-簡介
- Flutter – 1.簡介Flutter
- HTML————1、HTML簡介HTML
- 1、LVGL簡介
- 1. JUC簡介
- 1jQuery簡介jQuery
- 1-Mix簡介
- JavaFX基礎:1: 簡介Java
- JAVASE簡介---D1Java
- 高通SNPE - OpenCL簡介(1)
- POI-簡介(1/2)
- (1) Shell 指令碼簡介指令碼
- HDInsight - 1,簡介
- Oracle Scheduler(1)用法簡介Oracle
- 【asmcmd】使用asmcmd工具管理ASMASM
- asmcmdASM
- GraphQL 快速入門【1】簡介
- C語言-1.簡介C語言
- windows API簡介(系列1) (轉)WindowsAPI
- 【ASM】ASMCMD 之md_backup,md_restore介紹ASMREST
- ASMCMD命令ASM
- ASMCMD - cpASM
- 使用asmcmdASM
- (譯) 函式式 JS #1:簡介函式JS
- Go語言學習(1) - 簡介Go
- 1.Cobaltstrike 安裝與簡介
- 強化學習系列(1):簡介強化學習
- redis(1)NoSQL資料庫簡介RedisSQL資料庫
- 深入React技術棧(1):簡介React
- Vue.js實戰(1):簡介Vue.js
- WebGL程式設計指南(1)簡介Web程式設計
- XML進階:Level 1 – XML簡介XML
- 跟我學習dubbo-簡介(1)
- Gradle入門系列(1):簡介Gradle