Are you running the cmd session 'as administrator'?
You should, when running oradim.
No, I'm not. I'm trying to upgrade a script that was written for Oracle 11g and in that case I didn't need to run it "as administrator". Is this a requirement for latest Oracle versions?
Edit: I tried to run the oradim command from a command window with elevated privileges as you suggested, but the behavior remains the same. The command apparently performs everything that it should but doesn't return control to the prompt and doesn't log any errors.
Here's a piece of documentation:
ORADIM creates Oracle Database service, Oracle VSS Writer service, and Oracle Scheduler service to run under the Oracle Home User account.
Oracle Home User is the standard Windows User Account (not an Administrator), specified during installation, that runs most of the Windows services required by Oracle for Oracle home.
Oracle does support, even recommend the use of Windows Virtual accounts:
Here's the next one:
When you use ORADIM, a log file called
\database, or in the directory specified by registry parameter
ORA_CWD. All operations, whether successful or failed, are logged in this file.
What clues exist?
Thanks, but I had already read all the documentation you refer to.
As expected from the documentation, the Oracle Vss service is created using a Windows Virtual Account (NT SERVICE\OracleVssWriterXXXX), but based on the Windows Event log this user doesn't seem to have sufficient access rights to run the service.
Unfortunately in the oradim.log file I found no clue on the reason of the failure, the file exists in the default location but there aren't any logs related to the oradim -new command.
So you're typing "oradim -new"? What happens when you just type "oradim"?
Typing "oradim" returns me the command help.
Typing "oradim -new -sid XXXX -startmode manual" doesn't generate any output on the command window and, as described above, doesn't return control.
But if I force the command to stop with Ctrl+C, everything seems in place except for the Oracle Vss service that can't be started with the virtual user.
My main issue is that, being the oradim command part of a script needed to set up a database, it can't get to the end of the execution and gets stuck on the oradim call. After "killing" the oradim command I can manually run all the following commands in the script successfully, but this isn't obviously ok for installation of production systems.
Was there a previous failed attempt that left any zombies around? Have you tried restarting the server?
1 person found this helpful
Have you tried to change the log on account of OracleVssWriter<SID> from virtual account to Local System account?
Thanks for your suggestions. Here are the answers to your questions.
There were no previous attempts, I'm installing on virtual machines and I performed all my installation tests with clean VMs precisely to avoid issues relate to existing installations.
The service can't be started, when I try it fails with the same event error that was logged when launching the oradim command and that is reported in my original question.
I didn't try to change the log on account for the service, my issue is that I need a way to have the oradim command working inside an installation script and since the service is created by the command itself with the virtual user, changing the user is not possible during script execution. It can probably be used as a workaround to have the service running post-installation.
Oradim is probably the victim and not the culprit and this isn't a problem that Oracle can fix, but MS needs to address.
Well, it's MS Windows. What updates are installed?
Are you running any Antivirus/Security software that might prevent access ot the Windows Registry when the virtual account was created?
I'm working on a clean image of Windows Server 2016 LTSC (1607) with no installed updates.
I'm running an Antivirus software (TrendMicro) but the issue seems strictly related to the privileges of the user associated with Oracle Vss Writer.
I think you are right that the root cause is an issue related to the MS service, but probably this is not managed in the optimal way by oradim implementation.
Today I was able to confirm that the reason for the oradim command "freezing" is the failure in Oracle Vss Writer service start: after running oradim command, as soon as the service had been created, I modified its Log On user and then started the service. As soon as the service starts, the oradim command returns.
Thus, I think I'll modify my script to use this workaround and force the start of the Oracle Vss Service by modifying the associated user, although I'm aware this is not the cleanest solution.
Thanks again for your help.