Home » RDBMS Server » Backup & Recovery » Disaster recovery from SAN (Oracle 12c)
Disaster recovery from SAN [message #663812] Wed, 21 June 2017 01:35 Go to next message
greencurry
Messages: 13
Registered: June 2017
Junior Member
Hi all,

I have a question on switching to a DR server.

I have a production server (PROD) running Windows 2012 with Oracle 12c installed. The DB_CREATE_FILE_DEST and DB_RECOVERY_FILE_DEST are set to a Storage Area Network (D:\u01\oracle\oradata) and (E:\u01\oracle\fast_recovery_area) respectively.

Then I clone this setup to a standby server (STANDBY) and shut down all oracle database services.

After PROD server has been running for a few hours, I shut down all oracle database services, disconnect the mapped drives on SAN.

Then, on the STANDBY server, I start all oracle database services and map corresponding drives on SAN.

I tried:

$ : sqlplus / as sysdba
SQL> show parameter control_files;

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string D:\U01\ORADATA\DBTEST\CONTROLF
ILE\O1_MF_DGOXT93C_.CTL, E:\U0
2\FAST_RECOVERY_AREA\DBTEST\CO
NTROLFILE\O1_MF_DGOXT94H_.CTL


SQL> host rman target /

Recovery Manager: Release 12.1.0.2.0 - Production on Wed Jun 21 14:28:10 2017

Copyright (c) 1982, 2015, Oracle and/or its affiliates. All rights reserved.

connected to target database: DBTEST (not mounted)


RMAN> SET DBID=3845233333;

executing command: SET DBID

RMAN> alter database mount;

using target database control file instead of recovery catalog
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of sql statement command at 06/21/2017 14:30:33
ORA-00205: error in identifying controlfile


From the alert log, it reads:

ORA-00210: cannot open the specified control file
ORA-00202: control file: 'E:\U02\FAST_RECOVERY_AREA\DBTEST\CONTROLFILE\O1_MF_DGOXT94H_.CTL'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 5) Access is denied.
ORA-00210: cannot open the specified control file
ORA-00202: control file: 'D:\U01\ORADATA\DBTEST\CONTROLFILE\O1_MF_DGOXT93C_.CTL'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 5) Access is denied.



Please help.
Re: Disaster recovery from SAN [message #663815 is a reply to message #663812] Wed, 21 June 2017 01:44 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Check that:

Quote:
OSD-04002: unable to open file
O/S-Error: (OS 5) Access is denied.
Re: Disaster recovery from SAN [message #663816 is a reply to message #663815] Wed, 21 June 2017 01:47 Go to previous messageGo to next message
greencurry
Messages: 13
Registered: June 2017
Junior Member
Hi Michel,

I notice that. I could open the control files from a text editor though.

Are you suggesting that it's not accessible by the database? How can I check such access rights?


Green
Re: Disaster recovery from SAN [message #663818 is a reply to message #663816] Wed, 21 June 2017 02:00 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
I could open the control files from a text editor though.
With the oracle i,stance owner? Note this is most like SYSTEM which starts the instance, have a look at who starts the instance service.

Forgot the moderator bit:
Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.


Re: Disaster recovery from SAN [message #663820 is a reply to message #663818] Wed, 21 June 2017 02:07 Go to previous messageGo to next message
greencurry
Messages: 13
Registered: June 2017
Junior Member
Checked all oracle services on both servers, all are 'log on' by oracle instance.

OS-wise, I consider both servers are identical as the STANDBY is a direct clone of the PROD.

If I shutdown all services on STANDBY, disconnect the SAN drives, and on PROD, mount the SAN drives and start all services, the database runs well.

[Updated on: Wed, 21 June 2017 02:16]

Report message to a moderator

Re: Disaster recovery from SAN [message #663821 is a reply to message #663820] Wed, 21 June 2017 02:13 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
there is only one user, Administrator

This is not correct, there is at least also a SYSTEM Windows user.
ORA_ASMDBA is irrelevant as you do not use ASM (at least for these files).
Check what I said: the instance service.

Re: Disaster recovery from SAN [message #663824 is a reply to message #663821] Wed, 21 June 2017 02:29 Go to previous messageGo to next message
greencurry
Messages: 13
Registered: June 2017
Junior Member
On both servers, it's the 'Administrator' who logs on and does all the above-mentioned work.
Re: Disaster recovery from SAN [message #663825 is a reply to message #663824] Wed, 21 June 2017 02:58 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Who logs on is irrelevant here, who starts the service is the one, check your Oracle services.

Re: Disaster recovery from SAN [message #663826 is a reply to message #663825] Wed, 21 June 2017 03:09 Go to previous messageGo to next message
greencurry
Messages: 13
Registered: June 2017
Junior Member
All services are started by user 'oracle' on both servers.
Re: Disaster recovery from SAN [message #663827 is a reply to message #663824] Wed, 21 June 2017 03:15 Go to previous messageGo to next message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
Whichever user starts the Oracle Windows service on the standby server must have permissions on the SAN share. Remember: share permissions and file system permissions are two separate things.
Re: Disaster recovery from SAN [message #663828 is a reply to message #663826] Wed, 21 June 2017 03:16 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

1/ Post an image proving this
2/ Is "oracle" user able to read and write the control file and its directory? Tell how you checked this, opening it in an editor does not prove this.

Re: Disaster recovery from SAN [message #663832 is a reply to message #663828] Wed, 21 June 2017 03:45 Go to previous messageGo to next message
greencurry
Messages: 13
Registered: June 2017
Junior Member
Hi gazzag, Michel,

STANDBY server is a clone of PROD server after the SAN share is created. The access rights on the SAN should be identical on both servers.

How can I check if user 'oracle' on STANDBY server has access rights on SAN?

[Updated on: Wed, 21 June 2017 03:52]

Report message to a moderator

Re: Disaster recovery from SAN [message #663833 is a reply to message #663828] Wed, 21 June 2017 03:48 Go to previous messageGo to next message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
Michel Cadot wrote on Wed, 21 June 2017 09:16

1/ Post an image proving this
Re: Disaster recovery from SAN [message #663834 is a reply to message #663833] Wed, 21 June 2017 03:55 Go to previous messageGo to next message
greencurry
Messages: 13
Registered: June 2017
Junior Member
/forum/fa/13558/0/

[Updated on: Wed, 21 June 2017 04:06]

Report message to a moderator

Re: Disaster recovery from SAN [message #663836 is a reply to message #663834] Wed, 21 June 2017 04:23 Go to previous messageGo to next message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
That looks like you have a local "oracle" user on PROD. Why is this? Why not user SYSTEM, as Michel stated? This is not Unix. That PROD\oracle user will need read/write to the SYSTEM\NAS_Share.
Re: Disaster recovery from SAN [message #663838 is a reply to message #663836] Wed, 21 June 2017 04:33 Go to previous messageGo to next message
greencurry
Messages: 13
Registered: June 2017
Junior Member
This 'oracle' user was created during the 12c installation, and it belongs to the Administrator group on both servers.

I don't specifically assign full access rights for 'oracle' user, as it's already granted to Administrator group. Access right settings for SAN are identical on both servers and it's mysterious the STANDBY server does not work.


/forum/fa/13559/0/

[Updated on: Wed, 21 June 2017 04:35]

Report message to a moderator

Re: Disaster recovery from SAN [message #663839 is a reply to message #663836] Wed, 21 June 2017 04:50 Go to previous messageGo to next message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
gazzag wrote on Wed, 21 June 2017 10:23
That PROD\oracle user will need read/write to the SYSTEM\NAS_Share.
Re: Disaster recovery from SAN [message #663860 is a reply to message #663838] Wed, 21 June 2017 08:30 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Oracle home owner should NOT be the account that starts the instance.
Do you then realize that you give any PL/SQL code, which run with this account, the rights to modify your Oracle data and files and then destroy this database and this server and, if it has domain privileges, remote ones?
In short, this is a way to be hacked.

Re: Disaster recovery from SAN [message #663867 is a reply to message #663860] Wed, 21 June 2017 20:24 Go to previous messageGo to next message
greencurry
Messages: 13
Registered: June 2017
Junior Member
The services are automatically started by that PROD\oracle user after the database is created. I did not explicitly run the services by PROD\oracle.

Michel Cadot wrote on Wed, 21 June 2017 21:30

Oracle home owner should NOT be the account that starts the instance.
Do you then realize that you give any PL/SQL code, which run with this account, the rights to modify your Oracle data and files and then destroy this database and this server and, if it has domain privileges, remote ones?
In short, this is a way to be hacked.

Re: Disaster recovery from SAN [message #663868 is a reply to message #663839] Wed, 21 June 2017 21:08 Go to previous messageGo to next message
greencurry
Messages: 13
Registered: June 2017
Junior Member
STANDBY\oracle user is granted read/white to the SAN, but the alert log still shows:
ORA-00210: cannot open the specified control file
ORA-00202: control file: 'D:\U01\ORADATA\<SID>\CONTROLFILE\O1_MF_DGOXT93C_.CTL'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 5) Access is denied.


gazzag wrote on Wed, 21 June 2017 17:50
gazzag wrote on Wed, 21 June 2017 10:23
That PROD\oracle user will need read/write to the SYSTEM\NAS_Share.
Re: Disaster recovery from SAN [message #663869 is a reply to message #663868] Wed, 21 June 2017 22:54 Go to previous messageGo to next message
greencurry
Messages: 13
Registered: June 2017
Junior Member
The problem is resolved.

Start the instances by a Windows system user, instead of 'oracle' user.

Thanks, Michel and gazzag!
Re: Disaster recovery from SAN [message #663872 is a reply to message #663869] Thu, 22 June 2017 03:28 Go to previous message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
Thanks for the feedback Smile
Previous Topic: Tablespace point in time recovery
Next Topic: ORA-00280
Goto Forum:
  


Current Time: Thu Mar 28 20:38:51 CDT 2024