Home » RDBMS Server » Backup & Recovery » User managed backup fails with OSD-04002 (Oracle 19c, Window Server 2016)
User managed backup fails with OSD-04002 [message #684998] Wed, 06 October 2021 04:33 Go to next message
new_to_oracle
Messages: 4
Registered: October 2021
Junior Member
I am trying to remotely create a user managed backup of a pluggable database, for which I need to close the database.

After trying to input command(both in script and manually):

alter pluggable database PDB_NAME close immediate instances=all;

I get the following error:

ERROR at line 1:
ORA-01116: error in opening database file 9
ORA-01110: data file 9:
'D:\ORACLE19C\ORADATA\ORACLE19C\IMC_SLSP_DEV_VFA2\UNDOTBS01.DBF'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 5) Access is denied.

This happens both when I try to close the pdb remotely and locally BUT only happens after some time of running the pdb, such as a day, so I suspect the issue only comes up after database server restart. So when I create a new pdb, I can alter the database as necessary until(I believe) server restart(and with it oracle services restart).

Could it be caused by user that starts oracle services not having the correct access rights? Services are NOT started by the system user, how can I find the rights for the user starting the services? Which rights does he need to have and are they assigned at the level of oracle or the system itself?
Re: User managed backup fails with OSD-04002 [message #684999 is a reply to message #684998] Wed, 06 October 2021 06:05 Go to previous messageGo to next message
John Watson
Messages: 8640
Registered: January 2010
Location: Global Village
Senior Member
Welcome to the forum.
Please read the OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.

You may well be hitting issues caused by Windows security. Are the services running under local accounts or domain accounts? Are the files owned by a local or a domain user? Is this drive D: a local device or something exported from a remote machine?
Re: User managed backup fails with OSD-04002 [message #685043 is a reply to message #684999] Wed, 13 October 2021 03:45 Go to previous messageGo to next message
new_to_oracle
Messages: 4
Registered: October 2021
Junior Member
Hello, sorry for the delayed response, but our IT admin was(and still is) on vacation.

To answer your questions the services run under domain user, I cannot verify who owns the files of the pdb or who has administrative rights to them, as only the IT admin has rights to access that information. The disk D is a local disk. Could the issue be caused by the domain user who launches the oracle services not having administrative rights to the files of the pdb?

As a side note, is there a way to edit my post so that I can fix the code tags?
Re: User managed backup fails with OSD-04002 [message #685045 is a reply to message #685043] Wed, 13 October 2021 05:51 Go to previous messageGo to next message
John Watson
Messages: 8640
Registered: January 2010
Location: Global Village
Senior Member
Quote:
I cannot verify who owns the files of the pdb
Are you saying that you cannot run
dir /q D:\ORACLE19C\ORADATA\ORACLE19C\IMC_SLSP_DEV_VFA2\UNDOTBS01.DBF
to show the owner?
Re: User managed backup fails with OSD-04002 [message #685046 is a reply to message #685045] Wed, 13 October 2021 06:15 Go to previous messageGo to next message
new_to_oracle
Messages: 4
Registered: October 2021
Junior Member
When running it on that specific database, the owner returned with the command is ..., which I found out means there is no set owner. Note, this a testing database created for the purpose of testing backing it up.
Running the same command on actual, running databases returns owner as BUILTIN/Administrators. I do not know if the same issue persists on those databases, as they are currently all in use.

I also just tried to create another testing database and the owner of those files is BUILTIN/Administrators. Running the backup script on it changes nothing, so it's not the script that would remove the owner from it, same for my restore script. The newly created database seems to have no ownership issues at all(which was the same for the last one).

I have originally tried to find out the owner through properties of the files and in that case, access was refused, sorry for the confusion.
Re: User managed backup fails with OSD-04002 [message #685048 is a reply to message #685046] Thu, 14 October 2021 01:47 Go to previous messageGo to next message
John Watson
Messages: 8640
Registered: January 2010
Location: Global Village
Senior Member
I would do everything as a local Administrator. And change the services to run under the local System account. I am aware that some Windows SAs consider this to be bad policy, but if it works, well, if they don't like it you can pass the problem back to them
Re: User managed backup fails with OSD-04002 [message #685049 is a reply to message #685048] Thu, 14 October 2021 01:54 Go to previous message
new_to_oracle
Messages: 4
Registered: October 2021
Junior Member
Yeah, I expected that might be the answer, thank you for the help, hopefully the problem will not persist after that.
Previous Topic: How to restore Oracle after reinstalling Windows Server
Next Topic: Job RMAN_LEVEL1_S3.PROD failed.
Goto Forum:
  


Current Time: Sun Nov 28 12:48:27 CST 2021