【asmcmd】使用asmcmd工具管理ASM
類似於sqlplus運算元據庫一樣,asmcmd工具可以實現對ASM的管理。
簡單直觀的看一下asmcmd帶給我的功能。
1.連線到ASM例項
既然要管理ASM,必要要指定ASM例項,我們需要告知asmcmd的兩件事情是:①.ORACLE_HOME環境變數是什麼;②.所要連線到的ASM例項時什麼。
然後直接使用“asmcmd”或“asmcmd -p”(-p選項可以在命令提示符中給出當前的路徑資訊)便可連線到對應的ASM。
RACDB1@rac1 /home/oracle$ export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
RACDB1@rac1 /home/oracle$ export ORACLE_SID=+ASM1
+ASM1@rac1 /home/oracle$ asmcmd
ASMCMD>
ASMCMD> exit
+ASM1@rac1 /home/oracle$ asmcmd -p
ASMCMD [+] >
2.獲取asmcmd工具的幫助資訊
ASMCMD [+] > help
asmcmd [-p] [command]
The environment variables ORACLE_HOME and ORACLE_SID determine the
instance to which the program connects, and ASMCMD establishes a
bequeath connection to it, in the same manner as a SQLPLUS / AS
SYSDBA. The user must be a member of the SYSDBA group.
Specifying the -p option allows the current directory to be displayed
in the command prompt, like so:
ASMCMD [+DATAFILE/ORCL/CONTROLFILE] >
[command] specifies one of the following commands, along with its
parameters.
Type "help [command]" to get help on a specific ASMCMD command.
commands:
--------
cd
du
find
help
ls
lsct
lsdg
mkalias
mkdir
pwd
rm
rmalias
asmcmd工具提供了以上簡單的操作ASM檔案的命令。
3.將常用的命令做一個演示
ASMCMD [+] > ls
DATA/
FRA/
ASMCMD [+] > cd DATA
ASMCMD [+DATA] >
ASMCMD [+DATA] > cd ..
ASMCMD [+] > lsct
DB_Name Status Software_Version Compatible_version Instance_Name
RACDB CONNECTED 10.2.0.1.0 10.2.0.1.0 RACDB1
RACDB CONNECTED 10.2.0.1.0 10.2.0.1.0 RACDB1
ASMCMD [+] > lsdg
State Type Rebal Unbal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Name
MOUNTED EXTERN N N 512 4096 1048576 2047 7 0 7 0 DATA/
MOUNTED EXTERN N N 512 4096 1048576 2047 1825 0 1825 0 FRA/
ASMCMD [+data/racdb] > pwd
+data/racdb
ASMCMD [+data/racdb] > ls
1_10_733447664.dbf
1_11_733447664.dbf
1_12_733447664.dbf
1_13_733447664.dbf
1_14_733447664.dbf
1_15_733447664.dbf
1_16_733447664.dbf
1_17_733447664.dbf
1_18_733447664.dbf
1_19_733447664.dbf
1_20_733447664.dbf
1_3_733447664.dbf
1_4_733447664.dbf
1_5_733447664.dbf
1_6_733447664.dbf
1_7_733447664.dbf
1_8_733447664.dbf
1_9_733447664.dbf
2_1_733447664.dbf
2_2_733447664.dbf
2_3_733447664.dbf
2_4_733447664.dbf
2_5_733447664.dbf
ARCHIVELOG/
CONTROLFILE/
DATAFILE/
ONLINELOG/
PARAMETERFILE/
TEMPFILE/
spfileRACDB.ora
4.小結
asmcmd工具提供的功能雖然不是很豐富,但對於相對閉塞的ASM來說,它是一個非常有效的操作工具。
Good luck.
secooler
10.11.06
-- The End --
簡單直觀的看一下asmcmd帶給我的功能。
1.連線到ASM例項
既然要管理ASM,必要要指定ASM例項,我們需要告知asmcmd的兩件事情是:①.ORACLE_HOME環境變數是什麼;②.所要連線到的ASM例項時什麼。
然後直接使用“asmcmd”或“asmcmd -p”(-p選項可以在命令提示符中給出當前的路徑資訊)便可連線到對應的ASM。
RACDB1@rac1 /home/oracle$ export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
RACDB1@rac1 /home/oracle$ export ORACLE_SID=+ASM1
+ASM1@rac1 /home/oracle$ asmcmd
ASMCMD>
ASMCMD> exit
+ASM1@rac1 /home/oracle$ asmcmd -p
ASMCMD [+] >
2.獲取asmcmd工具的幫助資訊
ASMCMD [+] > help
asmcmd [-p] [command]
The environment variables ORACLE_HOME and ORACLE_SID determine the
instance to which the program connects, and ASMCMD establishes a
bequeath connection to it, in the same manner as a SQLPLUS / AS
SYSDBA. The user must be a member of the SYSDBA group.
Specifying the -p option allows the current directory to be displayed
in the command prompt, like so:
ASMCMD [+DATAFILE/ORCL/CONTROLFILE] >
[command] specifies one of the following commands, along with its
parameters.
Type "help [command]" to get help on a specific ASMCMD command.
commands:
--------
cd
du
find
help
ls
lsct
lsdg
mkalias
mkdir
pwd
rm
rmalias
asmcmd工具提供了以上簡單的操作ASM檔案的命令。
3.將常用的命令做一個演示
ASMCMD [+] > ls
DATA/
FRA/
ASMCMD [+] > cd DATA
ASMCMD [+DATA] >
ASMCMD [+DATA] > cd ..
ASMCMD [+] > lsct
DB_Name Status Software_Version Compatible_version Instance_Name
RACDB CONNECTED 10.2.0.1.0 10.2.0.1.0 RACDB1
RACDB CONNECTED 10.2.0.1.0 10.2.0.1.0 RACDB1
ASMCMD [+] > lsdg
State Type Rebal Unbal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Name
MOUNTED EXTERN N N 512 4096 1048576 2047 7 0 7 0 DATA/
MOUNTED EXTERN N N 512 4096 1048576 2047 1825 0 1825 0 FRA/
ASMCMD [+data/racdb] > pwd
+data/racdb
ASMCMD [+data/racdb] > ls
1_10_733447664.dbf
1_11_733447664.dbf
1_12_733447664.dbf
1_13_733447664.dbf
1_14_733447664.dbf
1_15_733447664.dbf
1_16_733447664.dbf
1_17_733447664.dbf
1_18_733447664.dbf
1_19_733447664.dbf
1_20_733447664.dbf
1_3_733447664.dbf
1_4_733447664.dbf
1_5_733447664.dbf
1_6_733447664.dbf
1_7_733447664.dbf
1_8_733447664.dbf
1_9_733447664.dbf
2_1_733447664.dbf
2_2_733447664.dbf
2_3_733447664.dbf
2_4_733447664.dbf
2_5_733447664.dbf
ARCHIVELOG/
CONTROLFILE/
DATAFILE/
ONLINELOG/
PARAMETERFILE/
TEMPFILE/
spfileRACDB.ora
4.小結
asmcmd工具提供的功能雖然不是很豐富,但對於相對閉塞的ASM來說,它是一個非常有效的操作工具。
Good luck.
secooler
10.11.06
-- The End --
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28389881/viewspace-1251199/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ASM工具asmcmdASM
- 使用 ASMCMD 工具管理ASM目錄及檔案ASM
- ASM命令列管理工具asmcmdASM命令列
- oracle asm asmcmdOracleASM
- 【ASM】ASMCMD cp 命令ASM
- OCP(11g)------> ASM Command-Line Utility (ASMCMD)和 使用 ASMCMDASM
- 使用asmcmdASM
- 【ASM】ASMCMD chtmpl 更改ASM 模版的屬性ASM
- ASMCMD - ASM command line utility .ASM
- asmcmdASM
- [zt] ORACLE 10g中ASMCMD使用及ASM檔案Oracle 10gASM
- ASMCMD命令ASM
- ASMCMD - cpASM
- Oracle 12C ASM asmcmd amdu_extractOracleASM
- 學習ASM技術(六)-- ASMCMD命令列ASM命令列
- asmcmd工具的詳細介紹ASM
- asmcmd詳解ASM
- 【ASM】ASMCMD 之md_backup,md_restore介紹ASMREST
- 用asmcmd 的rebal 代替 ASM_POWER_LIMIT 引數ASMMIT
- Oracle IZ0-053 Q36(ASM ASMCMD REMAP)OracleASMREM
- Oracle ASM使用asmcmd中的cp命令來執行遠端複製OracleASM
- ASMCMD簡介(1)ASM
- asmcmd命令學習ASM
- asmcmd命令用法教程ASM
- asmcmd does not exist in directoryASM
- ORACLE 10g中ASMCMD使用及ASM檔案XML DB訪問-1Oracle 10gASMXML
- oracle 11gR2 asmcmd工具增加 cp命令OracleASM
- Oracle ASMCMD命令參考OracleASM
- ASMCMD執行ASM後設資料備份與還原ASM
- grid使用者asmcmd命令相關ASM
- ASMCMD中的各個命令ASM
- asmcmd的cp命令小bugASM
- asmcmd的一個問題ASM
- 【ASM】ASMCMD 磁碟後設資料的備份與恢復實踐ASM
- asmcmd對磁碟組的處理ASM
- ASMCMD處理問題一則ASM
- asmcmd: command disallowed by current instance typeASM
- ASMCMD +ASM 例項 Connected to an idle instance. 一個 / 導致的問題ASM