Home » Infrastructure » Windows » Archiving to a shared directory (DB 12.1.0.2, Windows 2012 R2)
Archiving to a shared directory [message #670926] Fri, 03 August 2018 05:29 Go to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
This is a 2 node RAC, running on Windows server 2012. I need to configure archiving from both nodes to go to a shared device. A file system, not an ASM disc group.
We tried a normal Windows share. That doesn't work, I think because the database is running as a service and it has no permissions on a mapped drive: it can't even see it. So we tried NFS. Win2012 does come with an NFS server and client, but that doesn't work either. This article
https://social.technet.microsoft.com/Forums/windowsserver/en-US/44445dc3-0185-407f-b8ad-711f22cd4ec6/windows-nfs-client-reconnect-to- nfs-target-on-reboot?forum=winserverfiles
describes the problem, and at the very bottom suggests a solution:
Quote:
Create a batch file which maps the drives and scheduled it to run at Windows
start up in NTAUTHORITY\SYSTEM context. Drives mapped in SYSTEM context are visible
in all logon sessions.
I can't really try this, not without multiple reboots of a production system.

Does anyone have a recommendation for this: archiving to a shared directory in a Windows environment?

Thank you for any insight.
Re: Archiving to a shared directory [message #670944 is a reply to message #670926] Mon, 06 August 2018 09:30 Go to previous messageGo to next message
JPBoileau
Messages: 88
Registered: September 2017
Member
I'm not a fan of using network drives for Oracle storage, as they seem to disconnect on a whim.

That being said, there are a few ways to do it:

1) Create script (batch file) that will map the drive, and drop that batch file in the \ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp directory. This will run at start-up and map your drive.

2) Map the drive for all users. link.http://nerdynerdnerdz.com/3202/windows-server-20082012-map-network-drive-for-all-users/

If your issue is a space issue, you may consider putting the archive log in ASM and running a batch to move the archive log at a scheduled interval, using a given username that can map the drive itself.

JP
Re: Archiving to a shared directory [message #670946 is a reply to message #670944] Mon, 06 August 2018 09:58 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
Thank you, JP, I'll try the first solution.

FYI, the issue is not space, it is hassles getting all redo to a common location and on to a manually managed standby where it can be applied.
Re: Archiving to a shared directory [message #670947 is a reply to message #670946] Mon, 06 August 2018 10:05 Go to previous messageGo to next message
JPBoileau
Messages: 88
Registered: September 2017
Member
ASM's asmcmd cp command can copy any file from one server to another for you.

ASMCMD [+] > cp +data/orcl/datafile/EXAMPLE.265.691577295
             sys@server.asminstance:/scratch/file
copying +data/orcl/datafile/EXAMPLE.265.691577295 ->
                  /scratch/file

RMAN can do the same, too, probably even in a cleaner way.

I'll guess that you're not paying for Data Guard?

JP
Re: Archiving to a shared directory [message #670948 is a reply to message #670947] Mon, 06 August 2018 10:32 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
All has to be done with scripts. Welcome to Standard Edition.....
Re: Archiving to a shared directory [message #670949 is a reply to message #670946] Mon, 06 August 2018 12:04 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

To "manage a standby database with Oracle XE and without DataGuard" I remind you Stephane video.

Re: Archiving to a shared directory [message #671083 is a reply to message #670944] Wed, 15 August 2018 04:50 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
JPBoileau wrote on Mon, 06 August 2018 15:30
I'm not a fan of using network drives for Oracle storage, as they seem to disconnect on a whim.

That being said, there are a few ways to do it:

1) Create script (batch file) that will map the drive, and drop that batch file in the \ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp directory. This will run at start-up and map your drive.

2) Map the drive for all users. link.http://nerdynerdnerdz.com/3202/windows-server-20082012-map-network-drive-for-all-users/

If your issue is a space issue, you may consider putting the archive log in ASM and running a batch to move the archive log at a scheduled interval, using a given username that can map the drive itself.

JP
Thanks, JP, but it doesn't work for me. Using (1), the drive does get mapped on boot up, but Oracle can't see it. Any attempt to use it gives
ORA-19504: failed to create file "S:\CF.BSET"
ORA-27040: file create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.
or similar. I tried (2), but that seems to require a domain controller or something, not just a local user.

Help! Surely there must be a way to let Oracle see a Windows share? Or is a clustered file system the only way?
Re: Archiving to a shared directory [message #671106 is a reply to message #671083] Wed, 15 August 2018 10:58 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Why Oracle? Why not a specific user allowed to pull/push the archived logs from/to the target server?

Re: Archiving to a shared directory [message #671110 is a reply to message #671106] Wed, 15 August 2018 11:12 Go to previous message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
Thanks for replying. It has to be the database instance because I need to archive to it.

The problem is that I have only one shared device: a single ASM diskgroup. So I'm archiving to local, non-shared, destinations. This screws up the scripts I run on each node, because RMAN doesn't realize which archives are on which machine. Typically, the problem is when a node is rebooted. The surviving node will archive the current log from the failed thread to its local device, and then when RMAN does the BACKUP, CROSSCHECK, and DELETE EXPIRED commands in my scripts they mess up the repository because the archive is on the "wrong" machine.

Previous Topic: Create Directory Oracle 9i
Next Topic: How do I pass in double quotation argument from dos to rman?
Goto Forum:
  


Current Time: Thu Mar 28 17:26:13 CDT 2024