How to parse and configure channel
This article mainly shows you "how to parse and configure channel", the content is easy to understand, clear, hope to help you solve your doubts, let the editor lead you to study and learn "how to parse and configure channel" this article.
RMAN channel refers to the connection between RMAN and database server session. RMAN itself does not do backup and restore operations, and when we connect to RMAN, RMAN allocates server sessions on the target database. Channel reads the data into PGA, processes it and writes it to the device. Most RMAN commands are executed by channels.
When configuring channel, if you configure channel at the second time, the previous channel configuration will be overwritten
RMAN > CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 2G
New RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 2 G
New RMAN configuration parameters are successfully stored
RMAN > CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT'/ home/oracle/%U'
Old RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 2 G
New RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT'/ home/oracle/%U'
New RMAN configuration parameters are successfully stored
By default, RMAN allocates only one channel to one disk to handle all operations.
You can also use allocate channel to specify channel
Like running a script.
RUN
[oracle@lzl ~] $cat rman.script
RUN
{
ALLOCATE CHANNEL C1 DEVICE TYPE DISK format'/ home/oracle/c1.bakset'
BACKUP TABLESPACE users
ALLOCATE CHANNEL c2 DEVICE TYPE DISK format'/ home/oracle/c2.bakset'
BACKUP spfile
}
Assigned two channel to handle two tasks
RMAN > @ / home/oracle/rman.script
RMAN > RUN
2 > {
3 > ALLOCATE CHANNEL C1 DEVICE TYPE DISK format'/ home/oracle/c1.bakset'
4 > BACKUP TABLESPACE users
5 > ALLOCATE CHANNEL c2 DEVICE TYPE DISK format'/ home/oracle/c2.bakset'
6 > BACKUP spfile
7 >}
Using target database control file instead of recovery catalog
Allocated channel: c1
Channel c1: SID=1 device type=DISK
Starting backup at 2017-07-23 23:49:58
Channel c1: starting datafile copy
Input datafile file number=00004 name=/u01/app/oracle/oradata/test/users01.dbf
Output file name=/home/oracle/c1.bakset tag=TAG20170723T234958 RECID=2 STAMP=950140201
Channel c1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 2017-07-23 23:50:01
Allocated channel: c2
Channel c2: SID=42 device type=DISK
Starting backup at 2017-07-23 23:50:02
Channel c1: starting full datafile backup set
Channel C1: specifying datafile (s) in backup set
Including current SPFILE in backup set
Channel C1: starting piece 1 at 2017-07-23 23:50:02
RMAN-03009: failure of backup command on c1 channel at 07/23/2017 23:50:02
ORA-19504: failed to create file "/ home/oracle/c1.bakset"
ORA-27038: created file already exists
Additional information: 1
Channel c1 disabled, job failed on it will be run on another channel
Channel c2: starting full datafile backup set
Channel c2: specifying datafile (s) in backup set
Including current SPFILE in backup set
Channel c2: starting piece 1 at 2017-07-23 23:50:02
Channel c2: finished piece 1 at 2017-07-23 23:50:03
Piece handle=/home/oracle/c2.bakset tag=TAG20170723T235002 comment=NONE
Channel c2: backup set complete, elapsed time: 00:00:01
Finished backup at 2017-07-23 23:50:03
Released channel: c1
Released channel: c2
RMAN > * * end-of-file**
[oracle@lzl] $ls-lrth * .bakset
-rw-r- 1 oracle oinstall 409m Jul 23 23:50 c1.bakset
-rw-r- 1 oracle oinstall 96K Jul 23 23:50 c2.bakset
These are all the contents of the article "how to parse and configure channel". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!