1,安装好ASM后,启动ASM数据的过程
启动ASM 数据库的步骤
由于启动ASM 数据库必须要先启动ASM 实例,所以基本上启动步骤如下。
1. 以oracle 用户进入操作系统
2. $ export ORACLE_SID=+ASM //ORACLE_SID一定要大写。
3. $ sqlplus / as sysdba
4. SQL> startup
5. SQL> exit
6. $ export ORACLE_SID=<your_real_db_sid>
7. $sqlplus / as sysdba
8. SQL> startup
需要启动2个oracle_sid
2,启动监听器: lsnrctl start
监听器 listener.ora实例
# listener.ora Network Configuration File: /opt/app/oracle/product/10.2.0.1/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = +ASM)
(ORACLE_HOME = /opt/app/oracle/product/10.2.0.1/db_1)
(GLOBAL_DBNAME=+ASM )
)
(SID_DESC =
(SID_NAME = czdev)
(ORACLE_HOME = /opt/app/oracle/product/10.2.0.1/db_1)
(GLOBAL_DBNAME=czdev )
)
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/app/oracle/product/10.2.0.1/db_1)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = Rm-DevDB)(PORT = 1521))
)
)
3,启动web 管理页面
$emctl start dbconsole
远程连接ASM数据配置listener.ora的情况
listener.ora 这个文件的配置
服务器端的配置
[oracle@rs2600-2 admin]$ vi listener.ora
# listener.ora Network Configuration File: /opt/app/oracle/product/10.2.0/server/network/admin/listener.ora
# Generated by Oracle configuration tools.
LSNRASM =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rs2600-2)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = +ASM)
(ORACLE_HOME = /opt/app/oracle/product/10.2.0/server)
(SID_NAME = +ASM)
)
(SID_DESC =
(GLOBAL_DBNAME = danghj)
(ORACLE_HOME = /opt/app/oracle/product/10.2.0/server)
(SID_NAME = danghj)
)
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/app/oracle/product/10.2.0/server)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rs2600-2)(PORT = 1521))
)
)
客户端的配置
ASM_172.22.11.124 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.22.11.124)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = danghj)
)
)
4.启动Emctl
# emctl start dbconsole
# emctl status dbconsole //查看状态
4,Oracle 中删除 ASM 实例
删除自动存储管理实例+ASM实例+ASM的删除是在数据库被卸载之后完成的,并删除/ORACLE_HOME/dbs目录下的所有文件(除了 与ASM相关的)。因此必须完成下列步骤:
4.1在命令提示符中,设置oracle_sid环境变量为+ASM实例:
# export oracle_sid=+ASM
4.2启动SQL*Plus并以sys用户连接到自动存储管理+ASM实例:
# sqlplus / as sysdba
4.3使用下列命令来确定是否有数据库实例正在使用自动存储管理实例+ASM:
SQL>select instance_name from v$asm_client;
该命令结果列出所有正在运行并使用+ASM实例的数据库实例。只要+ASM包含正在支持的数据库实例,就不能删除该+ASM实例。(其实可以先 shutdown对应的数据库实例,然后从asmcmd进入磁盘组所在目录,删掉对应的数据库目录和文件就可以了)。
4.4 如果没有与+ASM相关联的数据库实例,则删除与该实例相关联的磁盘组。
首先,识别与+ASM相关联的磁盘组:
SQL>select name from v$asm_diskgroup;
其次,用下列命令删除每个要删除的磁盘组:
SQL>drop diskgroup<disk_group_name>including contents;
4.5 关闭+ASM实例并退出SQL*Plus:
SQL>shutdown
SQL>exit
4.6 在命令提示符中输入下列命令,删除+ASM服务(我没找到这个命令,所以没有运行):
oradim -delete -asmsid +ASM
4,到ASM磁盘输入sys密码连接不上,显示网络问题
需要启动istener就可以了