oracle FTP服务——Using FTP with Oracle ASM Files
2013-04-23 16:02
471 查看
若数据库用ASM文件系统进行管理,那么在文件下载、上传方面有些困难,即使使用了asmcmd工具,也没有类似cp的命令来复制其中的文件,于是oracle提供了ftp来实现一系列ASM文件的管理。
Using FTP with Oracle ASM Files
http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb22pro.htm#ADXDB5537Oracle Automatic Storage Management (Oracle ASM) organizes database files into disk groups for simplified management and added benefits such as database mirroring and I/O balancing.Database administrators can use protocols and
resource APIs to access Oracle ASM files in the Oracle XML DB repositoryvirtual folder
/sys/asm.
All files in
/sys/asmare binary.
Typical uses are listing, copying, moving, creating, and deleting Oracle ASM files and folders.Example 28-1 is an example of navigating
the Oracle ASM virtual folder and listing the files in a subfolder.
The structure of the Oracle ASM virtual folder,
/sys/asm, is described inChapter 21, "Accessing Oracle XML DB Repository Data". InExample
28-1, the disk groups are
DATAand
RECOVERY; the database name is
MFG; and the directories created for aliases are
dbsand
tmp. This example navigates to a subfolder, lists its files, and copies
a file to the local file system.
要使用ftp必须先再监听内配置端口:
如:SQL> @$ORACLE_HOME/rdbms/admin/catxdbdbca.sql 7777 8888
用sys用户执行以上语句,后面的两个端口可以自己指定,7070是ftp端口,8080是web端口。
查看下监听:
oel57t1:oracle:rac2 > lsnrctl status
出现以下内容,表示配置成功:
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.241)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.51)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=OEL57t1)(PORT=7777))(Presentation=FTP)(Session=RAW))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=OEL57t1)(PORT=8888))(Presentation=HTTP)(Session=RAW))
Example 28-1 Navigating Oracle ASM Folders
ftp> open myhost 7777 ftp> user system Password required for SYSTEM Password: password ftp> cd /sys/asm ftp> ls DATA RECOVERY ftp> cd DATA ftp> ls dbs MFG ftp> cd dbs ftp> ls t_dbl.f t_axl.f ftp> binary ftp> get t_dbl.f, t_axl.f ftp> put my_db2.f
In
Example 28-1, after connecting to and logging onto database
myhost(first four lines), FTP methods
cdand
lsare used to navigate and list folders, respectively. When in folder
/sys/asm/DATA/dbs, FTP command
getis used to
copy files
t_db1.fand
t_ax1.fto the current folder of the local file system. Then, FTP command
putis used to copy file
my_db2.ffrom the local file system
to folder
/sys/asm/DATA/dbs.
最常用的命令有:
ls 列出远程机的当前目录
cd 在远程机上改变工作目录
lcd 在本地机上改变工作目录
ascii 设置文件传输方式为ASCII模式
binary 设置文件传输方式为二进制模式
close 终止当前的ftp会话
hash 每次传输完数据缓冲区中的数据后就显示一个#号
get(mget) 从远程机传送指定文件到本地机
put(mput) 从本地机传送指定文件到远程机
open 连接远程ftp站点
bye 断开与远程机的连接并退出ftp
? 显示本地帮助信息
! 转到Shell中
ftp> ?
Commands may be abbreviated. Commands are:
! cr mdir proxy send
$ delete mget sendport site
account debug mkdir put size
append dir mls pwd status
ascii disconnect mode quit struct
bell form modtime quote system
binary get mput recv sunique
bye glob newer reget tenex
case hash nmap rstatus trace
ccc help nlist rhelp type
cd idle ntrans rename user
cdup image open reset umask
chmod lcd passive restart verbose
clear ls private rmdir ?
close macdef prompt runique
cprotect mdelete protect safe
相关文章推荐
- How to configure XDB for using ftp and http protocols with ASM [ID 357714.1]
- How to configure XDB for using ftp and http protocols with ASM [ID 357714.1]
- 64-bit mex files using sparse matrices must be rebuilt with the "-largeArrayDims" option.
- Using OpenLDAP with Microsoft SQL Server and Oracle Backend Databases
- cuteftp访问FTP服务,vsftpd: refusing to run with writable root inside chroot()问题解决方法,超简练,附(ftp服务目录为SD卡方案)
- Using XSLT files with the new XMLDataSource control(转)
- How to map asm files with online database files
- Intro-Using Java with Oracle db(notes)
- Generate mp4 video with image files using Jcodec in Android
- do export method of oracle all database tables with dmp files.
- Using Python With Oracle Database 11g 精简版
- Oracle® Fusion Middleware Using Web Server Plug-Ins with Oracle WebLogic Server 11g Release 1 (10.3.
- Using Oracle Preinstall RPM with Red Hat 6
- Using Clobs with Oracle and Hibernate
- Oracle 11g RAC with ASM 安装在 RHEL5上(简版)
- Using JRuby with Oracle Database
- AIX上裸设备WARNING: Oracle recommends creating new datafiles on devices with zero offset.
- Display hidden files or folders with CutFTP
- Populate A List Item With Record Group In Oracle Forms Using Populate_List And Create_Group_From_Query Command
- Get files automatically by using FTP in Linux environment.