<?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>Archives des Oracle 18c - dbi Blog</title>
	<atom:link href="https://www.dbi-services.com/blog/tag/oracle-18c/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbi-services.com/blog/tag/oracle-18c/</link>
	<description></description>
	<lastBuildDate>Tue, 18 Jul 2023 05:36:10 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2025/05/cropped-favicon_512x512px-min-32x32.png</url>
	<title>Archives des Oracle 18c - dbi Blog</title>
	<link>https://www.dbi-services.com/blog/tag/oracle-18c/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Oracle 18c &#8211; select from a flat file</title>
		<link>https://www.dbi-services.com/blog/oracle-select-from-file/</link>
					<comments>https://www.dbi-services.com/blog/oracle-select-from-file/#respond</comments>
		
		<dc:creator><![CDATA[Oracle Team]]></dc:creator>
		<pubDate>Thu, 04 Jun 2020 19:09:27 +0000</pubDate>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Database Administration & Monitoring]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[19c]]></category>
		<category><![CDATA[BI]]></category>
		<category><![CDATA[DWH]]></category>
		<category><![CDATA[external]]></category>
		<category><![CDATA[features]]></category>
		<category><![CDATA[inline]]></category>
		<category><![CDATA[Oracle 18c]]></category>
		<category><![CDATA[Oracle 20c]]></category>
		<category><![CDATA[table]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/oracle-select-from-file/</guid>

					<description><![CDATA[<p>By Franck Pachot . This post is the first one from a series of small examples on recent Oracle features. My goal is to present them to people outside of Oracle and relational databases usage, maybe some NoSQL players. And this is why the title is &#8220;select from a flat-file&#8221; rather than &#8220;Inline External Tables&#8221;. [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/oracle-select-from-file/">Oracle 18c &#8211; select from a flat file</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>By Franck Pachot</h2>
<p>.<br />
This post is the first one from a series of small examples on recent Oracle features. My goal is to present them to people outside of Oracle and relational databases usage, maybe some NoSQL players. And this is why the title is &#8220;select from a flat-file&#8221; rather than &#8220;Inline External Tables&#8221;. In my opinion, the names of the features of Oracle Database are invented by the architects and developers, sometimes renamed by Marketing or CTO, and all that is very far from what the users are looking for. In order to understand &#8220;Inline External Table&#8221; you need to know all the history behind: there were tables, then external tables, and there were queries, and inlined queries, and&#8230; But imagine a junior who just wants to query a file, he will never find this feature. He has a file, it is not a table, it is not external, and it is not inline. What is external to him is this SQL language and what we want to show him is that this language can query his file.</p>
<p> I&#8217;m running this in the Oracle 20c preview in the Oracle Cloud.</p>
<p>In this post, my goal is to load a small fact and dimension table for the next posts about some recent features that are interesting in data warehouses. It is the occasion to show that with Oracle we can easily select from a .csv file, without the need to run SQL*Loader or create an external table.<br />
I&#8217;m running everything from SQLcl and then I use the host command to call curl:</p>
<pre><code>
host curl -L http://opendata.ecdc.europa.eu/covid19/casedistribution/csv/ | dos2unix | (sed -u 1q; sort -t, -n -k4,4 -k3,3 -k2,2 ) &gt; /tmp/covid-19.csv
</code></pre>
<p>This gets the latest number of COVID-19 cases per day and per country.</p>
<p>It looks like this:</p>
<pre><code>
SQL&gt; host head  /tmp/covid-19.csv

dateRep,day,month,year,cases,deaths,countriesAndTerritories,geoId,countryterritoryCode,popData2018,continentExp
31/12/2019,31,12,2019,0,0,Afghanistan,AF,AFG,37172386,Asia
31/12/2019,31,12,2019,0,0,Algeria,DZ,DZA,42228429,Africa
31/12/2019,31,12,2019,0,0,Armenia,AM,ARM,2951776,Europe
31/12/2019,31,12,2019,0,0,Australia,AU,AUS,24992369,Oceania
31/12/2019,31,12,2019,0,0,Austria,AT,AUT,8847037,Europe
31/12/2019,31,12,2019,0,0,Azerbaijan,AZ,AZE,9942334,Europe
31/12/2019,31,12,2019,0,0,Bahrain,BH,BHR,1569439,Asia
31/12/2019,31,12,2019,0,0,Belarus,BY,BLR,9485386,Europe
31/12/2019,31,12,2019,0,0,Belgium,BE,BEL,11422068,Europe
</code></pre>
<p>I sorted them on date on purpose (<a href="https://www.dbi-services.com/blog/oracle-12c-table-clustering-reorganization" rel="noopener noreferrer" target="_blank">next post</a> may talk about data clustering) but this is the way the file comes anyway.</p>
<p>I need a directory object to access the file:</p>
<pre><code>
SQL&gt; create or replace directory "/tmp" as '/tmp';

Directory created.
</code></pre>
<p>You don&#8217;t have to use quoted identifiers if you don&#8217;t like it. I find it convenient here.</p>
<p>I can directly select from the file, the EXTERNAL clause mentioning what we had to put in an external table before 18c:</p>
<pre><code>
SQL&gt; 
select *
 from external (
  (
   dateRep                    date
   ,n_day                     number
   ,n_month                   number
   ,n_year                    number
   ,cases                     number
   ,deaths                    number
   ,countriesAndTerritories   varchar2(50)
   ,geoId                     varchar2(10)
   ,countryterritoryCode      varchar2(3)
   ,popData2018               number
   ,continentExp              varchar2(10)
  )
  default directory "/tmp"
  access parameters (
     records delimited by newline skip 1 -- skip header
     logfile 'covid-19.log'
     badfile 'covid-19.bad'
     fields terminated by "," optionally enclosed by '"'
(dateRep date 'dd/mm/yyyy',n_day,n_month,n_year,cases,deaths,countriesAndTerritories,geoId,countryterritoryCode,popData2018,continentExp))
  location ('covid.csv')
  reject limit 10000 - because I've seen some bad data ;)
 )
.


SQL&gt; /

      DATEREP    N_DAY    N_MONTH    N_YEAR    CASES    DEATHS                       COUNTRIESANDTERRITORIES       GEOID    COUNTRYTERRITORYCODE    POPDATA2018    CONTINENTEXP
_____________ ________ __________ _________ ________ _________ _____________________________________________ ___________ _______________________ ______________ _______________
31/12/2019          31         12      2019        0         0 Afghanistan                                   AF          AFG                           37172386 Asia
31/12/2019          31         12      2019        0         0 Algeria                                       DZ          DZA                           42228429 Africa
31/12/2019          31         12      2019        0         0 Armenia                                       AM          ARM                            2951776 Europe
31/12/2019          31         12      2019        0         0 Australia                                     AU          AUS                           24992369 Oceania
31/12/2019          31         12      2019        0         0 Austria                                       AT          AUT                            8847037 Europe
31/12/2019          31         12      2019        0         0 Azerbaijan                                    AZ          AZE                            9942334 Europe
31/12/2019          31         12      2019        0         0 Bahrain                                       BH          BHR                            1569439 Asia

ORA-01013: user requested cancel of current operation

SQL&gt;

</code></pre>
<p>I cancelled it as that&#8217;s too long to display here.</p>
<p>As the query is still in the buffer, I just add a CREATE TABLE in front of it:</p>
<pre><code>
SQL&gt; 1
  1* select *
SQL&gt; c/select/create table covid as select/
   create table covid as select *
  2   from external (
  3    (
  4     dateRep                    varchar2(10)
  5     ,day                       number
...

SQL&gt; /

Table created.

SQL&gt;

</code></pre>
<p>While I&#8217;m there I&#8217;ll quickly create a fact table and a dimension hierarchy:</p>
<pre><code>
SQL&gt; 
create table continents as select rownum continent_id, continentexp continent_name from (select distinct continentexp from covid where continentexp!='Other');

Table created.

SQL&gt; create table countries as select country_id,country_code,country_name,continent_id,popdata2018 from (select distinct geoid country_id,countryterritorycode country_code,countriesandterritories country_name,continentexp continent_name,popdata2018 from covid where continentexp!='Other') left join continents using(continent_name);

Table created.

SQL&gt; 
create table cases as select daterep, geoid country_id,cases from covid where continentexp!='Other';

Table created.

SQL&gt; 
alter table continents add primary key (continent_id);

Table altered.

SQL&gt; 
alter table countries add foreign key (continent_id) references continents;

Table altered.

SQL&gt; 
alter table countries add primary key (country_id);

Table altered.

SQL&gt; 
alter table cases add foreign key (country_id) references countries;

Table altered.

SQL&gt; 
alter table cases add primary key (country_id,daterep);

Table altered.

SQL&gt;

</code></pre>
<p>This creates a CASES fact table with only one measure (covid-19 cases) and two dimensions. To get it simple, the date dimension here is just a date column (you usually have a foreign key to a calendar dimension). The geographical dimension is a foreign key to the COUNTRIES table which itself has a foreign key referencing the CONTINENTS table.</p>
<h3>12c Top-N queries</h3>
<p>In 12c we have a nice syntax for Top-N queries with the FETCH FIRST clause of the ORDER BY:</p>
<pre><code>
SQL&gt; 
select continent_name,country_code,max(cases) from cases join countries using(country_id) join continents using(continent_id) group by continent_name,country_code order by max(cases) desc fetch first 10 rows only;

   CONTINENT_NAME    COUNTRY_CODE    MAX(CASES)
_________________ _______________ _____________
America           USA                     48529
America           BRA                     33274
Asia              CHN                     15141
Europe            RUS                     11656
America           ECU                     11536
Asia              IND                      9851
Europe            ESP                      9181
America           PER                      8875
Europe            GBR                      8719
Europe            FRA                      7578

10 rows selected.

</code></pre>
<p>This returns the 10 countries which had the maximum covid-19 cases per day.</p>
<h3>20c WINDOW clauses</h3>
<p>If I want to show the date with the maximum value, I can use analytic functions and in 20c I don&#8217;t have to repeat the window several times:</p>
<pre><code>
SQL&gt; 
select continent_name,country_code,top_date,top_cases from (
   select continent_name,country_code,daterep,cases
    ,first_value(daterep)over(w) top_date
    ,first_value(cases)over(w) top_cases
    ,row_number()over(w) r
    from cases join countries using(country_id) join continents using(continent_id)
    window w as (partition by continent_id order by cases desc)
   )
   where r=1 -- this to get the rows with the highest value only
   order by top_cases desc fetch first 10 rows only;

   CONTINENT_NAME    COUNTRY_CODE      TOP_DATE    TOP_CASES
_________________ _______________ _____________ ____________
America           USA             26/04/2020           48529
Asia              CHN             13/02/2020           15141
Europe            RUS             12/05/2020           11656
Africa            ZAF             05/06/2020            3267
Oceania           AUS             23/03/2020             611

</code></pre>
<p>The same can be done before 20c but you have to write the (partition by continent_id order by cases desc) for each projection.</p>
<p>In the <a href="https://www.dbi-services.com/blog/oracle-index-on-joins" rel="noopener noreferrer" target="_blank">next post</a> I&#8217;ll show a very nice feature. Keeping the 3 tables normalized data model but, because storage is cheap, materializing some pre-computed joins. If you are a fan of NoSQL because &#8220;storage is cheap&#8221; and &#8220;joins are expensive&#8221;, then you will see what we can do with SQL in this area&#8230;</p>
<p>L’article <a href="https://www.dbi-services.com/blog/oracle-select-from-file/">Oracle 18c &#8211; select from a flat file</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/oracle-select-from-file/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Migrating Oracle database from windows to ODA</title>
		<link>https://www.dbi-services.com/blog/migrating-oracle-database-from-windows-to-oda/</link>
					<comments>https://www.dbi-services.com/blog/migrating-oracle-database-from-windows-to-oda/#respond</comments>
		
		<dc:creator><![CDATA[Marc Wagner]]></dc:creator>
		<pubDate>Tue, 01 Oct 2019 05:47:10 +0000</pubDate>
				<category><![CDATA[Database Administration & Monitoring]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Migration]]></category>
		<category><![CDATA[ODA]]></category>
		<category><![CDATA[Oracle 11g]]></category>
		<category><![CDATA[Oracle 12.2]]></category>
		<category><![CDATA[Oracle 12c]]></category>
		<category><![CDATA[Oracle 18c]]></category>
		<category><![CDATA[RMAN]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/migrating-oracle-database-from-windows-to-oda/</guid>

					<description><![CDATA[<p>Nowadays I have been working on an interesting customer project where I had to migrate windows oracle standard databases to ODA. The ODAs are X7-2M Models, running version 18.5. This version is coming with Red Hat Enterprise Linx 6.10 (Santiago). Both windows databases and target ODA databases are running PSU 11.2.0.4.190115. But this would definitively [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/migrating-oracle-database-from-windows-to-oda/">Migrating Oracle database from windows to ODA</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Nowadays I have been working on an interesting customer project where I had to migrate windows oracle standard databases to ODA. The ODAs are X7-2M Models, running version 18.5. This version is coming with Red Hat Enterprise Linx 6.10 (Santiago). Both windows databases and target ODA databases are running PSU 11.2.0.4.190115. But this would definitively also be working for oracle 12c and oracle 18c databases. The databases are licensed with Standard Edition, so migrating through data guard was not possible. Through this blog I would like to share the experience I could get on this topic as well as the method and steps I have been using to successfully migrate those databases.<br />
<span id="more-12826"></span></p>
<h3>Limitations</h3>
<p>Windows and Linux platform been on the same endian, I have been initially thinking that it would not be more complicated than simply duplicating the windows database to an ODA instance using the last backup. ODA databases are OMF databases, so can not be easier, as no convert parameter is needed.<br />
After having created a single instance database on the ODA, exported the current database pfile and adapted it for the ODA, created the needed TNS connections, I have been running a single RMAN duplicate command :<br />
<code><br />
RMAN&gt; run {<br />
2&gt; set newname for database to new;<br />
3&gt; duplicate target database to 'ODA_DBNAME' backup location '/u99/app/oracle/backup';<br />
4&gt; }<br />
</code></p>
<p><em>Note : If the database is huge, as for example, more than a Tera bytes, and your sga is small, you might want to increase it. Having a bigger sga size will lower the restore time. Minimum 50 GB would be a good compromise. Also if your ODA is from the ODA-X7 family you will benefit from the NVMe technologie. As per my experience, a duplication of 1.5 TB database, with backup stored locally, did not take more than 40 minutes.</em></p>
<p>I have been more than happy to see the first duplication step been successfully achieved :<br />
<code><br />
Finished restore at 17-JUL-2019 16:45:10<br />
</code></p>
<p>And I was expecting the same for the next recovery part.</p>
<p>Unfortunately, this didn&#8217;t end as expected and I quickly got following restore errors :<br />
<code><br />
Errors in memory script<br />
RMAN-03015: error occurred in stored script Memory Script<br />
RMAN-06136: ORACLE error from auxiliary database: ORA-01507: database not mounted<br />
ORA-06512: at "SYS.X$DBMS_RCVMAN", line 13661<br />
ORA-06512: at line 1<br />
RMAN-03015: error occurred in stored script Memory Script<br />
RMAN-20000: abnormal termination of job step<br />
RMAN-11003: failure during parse/execution of SQL statement: alter database recover logfile '/u03/app/oracle/fast_recovery_area/ODA_DBNAME_RZA/archivelog/2019_07_17/o1_mf_1_25514_glyf3yd3_.arc'<br />
RMAN-11001: Oracle Error:<br />
ORA-10562: Error occurred while applying redo to data block (file# 91, block# 189)<br />
ORA-10564: tablespace DBVISIT<br />
ORA-01110: data file 91: '/u02/app/oracle/oradata/ODA_DBNAME_RZA/ODA_DBNAME_RZA/datafile/o1_mf_dbvisit_glyczqcj_.dbf'<br />
ORA-10561: block type 'TRANSACTION MANAGED DATA BLOCK', data object# 501874<br />
ORA-00600: internal error code, arguments: [4502], [0], [], [], [], [], [], [], [], [], [], []<br />
RMAN-00571: ===========================================================<br />
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============<br />
RMAN-00571: ===========================================================<br />
RMAN-03002: failure of Duplicate Db command at 07/17/2019 16:45:32<br />
RMAN-05501: aborting duplication of target database<br />
</code></p>
<p>Troubleshooting the problem I could understand that migrating database from Windows to Linux might not be so simple. Following oracle Doc ID is describing the problem :<br />
Restore From Windows To Linux using RMAN Fails (Doc ID 2003327.1)<br />
Cross-Platform Database Migration (across same endian) using RMAN Transportable Database (Doc ID 1401921.1)<br />
RMAN DUPLICATE/RESTORE/RECOVER Mixed Platform Support (Doc ID 1079563.1)<br />
Restore From Windows To Linux using RMAN Fails (Doc ID 2003327.1)</p>
<p>The problem is coming from the fact that recovering redo transactions between windows and linux platform is not supported if the database is not a standby one. For standard database version, the only possibility would be to go through a cold backup which, in my case, was impossible knowing the database size, the time taken to execute a backup and the short maintenance windows.</p>
<p>Looking for other solution and doing further tests, I could find a solution that I&#8217;m going to describe in the next steps.</p>
<h3>Restoring the database from the last backup</h3>
<p>In order to restore the database, I have been running next steps.</p>
<ol>
<li>Start the ODA instance in no mount :</li>
<p><code><br />
SQL&gt; startup nomount<br />
</code></p>
<li>Restore the last available control file from backup with rman :</li>
<p><code><br />
RMAN&gt; connect target /<br />
&nbsp;<br />
RMAN&gt; restore controlfile from '/mnt/backupNFS/oracle/ODA_DBNAME/20190813_233004_CTL_ODA_DBNAME_1179126808_S2864_P1.BCK';<br />
</code></p>
<li>Mount the database :</li>
<p><code><br />
SQL&gt; alter database mount;<br />
</code></p>
<li>Catalog the backup path :</li>
<p><code><br />
RMAN&gt; connect target /<br />
&nbsp;<br />
RMAN&gt; catalog start with '/mnt/backupNFS/oracle/ODA_DBNAME';<br />
</code></p>
<li>And finally restore the database :</li>
<p><code><br />
RMAN&gt; connect target /<br />
&nbsp;<br />
RMAN&gt; run {<br />
2&gt; set newname for database to new;<br />
3&gt; restore database;<br />
4&gt; switch datafile all;<br />
5&gt; }<br />
</code>
</ol>
<h3>Convert the primary database to a physical standby database</h3>
<p>In order to be able to recover the database we will convert the primary database to a physical standby one.</p>
<ol>
<li>We can check the actual status and see that our database is a primary one in mounted state :</li>
<p><code><br />
SQL&gt; select status,instance_name,database_role,open_mode from v$database,v$Instance;<br />
&nbsp;<br />
STATUS       INSTANCE_NAME       DATABASE_ROLE       OPEN_MODE<br />
------------ ----------------    ----------------    --------------------<br />
MOUNTED      ODA_DBNAME          PRIMARY             MOUNTED<br />
</code></p>
<li>We will convert the database to a physical standby</li>
<p><code><br />
SQL&gt; alter database convert to physical standby;<br />
&nbsp;<br />
Database altered.<br />
</code></p>
<li>We need to restart the database.</li>
<p><code><br />
SQL&gt; shutdown immediate<br />
&nbsp;<br />
SQL&gt; startup mount<br />
</code></p>
<li>We can check new database status</li>
<p><code><br />
SQL&gt; select status,instance_name,database_role,open_mode from v$database,v$Instance;<br />
&nbsp;<br />
STATUS       INSTANCE_NAME    DATABASE_ROLE    OPEN_MODE<br />
------------ ---------------- ---------------- --------------------<br />
MOUNTED      ODA_DBNAME          PHYSICAL      STANDBY MOUNTED<br />
</code>
</ol>
<h3> Get the current windows SCN database</h3>
<p>We are now ready to recover the database and the application can be stopped. The next steps will now be executed during the maintenance windows. The windows database listener can be stopped to make sure there is no new connection.</p>
<ol>
<li>We will make sure there is no existing application session on the database :</li>
<p><code><br />
SQL&gt; set linesize 300<br />
SQL&gt; set pagesize 500<br />
SQL&gt; col machine format a20<br />
SQL&gt; col service_name format a20<br />
&nbsp;<br />
SQL&gt; select SID, serial#, username, machine, process, program, status, service_name, logon_time from v$session where username not in ('SYS', 'PUBLIC') and username is not null order by status, username;<br />
</code></p>
<li>We will create a restore point :</li>
<p><code><br />
SQL&gt; create restore point for_migration_14082019;<br />
&nbsp;<br />
Restore point created.<br />
</code></p>
<li>We will get the last online log transactions archived :</li>
<p><code><br />
SQL&gt; ALTER SYSTEM ARCHIVE LOG CURRENT;<br />
&nbsp;<br />
System altered.<br />
</code></p>
<li>We will retrieve the SCN corresponding to the restore point :</li>
<p><code><br />
SQL&gt; col scn format 999999999999999<br />
&nbsp;<br />
SQL&gt; select scn from v$restore_point where lower(name)='for_migration_14082019';<br />
&nbsp;<br />
             SCN<br />
----------------<br />
     13069540631<br />
</code></p>
<li>We will backup the last archive log. This will be executed on the windows database using our dbi services internal DMK tool (<a href="http://dbi services dmk tool">https://www.dbi-services.com/offering/products/dmk-management-kit/</a>) :</li>
<p><code><br />
servicedbi@win_srv:E:apporaclelocaldmk_custombin [ODA_DBNAME] ./rman_backup_ODA_DBNAME_arc.bat<br />
&nbsp;<br />
E:apporaclelocaldmk_custombin&gt;powershell.exe -command "E:apporaclelocaldmk_habincheck_primary.ps1 ODA_DBNAME 'dmk_rman.ps1 -s ODA_DBNAME -t bck_arc.rcv -c E:apporacleadminODA_DBNAMEetcrman.cfg<br />
&nbsp;<br />
[OK]::KSBL::RMAN::dmk_dbbackup::ODA_DBNAME::bck_arc.rcv<br />
&nbsp;<br />
Logfile is : E:apporacleadminODA_DBNAMElogODA_DBNAME_bck_arc_20190814_141754.log<br />
&nbsp;<br />
RMAN return Code: 0<br />
2019-08-14_02:19:01::check_primary.ps1::MainProgram    ::INFO ==&gt; Program completed<br />
</code>
</ol>
<h3>Recover the database</h3>
<p>The database can now be recovered till our 13069540631 SCN number.</p>
<ol>
<li>We will first need to catalog new archive log backups :</li>
<p><code><br />
RMAN&gt; connect target /<br />
&nbsp;<br />
RMAN&gt; catalog start with '/mnt/backupNFS/oracle/ODA_DBNAME';<br />
</code></p>
<li>And recover the database till SCN 13069540632 :</li>
<p><code><br />
RMAN&gt; connect target /<br />
&nbsp;<br />
RMAN&gt; run {<br />
2&gt; set until scn 13069540632;<br />
3&gt; recover database;<br />
4&gt; }<br />
&nbsp;<br />
archived log file name=/u03/app/oracle/fast_recovery_area/ODA_DBNAME_RZA/archivelog/2019_08_14/o1_mf_1_30098_go80084r_.arc RECID=30124 STAMP=1016289320<br />
archived log file name=/u03/app/oracle/fast_recovery_area/ODA_DBNAME_RZA/archivelog/2019_08_14/o1_mf_1_30099_go80084x_.arc thread=1 sequence=30099<br />
channel default: deleting archived log(s)<br />
archived log file name=/u03/app/oracle/fast_recovery_area/ODA_DBNAME_RZA/archivelog/2019_08_14/o1_mf_1_30099_go80084x_.arc RECID=30119 STAMP=1016289320<br />
archived log file name=/u03/app/oracle/fast_recovery_area/ODA_DBNAME_RZA/archivelog/2019_08_14/o1_mf_1_30100_go8008bg_.arc thread=1 sequence=30100<br />
channel default: deleting archived log(s)<br />
archived log file name=/u03/app/oracle/fast_recovery_area/ODA_DBNAME_RZA/archivelog/2019_08_14/o1_mf_1_30100_go8008bg_.arc RECID=30121 STAMP=1016289320<br />
media recovery complete, elapsed time: 00:00:02<br />
Finished recover at 14-AUG-2019 14:35:23<br />
</code></p>
<li>We can check the alert log and see that recovering has been performed until SCN 13069540632 :</li>
<p><code><br />
oracle@ODA02:/u02/app/oracle/oradata/ODA_DBNAME_RZA/ODA_DBNAME_RZA/datafile/ [ODA_DBNAME] taa<br />
ORA-279 signalled during: alter database recover logfile '/u03/app/oracle/fast_recovery_area/ODA_DBNAME_RZA/archivelog/2019_08_14/o1_mf_1_30098_go80084r_.arc'...<br />
alter database recover logfile '/u03/app/oracle/fast_recovery_area/ODA_DBNAME_RZA/archivelog/2019_08_14/o1_mf_1_30099_go80084x_.arc'<br />
Media Recovery Log /u03/app/oracle/fast_recovery_area/ODA_DBNAME_RZA/archivelog/2019_08_14/o1_mf_1_30099_go80084x_.arc<br />
ORA-279 signalled during: alter database recover logfile '/u03/app/oracle/fast_recovery_area/ODA_DBNAME_RZA/archivelog/2019_08_14/o1_mf_1_30099_go80084x_.arc'...<br />
alter database recover logfile '/u03/app/oracle/fast_recovery_area/ODA_DBNAME_RZA/archivelog/2019_08_14/o1_mf_1_30100_go8008bg_.arc'<br />
Media Recovery Log /u03/app/oracle/fast_recovery_area/ODA_DBNAME_RZA/archivelog/2019_08_14/o1_mf_1_30100_go8008bg_.arc<br />
Wed Aug 14 14:35:23 2019<br />
Incomplete Recovery applied until change 13069540632 time 08/14/2019 14:13:46<br />
Media Recovery Complete (ODA_DBNAME)<br />
Completed: alter database recover logfile '/u03/app/oracle/fast_recovery_area/ODA_DBNAME_RZA/archivelog/2019_08_14/o1_mf_1_30100_go8008bg_.arc'</code></p>
<li>We can check the new ODA database current SCN :</li>
<p><code><br />
SQL&gt; col current_scn format 999999999999999<br />
&nbsp;<br />
SQL&gt; select current_scn from v$database;<br />
&nbsp;<br />
     CURRENT_SCN<br />
----------------<br />
     13069540631<br />
</code>
</ol>
<h3> Convert database to primary again</h3>
<p>Database can now be converted back to primary.<br />
<code><br />
SQL&gt; alter database activate standby database;<br />
&nbsp;<br />
Database altered.</code></p>
<p><code><br />
SQL&gt; select status,instance_name,database_role,open_mode from v$database,v$Instance;<br />
&nbsp;<br />
STATUS       INSTANCE_NAME    DATABASE_ROLE    OPEN_MODE<br />
------------ ---------------- ---------------- --------------------<br />
MOUNTED      ODA_DBNAME          PRIMARY          MOUNTED<br />
</code></p>
<p><em>At this step if the windows source database would be running 11.2.0.3 version, we could successfully upgrade the new ODA database to 11.2.0.4 following common oracle database upgrade process.</em></p>
<p>And finally we can open our database and have the database been migrated from windows to linux.</p>
<p><code><br />
SQL&gt; alter database open;<br />
&nbsp;<br />
Database altered.<br />
</code></p>
<p><code><br />
SQL&gt; select status,instance_name,database_role,open_mode from v$database,v$Instance;<br />
&nbsp;<br />
STATUS       INSTANCE_NAME    DATABASE_ROLE    OPEN_MODE<br />
------------ ---------------- ---------------- --------------------<br />
OPEN         ODA_DBNAME          PRIMARY          READ WRITE<br />
</code></p>
<p><code><br />
oracle@ODA02:/u02/app/oracle/oradata/ODA_DBNAME_RZA/ODA_DBNAME_RZA/datafile/ [ODA_DBNAME] ODA_DBNAME<br />
********* dbi services Ltd. *********<br />
STATUS                 : OPEN<br />
DB_UNIQUE_NAME         : ODA_DBNAME_RZA<br />
OPEN_MODE              : READ WRITE<br />
LOG_MODE               : ARCHIVELOG<br />
DATABASE_ROLE          : PRIMARY<br />
FLASHBACK_ON           : NO<br />
FORCE_LOGGING          : YES<br />
VERSION                : 11.2.0.4.0<br />
*************************************<br />
</code></p>
<h3>Post migration steps</h3>
<p>There will be a few post migration steps to be executed.</p>
<h4>Created redo logs again</h4>
<p>Redo logs are still stamped with windows path and therefore have been created in $ORACLE_HOME/dbs folder. In this steps we will create new OMF one again.</p>
<ol>
<li>Checking current online log members :</li>
<p><code><br />
SQL&gt; set linesize 300<br />
SQL&gt; set pagesize 500<br />
SQL&gt; col member format a100<br />
&nbsp;<br />
SQL&gt; select a.GROUP#, b.member, a.status, a.bytes/1024/1024 MB from v$log a, v$logfile b where a.GROUP#=b.GROUP#;<br />
&nbsp;<br />
    GROUP# MEMBER                                                                                               STATUS                   MB<br />
---------- ---------------------------------------------------------------------------------------------------- ---------------- ----------<br />
         6 /u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/I:FAST_RECOVERY_AREAODA_DBNAME_SITE1ONLINELOGREDO_6_1.LOG UNUSED                  500<br />
         6 /u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/I:FAST_RECOVERY_AREAODA_DBNAME_SITE1ONLINELOGREDO_6_2.LOG UNUSED                  500<br />
         5 /u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/I:FAST_RECOVERY_AREAODA_DBNAME_SITE1ONLINELOGREDO_5_2.LOG UNUSED                  500<br />
         5 /u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/I:FAST_RECOVERY_AREAODA_DBNAME_SITE1ONLINELOGREDO_5_1.LOG UNUSED                  500<br />
         4 /u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/I:FAST_RECOVERY_AREAODA_DBNAME_SITE1ONLINELOGREDO_4_2.LOG UNUSED                  500<br />
         4 /u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/I:FAST_RECOVERY_AREAODA_DBNAME_SITE1ONLINELOGREDO_4_1.LOG UNUSED                  500<br />
         3 /u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/I:FAST_RECOVERY_AREAODA_DBNAME_SITE1ONLINELOGREDO_3_2.LOG UNUSED                  500<br />
         3 /u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/I:FAST_RECOVERY_AREAODA_DBNAME_SITE1ONLINELOGREDO_3_1.LOG UNUSED                  500<br />
         2 /u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/I:FAST_RECOVERY_AREAODA_DBNAME_SITE1ONLINELOGREDO_2_2.LOG UNUSED                  500<br />
         2 /u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/I:FAST_RECOVERY_AREAODA_DBNAME_SITE1ONLINELOGREDO_2_1.LOG UNUSED                  500<br />
         1 /u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/I:FAST_RECOVERY_AREAODA_DBNAME_SITE1ONLINELOGREDO_1_2.LOG CURRENT                 500<br />
         1 /u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/I:FAST_RECOVERY_AREAODA_DBNAME_SITE1ONLINELOGREDO_1_1.LOG CURRENT                 500<br />
</code></p>
<li>Drop the first unused redo log group keeping only one :</li>
<p><code><br />
SQL&gt; alter database drop logfile group 6;<br />
&nbsp;<br />
Database altered.<br />
&nbsp;<br />
SQL&gt; alter database drop logfile group 5;<br />
&nbsp;<br />
Database altered.<br />
&nbsp;<br />
SQL&gt; alter database drop logfile group 4;<br />
&nbsp;<br />
Database altered.<br />
&nbsp;<br />
SQL&gt; alter database drop logfile group 3;<br />
&nbsp;<br />
Database altered.<br />
&nbsp;<br />
SQL&gt; alter database add logfile group 3 size 500M;<br />
&nbsp;<br />
Database altered.<br />
</code></p>
<li>Create the recent dropped group again :</li>
<p><code><br />
SQL&gt; alter database add logfile group 3 size 500M;<br />
&nbsp;<br />
Database altered.<br />
&nbsp;<br />
SQL&gt; alter database add logfile group 4 size 500M;<br />
&nbsp;<br />
Database altered.<br />
&nbsp;<br />
SQL&gt; alter database add logfile group 5 size 500M;<br />
&nbsp;<br />
Database altered.<br />
&nbsp;<br />
SQL&gt; alter database add logfile group 6 size 500M;<br />
&nbsp;<br />
Database altered.<br />
</code></p>
<li>Drop the last unused redo log group and create it again :</li>
<p><code><br />
SQL&gt;  alter database drop logfile group 2;<br />
&nbsp;<br />
Database altered.<br />
&nbsp;<br />
SQL&gt; alter database add logfile group 2 size 500M;<br />
&nbsp;<br />
Database altered.<br />
</code></p>
<li>Execute a switch log file and checkpoint so the current redo group becomes unused :</li>
<p><code><br />
SQL&gt; alter system switch logfile;<br />
&nbsp;<br />
System altered.<br />
&nbsp;<br />
SQL&gt; alter system checkpoint;<br />
&nbsp;<br />
System altered.<br />
</code></p>
<li>Drop it and create it again :</li>
<p><code><br />
SQL&gt;  alter database drop logfile group 1;<br />
&nbsp;<br />
Database altered.<br />
&nbsp;<br />
SQL&gt; alter database add logfile group 1 size 500M;<br />
&nbsp;<br />
Database altered.<br />
</code></p>
<li>Check redo group members :</li>
<p><code><br />
SQL&gt; select a.GROUP#, b.member, a.status, a.bytes/1024/1024 MB from v$log a, v$logfile b where a.GROUP#=b.GROUP#;<br />
&nbsp;<br />
    GROUP# MEMBER                                                                                               STATUS                   MB<br />
---------- ---------------------------------------------------------------------------------------------------- ---------------- ----------<br />
         3 /u03/app/oracle/redo/ODA_DBNAME_RZA/onlinelog/o1_mf_3_go81rj4t_.log                                     INACTIVE                500<br />
         3 /u02/app/oracle/oradata/ODA_DBNAME_RZA/redo/ODA_DBNAME_RZA/onlinelog/o1_mf_3_go81rjqn_.log                 INACTIVE                500<br />
         4 /u03/app/oracle/redo/ODA_DBNAME_RZA/onlinelog/o1_mf_4_go81ron1_.log                                     UNUSED                  500<br />
         4 /u02/app/oracle/oradata/ODA_DBNAME_RZA/redo/ODA_DBNAME_RZA/onlinelog/o1_mf_4_go81rp6o_.log                 UNUSED                  500<br />
         5 /u03/app/oracle/redo/ODA_DBNAME_RZA/onlinelog/o1_mf_5_go81rwhs_.log                                     UNUSED                  500<br />
         5 /u02/app/oracle/oradata/ODA_DBNAME_RZA/redo/ODA_DBNAME_RZA/onlinelog/o1_mf_5_go81rx1g_.log                 UNUSED                  500<br />
         6 /u03/app/oracle/redo/ODA_DBNAME_RZA/onlinelog/o1_mf_6_go81s1rk_.log                                     UNUSED                  500<br />
         6 /u02/app/oracle/oradata/ODA_DBNAME_RZA/redo/ODA_DBNAME_RZA/onlinelog/o1_mf_6_go81s2bx_.log                 UNUSED                  500<br />
         2 /u03/app/oracle/redo/ODA_DBNAME_RZA/onlinelog/o1_mf_2_go81sgdf_.log                                     CURRENT                 500<br />
         2 /u02/app/oracle/oradata/ODA_DBNAME_RZA/redo/ODA_DBNAME_RZA/onlinelog/o1_mf_2_go81sgxd_.log                 CURRENT                 500<br />
         1 /u03/app/oracle/redo/ODA_DBNAME_RZA/onlinelog/o1_mf_1_go81vpls_.log                                     UNUSED                  500<br />
         1 /u02/app/oracle/oradata/ODA_DBNAME_RZA/redo/ODA_DBNAME_RZA/onlinelog/o1_mf_1_go81vq4v_.log                 UNUSED                  500<br />
</code></p>
<li>Delete the wrong previous redo log members files :</li>
<p><code><br />
oracle@ODA02:/u02/app/oracle/oradata/ODA_DBNAME_RZA/ODA_DBNAME_RZA/datafile/ [ODA_DBNAME] cdh<br />
&nbsp;<br />
oracle@ODA02:/u01/app/oracle/product/11.2.0.4/dbhome_1/ [ODA_DBNAME] cd dbs<br />
&nbsp;<br />
oracle@ODA02:/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/ [ODA_DBNAME] ls -ltrh *REDO*.LOG<br />
-rw-r----- 1 oracle asmadmin 501M Aug 14 14:59 I:FAST_RECOVERY_AREAODA_DBNAME_SITE1ONLINELOGREDO_6_2.LOG<br />
-rw-r----- 1 oracle asmadmin 501M Aug 14 14:59 I:FAST_RECOVERY_AREAODA_DBNAME_SITE1ONLINELOGREDO_6_1.LOG<br />
-rw-r----- 1 oracle asmadmin 501M Aug 14 14:59 I:FAST_RECOVERY_AREAODA_DBNAME_SITE1ONLINELOGREDO_5_2.LOG<br />
-rw-r----- 1 oracle asmadmin 501M Aug 14 14:59 I:FAST_RECOVERY_AREAODA_DBNAME_SITE1ONLINELOGREDO_5_1.LOG<br />
-rw-r----- 1 oracle asmadmin 501M Aug 14 14:59 I:FAST_RECOVERY_AREAODA_DBNAME_SITE1ONLINELOGREDO_4_2.LOG<br />
-rw-r----- 1 oracle asmadmin 501M Aug 14 14:59 I:FAST_RECOVERY_AREAODA_DBNAME_SITE1ONLINELOGREDO_4_1.LOG<br />
-rw-r----- 1 oracle asmadmin 501M Aug 14 14:59 I:FAST_RECOVERY_AREAODA_DBNAME_SITE1ONLINELOGREDO_3_2.LOG<br />
-rw-r----- 1 oracle asmadmin 501M Aug 14 14:59 I:FAST_RECOVERY_AREAODA_DBNAME_SITE1ONLINELOGREDO_3_1.LOG<br />
-rw-r----- 1 oracle asmadmin 501M Aug 14 14:59 I:FAST_RECOVERY_AREAODA_DBNAME_SITE1ONLINELOGREDO_2_2.LOG<br />
-rw-r----- 1 oracle asmadmin 501M Aug 14 14:59 I:FAST_RECOVERY_AREAODA_DBNAME_SITE1ONLINELOGREDO_2_1.LOG<br />
-rw-r----- 1 oracle asmadmin 501M Aug 14 15:05 I:FAST_RECOVERY_AREAODA_DBNAME_SITE1ONLINELOGREDO_1_2.LOG<br />
-rw-r----- 1 oracle asmadmin 501M Aug 14 15:05 I:FAST_RECOVERY_AREAODA_DBNAME_SITE1ONLINELOGREDO_1_1.LOG<br />
&nbsp;<br />
oracle@ODA02:/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/ [ODA_DBNAME] rm *REDO*.LOG<br />
</code>
</ol>
<h4>Created temp file again</h4>
<ol>
<li>Checking current temp file we can see that the path is still the windows one :</li>
<p><code><br />
SQL&gt; set linesize 300<br />
SQL&gt; col name format a100<br />
&nbsp;<br />
SQL&gt; select b.name, b.status, b.bytes/1024/1024 MB, a.name from v$tablespace a, v$tempfile b where a.TS#=b.TS#;<br />
&nbsp;<br />
NAME                                                                                                 STATUS          MB NAME<br />
---------------------------------------------------------------------------------------------------- ------- ---------- -------------------------------------------<br />
F:ORADATAODA_DBNAMETEMPORARY_DATA_1.DBF                                                              ONLINE        8192 TEMPORARY_DATA<br />
</code></p>
<li>We can check that the default temporary tablespace is TEMPORARY_DATA</li>
<p><code><br />
SQL&gt; col property_value format a50<br />
&nbsp;<br />
SQL&gt; select property_name, property_value from database_properties where property_name like '%DEFAULT%TABLESPACE%';<br />
&nbsp;<br />
PROPERTY_NAME                  PROPERTY_VALUE<br />
------------------------------ --------------------------------------------------<br />
DEFAULT_TEMP_TABLESPACE        TEMPORARY_DATA<br />
DEFAULT_PERMANENT_TABLESPACE   USER_DATA<br />
</code></p>
<li>Let&#8217;s create a new temp tablespace and make it the default one</li>
<p><code><br />
SQL&gt; create temporary tablespace TEMP tempfile size 8G;<br />
&nbsp;<br />
Tablespace created.<br />
&nbsp;<br />
SQL&gt; alter database default temporary tablespace TEMP;<br />
&nbsp;<br />
Database altered.<br />
&nbsp;<br />
SQL&gt; select property_name, property_value from database_properties where property_name like '%DEFAULT%TABLESPACE%';<br />
&nbsp;<br />
PROPERTY_NAME                  PROPERTY_VALUE<br />
------------------------------ --------------------------------------------------<br />
DEFAULT_TEMP_TABLESPACE        TEMP<br />
DEFAULT_PERMANENT_TABLESPACE   USER_DATA<br />
</code></p>
<li>Drop previous TEMPORARY_DATA tablespace</li>
<p><code><br />
SQL&gt; drop tablespace TEMPORARY_DATA including contents and datafiles;<br />
&nbsp;<br />
Tablespace dropped.<br />
&nbsp;<br />
SQL&gt; select b.file#, b.name, b.status, b.bytes/1024/1024 MB, a.name from v$tablespace a, v$tempfile b where a.TS#=b.TS#;<br />
&nbsp;<br />
     FILE# NAME                                                                                                 STATUS          MB NAME<br />
---------- ---------------------------------------------------------------------------------------------------- ------- ----------<br />
         3 /u02/app/oracle/oradata/ODA_DBNAME_RZA/ODA_DBNAME_RZA/datafile/o1_mf_temp_go83m1tp_.tmp                    ONLINE        8192 TEMP<br />
</code></p>
<li>Create TEMPORARY_DATA tablespace again and make it the default one :</li>
<p><code><br />
SQL&gt;  create temporary tablespace TEMPORARY_DATA tempfile size 8G;<br />
&nbsp;<br />
Tablespace created.<br />
&nbsp;<br />
SQL&gt; select b.file#, b.name, b.status, b.bytes/1024/1024 MB, a.name from v$tablespace a, v$tempfile b where a.TS#=b.TS#;<br />
&nbsp;<br />
     FILE# NAME                                                                                                 STATUS          MB NAME<br />
---------- ---------------------------------------------------------------------------------------------------- ------- ----------<br />
         1 /u02/app/oracle/oradata/ODA_DBNAME_RZA/ODA_DBNAME_RZA/datafile/o1_mf_temporar_go83wfd7_.tmp                ONLINE        8192 TEMPORARY_DATA<br />
         3 /u02/app/oracle/oradata/ODA_DBNAME_RZA/ODA_DBNAME_RZA/datafile/o1_mf_temp_go83m1tp_.tmp                    ONLINE        8192 TEMP<br />
&nbsp;<br />
SQL&gt; alter database default temporary tablespace TEMPORARY_DATA;<br />
&nbsp;<br />
Database altered.<br />
&nbsp;<br />
SQL&gt; select property_name, property_value from database_properties where property_name like '%DEFAULT%TABLESPACE%';<br />
&nbsp;<br />
PROPERTY_NAME                  PROPERTY_VALUE<br />
------------------------------ --------------------------------------------------<br />
DEFAULT_TEMP_TABLESPACE        TEMPORARY_DATA<br />
DEFAULT_PERMANENT_TABLESPACE   USER_DATA<br />
</code></p>
<li>And finally drop the intermediare temp tablespace :</li>
<p><code><br />
SQL&gt; drop tablespace TEMP including contents and datafiles;<br />
&nbsp;<br />
Tablespace dropped.<br />
&nbsp;<br />
SQL&gt; select b.file#, b.name, b.status, b.bytes/1024/1024 MB, a.name from v$tablespace a, v$tempfile b where a.TS#=b.TS#;<br />
&nbsp;<br />
     FILE# NAME                                                                                                 STATUS          MB NAME<br />
---------- ---------------------------------------------------------------------------------------------------- ------- ----------<br />
         1 /u02/app/oracle/oradata/ODA_DBNAME_RZA/ODA_DBNAME_RZA/datafile/o1_mf_temporar_go83wfd7_.tmp                ONLINE        8192 TEMPORARY_DATA<br />
</code></p>
<li>Appropriate max size can be given to the new created temp tablespace</li>
<p><code><br />
SQL&gt;  alter database tempfile '/u02/app/oracle/oradata/ODA_DBNAME_RZA/ODA_DBNAME_RZA/datafile/o1_mf_temporar_go83wfd7_.tmp' autoextend on maxsize 31G;<br />
&nbsp;<br />
Database altered.<br />
</code></p>
<li>Remove wrong temp file stored in $ORACLE_HOME/dbs</li>
<p><code><br />
oracle@ODA02:/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/ [ODA_DBNAME] ls -ltr<br />
-rw-r--r-- 1 oracle oinstall       2851 May 15  2009 init.ora<br />
-rw-r--r-- 1 oracle oinstall         64 Jul 25 08:10 initODA_DBNAME.ora.old<br />
-rw-r----- 1 oracle oinstall       2048 Jul 25 08:10 orapwODA_DBNAME<br />
-rw-r--r-- 1 oracle oinstall         67 Jul 25 08:31 initODA_DBNAME.ora<br />
-rw-r----- 1 oracle asmadmin 8589942784 Aug 14 08:14 F:ORADATAODA_DBNAMETEMPORARY_DATA_1.DBF<br />
-rw-rw---- 1 oracle asmadmin       1544 Aug 14 14:59 hc_ODA_DBNAME.dat<br />
-rw-r----- 1 oracle asmadmin   43466752 Aug 14 15:48 snapcf_ODA_DBNAME.f<br />
&nbsp;<br />
oracle@RZA-ODA02:/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/ [ODA_DBNAME] rm F:ORADATAODA_DBNAMETEMPORARY_DATA_1.DBF<br />
</code>
</ol>
<h4> Apply specific ODA parameters</h4>
<p>Following specific ODA parameters can be updated to the new created instance.</p>
<p><code><br />
SQL&gt; alter system set "_datafile_write_errors_crash_instance"=false scope=spfile;<br />
&nbsp;<br />
System altered.<br />
&nbsp;<br />
SQL&gt; alter system set "_db_writer_coalesce_area_size"=16777216 scope=spfile;<br />
&nbsp;<br />
System altered.<br />
&nbsp;<br />
SQL&gt; alter system set "_disable_interface_checking"=TRUE scope=spfile;<br />
&nbsp;<br />
System altered.<br />
&nbsp;<br />
SQL&gt; alter system set "_ENABLE_NUMA_SUPPORT"=FALSE scope=spfile;<br />
&nbsp;<br />
System altered.<br />
&nbsp;<br />
SQL&gt; alter system set "_FILE_SIZE_INCREASE_INCREMENT"=2143289344 scope=spfile;<br />
&nbsp;<br />
System altered.<br />
&nbsp;<br />
SQL&gt; alter system set "_gc_policy_time"=0 scope=spfile;<br />
&nbsp;<br />
System altered.<br />
&nbsp;<br />
SQL&gt; alter system set "_gc_undo_affinity"=FALSE scope=spfile;<br />
&nbsp;<br />
System altered.<br />
&nbsp;<br />
SQL&gt; alter system set db_block_checking='FULL' scope=spfile;<br />
&nbsp;<br />
System altered.<br />
&nbsp;<br />
SQL&gt; alter system set db_block_checksum='FULL' scope=spfile;<br />
&nbsp;<br />
System altered.<br />
&nbsp;<br />
SQL&gt; alter system set db_lost_write_protect='TYPICAL' scope=spfile;<br />
&nbsp;<br />
System altered.<br />
&nbsp;<br />
SQL&gt; alter system set sql92_security=TRUE scope=spfile;<br />
&nbsp;<br />
System altered.<br />
&nbsp;<br />
SQL&gt; alter system set use_large_pages='only' scope=spfile;<br />
&nbsp;<br />
System altered.<br />
</code></p>
<p>&#8220;_fix_control&#8221;parameter is specific to Oracle12c and not compatible Oracle 11g. See Doc ID 2145105.1.</p>
<h4> Register database in grid</h4>
<p>After applying specific ODA instance parameters, we can register the database in the grid and start it with the grid.</p>
<p><code><br />
oracle@ODA02:/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/ [ODA_DBNAME] srvctl add database -d ODA_DBNAME_RZA -o /u01/app/oracle/product/11.2.0.4/dbhome_1 -c SINGLE -i ODA_DBNAME -x RZA-ODA02 -m ksbl.local -p /u02/app/oracle/oradata/ODA_DBNAME_RZA/dbs/spfileODA_DBNAME.ora -r PRIMARY -s OPEN -t IMMEDIATE -n ODA_DBNAME -j "/u02/app/oracle/oradata/ODA_DBNAME_RZA,/u03/app/oracle"<br />
&nbsp;<br />
SQL&gt; shutdown immediate<br />
Database closed.<br />
Database dismounted.<br />
ORACLE instance shut down.<br />
&nbsp;<br />
oracle@ODA02:/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/ [ODA_DBNAME] srvctl start database -d ODA_DBNAME_RZA<br />
&nbsp;<br />
oracle@ODA02:/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/ [ODA_DBNAME] srvctl status database -d ODA_DBNAME_RZA<br />
Instance ODA_DBNAME is running on node rza-oda02<br />
&nbsp;<br />
oracle@ODA02:/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/ [ODA_DBNAME] ODA_DBNAME<br />
********* dbi services Ltd. *********<br />
STATUS                 : OPEN<br />
DB_UNIQUE_NAME         : ODA_DBNAME_RZA<br />
OPEN_MODE              : READ WRITE<br />
LOG_MODE               : ARCHIVELOG<br />
DATABASE_ROLE          : PRIMARY<br />
FLASHBACK_ON           : NO<br />
FORCE_LOGGING          : YES<br />
VERSION                : 11.2.0.4.0<br />
*************************************<br />
</code></p>
<p>We can check the well functionning :<br />
<code><br />
oracle@ODA02:/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/ [ODA_DBNAME] srvctl stop database -d ODA_DBNAME_RZA<br />
&nbsp;<br />
oracle@ODA02:/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/ [ODA_DBNAME] srvctl status database -d ODA_DBNAME_RZA<br />
Instance ODA_DBNAME is not running on node rza-oda02<br />
&nbsp;<br />
oracle@ODA02:/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/ [ODA_DBNAME] ODA_DBNAME<br />
********* dbi services Ltd. *********<br />
STATUS          : STOPPED<br />
*************************************<br />
&nbsp;<br />
oracle@ODA02:/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/ [ODA_DBNAME] srvctl start database -d ODA_DBNAME_RZA<br />
&nbsp;<br />
oracle@ODA02:/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/ [ODA_DBNAME] srvctl status database -d ODA_DBNAME_RZA<br />
Instance ODA_DBNAME is running on node rza-oda02<br />
&nbsp;<br />
oracle@ODA02:/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/ [ODA_DBNAME] ODA_DBNAME<br />
********* dbi services Ltd. *********<br />
STATUS                 : OPEN<br />
DB_UNIQUE_NAME         : ODA_DBNAME_RZA<br />
OPEN_MODE              : READ WRITE<br />
LOG_MODE               : ARCHIVELOG<br />
DATABASE_ROLE          : PRIMARY<br />
FLASHBACK_ON           : NO<br />
FORCE_LOGGING          : YES<br />
VERSION                : 11.2.0.4.0<br />
*************************************</code></p>
<h3>Conclusion</h3>
<p>Going through a physical standby database, I was able to migrate successfully the windows databases into ODA linux one. I have been able to achieve migration of source 11.2.0.4 databases but also 11.2.0.3 database by adding an upgrade step in the process.</p>
<p>L’article <a href="https://www.dbi-services.com/blog/migrating-oracle-database-from-windows-to-oda/">Migrating Oracle database from windows to ODA</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/migrating-oracle-database-from-windows-to-oda/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Oracle 18c Grid Infrastructure on Windows Server</title>
		<link>https://www.dbi-services.com/blog/oracle-18c-grid-infrastructure-on-windows-server/</link>
					<comments>https://www.dbi-services.com/blog/oracle-18c-grid-infrastructure-on-windows-server/#respond</comments>
		
		<dc:creator><![CDATA[Oracle Team]]></dc:creator>
		<pubDate>Sat, 27 Apr 2019 13:05:45 +0000</pubDate>
				<category><![CDATA[Database Administration & Monitoring]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[ASM on Windows]]></category>
		<category><![CDATA[asmtoog]]></category>
		<category><![CDATA[asmtool]]></category>
		<category><![CDATA[Grid Infra on Windows]]></category>
		<category><![CDATA[Oracle 18c]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/oracle-18c-grid-infrastructure-on-windows-server/</guid>

					<description><![CDATA[<p>By Mouhamadou Diaw Oracle Grid Infrastucture can be installed on Windows platform. The steps are the same that on other platforms. In this blog we are going to install Oracle GI 18c on Windows 2016.I have two disks on my server Disk 0 : for the system Disk 1 : for the ASM I am [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/oracle-18c-grid-infrastructure-on-windows-server/">Oracle 18c Grid Infrastructure on Windows Server</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>By Mouhamadou Diaw</strong></p>
<p>Oracle Grid Infrastucture can be installed on Windows platform. The steps are the same that on other platforms. In this blog we are going to install Oracle GI 18c on Windows 2016.I have two disks on my server<br />
Disk 0 : for the system<br />
Disk 1 : for the ASM<br />
I am using a VirtualBox virtual machine.<br />
We suppose that the grid infrastructure sofware is already downloaded and decompressed in the grid home.<br />
Like on other platforms, we have to configure the ASM disk. In the documentation we can read :<br />
<em>The only partitions that OUI displays for Windows systems are logical drives that are on disks and have been marked (or stamped) with asmtoolg or by Oracle Automatic Storage Management (Oracle ASM) Filter Driver.</em><br />
So Disk1 should not be formatted and should not be assigned to a letter.<br />
Then the first step is to create logical partition using Windows diskpart utility.</p>
<div>
<div id="highlighter_937674" class="syntaxhighlighter  bash">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
<div class="line number2 index1 alt1">2</div>
<div class="line number3 index2 alt2">3</div>
<div class="line number4 index3 alt1">4</div>
<div class="line number5 index4 alt2">5</div>
<div class="line number6 index5 alt1">6</div>
<div class="line number7 index6 alt2">7</div>
<div class="line number8 index7 alt1">8</div>
<div class="line number9 index8 alt2">9</div>
<div class="line number10 index9 alt1">10</div>
<div class="line number11 index10 alt2">11</div>
<div class="line number12 index11 alt1">12</div>
<div class="line number13 index12 alt2">13</div>
<div class="line number14 index13 alt1">14</div>
<div class="line number15 index14 alt2">15</div>
<div class="line number16 index15 alt1">16</div>
<div class="line number17 index16 alt2">17</div>
<div class="line number18 index17 alt1">18</div>
<div class="line number19 index18 alt2">19</div>
<div class="line number20 index19 alt1">20</div>
<div class="line number21 index20 alt2">21</div>
<div class="line number22 index21 alt1">22</div>
<div class="line number23 index22 alt2">23</div>
<div class="line number24 index23 alt1">24</div>
<div class="line number25 index24 alt2">25</div>
<div class="line number26 index25 alt1">26</div>
<div class="line number27 index26 alt2">27</div>
<div class="line number28 index27 alt1">28</div>
<div class="line number29 index28 alt2">29</div>
<div class="line number30 index29 alt1">30</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="bash plain">Microsoft Windows [Version 10.0.14393]</code></div>
<div class="line number2 index1 alt1"><code class="bash plain">(c) 2016 Microsoft Corporation. All rights reserved.</code></div>
<div class="line number3 index2 alt2"></div>
<div class="line number4 index3 alt1"><code class="bash plain">C:\Users\Administrator&gt;diskpart</code></div>
<div class="line number5 index4 alt2"></div>
<div class="line number6 index5 alt1"><code class="bash plain">Microsoft DiskPart version 10.0.14393.0</code></div>
<div class="line number7 index6 alt2"></div>
<div class="line number8 index7 alt1"><code class="bash plain">Copyright (C) 1999-2013 Microsoft Corporation.</code></div>
<div class="line number9 index8 alt2"><code class="bash plain">On computer: RACWIN2</code></div>
<div class="line number10 index9 alt1"></div>
<div class="line number11 index10 alt2"><code class="bash plain">DISKPART&gt; list disk</code></div>
<div class="line number12 index11 alt1"></div>
<div class="line number13 index12 alt2"><code class="bash spaces">  </code><code class="bash plain">Disk </code><code class="bash comments">###  Status         Size     Free     Dyn  Gpt</code></div>
<div class="line number14 index13 alt1"><code class="bash spaces">  </code><code class="bash plain">--------  -------------  -------  -------  ---  ---</code></div>
<div class="line number15 index14 alt2"><code class="bash spaces">  </code><code class="bash plain">Disk 0    Online           60 GB      0 B</code></div>
<div class="line number16 index15 alt1"><code class="bash spaces">  </code><code class="bash plain">Disk 1    Online           20 GB    20 GB</code></div>
<div class="line number17 index16 alt2"></div>
<div class="line number18 index17 alt1"><code class="bash plain">DISKPART&gt; </code><code class="bash functions">select</code> <code class="bash plain">disk 1</code></div>
<div class="line number19 index18 alt2"></div>
<div class="line number20 index19 alt1"><code class="bash plain">Disk 1 is now the selected disk.</code></div>
<div class="line number21 index20 alt2"></div>
<div class="line number22 index21 alt1"><code class="bash plain">DISKPART&gt; create partition extended</code></div>
<div class="line number23 index22 alt2"></div>
<div class="line number24 index23 alt1"><code class="bash plain">DiskPart succeeded </code><code class="bash keyword">in</code> <code class="bash plain">creating the specified partition.</code></div>
<div class="line number25 index24 alt2"></div>
<div class="line number26 index25 alt1"><code class="bash plain">DISKPART&gt; create partition logical</code></div>
<div class="line number27 index26 alt2"></div>
<div class="line number28 index27 alt1"><code class="bash plain">DiskPart succeeded </code><code class="bash keyword">in</code> <code class="bash plain">creating the specified partition.</code></div>
<div class="line number29 index28 alt2"></div>
<div class="line number30 index29 alt1"><code class="bash plain">DISKPART&gt;</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>We can then list existing partition for Disk 1</p>
<div>
<div id="highlighter_484614" class="syntaxhighlighter  bash">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
<div class="line number2 index1 alt1">2</div>
<div class="line number3 index2 alt2">3</div>
<div class="line number4 index3 alt1">4</div>
<div class="line number5 index4 alt2">5</div>
<div class="line number6 index5 alt1">6</div>
<div class="line number7 index6 alt2">7</div>
<div class="line number8 index7 alt1">8</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="bash plain">DISKPART&gt; list partition</code></div>
<div class="line number2 index1 alt1"></div>
<div class="line number3 index2 alt2"><code class="bash spaces">  </code><code class="bash plain">Partition </code><code class="bash comments">###  Type              Size     Offset</code></div>
<div class="line number4 index3 alt1"><code class="bash spaces">  </code><code class="bash plain">-------------  ----------------  -------  -------</code></div>
<div class="line number5 index4 alt2"><code class="bash spaces">  </code><code class="bash plain">Partition 0    Extended            19 GB  1024 KB</code></div>
<div class="line number6 index5 alt1"><code class="bash plain">* Partition 1    Logical             19 GB  2048 KB</code></div>
<div class="line number7 index6 alt2"></div>
<div class="line number8 index7 alt1"><code class="bash plain">DISKPART&gt;</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>Once the logical partition created we can launch the asmtool or asmtoolg utility. This utility comes with the grid software</p>
<div>
<div id="highlighter_875942" class="syntaxhighlighter  bash">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="bash plain">c:\app\grid\18000\bin&gt;asmtoolg.exe</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>The first time we executed the asmtoolg.exe command, we get following error<br />
<img decoding="async" class="alignnone size-medium wp-image-32038" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/picture1-3.png" alt="" width="300" height="101" /><br />
According to this Oracle support note <em>Windows: asmtoolg: MSVCR120.dll is missing from your computer (Doc ID 2251869.1)</em>, we have to download and install Visual C++ 2013 Redistributable Package.<br />
Once done we launch again the asmtoolg utility<br />
<img fetchpriority="high" decoding="async" class="alignnone size-medium wp-image-32039" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/picture2-2.png" alt="" width="300" height="258" /><br />
Clicking on next, we can choose the disk we want to stamp for ASM<br />
<img decoding="async" class="alignnone size-medium wp-image-32041" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/picture3-1.png" alt="" width="300" height="263" /><br />
Click on Next<br />
<img loading="lazy" decoding="async" class="alignnone size-medium wp-image-32042" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/picture4-2.png" alt="" width="300" height="259" /><br />
Click on Next<br />
<img loading="lazy" decoding="async" class="alignnone size-medium wp-image-32043" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/picture5-2.png" alt="" width="300" height="265" /><br />
And Click to Finish. We can then list the disks marked for ASM with the asmtool utility.</p>
<div>
<div id="highlighter_375824" class="syntaxhighlighter  bash">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
<div class="line number2 index1 alt1">2</div>
<div class="line number3 index2 alt2">3</div>
<div class="line number4 index3 alt1">4</div>
<div class="line number5 index4 alt2">5</div>
<div class="line number6 index5 alt1 highlighted">6</div>
<div class="line number7 index6 alt2">7</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="bash plain">C:\Users\Administrator&gt;</code><code class="bash functions">cd</code> <code class="bash plain">c:\app\18000\grid\bin</code></div>
<div class="line number2 index1 alt1"></div>
<div class="line number3 index2 alt2"><code class="bash plain">c:\app\18000\grid\bin&gt;asmtool.exe -list</code></div>
<div class="line number4 index3 alt1"><code class="bash plain">NTFS                             \Device\Harddisk0\Partition1              500M</code></div>
<div class="line number5 index4 alt2"><code class="bash plain">NTFS                             \Device\Harddisk0\Partition2            60938M</code></div>
<div class="line number6 index5 alt1 highlighted"><code class="bash plain">ORCLDISKDATA0                    \Device\Harddisk1\Partition1            20477M</code></div>
<div class="line number7 index6 alt2"><code class="bash plain">c:\app\18000\grid\bin&gt;</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>Now it’s time to launch the gridSetup executable</p>
<div>
<div id="highlighter_453207" class="syntaxhighlighter  bash">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="bash plain">c:\app\grid\18000&gt;gridSetup.bat</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-32045" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/picture6-2.png" alt="" width="300" height="227" /><br />
<img loading="lazy" decoding="async" class="alignnone size-medium wp-image-32046" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/picture7-2.png" alt="" width="300" height="227" /><br />
<img loading="lazy" decoding="async" class="alignnone size-medium wp-image-32047" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/picture8-2.png" alt="" width="300" height="226" /><br />
<img loading="lazy" decoding="async" class="alignnone size-medium wp-image-32048" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2019/04/picture9.png" alt="" width="300" height="224" /><br />
<img loading="lazy" decoding="async" class="alignnone size-medium wp-image-32051" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/picture10-1.png" alt="" width="300" height="227" /></p>
<p><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-32052" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/picture11-2.png" alt="" width="300" height="228" /><br />
We decide to ignore the Warning<br />
<img loading="lazy" decoding="async" class="alignnone size-medium wp-image-32053" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2019/04/picture12.png" alt="" width="300" height="228" /></p>
<p><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-32054" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/picture13-2.png" alt="" width="300" height="229" /><br />
At the end, we got an error from the cluster verification utility. But it is normal because we ignored some perquisites.<br />
<img loading="lazy" decoding="async" class="alignnone size-medium wp-image-32055" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/picture14-2.png" alt="" width="300" height="227" /><br />
<img loading="lazy" decoding="async" class="alignnone size-medium wp-image-32056" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/picture15-2.png" alt="" width="300" height="226" /><br />
We can verify that the insallation was fine</p>
<div>
<div id="highlighter_171150" class="syntaxhighlighter  bash">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
<div class="line number2 index1 alt1">2</div>
<div class="line number3 index2 alt2">3</div>
<div class="line number4 index3 alt1">4</div>
<div class="line number5 index4 alt2">5</div>
<div class="line number6 index5 alt1">6</div>
<div class="line number7 index6 alt2">7</div>
<div class="line number8 index7 alt1">8</div>
<div class="line number9 index8 alt2">9</div>
<div class="line number10 index9 alt1">10</div>
<div class="line number11 index10 alt2">11</div>
<div class="line number12 index11 alt1">12</div>
<div class="line number13 index12 alt2">13</div>
<div class="line number14 index13 alt1">14</div>
<div class="line number15 index14 alt2">15</div>
<div class="line number16 index15 alt1">16</div>
<div class="line number17 index16 alt2">17</div>
<div class="line number18 index17 alt1">18</div>
<div class="line number19 index18 alt2">19</div>
<div class="line number20 index19 alt1">20</div>
<div class="line number21 index20 alt2">21</div>
<div class="line number22 index21 alt1">22</div>
<div class="line number23 index22 alt2">23</div>
<div class="line number24 index23 alt1">24</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="bash plain">c:\app\18000\grid&gt;crsctl status resource -t</code></div>
<div class="line number2 index1 alt1"><code class="bash plain">--------------------------------------------------------------------------------</code></div>
<div class="line number3 index2 alt2"><code class="bash plain">Name           Target  State        Server                   State details</code></div>
<div class="line number4 index3 alt1"><code class="bash plain">--------------------------------------------------------------------------------</code></div>
<div class="line number5 index4 alt2"><code class="bash plain">Local Resources</code></div>
<div class="line number6 index5 alt1"><code class="bash plain">--------------------------------------------------------------------------------</code></div>
<div class="line number7 index6 alt2"><code class="bash plain">ora.DATA.dg</code></div>
<div class="line number8 index7 alt1"><code class="bash spaces">               </code><code class="bash plain">ONLINE  ONLINE       racwin2                  STABLE</code></div>
<div class="line number9 index8 alt2"><code class="bash plain">ora.LISTENER.lsnr</code></div>
<div class="line number10 index9 alt1"><code class="bash spaces">               </code><code class="bash plain">ONLINE  ONLINE       racwin2                  STABLE</code></div>
<div class="line number11 index10 alt2"><code class="bash plain">ora.asm</code></div>
<div class="line number12 index11 alt1"><code class="bash spaces">               </code><code class="bash plain">ONLINE  ONLINE       racwin2                  Started,STABLE</code></div>
<div class="line number13 index12 alt2"><code class="bash plain">ora.ons</code></div>
<div class="line number14 index13 alt1"><code class="bash spaces">               </code><code class="bash plain">OFFLINE OFFLINE      racwin2                  STABLE</code></div>
<div class="line number15 index14 alt2"><code class="bash plain">--------------------------------------------------------------------------------</code></div>
<div class="line number16 index15 alt1"><code class="bash plain">Cluster Resources</code></div>
<div class="line number17 index16 alt2"><code class="bash plain">--------------------------------------------------------------------------------</code></div>
<div class="line number18 index17 alt1"><code class="bash plain">ora.cssd</code></div>
<div class="line number19 index18 alt2"><code class="bash spaces">      </code><code class="bash plain">1        ONLINE  ONLINE       racwin2                  STABLE</code></div>
<div class="line number20 index19 alt1"><code class="bash plain">ora.evmd</code></div>
<div class="line number21 index20 alt2"><code class="bash spaces">      </code><code class="bash plain">1        ONLINE  ONLINE       racwin2                  STABLE</code></div>
<div class="line number22 index21 alt1"><code class="bash plain">--------------------------------------------------------------------------------</code></div>
<div class="line number23 index22 alt2"></div>
<div class="line number24 index23 alt1"><code class="bash plain">c:\app\18000\grid&gt;</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>We can connect to the ASM instance</p>
<div>
<div id="highlighter_897626" class="syntaxhighlighter  bash">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
<div class="line number2 index1 alt1">2</div>
<div class="line number3 index2 alt2">3</div>
<div class="line number4 index3 alt1">4</div>
<div class="line number5 index4 alt2">5</div>
<div class="line number6 index5 alt1">6</div>
<div class="line number7 index6 alt2">7</div>
<div class="line number8 index7 alt1">8</div>
<div class="line number9 index8 alt2">9</div>
<div class="line number10 index9 alt1">10</div>
<div class="line number11 index10 alt2">11</div>
<div class="line number12 index11 alt1">12</div>
<div class="line number13 index12 alt2">13</div>
<div class="line number14 index13 alt1">14</div>
<div class="line number15 index14 alt2">15</div>
<div class="line number16 index15 alt1">16</div>
<div class="line number17 index16 alt2">17</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="bash plain">C:\Users\Administrator&gt;</code><code class="bash functions">set</code> <code class="bash plain">oracle_sid=+ASM</code></div>
<div class="line number2 index1 alt1"></div>
<div class="line number3 index2 alt2"><code class="bash plain">C:\Users\Administrator&gt;sqlplus / as sysasm</code></div>
<div class="line number4 index3 alt1"></div>
<div class="line number5 index4 alt2"><code class="bash plain">SQL*Plus: Release 18.0.0.0.0 - Production on Sat Apr 27 05:49:38 2019</code></div>
<div class="line number6 index5 alt1"><code class="bash plain">Version 18.3.0.0.0</code></div>
<div class="line number7 index6 alt2"></div>
<div class="line number8 index7 alt1"><code class="bash plain">Copyright (c) 1982, 2018, Oracle.  All rights reserved.</code></div>
<div class="line number9 index8 alt2"></div>
<div class="line number10 index9 alt1"></div>
<div class="line number11 index10 alt2"><code class="bash plain">SQL&gt; </code><code class="bash functions">select</code> <code class="bash plain">name,state from </code><code class="bash functions">v</code><code class="bash plain">$asm_diskgroup;</code></div>
<div class="line number12 index11 alt1"></div>
<div class="line number13 index12 alt2"><code class="bash plain">NAME                           STATE</code></div>
<div class="line number14 index13 alt1"><code class="bash plain">------------------------------ -----------</code></div>
<div class="line number15 index14 alt2"><code class="bash plain">DATA                           MOUNTED</code></div>
<div class="line number16 index15 alt1"></div>
<div class="line number17 index16 alt2"><code class="bash plain">SQL&gt;</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p><strong>Conclusion</strong><br />
Once the grid infrastructure configured, we have to install the Oracle database software.</p>
<p>L’article <a href="https://www.dbi-services.com/blog/oracle-18c-grid-infrastructure-on-windows-server/">Oracle 18c Grid Infrastructure on Windows Server</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/oracle-18c-grid-infrastructure-on-windows-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>When you change the UNDO_RETENTION parameter, the LOB segment’s retention value is not modified</title>
		<link>https://www.dbi-services.com/blog/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified/</link>
					<comments>https://www.dbi-services.com/blog/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified/#respond</comments>
		
		<dc:creator><![CDATA[Oracle Team]]></dc:creator>
		<pubDate>Mon, 18 Mar 2019 07:30:17 +0000</pubDate>
				<category><![CDATA[Database Administration & Monitoring]]></category>
		<category><![CDATA[Database management]]></category>
		<category><![CDATA[Development & Performance]]></category>
		<category><![CDATA[Hardware & Storage]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[12.2]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[High availability]]></category>
		<category><![CDATA[Oracle 11g]]></category>
		<category><![CDATA[Oracle 12.2]]></category>
		<category><![CDATA[Oracle 12c]]></category>
		<category><![CDATA[Oracle 18c]]></category>
		<category><![CDATA[Oracle Enterprise Manager Cloud 12c]]></category>
		<category><![CDATA[Performance]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified/</guid>

					<description><![CDATA[<p>Below, I will try to explain, a particular case for the general error : ORA-01555 snapshot too old error.. Normally, when we have this error, we are trying to adapt the retention parameters or to tune our queries. SQL&#62; show parameter undo; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ temp_undo_enabled boolean FALSE undo_management string AUTO undo_retention [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified/">When you change the UNDO_RETENTION parameter, the LOB segment’s retention value is not modified</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Below, I will try to explain, a particular case for the general error : <strong>ORA-01555 snapshot too old error..</strong></p>
<p>Normally, when we have this error, we are trying to adapt the retention parameters or to tune our queries.</p>
<pre class="brush: sql; gutter: true; first-line: 1">SQL&gt; show parameter undo;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
temp_undo_enabled                    boolean     FALSE
undo_management                      string      AUTO
undo_retention                       integer     3600 --extended from 900,
undo_tablespace                      string      UNDOTBS1
</pre>
<p>But, are some scenarios where the above rule is not working .</p>
<p>We got from the alert log file of the DB the sql id which caused the issue : <strong>pmrbk5fdfd665</strong></p>
<p>But, when you want to search for it, in <strong>V$SQL/V$SQLAREA</strong>  is not there</p>
<pre class="brush: sql; gutter: true; first-line: 1">SQL&gt; select sql_fulltext from v$sql where sql_id like '%pmrbk5fdfd665%';

no rows selected
</pre>
<p><strong>Why?</strong></p>
<p>Seems that, sql_id is present in <strong>V$OPEN_CURSOR</strong>, with an input into the <strong>sqltext</strong> column.<br />
The issue is coming from the fact that the statement is accessing a LOB column, which causes to Oracle to generate a new sql id.<br />
The execution part related to the LOBs will not appear into V$SQL/V$SQLAREA and is not captured into the AWR reports.</p>
<pre class="brush: sql; gutter: true; first-line: 1">SQL&gt;  select distinct * from v$open_cursor
  2     where rownum &lt; 25
  3     and sql_id like '%pmrbk5fdfd665%';

SADDR                   SID USER_NAME                      ADDRESS          HASH_VALUE SQL_ID        SQL_TEXT                                                     LAST_SQL SQL_EXEC_ID CURSOR_TYPE
---------------- ---------- ------------------------------ ---------------- ---------- ------------- ------------------------------------------------------------ -------- ----------- ---------------
0000000670A19780         74 my_user                   00000002EB91F1F0 3831220380 pmrbk5fdfd665 table_104_11_XYZT_0_0_0
00000006747F0478        131 my_user                   00000002EB91F1F0 3831220380 pmrbk5fdfd665 table_104_11_XYZT_0_0_0
</pre>
<p>Apparently, the string into the sql_text column is  a  HEX representation of the object_id that is being accessed.<br />
In our case is :<strong>XYZT</strong></p>
<pre class="brush: sql; gutter: true; first-line: 1">SQL&gt;    select owner, object_name, object_type
  2    from dba_objects
  3    where object_id = (select to_number('&amp;hex_value','XXXXXX') from dual);
Enter value for hex_value: XYZT
old   3:   where object_id = (select to_number('&amp;hex_value','XXXXXX') from dual)
new   3:   where object_id = (select to_number('XYZT','XXXXXX') from dual)

                                                                                                                    
OWNER                  OBJECT_TYPE                                               OBJECT_NAME
---------------------- --------------------------------------------------------------------------
my_user                TABLE                                                     my_table


SQL&gt; desc my_user.my_table;
 Name                  Type
 -------------------   ----------------
 EXPERIMENT_ID          VARCHAR2(20)
 DOCUMENT               BLOB
............….
</pre>
<p>If we are looking for the retention on the &#8221; DOCUMENT &#8221; column, we will see :</p>
<pre class="brush: sql; gutter: true; first-line: 1">SQL&gt; select table_name, pctversion, retention,segment_name from dba_lobs where table_name in ('my_table');

TABLE_NAME                                                                               
                                                  PCTVERSION  RETENTION                  SEGMENT_NAME
---------------------------------------------------------------------------------------- ------------------------------------
my_table                                                       900                       SYS_LOB0000027039C00002$$</pre>
<p>In order to fix it , try to run this column to adapt the retention of the blob column, related to the new value of the UNDO_RETENTION parameter,</p>
<pre class="brush: sql; gutter: true; first-line: 1">ALTER TABLE my_table MODIFY LOB (DOCUMENT) (3600);</pre>
<p>L’article <a href="https://www.dbi-services.com/blog/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified/">When you change the UNDO_RETENTION parameter, the LOB segment’s retention value is not modified</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/when-you-change-the-undo_retention-parameter-the-lob-segments-retention-value-is-not-modified/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Strange behavior when patching GI/ASM</title>
		<link>https://www.dbi-services.com/blog/strange-behavior-when-patching-giasm/</link>
					<comments>https://www.dbi-services.com/blog/strange-behavior-when-patching-giasm/#comments</comments>
		
		<dc:creator><![CDATA[Oracle Team]]></dc:creator>
		<pubDate>Mon, 26 Nov 2018 17:45:19 +0000</pubDate>
				<category><![CDATA[Database Administration & Monitoring]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[High availability]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle 18c]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/strange-behavior-when-patching-giasm/</guid>

					<description><![CDATA[<p>I tried to apply a patch to my 18.3.0 GI/ASM two node cluster on RHEL 7.5. The first node worked fine, but the second node got always an error&#8230; Environment: Server Node1: dbserver01 Server Node2: dbserver02 Oracle Version: 18.3.0 with PSU OCT 2018 ==&#62; 28660077 Patch to be installed: 28655784 (RU 18.4.0.0) First node (dbserver01) [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/strange-behavior-when-patching-giasm/">Strange behavior when patching GI/ASM</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I tried to apply a patch to my 18.3.0 GI/ASM two node cluster on RHEL 7.5.<br />
The first node worked fine, but the second node got always an error&#8230;<br />
<span id="more-12065"></span></p>
<p>Environment:<br />
Server Node1: dbserver01<br />
Server Node2: dbserver02<br />
Oracle Version: 18.3.0 with PSU OCT 2018 ==&gt; 28660077<br />
Patch to be installed: 28655784 (RU 18.4.0.0)</p>
<p>First node (dbserver01)<br />
Everything fine:</p>
<pre class="brush: bash; gutter: true; first-line: 1;">cd ${ORACLE_HOME}/OPatch
sudo ./opatchauto apply /tmp/28655784/
...
Sucessfull
</pre>
<p>Secondary node (dbserver02)<br />
Same command but different output:</p>
<pre class="brush: bash; gutter: true; first-line: 1;">cd ${ORACLE_HOME}/Patch
sudo ./opatchauto apply /tmp/28655784/
...
Remote command execution failed due to No ECDSA host key is known for dbserver01 and you have requested strict checking.
Host key verification failed.
Command output:
OPATCHAUTO-72050: System instance creation failed.
OPATCHAUTO-72050: Failed while retrieving system information.
OPATCHAUTO-72050: Please check log file for more details.
</pre>
<p>After playing around with the keys I found out, that the host keys had to be exchange also for root.<br />
So I connected as root and made an ssh from dbserver01 to dbserver02 and from dbserver02 to dbserver01.</p>
<p>After I exchanged the host keys the error message changed:</p>
<pre class="brush: bash; gutter: true; first-line: 1;">Remote command execution failed due to Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
Command output:
OPATCHAUTO-72050: System instance creation failed.
OPATCHAUTO-72050: Failed while retrieving system information.
OPATCHAUTO-72050: Please check log file for more details.
</pre>
<p>So I investigated the log file a litte further and the statement with the error was:</p>
<pre class="brush: bash; gutter: true; first-line: 1;">/bin/ssh -o FallBackToRsh=no -o PasswordAuthentication=no -o StrictHostKeyChecking=no -o NumberOfPasswordPrompts=0 dbserver01 
/bin/ssh -o FallBackToRsh=no -o PasswordAuthentication=no -o StrictHostKeyChecking=yes -o NumberOfPasswordPrompts=0 dbserver01 
/u00/app/oracle/product/18.3.0/dbhome_1//perl/bin/perl 
/u00/app/oracle/product/18.3.0/dbhome_1/OPatch/auto/database/bin/RemoteHostExecutor.pl 
-GRID_HOME=/u00/app/oracle/product/18.3.0/grid_1 
-OBJECTLOC=/u00/app/oracle/product/18.3.0/dbhome_1//cfgtoollogs/opatchautodb/hostdata.obj 
-CRS_ACTION=get_all_homes -CLUSTERNODES=dbserver01,dbserver02,dbserver02 
-JVM_HANDLER=oracle/dbsysmodel/driver/sdk/productdriver/remote/RemoteOperationHelper
</pre>
<p>Soooooo: dbserver02 starts a ssh session to dbserver01 and from there an additional session to dbserver01 (himself).<br />
I don’t know why but it is as it is….after I did a keyexchange from dbserver01 (root) to dbserver01 (root) the patching worked fine.<br />
At the moment I can not remeber that I ever had to do a keyexchange from the root User on to the same host.</p>
<p>Did you got the same problem or do you know a better way to do that? Write me a comment!</p>
<p>L’article <a href="https://www.dbi-services.com/blog/strange-behavior-when-patching-giasm/">Strange behavior when patching GI/ASM</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/strange-behavior-when-patching-giasm/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Schema only account with Oracle 18.3</title>
		<link>https://www.dbi-services.com/blog/schema-only-account-with-oracle-18-3/</link>
					<comments>https://www.dbi-services.com/blog/schema-only-account-with-oracle-18-3/#respond</comments>
		
		<dc:creator><![CDATA[Oracle Team]]></dc:creator>
		<pubDate>Sat, 20 Oct 2018 12:00:13 +0000</pubDate>
				<category><![CDATA[Database Administration & Monitoring]]></category>
		<category><![CDATA[Oracle 18c]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/schema-only-account-with-oracle-18-3/</guid>

					<description><![CDATA[<p>With Oracle 18.3, we have the possibility to create schemas without a password. Effectively in a perfect world, we should not be able to connect to application schemas. For security reasons it is a good thing that nobody can connect directly to the application schema. A good way is to use proxy connections, in fact [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/schema-only-account-with-oracle-18-3/">Schema only account with Oracle 18.3</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>With Oracle 18.3, we have the possibility to create schemas without a password. Effectively in a perfect world, we should not be able to connect to application schemas. For security reasons it is a good thing that nobody can connect directly to the application schema.</p>
<p>A good way is to use proxy connections, in fact connect as app_user but using the psi_user password for example:</p>
<p>Let’s create a user named app_user:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; connect sys@pdb as sysdba
Enter password: 
Connected.

SQL&gt; create user app_user identified by app_user
  2  quota unlimited on users;

User created.

SQL&gt; grant create session , create table to app_user;

Grant succeeded.

</pre>
<p>Let’s create a proxy user named psi_user:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; create user psi_user identified by psi_user;

User created.

SQL&gt; grant create session to psi_user;

Grant succeeded.</pre>
<pre class="brush: sql; gutter: false; first-line: 1">We allow the proxy connection to the app_user:

</pre>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; alter user app_user grant connect through psi_user;

User altered.</pre>
<p>Now we can connect via the proxy user using the following syntax:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; connect psi_user[app_user]/psi_user@pdb 
Connected.</pre>
<p>We can see we are connected as user app_user but using the psi_user password:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; select sys_context('USERENV','SESSION_USER') as session_user,
sys_context('USERENV','SESSION_SCHEMA') as session_schema,
sys_context('USERENV','PROXY_USER') as proxy,
user
from dual;

SESSION_USER	SESSION_SCHEMA	        PROXY		USER
APP_USER	APP_USER		PSI_USER	APP_USER</pre>
<p>But there is a problem, if the app_user is locked the proxy connection does not work anymore:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; connect sys@pdb as sysdba
Enter password: 
Connected.
SQL&gt; alter user app_user account lock;

User altered.

SQL&gt; connect psi_user[app_user]/psi_user@pdb
ERROR:
ORA-28000: The account is locked.

Warning: You are no longer connected to ORACLE.</pre>
<p>The good solution is to use the schema only Oracle 18c new feature:</p>
<p>We drop the old accounts:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; connect sys@pdb as sysdba
Enter password: 
Connected.
SQL&gt; drop user psi_user cascade;

User dropped.

SQL&gt; drop user app_user cascade;

User dropped.</pre>
<p>And we recreate them in the following way, we first create the schema owner with no authentication:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; create user app_user no authentication
  2  quota unlimited on users;

User created.

SQL&gt; grant create session , create table to app_user;

Grant succeeded.</pre>
<pre class="brush: sql; gutter: false; first-line: 1">We create the proxy user as before:</pre>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; create user psi_user identified by psi_user;</pre>
<p>We allow the proxy user to connect to the app_user:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; alter user app_user grant connect through psi_user;

User altered.</pre>
<p>We now can connect via psi_user:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; connect psi_user[app_user]/psi_user@pdb
Connected.</pre>
<p>And as the app_user has been created in no authentication, you receive the classical ORA-01017 error when you try to connect directly with the app_user account:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; connect app_user/app_user@pdb
ERROR:
ORA-01017: invalid username/password; logon denied

Warning: You are no longer connected to ORACLE.</pre>
<p>Using no authentication is a good protection, but you cannot grant system privileges to such users:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; grant sysdba to app_user;
grant sysdba to app_user
*
ERROR at line 1:
ORA-40366: Administrative privilege cannot be granted to this user.</pre>
<p>We can try to alter the app_user with a password and grant it to sysdba but it does not work:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; alter user app_user identified by password;

User altered.

SQL&gt; grant sysdba to app_user;

Grant succeeded.

SQL&gt; alter user app_user no authentication;
alter user app_user no authentication
*
ERROR at line 1:
ORA-40367: An Administrative user cannot be altered to have no authentication
type.

SQL&gt; revoke sysdba from app_user;

Revoke succeeded.

SQL&gt; alter user app_user no authentication;

User altered.</pre>
<p>To understand correctly the behavior, I made the following test:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; connect sys@pdb as sysdba
Enter password: 
Connected.</pre>
<pre class="brush: sql; gutter: false; first-line: 1">I remove the no authentication:

</pre>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; alter user app_user identified by app_user;

User altered.</pre>
<p>Now I can connect on the app_user schema, I create a table and insert some values:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; connect app_user/app_user@pdb
Connected.
SQL&gt; create table employe (name varchar2(10));

Table created.

SQL&gt; insert into employe values('Larry');

1 row created.

SQL&gt; commit;

Commit complete.</pre>
<p>I reset the app_user to no authentication:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; connect sys@pdb as sysdba
Enter password: 
Connected.
SQL&gt; alter user app_user no authentication;

User altered.</pre>
<p>I connect with the proxy user, I can display the employe table content:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; connect psi_user[app_user]/psi_user@pdb
Connected.
SQL&gt; select * from employe;

NAME
----------
Larry</pre>
<p>The table belongs to the app_user schema:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; select object_name, object_type, owner from all_objects where object_name ='EMPLOYE';

OBJECT_NAME	OBJECT_TYPE	OWNER
EMPLOYE		TABLE		APP_USER</pre>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; insert into employe values ('Bill');

1 row created.

SQL&gt; commit; 

Commit complete.

SQL&gt; select * from employe;

NAME
----------
Larry
Bill</pre>
<p>What is the behavior in the audit trail ?</p>
<p>We create an audit policy to detect any table creation:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; create audit policy psi_user_audit_policy
  2  privileges create table
  3  when 'SYS_CONTEXT(''USERENV'',''SESSION_USER'') = ''APP_USER'''
  4  evaluate per session
  5 container=current

Audit policy created.

SQL&gt; audit policy psi_user_audit_policy whenever successful;

Audit succeeded.</pre>
<pre class="brush: sql; gutter: false; first-line: 1">If now we have a look at the unified_audit_trail view:

</pre>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; select event_timestamp, dbusername, dbproxy_username from unified_audit_trail where object_name = 'SALARY' and action_name = 'CREATE TABLE'

EVENT_TIMESTAMP		DBUSERNAME	DBPROXY_USERNAME
16-OCT-18 03.40.49	APP_USER	PSI_USER</pre>
<p>We can identify clearly the proxy user in the audit trail.</p>
<p>Conclusion:</p>
<p>The schema only accounts is an interesting new feature. In resume we can create a schema named app_user and set the authentication to NONE, the consequence is that you cannot be logged in. We can create a proxy account named psi_user which connects through app_user and we can create tables , views … to this app_user schema.</p>
<pre class="brush: sql; gutter: false; first-line: 1">







</pre>
<p>L’article <a href="https://www.dbi-services.com/blog/schema-only-account-with-oracle-18-3/">Schema only account with Oracle 18.3</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/schema-only-account-with-oracle-18-3/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to migrate Grid Infrastructure from release 12c to release 18c</title>
		<link>https://www.dbi-services.com/blog/how-to-migrate-grid-infrastructure-from-release-12c-to-release-18c/</link>
					<comments>https://www.dbi-services.com/blog/how-to-migrate-grid-infrastructure-from-release-12c-to-release-18c/#respond</comments>
		
		<dc:creator><![CDATA[Oracle Team]]></dc:creator>
		<pubDate>Fri, 12 Oct 2018 05:01:04 +0000</pubDate>
				<category><![CDATA[Application integration & Middleware]]></category>
		<category><![CDATA[Database Administration & Monitoring]]></category>
		<category><![CDATA[Database management]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[12.2]]></category>
		<category><![CDATA[Cluster]]></category>
		<category><![CDATA[High availability]]></category>
		<category><![CDATA[Oracle 11g]]></category>
		<category><![CDATA[Oracle 12.2]]></category>
		<category><![CDATA[Oracle 12c]]></category>
		<category><![CDATA[Oracle 18c]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/how-to-migrate-grid-infrastructure-from-release-12c-to-release-18c/</guid>

					<description><![CDATA[<p>Oracle Clusterware 18c builds on this innovative technology by further enhancing support for larger multi-cluster environments and improving the overall ease of use. Oracle Clusterware is leveraged in the cloud in order to provide enterprise-class resiliency where required and dynamic as well as online allocation of compute resources where needed, when needed. Oracle Grid Infrastructure [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/how-to-migrate-grid-infrastructure-from-release-12c-to-release-18c/">How to migrate Grid Infrastructure from release 12c to release 18c</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Oracle Clusterware 18c builds on this innovative technology by further enhancing support for larger multi-cluster environments and improving the overall ease of use. Oracle Clusterware is leveraged in the cloud in order to provide enterprise-class resiliency where required and dynamic as well as online allocation of compute resources where needed, when needed.<br />
Oracle Grid Infrastructure provides the necessary components to manage high availability (HA) for any business critical application.<br />
HA in consolidated environments is no longer simple active/standby failover.</p>
<p>In this blog we will see how to upgrade our Grid Infrastructure stack from 12cR2 to 18c.</p>
<p><strong>Step1: </strong>You are required to patch your GI with the patch<strong> 27006180<br />
</strong></p>
<pre class="brush: actionscript3; gutter: true; first-line: 1">[root@dbisrv04 ~]# /u91/app/grid/product/12.2.0/grid/OPatch/opatchauto apply /u90/Kit/27006180/ -oh /u91/app/grid/product/12.2.0/grid/

Performing prepatch operations on SIHA Home........

Start applying binary patches on SIHA Home........

Performing postpatch operations on SIHA Home........

[finalize:finalize] OracleHomeLSInventoryGrepAction action completed on home /u91/app/grid/product/12.2.0/grid successfully
OPatchAuto successful.</pre>
<p><strong>Step2:</strong> Check the list of patches applied</p>
<pre class="brush: sql; gutter: true; first-line: 1">grid@dbisrv04:/u90/Kit/ [+ASM] /u91/app/grid/product/12.2.0/grid/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 12.2.0.1.6
Copyright (c) 2018, Oracle Corporation.  All rights reserved.

Lsinventory Output file location : /u91/app/grid/product/12.2.0/grid/cfgtoollogs/opatch/lsinv/lsinventory2018-10-11_09-06-44AM.txt

--------------------------------------------------------------------------------
Oracle Grid Infrastructure 12c                                       12.2.0.1.0
There are 1 products installed in this Oracle Home.


Interim patches (1) :

Patch  27006180     : applied on Thu Oct 11 09:02:50 CEST 2018
Unique Patch ID:  21761216
Patch description:  "OCW Interim patch for 27006180"
   Created on 5 Dec 2017, 09:12:44 hrs PST8PDT
   Bugs fixed:
     13250991, 20559126, 22986384, 22999793, 23340259, 23722215, 23762756
........................
     26546632, <strong>27006180</strong></pre>
<p>&nbsp;</p>
<p><strong>Step3:</strong> Upgrage the binaries to the release 18c</p>
<p><a href="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/upgrade_grid.png"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-28437" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/upgrade_grid.png" alt="upgrade_grid" width="300" height="236" /></a></p>
<p><a href="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/directory_new_grid.png"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-28433" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/directory_new_grid.png" alt="directory_new_grid" width="300" height="236" /></a></p>
<p>&#8211; recommend to run the rootUpgrade.sh script manually</p>
<p><a href="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/run_root_script.png"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-28435" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/run_root_script.png" alt="run_root_script" width="300" height="238" /></a></p>
<pre class="brush: sql; gutter: true; first-line: 1">/u90/app/grid/product/18.3.0/grid/rootupgrade.sh
[root@dbisrv04 ~]# /u90/app/grid/product/18.3.0/grid/rootupgrade.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u90/app/grid/product/18.3.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]:
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]:

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u90/app/grid/product/18.3.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/oracle/crsdata/dbisrv04/crsconfig/roothas_2018-10-11_09-21-27AM.log

2018/10/11 09:21:29 CLSRSC-595: Executing upgrade step 1 of 12: 'UpgPrechecks'.
2018/10/11 09:21:30 CLSRSC-363: User ignored prerequisites during installation
2018/10/11 09:21:31 CLSRSC-595: Executing upgrade step 2 of 12: 'GetOldConfig'.
2018/10/11 09:21:33 CLSRSC-595: Executing upgrade step 3 of 12: 'GenSiteGUIDs'.
2018/10/11 09:21:33 CLSRSC-595: Executing upgrade step 4 of 12: 'SetupOSD'.
2018/10/11 09:21:34 CLSRSC-595: Executing upgrade step 5 of 12: 'PreUpgrade'.

ASM has been upgraded and started successfully.

2018/10/11 09:22:25 CLSRSC-595: Executing upgrade step 6 of 12: 'UpgradeAFD'.
2018/10/11 09:23:52 CLSRSC-595: Executing upgrade step 7 of 12: 'UpgradeOLR'.
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
2018/10/11 09:23:57 CLSRSC-595: Executing upgrade step 8 of 12: 'UpgradeOCR'.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node dbisrv04 successfully pinned.
2018/10/11 09:24:00 CLSRSC-595: Executing upgrade step 9 of 12: 'CreateOHASD'.
2018/10/11 09:24:02 CLSRSC-595: Executing upgrade step 10 of 12: 'ConfigOHASD'.
2018/10/11 09:24:02 CLSRSC-329: Replacing Clusterware entries in file 'oracle-ohasd.service'
2018/10/11 09:24:49 CLSRSC-595: Executing upgrade step 11 of 12: 'UpgradeSIHA'.
CRS-4123: Oracle High Availability Services has been started.


dbisrv04     2018/10/11 09:25:58     /u90/app/grid/product/18.3.0/grid/cdata/dbisrv04/backup_20181011_092558.olr     70732493   

dbisrv04     2018/07/31 15:24:14     /u91/app/grid/product/12.2.0/grid/cdata/dbisrv04/backup_20180731_152414.olr     0
2018/10/11 09:25:59 CLSRSC-595: Executing upgrade step 12 of 12: 'InstallACFS'.
CRS-4123: Oracle High Availability Services has been started.

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'dbisrv04'
CRS-2673: Attempting to stop 'ora.driver.afd' on 'dbisrv04'
CRS-2677: Stop of 'ora.driver.afd' on 'dbisrv04' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'dbisrv04' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
2018/10/11 09:27:54 CLSRSC-327: Successfully configured Oracle Restart for a standalone server</pre>
<p>&#8211; you can ignore the warning related to the memory resources</p>
<p><a href="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/ignore_prereq.png"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-28434" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/ignore_prereq.png" alt="ignore_prereq" width="300" height="235" /></a></p>
<p><a href="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/completed_succesfully.png"><img loading="lazy" decoding="async" class="alignnone size-medium wp-image-28432" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/completed_succesfully.png" alt="completed_succesfully" width="300" height="237" /></a></p>
<p>&#8211; once finished the installation, verify what has been made</p>
<pre class="brush: sql; gutter: true; first-line: 1">[root@dbisrv04 ~]# /u90/app/grid/product/18.3.0/grid/bin/crsctl query has softwareversion
Oracle High Availability Services version on the local node is [18.0.0.0.0]

[root@dbisrv04 ~]# /u90/app/grid/product/18.3.0/grid/bin/crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       dbisrv04                 STABLE
ora.DATA2.dg
               ONLINE  ONLINE       dbisrv04                 STABLE
ora.DATA3.dg
               ONLINE  ONLINE       dbisrv04                 STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       dbisrv04                 STABLE
ora.RECO.dg
               ONLINE  ONLINE       dbisrv04                 STABLE
ora.asm
               ONLINE  ONLINE       dbisrv04                 Started,STABLE
ora.ons
               OFFLINE OFFLINE      dbisrv04                 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       dbisrv04                 STABLE
ora.db18c.db
      1        ONLINE  ONLINE       dbisrv04                 Open,HOME=/u90/app/o
                                                             racle/product/18.3.0
                                                             /dbhome_1,STABLE
ora.diskmon
      1        OFFLINE OFFLINE                               STABLE
ora.driver.afd
      1        ONLINE  ONLINE       dbisrv04                 STABLE
ora.evmd
      1        ONLINE  ONLINE       dbisrv04                 STABLE
ora.orcl.db
      1        ONLINE  ONLINE       dbisrv04                 Open,HOME=/u90/app/o
                                                             racle/product/18.3.0
                                                             /dbhome_1,STABLE
--------------------------------------------------------------------------------</pre>
<p>L’article <a href="https://www.dbi-services.com/blog/how-to-migrate-grid-infrastructure-from-release-12c-to-release-18c/">How to migrate Grid Infrastructure from release 12c to release 18c</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/how-to-migrate-grid-infrastructure-from-release-12c-to-release-18c/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>PDB Snapshot Carousel Oracle 18.3</title>
		<link>https://www.dbi-services.com/blog/pdb-snapshot-carousel-oracle-18-3/</link>
					<comments>https://www.dbi-services.com/blog/pdb-snapshot-carousel-oracle-18-3/#respond</comments>
		
		<dc:creator><![CDATA[Oracle Team]]></dc:creator>
		<pubDate>Tue, 02 Oct 2018 12:09:36 +0000</pubDate>
				<category><![CDATA[Database Administration & Monitoring]]></category>
		<category><![CDATA[Oracle 18c]]></category>
		<category><![CDATA[PDB]]></category>
		<category><![CDATA[Snapshot]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/pdb-snapshot-carousel-oracle-18-3/</guid>

					<description><![CDATA[<p>A new feature with Oracle 18c is the PDB snapshot carousel. As indicated by its name a PDB snapshot is a copy of a PDB at a specific point in time. You have the possibility to create up to eight snapshots, when you reach the maximum number of snapshots, the last snapshot is over written. [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/pdb-snapshot-carousel-oracle-18-3/">PDB Snapshot Carousel Oracle 18.3</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>A new feature with Oracle 18c is the PDB snapshot carousel. As indicated by its name a PDB snapshot is a copy of a PDB at a specific point in time. You have the possibility to create up to eight snapshots, when you reach the maximum number of snapshots, the last snapshot is over written. The snapshot carousel is obviously the name of all your PDB snapshots.</p>
<p>We have the possibility to create automatic snapshots using the “snapshot mode every” clause when you create or alter a PDB. For example you can change the snapshot mode from a PDB to every  3 hours:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; alter session set container=pdb;

Session altered.

SQL&gt; select snapshot_mode,snapshot_interval/60 from dba_pdbs;

SNAPSH SNAPSHOT_INTERVAL/60
------ --------------------
MANUAL

SQL&gt; alter pluggable database snapshot mode every 3 hours;

Pluggable database altered.

SQL&gt; select snapshot_mode,snapshot_interval/60 from dba_pdbs;

SNAPSH SNAPSHOT_INTERVAL/60
------ --------------------
AUTO			  3

</pre>
<p>To return to manual mode, just type:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; alter pluggable database snapshot mode manual;

Pluggable database altered.

</pre>
<p>We can create PDB snapshots manually, you can use a specific name or not:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; alter pluggable database snapshot pdb_snap;

Pluggable database altered.

SQL&gt; alter pluggable database snapshot;

Pluggable database altered.

</pre>
<p>We can query the dba_pdb_snapshots view to display the PDB snapshots location:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; SELECT CON_ID, CON_NAME, SNAPSHOT_NAME, 
SNAPSHOT_SCN AS snap_scn, FULL_SNAPSHOT_PATH 
FROM   DBA_PDB_SNAPSHOTS ORDER BY SNAP_SCN;

CON_ID CON_NAME SNAPSHOT_NAME SNAP_SCN

FULL_SNAPSHOT_PATH

3        PDB	  PDB_SNAP    1155557
/home/oracle/oradata/DB18/pdb/snap_2263384607_1155557.pdb

3        PDB	  SNAP_2263384607_987432172  1155823
/home/oracle/oradata/DB18/pdb/snap_2263384607_1155823.pdb

</pre>
<p>If you want to drop a snapshot, you have two methods:</p>
<p>You delete the snapshot with the following alter pluggable statement:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; alter pluggable database drop snapshot SNAP_2263384607_987432172;

Pluggable database altered.

</pre>
<p>Otherwise you set the MAX_PDB_SNAPSHOTS property to zero in the PDB:</p>
<p>You can query the CDB_PROPERTIES and CDB_PDBS to display the parameter value:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SELECT r.CON_ID, p.PDB_NAME, PROPERTY_NAME,
  	PROPERTY_VALUE AS value, DESCRIPTION
  	FROM   CDB_PROPERTIES r, CDB_PDBS p
  	WHERE  r.CON_ID = p.CON_ID
  	AND    PROPERTY_NAME LIKE 'MAX_PDB%'
  	AND    description like 'maximum%'
  	ORDER BY PROPERTY_NAME

CON_ID	PDB_NAME	PROPERTY_NAME	VALUE	           DESCRIPTION
  3		  PDB     MAX_PDB_SNAPSHOTS    8    maximum number of snapshots for a given PDB

</pre>
<p>And if you set it to zero all your PDB snapshots will be dropped:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; alter session set container=pdb;

Session altered.

SQL&gt; alter pluggable database set max_pdb_snapshots = 0;

Pluggable database altered.

SQL&gt; SELECT CON_ID, CON_NAME, SNAPSHOT_NAME, 
SNAPSHOT_SCN AS snap_scn, FULL_SNAPSHOT_PATH 
FROM   DBA_PDB_SNAPSHOTS
ORDER BY SNAP_SCN;

no rows selected

</pre>
<p>But the main interest of the snapshot PDBS is to create new PDBS from a productive environment based on a point in time of the production PDB.</p>
<p>So we create a PDB snapshot named PDB_SNAP:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; alter pluggable database snapshot pdb_snap;

Pluggable database altered.</pre>
<p>And now we create a PDB from the PDB_SNAP snapshot:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; create pluggable database PDB2 from PDB using snapshot PDB_SNAP create_file_dest='/home/oracle/oradata/DB18/pdb2';

Pluggable database created.

SQL&gt; show pdbs

    CON_ID CON_NAME			  OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
	 2 PDB$SEED			  READ ONLY  NO
	 3 PDB		                  READ WRITE NO
	 4 APPPSI			  READ WRITE NO
	 5 PDB2 			  READ WRITE NO

</pre>
<p>We have also the possibility to change the snapshot mode:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; alter session set container=pdb;

Session altered.

SQL&gt; SELECT SNAPSHOT_MODE "S_MODE", SNAPSHOT_INTERVAL/60 "SNAP_INT_HRS" 
     FROM DBA_PDBS;

S_MODE SNAP_INT_HRS
------ ------------
MANUAL


SQL&gt; ALTER PLUGGABLE DATABASE SNAPSHOT MODE EVERY 1 HOURS;

Pluggable database altered.

SQL&gt; SELECT SNAPSHOT_MODE "S_MODE", SNAPSHOT_INTERVAL/60 "SNAP_INT_HRS" 
     FROM DBA_PDBS;

S_MODE SNAP_INT_HRS
------ ------------
AUTO		  1</pre>
<p>We have the possibility to create a PDB that creates snapshots every 15 minutes :</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; create pluggable database pdb_new from pdb
  2  file_name_convert=('pdb','pdb_new')
  3  snapshot mode every 15 minutes;

Pluggable database created.

</pre>
<p>There is a pre requisite for configuring automatic PDB snapshots: the CDB must be in local undo mode.</p>
<p>Finally the snapshots are correctly created in my environment every 15 minutes:</p>
<pre class="brush: sql; gutter: false; first-line: 1">oracle@localhost:/home/oracle/oradata/DB183/pdb/ [DB183] ls -lrt snap*
-rw-r--r--. 1 oracle dba 65690276 Oct  1 15:04 snap_3893567541_798493.pdb
-rw-r--r--. 1 oracle dba 65740202 Oct  1 15:19 snap_3893567541_801189.pdb
-rw-r--r--. 1 oracle dba 65823279 Oct  1 15:34 snap_3893567541_803706.pdb</pre>
<p>And to verify if it is correct , I had created in my pdb_new environment a location table in my psi schema with two records at 15H20:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; create table psi.location (name varchar2(10));

Table created.

SQL&gt; insert into psi.location values ('London');

1 row created.

SQL&gt; insert into psi.location values('Paris');

1 row created.

SQL&gt; commit;

</pre>
<p>And we create a new pdb from the snap to verify if the data are correct:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; create pluggable database pdb_psi from pdb_new 
     using snapshot SNAP_45745043_988386045 
     create_file_dest='/home/oracle/oradata/DB183/pdb_psi';

Pluggable database created.

</pre>
<p>We open pdb_psi and we check:</p>
<pre class="brush: sql; gutter: false; first-line: 1">SQL&gt; alter session set container=pdb_psi;

Session altered.

SQL&gt; select * from psi.location;

NAME
----------
London
Paris

</pre>
<p>This feature might be very useful for testing purposes, imagine you have a production PDB, you only have to create a refreshable clone named PDB_MASTER and configure it to create daily snapshots. If you need a PDB for testing you only have to create a clone from any snapshot.</p>
<p>Conclusion</p>
<p>All those tests have been realized on an Linux x86-64 server, with Oracle 18.3 Enterprise Edition. My DB183 database has been initialized with the “_exadata_feature_on”  hidden parameter to avoid the &#8220;ORA-12754 Feature PDB Snapshot Carousel is disabled due to missing capability&#8221; error message.</p>
<p>If you have a look at the Database Licensing User Manual:</p>
<p><a href="https://docs.oracle.com/en/database/oracle/oracle-database/18/dblic/Licensing-Information.html#GUID-B6113390-9586-46D7-9008-DCC9EDA45AB4">https://docs.oracle.com/en/database/oracle/oracle-database/18/dblic/Licensing-Information.html#GUID-B6113390-9586-46D7-9008-DCC9EDA45AB4</a></p>
<table width="100%">
<thead>
<tr>
<td width="16%"><strong>Feature / Option / Pack</strong></td>
<td width="5%"><strong>SE2</strong></td>
<td width="6%"><strong>EE</strong></td>
<td width="7%"><strong>EE-ES</strong></td>
<td width="7%"><strong>DBCS SE</strong></td>
<td width="7%"><strong>DBCS EE</strong></td>
<td width="7%"><strong>DBCS EE-HP</strong></td>
<td width="7%"><strong>DBCS EE-EP</strong></td>
<td width="8%"><strong>ExaCS</strong></td>
<td width="23%"><strong>Notes</strong></td>
</tr>
</thead>
<tbody>
<tr>
<td width="16%">PDB Snapshot Carousel</td>
<td width="5%">N</td>
<td width="6%">N</td>
<td width="7%">Y</td>
<td width="7%">N</td>
<td width="7%">Y</td>
<td width="7%">Y</td>
<td width="7%">Y</td>
<td width="8%">Y</td>
<td width="23%"></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>You will see that PDB Carousel (and a lot of interesting new features in Oracle 18.3) are only available for Engineered System or in Cloud and not for Enterprise Edition for third party hardware. I really hope Oracle will change this behavior in the future releases.</p>
<p>L’article <a href="https://www.dbi-services.com/blog/pdb-snapshot-carousel-oracle-18-3/">PDB Snapshot Carousel Oracle 18.3</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/pdb-snapshot-carousel-oracle-18-3/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Oracle 18c DataGuard : Rman RECOVER STANDBY DATABASE</title>
		<link>https://www.dbi-services.com/blog/oracle-18c-dataguard-rman-recover-standby-database/</link>
					<comments>https://www.dbi-services.com/blog/oracle-18c-dataguard-rman-recover-standby-database/#comments</comments>
		
		<dc:creator><![CDATA[Oracle Team]]></dc:creator>
		<pubDate>Wed, 15 Aug 2018 13:08:27 +0000</pubDate>
				<category><![CDATA[Database Administration & Monitoring]]></category>
		<category><![CDATA[DataGuard]]></category>
		<category><![CDATA[Dataguard refresh]]></category>
		<category><![CDATA[Dataguard synchronization]]></category>
		<category><![CDATA[Oracle 18c]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/oracle-18c-dataguard-rman-recover-standby-database/</guid>

					<description><![CDATA[<p>By Mouhamadou Diaw With Oracle Database 18c, we can now refresh a standby database over the network using one RMAN command, RECOVER STANDBY DATABASE. The RECOVER STANDBY DATABASE command restarts the standby instance, refreshes the control file from the primary database, and automatically renames data files, temp files, and online logs. It restores new data [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/oracle-18c-dataguard-rman-recover-standby-database/">Oracle 18c DataGuard : Rman RECOVER STANDBY DATABASE</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>By Mouhamadou Diaw</strong></p>
<p>With Oracle Database 18c, we can now refresh a standby database over the network using one RMAN command, RECOVER STANDBY DATABASE.</p>
<p>The RECOVER STANDBY DATABASE command restarts the standby instance, refreshes the control file from the primary database, and automatically renames data files, temp files, and online logs. It restores new data files that were added to the primary database and recovers the standby database up to the current time.<br />
When you use the RECOVER STANDBY DATABASE command to refresh a standby database, you specify either a FROM SERVICE clause or a NOREDO clause. The FROM SERVICE clause specifies the name of a primary service. The NOREDO clause specifies that backups should be used for the refresh, which allows a standby to be rolled forward to a specific time or SCN.<br />
The MRP must be manually stopped on the standby before any attempt is made to sync with primary database.</p>
<p>In this blog I am doing some tests of standby refresh using the Recover Standby Database command.</p>
<p>From a fine Data Guard let’s set the property StandbyFileManagement to MANUAL</p>
<div>
<div id="highlighter_6505" class="syntaxhighlighter  sql">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
<div class="line number2 index1 alt1">2</div>
<div class="line number3 index2 alt2">3</div>
<div class="line number4 index3 alt1">4</div>
<div class="line number5 index4 alt2">5</div>
<div class="line number6 index5 alt1">6</div>
<div class="line number7 index6 alt2">7</div>
<div class="line number8 index7 alt1">8</div>
<div class="line number9 index8 alt2">9</div>
<div class="line number10 index9 alt1">10</div>
<div class="line number11 index10 alt2">11</div>
<div class="line number12 index11 alt1">12</div>
<div class="line number13 index12 alt2">13</div>
<div class="line number14 index13 alt1">14</div>
<div class="line number15 index14 alt2">15</div>
<div class="line number16 index15 alt1">16</div>
<div class="line number17 index16 alt2">17</div>
<div class="line number18 index17 alt1">18</div>
<div class="line number19 index18 alt2">19</div>
<div class="line number20 index19 alt1">20</div>
<div class="line number21 index20 alt2">21</div>
<div class="line number22 index21 alt1">22</div>
<div class="line number23 index22 alt2">23</div>
<div class="line number24 index23 alt1">24</div>
<div class="line number25 index24 alt2">25</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="sql plain">DGMGRL&gt; show configuration;</code></div>
<div class="line number2 index1 alt1"></div>
<div class="line number3 index2 alt2"><code class="sql plain">Configuration - CONT18C_DR</code></div>
<div class="line number4 index3 alt1"></div>
<div class="line number5 index4 alt2"><code class="sql spaces">  </code><code class="sql plain">Protection Mode: MaxPerformance</code></div>
<div class="line number6 index5 alt1"><code class="sql spaces">  </code><code class="sql plain">Members:</code></div>
<div class="line number7 index6 alt2"><code class="sql spaces">  </code><code class="sql plain">CONT18C_SITE  - </code><code class="sql keyword">Primary</code> <code class="sql keyword">database</code></div>
<div class="line number8 index7 alt1"><code class="sql spaces">    </code><code class="sql plain">CONT18C_SITE1 - Physical standby </code><code class="sql keyword">database</code></div>
<div class="line number9 index8 alt2"></div>
<div class="line number10 index9 alt1"><code class="sql plain">Fast-Start Failover: DISABLED</code></div>
<div class="line number11 index10 alt2"></div>
<div class="line number12 index11 alt1"><code class="sql plain">Configuration Status:</code></div>
<div class="line number13 index12 alt2"><code class="sql plain">SUCCESS   (status updated 18 seconds ago)</code></div>
<div class="line number14 index13 alt1"></div>
<div class="line number15 index14 alt2"><code class="sql plain">DGMGRL&gt;</code></div>
<div class="line number16 index15 alt1"></div>
<div class="line number17 index16 alt2"><code class="sql plain">DGMGRL&gt; edit </code><code class="sql keyword">database</code> <code class="sql string">'CONT18C_SITE'</code> <code class="sql keyword">set</code> <code class="sql plain">property StandbyFileManagement=MANUAL;</code></div>
<div class="line number18 index17 alt1"><code class="sql plain">Property </code><code class="sql string">"standbyfilemanagement"</code> <code class="sql plain">updated</code></div>
<div class="line number19 index18 alt2"><code class="sql plain">DGMGRL&gt; edit </code><code class="sql keyword">database</code> <code class="sql string">'CONT18C_SITE1'</code> <code class="sql keyword">set</code> <code class="sql plain">property StandbyFileManagement=MANUAL;</code></div>
<div class="line number20 index19 alt1"><code class="sql plain">Property </code><code class="sql string">"standbyfilemanagement"</code> <code class="sql plain">updated</code></div>
<div class="line number21 index20 alt2"><code class="sql plain">DGMGRL&gt; show  </code><code class="sql keyword">database</code> <code class="sql string">'CONT18C_SITE'</code> <code class="sql plain">StandbyFileManagement;</code></div>
<div class="line number22 index21 alt1"><code class="sql spaces">  </code><code class="sql plain">StandbyFileManagement = </code><code class="sql string">'manual'</code></div>
<div class="line number23 index22 alt2"><code class="sql plain">DGMGRL&gt; show  </code><code class="sql keyword">database</code> <code class="sql string">'CONT18C_SITE1'</code> <code class="sql plain">StandbyFileManagement;</code></div>
<div class="line number24 index23 alt1"><code class="sql spaces">  </code><code class="sql plain">StandbyFileManagement = </code><code class="sql string">'manual'</code></div>
<div class="line number25 index24 alt2"><code class="sql plain">DGMGRL&gt;</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>And Then I create add new tablespace and new table in the primary</p>
<div>
<div id="highlighter_145712" class="syntaxhighlighter  sql">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
<div class="line number2 index1 alt1">2</div>
<div class="line number3 index2 alt2">3</div>
<div class="line number4 index3 alt1">4</div>
<div class="line number5 index4 alt2">5</div>
<div class="line number6 index5 alt1">6</div>
<div class="line number7 index6 alt2">7</div>
<div class="line number8 index7 alt1">8</div>
<div class="line number9 index8 alt2">9</div>
<div class="line number10 index9 alt1">10</div>
<div class="line number11 index10 alt2">11</div>
<div class="line number12 index11 alt1">12</div>
<div class="line number13 index12 alt2">13</div>
<div class="line number14 index13 alt1">14</div>
<div class="line number15 index14 alt2">15</div>
<div class="line number16 index15 alt1">16</div>
<div class="line number17 index16 alt2">17</div>
<div class="line number18 index17 alt1">18</div>
<div class="line number19 index18 alt2">19</div>
<div class="line number20 index19 alt1">20</div>
<div class="line number21 index20 alt2">21</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="sql plain">SQL&gt; </code><code class="sql keyword">create</code> <code class="sql plain">tablespace TBS_2 datafile </code><code class="sql string">'/u01/app/oracle/oradata/CONT18C/PDB1/tbs_201.dbf'</code> <code class="sql keyword">size</code> <code class="sql plain">5M ;</code></div>
<div class="line number2 index1 alt1"></div>
<div class="line number3 index2 alt2"><code class="sql plain">Tablespace created.</code></div>
<div class="line number4 index3 alt1"></div>
<div class="line number5 index4 alt2"><code class="sql plain">SQL&gt; </code><code class="sql keyword">create</code> <code class="sql keyword">table</code> <code class="sql plain">test (id number) tablespace TBS_2;</code></div>
<div class="line number6 index5 alt1"></div>
<div class="line number7 index6 alt2"><code class="sql keyword">Table</code> <code class="sql plain">created.</code></div>
<div class="line number8 index7 alt1"></div>
<div class="line number9 index8 alt2"><code class="sql plain">SQL&gt; </code><code class="sql keyword">insert</code> <code class="sql keyword">into</code> <code class="sql plain">test </code><code class="sql keyword">values</code> <code class="sql plain">(1);</code></div>
<div class="line number10 index9 alt1"></div>
<div class="line number11 index10 alt2"><code class="sql plain">1 row created.</code></div>
<div class="line number12 index11 alt1"></div>
<div class="line number13 index12 alt2"><code class="sql plain">SQL&gt; </code><code class="sql keyword">insert</code> <code class="sql keyword">into</code> <code class="sql plain">test </code><code class="sql keyword">values</code> <code class="sql plain">(2);</code></div>
<div class="line number14 index13 alt1"></div>
<div class="line number15 index14 alt2"><code class="sql plain">1 row created.</code></div>
<div class="line number16 index15 alt1"></div>
<div class="line number17 index16 alt2"><code class="sql plain">SQL&gt; </code><code class="sql keyword">commit</code><code class="sql plain">;</code></div>
<div class="line number18 index17 alt1"></div>
<div class="line number19 index18 alt2"><code class="sql keyword">Commit</code> <code class="sql plain">complete.</code></div>
<div class="line number20 index19 alt1"></div>
<div class="line number21 index20 alt2"><code class="sql plain">SQL&gt;</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>As expected the changes are not being replicated as shown in the standby alert logfile and in the broker sonfiguration</p>
<div>
<div id="highlighter_182612" class="syntaxhighlighter  bash">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
<div class="line number2 index1 alt1">2</div>
<div class="line number3 index2 alt2">3</div>
<div class="line number4 index3 alt1">4</div>
<div class="line number5 index4 alt2">5</div>
<div class="line number6 index5 alt1">6</div>
<div class="line number7 index6 alt2">7</div>
<div class="line number8 index7 alt1">8</div>
<div class="line number9 index8 alt2">9</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="bash plain">(3):File </code><code class="bash comments">#14 added to control file as 'UNNAMED00014' because</code></div>
<div class="line number2 index1 alt1"><code class="bash plain">(3):the parameter STANDBY_FILE_MANAGEMENT is </code><code class="bash functions">set</code> <code class="bash plain">to MANUAL</code></div>
<div class="line number3 index2 alt2"><code class="bash plain">(3):The </code><code class="bash functions">file</code> <code class="bash plain">should be manually created to </code><code class="bash keyword">continue</code><code class="bash plain">.</code></div>
<div class="line number4 index3 alt1"><code class="bash plain">MRP0 (PID:6307): MRP0: Background Media Recovery terminated with error 1274</code></div>
<div class="line number5 index4 alt2"><code class="bash plain">2018-08-15T13:31:08.343276+02:00</code></div>
<div class="line number6 index5 alt1"><code class="bash plain">Errors </code><code class="bash keyword">in</code> <code class="bash functions">file</code> <code class="bash plain">/u01/app/oracle/diag/rdbms/cont18c_site1/CONT18C/trace/CONT18C_mrp0_6307</code><code class="bash plain">.trc:</code></div>
<div class="line number7 index6 alt2"><code class="bash plain">ORA-01274: cannot add data </code><code class="bash functions">file</code> <code class="bash plain">that was originally created as </code><code class="bash string">'/u01/app/oracle/oradata/CONT18C/PDB1/tbs_201.dbf'</code></div>
<div class="line number8 index7 alt1"><code class="bash plain">MRP0 (PID:6307): Managed Standby Recovery not using Real Time Apply</code></div>
<div class="line number9 index8 alt2"><code class="bash plain">Recovery interrupted!</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>Using the broker</p>
<div>
<div id="highlighter_231591" class="syntaxhighlighter  sql">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
<div class="line number2 index1 alt1">2</div>
<div class="line number3 index2 alt2">3</div>
<div class="line number4 index3 alt1">4</div>
<div class="line number5 index4 alt2">5</div>
<div class="line number6 index5 alt1">6</div>
<div class="line number7 index6 alt2">7</div>
<div class="line number8 index7 alt1">8</div>
<div class="line number9 index8 alt2">9</div>
<div class="line number10 index9 alt1">10</div>
<div class="line number11 index10 alt2">11</div>
<div class="line number12 index11 alt1">12</div>
<div class="line number13 index12 alt2">13</div>
<div class="line number14 index13 alt1">14</div>
<div class="line number15 index14 alt2">15</div>
<div class="line number16 index15 alt1">16</div>
<div class="line number17 index16 alt2">17</div>
<div class="line number18 index17 alt1">18</div>
<div class="line number19 index18 alt2">19</div>
<div class="line number20 index19 alt1">20</div>
<div class="line number21 index20 alt2">21</div>
<div class="line number22 index21 alt1">22</div>
<div class="line number23 index22 alt2">23</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="sql plain">DGMGRL&gt; show </code><code class="sql keyword">database</code> <code class="sql string">'CONT18C_SITE1'</code><code class="sql plain">;</code></div>
<div class="line number2 index1 alt1"></div>
<div class="line number3 index2 alt2"><code class="sql keyword">Database</code> <code class="sql plain">- CONT18C_SITE1</code></div>
<div class="line number4 index3 alt1"></div>
<div class="line number5 index4 alt2"><code class="sql spaces">  </code><code class="sql plain">Role:               PHYSICAL STANDBY</code></div>
<div class="line number6 index5 alt1"><code class="sql spaces">  </code><code class="sql plain">Intended State:     APPLY-</code><code class="sql keyword">ON</code></div>
<div class="line number7 index6 alt2"><code class="sql spaces">  </code><code class="sql plain">Transport Lag:      0 seconds (computed 1 </code><code class="sql keyword">second</code> <code class="sql plain">ago)</code></div>
<div class="line number8 index7 alt1"><code class="sql spaces">  </code><code class="sql plain">Apply Lag:          4 minutes 33 seconds (computed 1 </code><code class="sql keyword">second</code> <code class="sql plain">ago)</code></div>
<div class="line number9 index8 alt2"><code class="sql spaces">  </code><code class="sql plain">Average Apply Rate: 3.00 KByte/s</code></div>
<div class="line number10 index9 alt1"><code class="sql spaces">  </code><code class="sql keyword">Real</code> <code class="sql keyword">Time</code> <code class="sql plain">Query:    </code><code class="sql keyword">OFF</code></div>
<div class="line number11 index10 alt2"><code class="sql spaces">  </code><code class="sql plain">Instance(s):</code></div>
<div class="line number12 index11 alt1"><code class="sql spaces">    </code><code class="sql plain">CONT18C</code></div>
<div class="line number13 index12 alt2"></div>
<div class="line number14 index13 alt1"><code class="sql spaces">  </code><code class="sql keyword">Database</code> <code class="sql plain">Error(s):</code></div>
<div class="line number15 index14 alt2"><code class="sql spaces">    </code><code class="sql plain">ORA-16766: Redo Apply </code><code class="sql keyword">is</code> <code class="sql plain">stopped</code></div>
<div class="line number16 index15 alt1"></div>
<div class="line number17 index16 alt2"><code class="sql spaces">  </code><code class="sql keyword">Database</code> <code class="sql plain">Warning(s):</code></div>
<div class="line number18 index17 alt1"><code class="sql spaces">    </code><code class="sql plain">ORA-16853: apply lag has exceeded specified threshold</code></div>
<div class="line number19 index18 alt2"></div>
<div class="line number20 index19 alt1"><code class="sql keyword">Database</code> <code class="sql plain">Status:</code></div>
<div class="line number21 index20 alt2"><code class="sql plain">ERROR</code></div>
<div class="line number22 index21 alt1"></div>
<div class="line number23 index22 alt2"><code class="sql plain">DGMGRL&gt;</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>Now let’s try to sync the standby database using the RECOVER command. First let’s stop the recovery process.</p>
<div>
<div id="highlighter_776202" class="syntaxhighlighter  sql">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
<div class="line number2 index1 alt1">2</div>
<div class="line number3 index2 alt2">3</div>
<div class="line number4 index3 alt1">4</div>
<div class="line number5 index4 alt2">5</div>
<div class="line number6 index5 alt1">6</div>
<div class="line number7 index6 alt2">7</div>
<div class="line number8 index7 alt1">8</div>
<div class="line number9 index8 alt2">9</div>
<div class="line number10 index9 alt1">10</div>
<div class="line number11 index10 alt2">11</div>
<div class="line number12 index11 alt1">12</div>
<div class="line number13 index12 alt2">13</div>
<div class="line number14 index13 alt1">14</div>
<div class="line number15 index14 alt2">15</div>
<div class="line number16 index15 alt1">16</div>
<div class="line number17 index16 alt2">17</div>
<div class="line number18 index17 alt1">18</div>
<div class="line number19 index18 alt2">19</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="sql plain">DGMGRL&gt; edit </code><code class="sql keyword">database</code> <code class="sql string">'CONT18C_SITE1'</code> <code class="sql keyword">set</code> <code class="sql plain">state =</code><code class="sql string">'APPLY-OFF'</code><code class="sql plain">;</code></div>
<div class="line number2 index1 alt1"><code class="sql plain">Succeeded.</code></div>
<div class="line number3 index2 alt2"><code class="sql plain">DGMGRL&gt; show </code><code class="sql keyword">database</code> <code class="sql string">'CONT18C_SITE1'</code><code class="sql plain">;</code></div>
<div class="line number4 index3 alt1"></div>
<div class="line number5 index4 alt2"><code class="sql keyword">Database</code> <code class="sql plain">- CONT18C_SITE1</code></div>
<div class="line number6 index5 alt1"></div>
<div class="line number7 index6 alt2"><code class="sql spaces">  </code><code class="sql plain">Role:               PHYSICAL STANDBY</code></div>
<div class="line number8 index7 alt1"><code class="sql spaces">  </code><code class="sql plain">Intended State:     APPLY-</code><code class="sql keyword">OFF</code></div>
<div class="line number9 index8 alt2"><code class="sql spaces">  </code><code class="sql plain">Transport Lag:      0 seconds (computed 0 seconds ago)</code></div>
<div class="line number10 index9 alt1"><code class="sql spaces">  </code><code class="sql plain">Apply Lag:          26 minutes 28 seconds (computed 0 seconds ago)</code></div>
<div class="line number11 index10 alt2"><code class="sql spaces">  </code><code class="sql plain">Average Apply Rate: (unknown)</code></div>
<div class="line number12 index11 alt1"><code class="sql spaces">  </code><code class="sql keyword">Real</code> <code class="sql keyword">Time</code> <code class="sql plain">Query:    </code><code class="sql keyword">OFF</code></div>
<div class="line number13 index12 alt2"><code class="sql spaces">  </code><code class="sql plain">Instance(s):</code></div>
<div class="line number14 index13 alt1"><code class="sql spaces">    </code><code class="sql plain">CONT18C</code></div>
<div class="line number15 index14 alt2"></div>
<div class="line number16 index15 alt1"><code class="sql keyword">Database</code> <code class="sql plain">Status:</code></div>
<div class="line number17 index16 alt2"><code class="sql plain">SUCCESS</code></div>
<div class="line number18 index17 alt1"></div>
<div class="line number19 index18 alt2"><code class="sql plain">DGMGRL&gt;</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>After let’s connect with Rman as the <strong>target to the standby </strong>and let’s run the command<br />
If we try to run the command while connecting to the primary as target we will get following error</p>
<div>
<div id="highlighter_100535" class="syntaxhighlighter  bash">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
<div class="line number2 index1 alt1">2</div>
<div class="line number3 index2 alt2">3</div>
<div class="line number4 index3 alt1">4</div>
<div class="line number5 index4 alt2">5</div>
<div class="line number6 index5 alt1">6</div>
<div class="line number7 index6 alt2">7</div>
<div class="line number8 index7 alt1">8</div>
<div class="line number9 index8 alt2">9</div>
<div class="line number10 index9 alt1">10</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="bash plain">RMAN&gt; RECOVER STANDBY DATABASE FROM SERVICE CONT18c_SITE;</code></div>
<div class="line number2 index1 alt1"></div>
<div class="line number3 index2 alt2"><code class="bash plain">Starting recover at 15-AUG-18</code></div>
<div class="line number4 index3 alt1"><code class="bash plain">RMAN-00571: ===========================================================</code></div>
<div class="line number5 index4 alt2"><code class="bash plain">RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============</code></div>
<div class="line number6 index5 alt1"><code class="bash plain">RMAN-00571: ===========================================================</code></div>
<div class="line number7 index6 alt2"><code class="bash plain">RMAN-03002: failure of recover </code><code class="bash functions">command</code> <code class="bash plain">at 08</code><code class="bash plain">/15/2018</code> <code class="bash plain">14:00:15</code></div>
<div class="line number8 index7 alt1"><code class="bash plain">RMAN-05146: must be connected to standby database to issue RECOVER STANDBY DATABASE</code></div>
<div class="line number9 index8 alt2"></div>
<div class="line number10 index9 alt1"><code class="bash plain">RMAN&gt;</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>So from the standby as target. Note that outputs are truncated</p>
<div>
<div id="highlighter_584262" class="syntaxhighlighter  bash">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
<div class="line number2 index1 alt1">2</div>
<div class="line number3 index2 alt2">3</div>
<div class="line number4 index3 alt1">4</div>
<div class="line number5 index4 alt2">5</div>
<div class="line number6 index5 alt1">6</div>
<div class="line number7 index6 alt2">7</div>
<div class="line number8 index7 alt1">8</div>
<div class="line number9 index8 alt2">9</div>
<div class="line number10 index9 alt1">10</div>
<div class="line number11 index10 alt2">11</div>
<div class="line number12 index11 alt1">12</div>
<div class="line number13 index12 alt2">13</div>
<div class="line number14 index13 alt1">14</div>
<div class="line number15 index14 alt2">15</div>
<div class="line number16 index15 alt1">16</div>
<div class="line number17 index16 alt2">17</div>
<div class="line number18 index17 alt1">18</div>
<div class="line number19 index18 alt2">19</div>
<div class="line number20 index19 alt1">20</div>
<div class="line number21 index20 alt2">21</div>
<div class="line number22 index21 alt1">22</div>
<div class="line number23 index22 alt2">23</div>
<div class="line number24 index23 alt1">24</div>
<div class="line number25 index24 alt2">25</div>
<div class="line number26 index25 alt1">26</div>
<div class="line number27 index26 alt2">27</div>
<div class="line number28 index27 alt1">28</div>
<div class="line number29 index28 alt2">29</div>
<div class="line number30 index29 alt1">30</div>
<div class="line number31 index30 alt2">31</div>
<div class="line number32 index31 alt1">32</div>
<div class="line number33 index32 alt2">33</div>
<div class="line number34 index33 alt1">34</div>
<div class="line number35 index34 alt2">35</div>
<div class="line number36 index35 alt1">36</div>
<div class="line number37 index36 alt2">37</div>
<div class="line number38 index37 alt1">38</div>
<div class="line number39 index38 alt2">39</div>
<div class="line number40 index39 alt1">40</div>
<div class="line number41 index40 alt2">41</div>
<div class="line number42 index41 alt1">42</div>
<div class="line number43 index42 alt2">43</div>
<div class="line number44 index43 alt1">44</div>
<div class="line number45 index44 alt2">45</div>
<div class="line number46 index45 alt1">46</div>
<div class="line number47 index46 alt2">47</div>
<div class="line number48 index47 alt1">48</div>
<div class="line number49 index48 alt2">49</div>
<div class="line number50 index49 alt1">50</div>
<div class="line number51 index50 alt2">51</div>
<div class="line number52 index51 alt1">52</div>
<div class="line number53 index52 alt2">53</div>
<div class="line number54 index53 alt1">54</div>
<div class="line number55 index54 alt2">55</div>
<div class="line number56 index55 alt1">56</div>
<div class="line number57 index56 alt2">57</div>
<div class="line number58 index57 alt1">58</div>
<div class="line number59 index58 alt2">59</div>
<div class="line number60 index59 alt1">60</div>
<div class="line number61 index60 alt2">61</div>
<div class="line number62 index61 alt1">62</div>
<div class="line number63 index62 alt2">63</div>
<div class="line number64 index63 alt1">64</div>
<div class="line number65 index64 alt2">65</div>
<div class="line number66 index65 alt1">66</div>
<div class="line number67 index66 alt2">67</div>
<div class="line number68 index67 alt1">68</div>
<div class="line number69 index68 alt2">69</div>
<div class="line number70 index69 alt1">70</div>
<div class="line number71 index70 alt2">71</div>
<div class="line number72 index71 alt1">72</div>
<div class="line number73 index72 alt2">73</div>
<div class="line number74 index73 alt1">74</div>
<div class="line number75 index74 alt2">75</div>
<div class="line number76 index75 alt1">76</div>
<div class="line number77 index76 alt2">77</div>
<div class="line number78 index77 alt1">78</div>
<div class="line number79 index78 alt2">79</div>
<div class="line number80 index79 alt1">80</div>
<div class="line number81 index80 alt2">81</div>
<div class="line number82 index81 alt1">82</div>
<div class="line number83 index82 alt2">83</div>
<div class="line number84 index83 alt1">84</div>
<div class="line number85 index84 alt2">85</div>
<div class="line number86 index85 alt1">86</div>
<div class="line number87 index86 alt2">87</div>
<div class="line number88 index87 alt1">88</div>
<div class="line number89 index88 alt2">89</div>
<div class="line number90 index89 alt1">90</div>
<div class="line number91 index90 alt2">91</div>
<div class="line number92 index91 alt1">92</div>
<div class="line number93 index92 alt2">93</div>
<div class="line number94 index93 alt1">94</div>
<div class="line number95 index94 alt2">95</div>
<div class="line number96 index95 alt1">96</div>
<div class="line number97 index96 alt2">97</div>
<div class="line number98 index97 alt1">98</div>
<div class="line number99 index98 alt2">99</div>
<div class="line number100 index99 alt1">100</div>
<div class="line number101 index100 alt2">101</div>
<div class="line number102 index101 alt1">102</div>
<div class="line number103 index102 alt2">103</div>
<div class="line number104 index103 alt1">104</div>
<div class="line number105 index104 alt2">105</div>
<div class="line number106 index105 alt1">106</div>
<div class="line number107 index106 alt2">107</div>
<div class="line number108 index107 alt1">108</div>
<div class="line number109 index108 alt2">109</div>
<div class="line number110 index109 alt1">110</div>
<div class="line number111 index110 alt2">111</div>
<div class="line number112 index111 alt1">112</div>
<div class="line number113 index112 alt2">113</div>
<div class="line number114 index113 alt1">114</div>
<div class="line number115 index114 alt2">115</div>
<div class="line number116 index115 alt1">116</div>
<div class="line number117 index116 alt2">117</div>
<div class="line number118 index117 alt1">118</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="bash plain">[oracle@primaserver admin]$ rman target sys</code><code class="bash plain">/root</code><code class="bash plain">@cont18c_site1</code></div>
<div class="line number2 index1 alt1"></div>
<div class="line number3 index2 alt2"><code class="bash plain">Recovery Manager: Release 18.0.0.0.0 - Production on Wed Aug 15 14:03:55 2018</code></div>
<div class="line number4 index3 alt1"><code class="bash plain">Version 18.3.0.0.0</code></div>
<div class="line number5 index4 alt2"></div>
<div class="line number6 index5 alt1"><code class="bash plain">Copyright (c) 1982, 2018, Oracle and</code><code class="bash plain">/or</code> <code class="bash plain">its affiliates.  All rights reserved.</code></div>
<div class="line number7 index6 alt2"></div>
<div class="line number8 index7 alt1"><code class="bash plain">connected to target database: CONT18C (DBID=4292751651)</code></div>
<div class="line number9 index8 alt2"></div>
<div class="line number10 index9 alt1"><code class="bash plain">RMAN&gt;  RECOVER STANDBY DATABASE FROM SERVICE CONT18c_SITE;</code></div>
<div class="line number11 index10 alt2"></div>
<div class="line number12 index11 alt1"><code class="bash plain">Starting recover at 15-AUG-18</code></div>
<div class="line number13 index12 alt2"><code class="bash plain">using target database control </code><code class="bash functions">file</code> <code class="bash plain">instead of recovery catalog</code></div>
<div class="line number14 index13 alt1"><code class="bash plain">Executing: alter database flashback off</code></div>
<div class="line number15 index14 alt2"><code class="bash plain">Oracle instance started</code></div>
<div class="line number16 index15 alt1"></div>
<div class="line number17 index16 alt2"><code class="bash plain">Total System Global Area     956299440 bytes</code></div>
<div class="line number18 index17 alt1"></div>
<div class="line number19 index18 alt2"><code class="bash plain">Fixed Size                     8902832 bytes</code></div>
<div class="line number20 index19 alt1"><code class="bash plain">Variable Size                348127232 bytes</code></div>
<div class="line number21 index20 alt2"><code class="bash plain">Database Buffers             595591168 bytes</code></div>
<div class="line number22 index21 alt1"><code class="bash plain">Redo Buffers                   3678208 bytes</code></div>
<div class="line number23 index22 alt2"></div>
<div class="line number24 index23 alt1"><code class="bash plain">contents of Memory Script:</code></div>
<div class="line number25 index24 alt2"><code class="bash plain">{</code></div>
<div class="line number26 index25 alt1"><code class="bash spaces">   </code><code class="bash plain">restore standby controlfile from service  </code><code class="bash string">'CONT18c_SITE'</code><code class="bash plain">;</code></div>
<div class="line number27 index26 alt2"><code class="bash spaces">   </code><code class="bash plain">alter database </code><code class="bash functions">mount</code> <code class="bash plain">standby database;</code></div>
<div class="line number28 index27 alt1"><code class="bash plain">}</code></div>
<div class="line number29 index28 alt2"><code class="bash plain">executing Memory Script</code></div>
<div class="line number30 index29 alt1"></div>
<div class="line number31 index30 alt2"><code class="bash plain">Starting restore at 15-AUG-18</code></div>
<div class="line number32 index31 alt1"><code class="bash plain">allocated channel: ORA_DISK_1</code></div>
<div class="line number33 index32 alt2"><code class="bash plain">channel ORA_DISK_1: SID=39 device </code><code class="bash functions">type</code><code class="bash plain">=DISK</code></div>
<div class="line number34 index33 alt1"></div>
<div class="line number35 index34 alt2"><code class="bash plain">channel ORA_DISK_1: starting datafile backup </code><code class="bash functions">set</code> <code class="bash plain">restore</code></div>
<div class="line number36 index35 alt1"><code class="bash plain">channel ORA_DISK_1: using network backup </code><code class="bash functions">set</code> <code class="bash plain">from service CONT18c_SITE</code></div>
<div class="line number37 index36 alt2"><code class="bash plain">channel ORA_DISK_1: restoring control </code><code class="bash functions">file</code></div>
<div class="line number38 index37 alt1"><code class="bash plain">channel ORA_DISK_1: restore complete, elapsed </code><code class="bash functions">time</code><code class="bash plain">: 00:00:04</code></div>
<div class="line number39 index38 alt2"><code class="bash plain">output </code><code class="bash functions">file</code> <code class="bash plain">name=</code><code class="bash plain">/u01/app/oracle/oradata/CONT18C/control01</code><code class="bash plain">.ctl</code></div>
<div class="line number40 index39 alt1"><code class="bash plain">output </code><code class="bash functions">file</code> <code class="bash plain">name=</code><code class="bash plain">/u01/app/oracle/oradata/CONT18C/control02</code><code class="bash plain">.ctl</code></div>
<div class="line number41 index40 alt2"><code class="bash plain">Finished restore at 15-AUG-18</code></div>
<div class="line number42 index41 alt1"></div>
<div class="line number43 index42 alt2"><code class="bash plain">released channel: ORA_DISK_1</code></div>
<div class="line number44 index43 alt1"><code class="bash plain">Statement processed</code></div>
<div class="line number45 index44 alt2"></div>
<div class="line number46 index45 alt1"><code class="bash plain">contents of Memory Script:</code></div>
<div class="line number47 index46 alt2"><code class="bash plain">{</code></div>
<div class="line number48 index47 alt1"><code class="bash functions">set</code> <code class="bash plain">newname </code><code class="bash keyword">for</code> <code class="bash plain">datafile  14 to</code></div>
<div class="line number49 index48 alt2"><code class="bash spaces"> </code><code class="bash string">"/u01/app/oracle/oradata/CONT18C/PDB1/tbs_201.dbf"</code><code class="bash plain">;</code></div>
<div class="line number50 index49 alt1"><code class="bash spaces">   </code><code class="bash plain">restore from service  </code><code class="bash string">'CONT18c_SITE'</code> <code class="bash plain">datafile</code></div>
<div class="line number51 index50 alt2"><code class="bash spaces">    </code><code class="bash plain">14;</code></div>
<div class="line number52 index51 alt1"><code class="bash spaces">   </code><code class="bash plain">catalog datafilecopy  </code><code class="bash string">"/u01/app/oracle/oradata/CONT18C/PDB1/tbs_201.dbf"</code><code class="bash plain">;</code></div>
<div class="line number53 index52 alt2"><code class="bash spaces">   </code><code class="bash plain">switch datafile all;</code></div>
<div class="line number54 index53 alt1"><code class="bash plain">}</code></div>
<div class="line number55 index54 alt2"><code class="bash plain">executing Memory Script</code></div>
<div class="line number56 index55 alt1"></div>
<div class="line number57 index56 alt2"><code class="bash plain">executing </code><code class="bash functions">command</code><code class="bash plain">: SET NEWNAME</code></div>
<div class="line number58 index57 alt1"></div>
<div class="line number59 index58 alt2"><code class="bash plain">Starting restore at 15-AUG-18</code></div>
<div class="line number60 index59 alt1"><code class="bash plain">Starting implicit crosscheck backup at 15-AUG-18</code></div>
<div class="line number61 index60 alt2"><code class="bash plain">allocated channel: ORA_DISK_1</code></div>
<div class="line number62 index61 alt1"><code class="bash plain">channel ORA_DISK_1: SID=51 device </code><code class="bash functions">type</code><code class="bash plain">=DISK</code></div>
<div class="line number63 index62 alt2"><code class="bash plain">Crosschecked 5 objects</code></div>
<div class="line number64 index63 alt1"><code class="bash plain">Finished implicit crosscheck backup at 15-AUG-18</code></div>
<div class="line number65 index64 alt2"></div>
<div class="line number66 index65 alt1"><code class="bash plain">Starting implicit crosscheck copy at 15-AUG-18</code></div>
<div class="line number67 index66 alt2"><code class="bash plain">using channel ORA_DISK_1</code></div>
<div class="line number68 index67 alt1"><code class="bash plain">Finished implicit crosscheck copy at 15-AUG-18</code></div>
<div class="line number69 index68 alt2"></div>
<div class="line number70 index69 alt1"><code class="bash plain">searching </code><code class="bash keyword">for</code> <code class="bash plain">all files </code><code class="bash keyword">in</code> <code class="bash plain">the recovery area</code></div>
<div class="line number71 index70 alt2"><code class="bash plain">cataloging files...</code></div>
<div class="line number72 index71 alt1"><code class="bash plain">cataloging </code><code class="bash keyword">done</code></div>
<div class="line number73 index72 alt2"></div>
<div class="line number74 index73 alt1"><code class="bash plain">List of Cataloged Files</code></div>
<div class="line number75 index74 alt2"><code class="bash plain">=======================</code></div>
<div class="line number76 index75 alt1"><code class="bash plain">File Name: </code><code class="bash plain">/u01/app/oracle/fast_recovery_area/CONT18C/CONT18C_SITE1/archivelog/2018_08_15/o1_mf_1_47_fq7q5ls5_</code><code class="bash plain">.arc</code></div>
<div class="line number77 index76 alt2"><code class="bash plain">File Name: </code><code class="bash plain">/u01/app/oracle/fast_recovery_area/CONT18C/CONT18C_SITE1/archivelog/2018_08_15/o1_mf_1_48_fq7qn5s3_</code><code class="bash plain">.arc</code></div>
<div class="line number78 index77 alt1"><code class="bash plain">File Name: </code><code class="bash plain">/u01/app/oracle/fast_recovery_area/CONT18C/CONT18C_SITE1/archivelog/2018_08_15/o1_mf_1_49_fq7r0715_</code><code class="bash plain">.arc</code></div>
<div class="line number79 index78 alt2"><code class="bash plain">File Name: </code></div>
<div class="line number80 index79 alt1"><code class="bash plain">…</code></div>
<div class="line number81 index80 alt2"><code class="bash plain">…</code></div>
<div class="line number82 index81 alt1"></div>
<div class="line number83 index82 alt2"><code class="bash plain">contents of Memory Script:</code></div>
<div class="line number84 index83 alt1"><code class="bash plain">{</code></div>
<div class="line number85 index84 alt2"><code class="bash spaces">  </code><code class="bash plain">recover database from service  </code><code class="bash string">'CONT18c_SITE'</code><code class="bash plain">;</code></div>
<div class="line number86 index85 alt1"><code class="bash plain">}</code></div>
<div class="line number87 index86 alt2"><code class="bash plain">executing Memory Script</code></div>
<div class="line number88 index87 alt1"></div>
<div class="line number89 index88 alt2"><code class="bash plain">Starting recover at 15-AUG-18</code></div>
<div class="line number90 index89 alt1"><code class="bash plain">using channel ORA_DISK_1</code></div>
<div class="line number91 index90 alt2"><code class="bash plain">skipping datafile 5; already restored to SCN 1550044</code></div>
<div class="line number92 index91 alt1"><code class="bash plain">skipping datafile 6; already restored to SCN 1550044</code></div>
<div class="line number93 index92 alt2"><code class="bash plain">skipping datafile 8; already restored to SCN 1550044</code></div>
<div class="line number94 index93 alt1"><code class="bash plain">skipping datafile 14; already restored to SCN 2112213</code></div>
<div class="line number95 index94 alt2"><code class="bash plain">channel ORA_DISK_1: starting incremental datafile backup </code><code class="bash functions">set</code> <code class="bash plain">restore</code></div>
<div class="line number96 index95 alt1"><code class="bash plain">channel ORA_DISK_1: using network backup </code><code class="bash functions">set</code> <code class="bash plain">from service CONT18c_SITE</code></div>
<div class="line number97 index96 alt2"><code class="bash plain">destination </code><code class="bash keyword">for</code> <code class="bash plain">restore of datafile 00001: </code><code class="bash plain">/u01/app/oracle/oradata/CONT18C/system01</code><code class="bash plain">.dbf</code></div>
<div class="line number98 index97 alt1"><code class="bash plain">channel ORA_DISK_1: restore complete, elapsed </code><code class="bash functions">time</code><code class="bash plain">: 00:00:35</code></div>
<div class="line number99 index98 alt2"><code class="bash plain">channel ORA_DISK_1: starting incremental datafile backup </code><code class="bash functions">set</code> <code class="bash plain">restore</code></div>
<div class="line number100 index99 alt1"><code class="bash plain">channel ORA_DISK_1: using network backup </code><code class="bash functions">set</code> <code class="bash plain">from service CONT18c_SITE</code></div>
<div class="line number101 index100 alt2"><code class="bash plain">destination </code><code class="bash keyword">for</code> <code class="bash plain">restore of datafile 00003: </code></div>
<div class="line number102 index101 alt1"><code class="bash plain">…</code></div>
<div class="line number103 index102 alt2"><code class="bash plain">…</code></div>
<div class="line number104 index103 alt1"><code class="bash plain">destination </code><code class="bash keyword">for</code> <code class="bash plain">restore of datafile 00012: </code><code class="bash plain">/u01/app/oracle/oradata/CONT18C/PDB1/users01</code><code class="bash plain">.dbf</code></div>
<div class="line number105 index104 alt2"><code class="bash plain">channel ORA_DISK_1: restore complete, elapsed </code><code class="bash functions">time</code><code class="bash plain">: 00:00:01</code></div>
<div class="line number106 index105 alt1"><code class="bash plain">channel ORA_DISK_1: starting incremental datafile backup </code><code class="bash functions">set</code> <code class="bash plain">restore</code></div>
<div class="line number107 index106 alt2"><code class="bash plain">channel ORA_DISK_1: using network backup </code><code class="bash functions">set</code> <code class="bash plain">from service CONT18c_SITE</code></div>
<div class="line number108 index107 alt1"><code class="bash plain">destination </code><code class="bash keyword">for</code> <code class="bash plain">restore of datafile 00013: </code><code class="bash plain">/u01/app/oracle/oradata/CONT18C/PDB1/tbs_nolog01</code><code class="bash plain">.dbf</code></div>
<div class="line number109 index108 alt2"><code class="bash plain">channel ORA_DISK_1: restore complete, elapsed </code><code class="bash functions">time</code><code class="bash plain">: 00:00:01</code></div>
<div class="line number110 index109 alt1"></div>
<div class="line number111 index110 alt2"><code class="bash plain">starting media recovery</code></div>
<div class="line number112 index111 alt1"></div>
<div class="line number113 index112 alt2"><code class="bash plain">media recovery complete, elapsed </code><code class="bash functions">time</code><code class="bash plain">: 00:00:00</code></div>
<div class="line number114 index113 alt1"><code class="bash plain">Finished recover at 15-AUG-18</code></div>
<div class="line number115 index114 alt2"><code class="bash plain">flashback needs to be reenabled on standby </code><code class="bash functions">open</code></div>
<div class="line number116 index115 alt1"><code class="bash plain">Finished recover at 15-AUG-18</code></div>
<div class="line number117 index116 alt2"></div>
<div class="line number118 index117 alt1"><code class="bash plain">RMAN&gt;</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>And we can verify that the configuration is now sync</p>
<div>
<div id="highlighter_225635" class="syntaxhighlighter  sql">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
<div class="line number2 index1 alt1">2</div>
<div class="line number3 index2 alt2">3</div>
<div class="line number4 index3 alt1">4</div>
<div class="line number5 index4 alt2">5</div>
<div class="line number6 index5 alt1">6</div>
<div class="line number7 index6 alt2">7</div>
<div class="line number8 index7 alt1">8</div>
<div class="line number9 index8 alt2">9</div>
<div class="line number10 index9 alt1">10</div>
<div class="line number11 index10 alt2">11</div>
<div class="line number12 index11 alt1">12</div>
<div class="line number13 index12 alt2">13</div>
<div class="line number14 index13 alt1">14</div>
<div class="line number15 index14 alt2">15</div>
<div class="line number16 index15 alt1">16</div>
<div class="line number17 index16 alt2">17</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="sql plain">DGMGRL&gt; edit </code><code class="sql keyword">database</code> <code class="sql string">'CONT18C_SITE1'</code> <code class="sql keyword">set</code> <code class="sql plain">state =</code><code class="sql string">'APPLY-ON'</code><code class="sql plain">;</code></div>
<div class="line number2 index1 alt1"><code class="sql plain">Succeeded.</code></div>
<div class="line number3 index2 alt2"><code class="sql plain">DGMGRL&gt; show configuration;</code></div>
<div class="line number4 index3 alt1"></div>
<div class="line number5 index4 alt2"><code class="sql plain">Configuration - CONT18C_DR</code></div>
<div class="line number6 index5 alt1"></div>
<div class="line number7 index6 alt2"><code class="sql spaces">  </code><code class="sql plain">Protection Mode: MaxPerformance</code></div>
<div class="line number8 index7 alt1"><code class="sql spaces">  </code><code class="sql plain">Members:</code></div>
<div class="line number9 index8 alt2"><code class="sql spaces">  </code><code class="sql plain">CONT18C_SITE  - </code><code class="sql keyword">Primary</code> <code class="sql keyword">database</code></div>
<div class="line number10 index9 alt1"><code class="sql spaces">    </code><code class="sql plain">CONT18C_SITE1 - Physical standby </code><code class="sql keyword">database</code></div>
<div class="line number11 index10 alt2"></div>
<div class="line number12 index11 alt1"><code class="sql plain">Fast-Start Failover: DISABLED</code></div>
<div class="line number13 index12 alt2"></div>
<div class="line number14 index13 alt1"><code class="sql plain">Configuration Status:</code></div>
<div class="line number15 index14 alt2"><code class="sql plain">SUCCESS   (status updated 37 seconds ago)</code></div>
<div class="line number16 index15 alt1"></div>
<div class="line number17 index16 alt2"><code class="sql plain">DGMGRL&gt;</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>After opening the standby on read only mode we can verify that everything is now fine</p>
<div>
<div id="highlighter_682010" class="syntaxhighlighter  sql">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gutter">
<div class="line number1 index0 alt2">1</div>
<div class="line number2 index1 alt1">2</div>
<div class="line number3 index2 alt2">3</div>
<div class="line number4 index3 alt1">4</div>
<div class="line number5 index4 alt2">5</div>
<div class="line number6 index5 alt1">6</div>
<div class="line number7 index6 alt2">7</div>
<div class="line number8 index7 alt1">8</div>
<div class="line number9 index8 alt2">9</div>
<div class="line number10 index9 alt1">10</div>
<div class="line number11 index10 alt2">11</div>
<div class="line number12 index11 alt1">12</div>
<div class="line number13 index12 alt2">13</div>
<div class="line number14 index13 alt1">14</div>
<div class="line number15 index14 alt2">15</div>
<div class="line number16 index15 alt1">16</div>
<div class="line number17 index16 alt2">17</div>
<div class="line number18 index17 alt1">18</div>
<div class="line number19 index18 alt2">19</div>
<div class="line number20 index19 alt1">20</div>
<div class="line number21 index20 alt2">21</div>
<div class="line number22 index21 alt1">22</div>
<div class="line number23 index22 alt2">23</div>
<div class="line number24 index23 alt1">24</div>
<div class="line number25 index24 alt2">25</div>
<div class="line number26 index25 alt1">26</div>
<div class="line number27 index26 alt2">27</div>
<div class="line number28 index27 alt1">28</div>
<div class="line number29 index28 alt2">29</div>
<div class="line number30 index29 alt1">30</div>
<div class="line number31 index30 alt2">31</div>
<div class="line number32 index31 alt1">32</div>
<div class="line number33 index32 alt2">33</div>
<div class="line number34 index33 alt1">34</div>
<div class="line number35 index34 alt2">35</div>
<div class="line number36 index35 alt1">36</div>
<div class="line number37 index36 alt2">37</div>
<div class="line number38 index37 alt1">38</div>
<div class="line number39 index38 alt2">39</div>
</td>
<td class="code">
<div class="container">
<div class="line number1 index0 alt2"><code class="sql plain">SQL&gt; </code><code class="sql keyword">alter</code> <code class="sql plain">session </code><code class="sql keyword">set</code> <code class="sql plain">container=pdb1;</code></div>
<div class="line number2 index1 alt1"></div>
<div class="line number3 index2 alt2"><code class="sql plain">Session altered.</code></div>
<div class="line number4 index3 alt1"></div>
<div class="line number5 index4 alt2"><code class="sql plain">SQL&gt; </code><code class="sql keyword">select</code> <code class="sql keyword">name</code> <code class="sql keyword">from</code> <code class="sql plain">v$tablespace;</code></div>
<div class="line number6 index5 alt1"></div>
<div class="line number7 index6 alt2"><code class="sql keyword">NAME</code></div>
<div class="line number8 index7 alt1"><code class="sql comments">------------------------------</code></div>
<div class="line number9 index8 alt2"><code class="sql plain">SYSTEM</code></div>
<div class="line number10 index9 alt1"><code class="sql plain">SYSAUX</code></div>
<div class="line number11 index10 alt2"><code class="sql plain">UNDOTBS1</code></div>
<div class="line number12 index11 alt1"><code class="sql keyword">TEMP</code></div>
<div class="line number13 index12 alt2"><code class="sql plain">USERS</code></div>
<div class="line number14 index13 alt1"><code class="sql plain">TBS_NOLOG</code></div>
<div class="line number15 index14 alt2"><code class="sql plain">TBS_2</code></div>
<div class="line number16 index15 alt1"></div>
<div class="line number17 index16 alt2"><code class="sql plain">7 </code><code class="sql keyword">rows</code> <code class="sql plain">selected.</code></div>
<div class="line number18 index17 alt1"></div>
<div class="line number19 index18 alt2"><code class="sql plain">SQL&gt; </code><code class="sql keyword">select</code> <code class="sql keyword">name</code> <code class="sql keyword">from</code> <code class="sql plain">v$datafile;</code></div>
<div class="line number20 index19 alt1"></div>
<div class="line number21 index20 alt2"><code class="sql keyword">NAME</code></div>
<div class="line number22 index21 alt1"><code class="sql comments">--------------------------------------------------------------------------------</code></div>
<div class="line number23 index22 alt2"><code class="sql plain">/u01/app/oracle/oradata/CONT18C/PDB1/system01.dbf</code></div>
<div class="line number24 index23 alt1"><code class="sql plain">/u01/app/oracle/oradata/CONT18C/PDB1/sysaux01.dbf</code></div>
<div class="line number25 index24 alt2"><code class="sql plain">/u01/app/oracle/oradata/CONT18C/PDB1/undotbs01.dbf</code></div>
<div class="line number26 index25 alt1"><code class="sql plain">/u01/app/oracle/oradata/CONT18C/PDB1/users01.dbf</code></div>
<div class="line number27 index26 alt2"><code class="sql plain">/u01/app/oracle/oradata/CONT18C/PDB1/tbs_nolog01.dbf</code></div>
<div class="line number28 index27 alt1"><code class="sql plain">/u01/app/oracle/oradata/CONT18C/PDB1/tbs_201.dbf</code></div>
<div class="line number29 index28 alt2"></div>
<div class="line number30 index29 alt1"><code class="sql plain">6 </code><code class="sql keyword">rows</code> <code class="sql plain">selected.</code></div>
<div class="line number31 index30 alt2"></div>
<div class="line number32 index31 alt1"><code class="sql plain">SQL&gt; </code><code class="sql keyword">select</code> <code class="sql plain">* </code><code class="sql keyword">from</code> <code class="sql plain">test;</code></div>
<div class="line number33 index32 alt2"></div>
<div class="line number34 index33 alt1"><code class="sql spaces">        </code><code class="sql plain">ID</code></div>
<div class="line number35 index34 alt2"><code class="sql comments">----------</code></div>
<div class="line number36 index35 alt1"><code class="sql spaces">         </code><code class="sql plain">1</code></div>
<div class="line number37 index36 alt2"><code class="sql spaces">         </code><code class="sql plain">2</code></div>
<div class="line number38 index37 alt1"></div>
<div class="line number39 index38 alt2"><code class="sql plain">SQL&gt;</code></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>L’article <a href="https://www.dbi-services.com/blog/oracle-18c-dataguard-rman-recover-standby-database/">Oracle 18c DataGuard : Rman RECOVER STANDBY DATABASE</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/oracle-18c-dataguard-rman-recover-standby-database/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>18c runInstaller -silent</title>
		<link>https://www.dbi-services.com/blog/18c-runinstaller-silent/</link>
					<comments>https://www.dbi-services.com/blog/18c-runinstaller-silent/#respond</comments>
		
		<dc:creator><![CDATA[Oracle Team]]></dc:creator>
		<pubDate>Sun, 12 Aug 2018 05:34:02 +0000</pubDate>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle 18c]]></category>
		<category><![CDATA[runInstaller]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/18c-runinstaller-silent/</guid>

					<description><![CDATA[<p>By Franck Pachot . You find two different &#8216;runInstaller&#8217; under an Oracle Home. The old one, the Oracle Universal Installer, in $ORACLE_HOME/oui/bin. And the new one, in $ORACLE_HOME directly. They have the same name but are completely different. The old one was used to install an Oracle Home from the installation media. But in 18c [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/18c-runinstaller-silent/">18c runInstaller -silent</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>By Franck Pachot</h2>
<p>.<br />
You find two different &#8216;runInstaller&#8217; under an Oracle Home. The old one, the Oracle Universal Installer, in $ORACLE_HOME/oui/bin. And the new one, in $ORACLE_HOME directly. They have the same name but are completely different. The old one was used to install an Oracle Home from the installation media. But in 18c you don&#8217;t use it. It has been used by Oracle to build the Oracle Home image. Then you download and unzip directly your Oracle Home. You have only to configure it and re-link the binaries. And this is done by the new runInstaller which is at the root of the Oracle Home. Actually, it is just a shell script that runs the Perl dbSetup.pl to setup the Oracle Database software. In my opinion, it would be better to have it called dbSetup.sh rather than rename it  to runInstaller, especially given that the same thing for Grid Infrastructure is called GridSetup.sh since 12cR2. The Perl script finally runs the Java GUI. It can also be run in command line, aka silent mode, which is the goal of this post. The command line arguments are similar, but not the same as in the old runInstaller.<br />
<span id="more-11535"></span></p>
<h3>Prerequisites</h3>
<p>You may want to run the prerequisites only to check if your system is ready for the installation. Here is how to do so in command line:</p>
<pre><code>
$ $ORACLE_HOME/runInstaller -silent -executePrereqs -responseFile $ORACLE_HOME/inventory/response/db_install.rsp
&nbsp;
Launching Oracle Database Setup Wizard...
&nbsp;
[FATAL] [INS-13013] Target environment does not meet some mandatory requirements.
   CAUSE: Some of the mandatory prerequisites are not met. See logs for details. /u00/app/oraInventory/logs/InstallActions2018-08-11_06-07-14PM/installActions2018-08-11_06-07-14PM.log
   ACTION: Identify the list of failed prerequisite checks from the log: /u00/app/oraInventory/logs/InstallActions2018-08-11_06-07-14PM/installActions2018-08-11_06-07-14PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
</code></pre>
<p>From there we can check the log about the tests that have failed, such as in the following example:</p>
<pre><code>
INFO:  [Aug 11, 2018 6:08:21 PM] Physical Memory: This is a prerequisite condition to test whether the system has at least 8GB (8388608.0KB) of total physical memory.
INFO:  [Aug 11, 2018 6:08:21 PM] Severity:IGNORABLE
INFO:  [Aug 11, 2018 6:08:21 PM] OverallStatus:VERIFICATION_FAILED
INFO:  [Aug 11, 2018 6:08:21 PM] *********************************************
INFO:  [Aug 11, 2018 6:08:21 PM] Run Level: This is a prerequisite condition to test whether the system is running with proper run level.
INFO:  [Aug 11, 2018 6:08:21 PM] Severity:CRITICAL
INFO:  [Aug 11, 2018 6:08:21 PM] OverallStatus:VERIFICATION_FAILED
INFO:  [Aug 11, 2018 6:08:21 PM] *********************************************
INFO:  [Aug 11, 2018 6:08:21 PM] OS Kernel Version: This is a prerequisite condition to test whether the system kernel version is at least "2.6.39-400.211.1".
INFO:  [Aug 11, 2018 6:08:21 PM] Severity:CRITICAL
INFO:  [Aug 11, 2018 6:08:21 PM] OverallStatus:VERIFICATION_FAILED
</code></pre>
<h3>Software Install</h3>
<p>You can pass all parameters in command line (&#8216;runInstaller -silent -help&#8217; to see all possibilities), but in all cases you need a response file. Then I put everything I need in the response file. There&#8217;s no mention of the ORACLE_HOME because you already unzipped it at the right place. The most important is the edition which seems to accept [EE, SEONE, SE2, HP, XP, PE]. I didn&#8217;t try it but Standard Edition One is for versions &lt;= 12.1.0.1 by the way.</p>
<pre><code>
cd $ORACLE_HOME
&nbsp;
cat &gt; db18EE.rsp &lt;&lt;END
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v18.0.0
oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u00/app/oraInventory
ORACLE_BASE=/u00/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.OSDBA_GROUP=dba
oracle.install.db.OSOPER_GROUP=oper
oracle.install.db.OSBACKUPDBA_GROUP=backupdba
oracle.install.db.OSDGDBA_GROUP=dgdba
oracle.install.db.OSKMDBA_GROUP=kmdba
oracle.install.db.OSRACDBA_GROUP=dba
END
</code></pre>
<p>There is no need for the oracle.install.db.config variables because I&#8217;ll install the software only without creating a database.</p>
<p>Here is how to run the dbSetup. You can use &#8216;-ignorePrereqFailure&#8217; to ignore the prerequisites if you want to install to a host where some prerequisites fail:</p>
<pre><code>
./runInstaller -silent -noconfig -ignorePrereqFailure -responseFile ./db18EE.rsp
</code></pre>
<p>&nbsp;<br />
The log of the installation goes into the oraInventory/logs and, as usual, you have to run the root.sh </p>
<pre><code>
As a root user, execute the following script(s):
        1. /u00/app/oracle/product/18SE/root.sh
&nbsp;
Execute /u00/app/oracle/product/18SE/root.sh on the following nodes:
[vmreforatun01]
</code></pre>
<p>This new runInstaller can also apply one-off patches with -applyOneOffs mentioning the patch locations. You can also build an Oracle Home image that you customize, with -createGoldImage -destinationLocation and even mention some files or path to exclude to make it smaller: -exclFiles</p>
<p>L’article <a href="https://www.dbi-services.com/blog/18c-runinstaller-silent/">18c runInstaller -silent</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/18c-runinstaller-silent/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Lazy Loading (feed)

Served from: www.dbi-services.com @ 2026-10-17 15:22:26 by W3 Total Cache
-->