<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Oracle - Concepts et Exemples &#187; RMAN</title>
	<atom:link href="https://blog.developpez.com/pachot/tag/rman-2/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.developpez.com/pachot</link>
	<description>Les fonctionalités et concepts d&#039;Oracle à partir de traductions et de démos</description>
	<lastBuildDate>Sun, 03 Apr 2016 20:36:21 +0000</lastBuildDate>
	<language>fr-FR</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.42</generator>
	<item>
		<title>Déplacer des archivelog avec RMAN</title>
		<link>https://blog.developpez.com/pachot/rman-move-archivelog/</link>
		<comments>https://blog.developpez.com/pachot/rman-move-archivelog/#comments</comments>
		<pubDate>Sat, 15 Jun 2013 20:29:06 +0000</pubDate>
		<dc:creator><![CDATA[pachot]]></dc:creator>
				<category><![CDATA[MicroLearning]]></category>
		<category><![CDATA[Recovery Cases]]></category>
		<category><![CDATA[RMAN]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/pachot/?p=183</guid>
		<description><![CDATA[Par manque de place dans un filesystem, on peut être amené à déplacer des archive logs. Si on les déplace avec l&#8217;OS (mv) alors Oracle ne saura plus où ils sont. Il faudra utiliser RMAN pour supprimer les anciens (crosscheck &#8230; <a href="https://blog.developpez.com/pachot/rman-move-archivelog/">Lire la suite <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Par manque de place dans un filesystem, on peut être amené à déplacer des archive logs.<br />
Si on les déplace avec l&rsquo;OS (mv) alors Oracle ne saura plus où ils sont. Il faudra utiliser RMAN pour supprimer les anciens (crosscheck archivelog all ; delete expired archivelog all; catalog start with &lsquo;&#8230;&rsquo; ; )</p>
<p>Mais il y a plus rapide: <strong>BACKUP AS COPY</strong> fait une copie des fichiers et avec <strong>DELETE INPUT</strong> on supprime la source. Ce qui revient à les déplacer&#8230;</p>
<h4>Exemple:</h4>
<p><span id="more-183"></span><br />
Je génère 3 archivelogs.</p>
<pre>RMAN&gt; sql "alter system archive log current";
sql statement: alter system archive log current

RMAN&gt; sql "alter system archive log current";
sql statement: alter system archive log current

RMAN&gt; sql "alter system archive log current";
sql statement: alter system archive log current
</pre>
<p>Les voici:</p>
<pre>RMAN&gt; list archivelog all;

List of Archived Log Copies for database with db_unique_name ORCL
=====================================================================

Key     Thrd Seq     S Low Time
------- ---- ------- - ---------
8528    1    8512    A 14-JUN-13
        Name: /app/oracle/fast_recovery_area/ORCL/archivelog/2013_06_14/o1_mf_1_8512_8voshs5y_.arc

8529    1    8513    A 14-JUN-13
        Name: /app/oracle/fast_recovery_area/ORCL/archivelog/2013_06_14/o1_mf_1_8513_8vosht61_.arc

8530    1    8514    A 14-JUN-13
        Name: /app/oracle/fast_recovery_area/ORCL/archivelog/2013_06_14/o1_mf_1_8514_8voshy3l_.arc</pre>
<p>Je les déplace vers /tmp:</p>
<pre>RMAN&gt; backup as copy archivelog all format '/tmp/%U' delete input;

Starting backup at 14-JUN-13
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log copy
input archived log thread=1 sequence=8512 RECID=8528 STAMP=818070265
output file name=/tmp/arch_D-ORCL_id-1634007513_S-8512_T-1_A-747580379_qmoc5gou RECID=8532 STAMP=818070302
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: deleting archived log(s)
archived log file name=/app/oracle/fast_recovery_area/ORCL/archivelog/2013_06_14/o1_mf_1_8512_8voshs5y_.arc RECID=8528 STAMP=818070265
channel ORA_DISK_1: starting archived log copy
input archived log thread=1 sequence=8513 RECID=8529 STAMP=818070266
output file name=/tmp/arch_D-ORCL_id-1634007513_S-8513_T-1_A-747580379_qnoc5gov RECID=8533 STAMP=818070303
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: deleting archived log(s)
archived log file name=/app/oracle/fast_recovery_area/ORCL/archivelog/2013_06_14/o1_mf_1_8513_8vosht61_.arc RECID=8529 STAMP=818070266
channel ORA_DISK_1: starting archived log copy
input archived log thread=1 sequence=8514 RECID=8530 STAMP=818070270
output file name=/tmp/arch_D-ORCL_id-1634007513_S-8514_T-1_A-747580379_qooc5gp1 RECID=8534 STAMP=818070305
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: deleting archived log(s)
archived log file name=/app/oracle/fast_recovery_area/ORCL/archivelog/2013_06_14/o1_mf_1_8514_8voshy3l_.arc RECID=8530 STAMP=818070270
channel ORA_DISK_1: starting archived log copy
input archived log thread=1 sequence=8515 RECID=8531 STAMP=818070302
output file name=/tmp/arch_D-ORCL_id-1634007513_S-8515_T-1_A-747580379_qpoc5gp2 RECID=8535 STAMP=818070306
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
channel ORA_DISK_1: deleting archived log(s)
archived log file name=/app/oracle/fast_recovery_area/ORCL/archivelog/2013_06_14/o1_mf_1_8515_8vosjyql_.arc RECID=8531 STAMP=818070302
Finished backup at 14-JUN-13

Starting Control File and SPFILE Autobackup at 14-JUN-13
piece handle=/app/oracle/fast_recovery_area/ORCL/autobackup/2013_06_14/o1_mf_s_818070307_8vosk3hj_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 14-JUN-13</pre>
<p>Et voici les archivelogs:</p>
<pre>RMAN&gt; list archivelog all;

List of Archived Log Copies for database with db_unique_name ORCL
=====================================================================

Key     Thrd Seq     S Low Time
------- ---- ------- - ---------
8532    1    8512    A 14-JUN-13
        Name: /tmp/arch_D-ORCL_id-1634007513_S-8512_T-1_A-747580379_qmoc5gou

8533    1    8513    A 14-JUN-13
        Name: /tmp/arch_D-ORCL_id-1634007513_S-8513_T-1_A-747580379_qnoc5gov

8534    1    8514    A 14-JUN-13
        Name: /tmp/arch_D-ORCL_id-1634007513_S-8514_T-1_A-747580379_qooc5gp1

8535    1    8515    A 14-JUN-13
        Name: /tmp/arch_D-ORCL_id-1634007513_S-8515_T-1_A-747580379_qpoc5gp2</pre>
<p>Les noms ont changé (j&rsquo;ai utilisé %U pour les générer), mais l&rsquo;important c&rsquo;est que Oracle sache où ils sont.</p>
<p>La syntaxe RMAN est assez particulière, et leur output aussi. Mais il est intéressant de bien les comprendre. <ins datetime="2013-06-11T10:29:02+00:00">Les exemples complets sont ici: <a href="http://ora-demo.pachot.net/rman-move-archivelog.html#3.3" title="demo" target="_blank">demo</a></ins>.</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
