日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

oracle存储过程使用ftp,ASM存储FTP上传文件

發(fā)布時(shí)間:2023/12/10 编程问答 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 oracle存储过程使用ftp,ASM存储FTP上传文件 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

引用

SQL>execute dbms_xdb.sethttpport(8080);

SQL>execute dbms_xdb.setftpport(2100);

SQL>commit;

檢查端口是否開(kāi)啟

引用

SQL> select dbms_xdb.GETHTTPPORT() from dual;

DBMS_XDB.GETHTTPPORT()

----------------------

8080

SQL> select dbms_xdb.GETFTPPORT() from dual;

DBMS_XDB.GETFTPPORT()

---------------------

2100

2、配置dispatch參數(shù)

引用

SQL> alter system set dispatchers ='(PROTOCOL=TCP) (SERVICE=rac1XDB)' scope=both sid='rac1';

System altered.

SQL> alter system set dispatchers ='(PROTOCOL=TCP) (SERVICE=rac2XDB)' scope=both sid='rac2';

System altered.

3、重啟監(jiān)聽(tīng)

引用

[oracle@node1 app]$srvctl stop listener -n node1

[oracle@node1 app]$srvctl stop listener -n node2

[oracle@node1 app]$srvctl start listener -n node2

[oracle@node1 app]$srvctl start listener -n node1

4、檢查監(jiān)聽(tīng)狀態(tài),注意端口號(hào),協(xié)議

引用

[oracle@node1 app]$ lsnrctl status LISTENER_NODE1

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 20-JAN-2011 13:41:15

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? ?? ?? ?? ?? ? 20-JAN-2011 13:40:16

Uptime? ?? ?? ?? ?? ?? ???0 days 0 hr. 0 min. 58 sec

Trace Level? ?? ?? ?? ?? ?off

Security? ?? ?? ?? ?? ?? ?ON: Local OS Authentication

SNMP? ?? ?? ?? ?? ?? ?? ? OFF

Listener Parameter File? ?/app/oracle/product/10.2.0/db_1/network/admin/listener.ora

Listener Log File? ?? ?? ?/app/oracle/product/10.2.0/db_1/network/log/listener_node1.log

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.4.182)(PORT=1521)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.4.178)(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 "+ASM2", status BLOCKED, has 1 handler(s) for this service...

Service "+ASM_XPT" has 1 instance(s).

Instance "+ASM2", 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 "rac" has 2 instance(s).

Instance "rac1", status READY, has 1 handler(s) for this service...

Instance "rac2", status READY, has 2 handler(s) for this service...

Service "rac1XDB" has 1 instance(s).

Instance "rac1", status READY, has 1 handler(s) for this service...

Service "rac2XDB" has 1 instance(s).

Instance "rac2", status READY, has 1 handler(s) for this service...

Service "racXDB" has 2 instance(s).

Instance "rac1", status READY, has 0 handler(s) for this service...

Instance "rac2", status READY, has 0 handler(s) for this service...

Service "racXDB1" has 1 instance(s).

Instance "rac1", status READY, has 0 handler(s) for this service...

Service "racXDB2" has 1 instance(s).

Instance "rac1", status READY, has 0 handler(s) for this service...

Service "rac_XPT" has 2 instance(s).

Instance "rac1", status READY, has 1 handler(s) for this service...

Instance "rac2", status READY, has 2 handler(s) for this service...

The command completed successfully

2、腳本開(kāi)啟之后,即可用用客戶端進(jìn)行ftp傳輸

引用

[ora10g@hzmc rac]$ ftp 172.16.4.178 2100

Connected to 172.16.4.178.

220- node1

Unauthorised use of this FTP server is prohibited and may be subject to civil and criminal prosecution.

220 node1 FTP Server (Oracle XML DB/Oracle Database) ready.

530??Please login with USER and PASS.

530??Please login with USER and PASS.

KERBEROS_V4 rejected as an authentication type

Name (172.16.4.178

ra10g): system

331 pass required for SYSTEM

Password:

230 SYSTEM logged in

Remote system type is Unix.

ftp> bin

200??Type set to I.

ftp> cd /sys/asm

250 CWD Command successful

ftp> cd DATA/rac/datafile/

250 CWD Command successful

ftp> ls -rtl

227 Entering Passive Mode (172,16,4,178,148,40)

150 ASCII Data Connection

-rw-r--r--? ?1 SYS? ?? ?oracle??503324672 JAN 20 05:19 SYSTEM.256.740397671

-rw-r--r--? ?1 SYS? ?? ?oracle??304095232 JAN 20 05:19 SYSAUX.257.740397673

-rw-r--r--? ?1 SYS? ?? ?oracle??26222592 JAN 20 05:19 UNDOTBS1.258.740397675

-rw-r--r--? ?1 SYS? ?? ?oracle? ?5251072 JAN 20 05:19 USERS.259.740397675

-rw-r--r--? ?1 SYS? ?? ?oracle??26222592 JAN 20 05:19 UNDOTBS2.264.740397951

226 ASCII Transfer Complete

ftp> get SYSTEM.256.740397671

local: SYSTEM.256.740397671 remote: SYSTEM.256.740397671

227 Entering Passive Mode (172,16,4,178,49,55)

150 BIN Data Connection

226 BIN Transfer Complete

503324672 bytes received in 60 seconds (8.2e+03 Kbytes/s)

注意ftp需要用bin模式,如采用默認(rèn)傳輸模式ascii,則會(huì)報(bào)如下錯(cuò)誤:

引用

ftp> get UNDOTBS1.258.740397675

local: UNDOTBS1.258.740397675 remote: UNDOTBS1.258.740397675

227 Entering Passive Mode (172,16,4,178,80,157)

150 ASCII Data Connection

550- Error Response

ORA-31198: Mismatch in number of bytes transferred due to non-binary mode

550 End Error Response

271257 bytes received in 0.19 seconds (1.4e+03 Kbytes/s)

總結(jié)

以上是生活随笔為你收集整理的oracle存储过程使用ftp,ASM存储FTP上传文件的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。