使用FTP访问ASM磁盘组

首先需要数据库已经安装XML Database (XDB) 组件
可以在dbca图形界面里configure database,也可根据metalink手动刷组件

1) As root check that ftp service is running:

# netstat -a | grep ftp
tcp 0 0 *:ftp *:* LISTEN

If no output is returned, start ftp:
# service vsftpd start
Starting vsftpd for vsftpd: [ OK ]

Also configure ftp to start automatically
# chkconfig vsftpd on

2) Configure the FTP and HTTP ports of XDB using:
如果没有XML Database (XDB) ,包执行会报错,没有定义此包
对于RAC来说,两节点都要执行
connect / as sysdba
execute dbms_xdb.sethttpport(8080);
execute dbms_xdb.setftpport(2100);
commit;

检查端口是否设置正确:
select dbms_xdb.GETFTPPORT() from dual;
select dbms_xdb.GETHTTPPORT() from dual;

3)配置dispatchers。 Check the dispatchers configuration for xdb, if it is not set set it up,
单实例环境:
ALTER SYSTEM SET dispatchers = =(PROTOCOL=TCP) (SERVICE=XDB)" SCOPE=BOTH
RAC环境:
SQL> alter system set dispatchers ='(PROTOCOL=TCP) (SERVICE=node1XDB)' scope=both sid='orcl1';
SQL> alter system set dispatchers ='(PROTOCOL=TCP) (SERVICE=node2XDB)' scope=both sid='orcl2';
If you are not using the default Listener ensure you have set LOCAL_LISTENER in the (init.ora/spfile)
as prescribed for RAC/NON-RAC instances or the end points will not register.

4)重启监听
lsnrctl stop
lsnrctl start

节点一:
[oracle@node1 admin]$ lsnrctl stop LISTENER_NODE1
[oracle@node1 admin]$ crs_stat -t
ora….E1.lsnr application OFFLINE OFFLINE
节点二:
[oracle@node2 admin]$ lsnrctl stop LISTENER_NODE2
[oracle@node2 admin]$ crs_stat -t
ora….E1.lsnr application OFFLINE OFFLINE
ora….E2.lsnr application OFFLINE OFFLINE
节点一:lsnrctl start LISTENER_NODE1
节点二:lsnrctl start LISTENER_NODE2

5)重启完后监听,检查监听状态是否包含FTP,HTTP协议,端口号是否正确
[oracle@node1 admin]$ lsnrctl status LISTENER_NODE1
LSNRCTL for Linux: Version 10.2.0.1.0 – Production on 29-AUG-2011 12:18:05
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=node1-vip)(PORT=1521)(IP=FIRST)))
STATUS of the LISTENER
————————
Alias LISTENER_NODE1
Version TNSLSNR for Linux: Version 10.2.0.1.0 – Production
Start Date 29-AUG-2011 12:16:38
Uptime 0 days 0 hr. 1 min. 26 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /oracle/product/10.2.0/db_1/network/log/listener_node1.log
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.4.218)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.4.217)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=node1)(PORT=2100))(Presentation=FTP)(Session=RAW))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=node1)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Services Summary…
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status BLOCKED, has 1 handler(s) for this service…
Service "+ASM_XPT" has 1 instance(s).
Instance "+ASM1", status BLOCKED, has 1 handler(s) for this service…
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service…
Service "orcl" has 2 instance(s).
Instance "orcl1", status READY, has 2 handler(s) for this service…
Instance "orcl2", status READY, has 1 handler(s) for this service…
Service "orcl_XPT" has 2 instance(s).
Instance "orcl1", status READY, has 2 handler(s) for this service…
Instance "orcl2", status READY, has 1 handler(s) for this service…
The command completed successfully

6)之后就可以用ftp访问ASM磁盘组文件了,并可进行传输等操作了 在/sys/asm 目录下
注意使用system登录ftp
C:\Documents and Settings\yeyj>ftp -n
ftp> open 172.16.4.217 2100
Connected to 172.16.4.217.
220- node1
Unauthorised use of this FTP server is prohibited and may be subject to civil an
d criminal prosecution.
220 node1 FTP Server (Oracle XML DB/Oracle Database) ready.
ftp> user system
331 pass required for SYSTEM
Password:
230 SYSTEM logged in
ftp> cd sys
250 CWD Command successful
ftp> cd asm
250 CWD Command successful
ftp> ls
200 PORT Command successful
150 ASCII Data Connection
DATA
226 ASCII Transfer Complete
ftp: 收到 6 字节,用时 0.97Seconds 0.01Kbytes/sec.

注意:
在第6步的时候,如果ftp不能登录,3种处理方法。
1.SQL> select count(*) from dba_objects where wner='XDB' and status='INVALID'; 确认为0
2.SQL> select comp_name, status, version from DBA_REGISTRY where comp_name='Oracle XML Database' 确认已安装成功,valid
3.重启数据库和监听 (此例中遇到ftp:Connection closed by remote host.重启后正常)

另外在,运行ftp连到ASM磁盘组似乎并不太稳定,容易受超时断开连接//Service not available, remote server has closed connection
还不知道从哪里找到相关的参数修改

相关参考:357714.1 / 1292189.1

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24005010/viewspace-710276/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/24005010/viewspace-710276/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值