Oracle FTP service -- using FTP with Oracle ASM files

Source: Internet
Author: User
Tags ftp site
If the database uses the ASM file system for management, it may be difficult to download and upload files. Even if the asmcmd tool is used, there is no command similar to CP to copy files, oracle provides FTP to manage a series of ASM files. Using FTP with Oracle ASM fileshttp: // docs.oracle.com/cd/e11882_01/appdev.#/e23094/xdb22pro.htm?adxdb5537

Oracle Automatic Storage Management (Oracle ASM) organizes database files into disk groups for simplified management and added benefits such as database sorting 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 areDATAAndRECOVERY; The database name isMFG; And the directories created for aliases aredbsAndtmp. This example navigates to a subfolder, lists its files, and copies
A file to the local file system.

To use ftp, you must first listen to the configured port:

For example:SQL> @ $ ORACLE_HOME/rdbms/admin/catxdbdbca. SQL 7777 8888

Run the preceding statement using SYS. You can specify the following two ports. Port 7070 is the ftp port and port 8080 is the Web port.

View the listener:

Oel57t1: oracle: rac2> LSNRCTL status

The following message is displayed, indicating that the configuration is successful:

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 7777ftp> user systemPassword required for SYSTEMPassword: passwordftp> cd /sys/asmftp> lsDATARECOVERYftp> cd DATAftp> lsdbsMFGftp> cd dbsftp> lst_dbl.ft_axl.fftp> binaryftp> get t_dbl.f, t_axl.fftp> put my_db2.f

In
Example 28-1, after connecting to and logging onto Databasemyhost(First four lines), FTP MethodscdAnd
lsAre used to navigate and list folders, respectively. When in folder/sys/asm/DATA/dbs, FTP commandgetIs used
Copy filest_db1.fAndt_ax1.fTo the current folder of the local file system. Then, FTP commandputIs used to copy filemy_db2.fFrom the local file system
To folder/sys/asm/DATA/dbs.

The most common commands are:

Ls to list the current directory of the remote machine
CD changes the working directory on a remote machine
LCD changes the working directory on the local machine
Set the file transmission mode to ASCII in ASCII mode.
Set the file transfer mode to binary.
Close to terminate the current FTP session
Each time the hash data is transmitted in the data buffer, A # number is displayed.
Get (mget) transfers specified files from a remote machine to a Local Machine
Put (mput) transfers the specified file from the local machine to the remote machine
Open connection to remote FTP site
Bye disconnects from the remote machine and exits FTP
? Display local help information
! Go to 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.