We're here to help!

CSD getting stuck - Oracle 12c

Follow

Description

The CSD gets stuck during creation of service using oradim utility, we have found similar issues specific to Oracle 12c home owner changes that was introduced. When the oradim utility is run, it is waiting on a password - reason why it hangs.

A couple of notes and explanation behind this:

When installing Oracle 12c you have the option to do the following at software installation time:

1.1 Using an Exisiting Windows User
1.2 Create a new Windows User (Which will not have user login permission)
1.3 Use Windows Built-in Account

The recommended option for now would have been to use the 1.1 option which is to make use of an existing user that does have login permission.

Dbvisit Standby can be installed as a different user, but the key is that the user has the required ORA_DBA permission and in 12c specific the permission ORA_DBA for the specific Oracle Home.

The Dbvserver and Dbvnet services does require login permission and this would be why they will not be able to start if you use a restrictive account that does not have this permission.

If you are using the 1.2 option where you have created restrictive accounts during installation for the Oracle Home User then it is still possible to use Dbvisit Standby, but there are a few areas that will require attention and we will try and list them here:

  • So let's assume Oracle is installed as a Domain Administrator with local admin etc, but during installation option 1.2 was selected and a restrictive account without login permission was created for the Oracle Home User and Service.
  • Dbvisit Standby is installed on both primary and standby servers under a Domain Account with login permission as well as are in the ORA_DBA, ORA_ASMDBA group
  • The Dbvserver and Dbvnet services should start and run fine (make sure the required ports - 8081 (dbvserver) and 7890 (dbvnet) is open on both systems)
  • If the Oracle Home User is example called "oracle" then make sure that the temporary folders and ARCHDEST used by Dbvisit Standby allow FULL Read/write permission to this account. Example folders would be: C:\Temp (Which might be the location on both systems you will be using as temporary space to place backups etc - this is used during the Create Standby Database (CSD) process to store backups of the database) the other important folder that must allow this "oracle" account full permission is DBVISIT_BASE/standby/tmp Example this folder would be by default C:\Program Files (x86)\dbvisit\standby\tmp. The reason for these folders to have permission for this "oracle" user is to allow for RMAN to be able to create/restore backups from these folders without getting "Permission denied" issues. The Dbvisit Standby ARCHDEST is where we will copy the archive logs to on the standby server and from where they will be applied. It is important to make sure this directory exist on both primary and standby and that it has full read/write permission for the user running Dbvisit Standby as well as the Oracle Home User. Also make sure that the audit dump destination etc has permission for the "oracle" user.

IMPORTANT
Then one of the key changes with this new kind of "role separation" is that when you want to create a new OracleService for the standby database (which is done as part of the Create Standby Database (CSD) process) and this is where I suspect the CSD process is hanging - it will ask you for the password for the service.


Example
C:\Program Files (x86)\Dbvisit\Standby>
C:\Program Files (x86)\Dbvisit\Standby>oradim -new -sid devdb -startmode m
Enter password for Oracle service user:
Instance created.

C:\Program Files (x86)\Dbvisit\Standby>
C:\Program Files (x86)\Dbvisit\Standby>oradim -new -sid devdb2 -startmode m -runas oracle/XYZ
Instance created.

C:\Program Files (x86)\Dbvisit\Standby>

As you can see above you can add the -runas command to supply the user and password for the service.
Interesting it asks for password to create, but does not ask for one when removing it:

C:\Program Files (x86)\Dbvisit\Standby>oradim -delete -sid devdb
Instance deleted.

C:\Program Files (x86)\Dbvisit\Standby>oradim -delete -sid devdb2
Instance deleted.

Now the problem with the current Dbvisit Standby is that, the oradim utility is executed as part of the CSD process when the standby database is created. But with the new Oracle Home User for the service, a password is asked and this is where the CSD process will hang as in previous versions of Oracle, or where a specific Oracle Home User was not used, no password was asked. We will review this and this will require code changes to allow for this.

The work-around for this is that prior to starting the CSD process is to manually create this service using the oradim command and then supply the password for the Oracle Home User so that the service is created with the correct user (permissions). Once this is done, you can start the CSD process and it should now not get stuck at this place as it will see the service is already created and will use it - not recreate it.


Summary

As long as the service on the standby server is created with the correct Oracle Home User account and password, and the temporary directories used by Dbvisit Standby allows full permission to this user for read/write of files (on both primary and standby servers), and that Dbvisit Standby in this case run as a separate user with the required windows DBA groups assigned to allow for it to perform the required tasks

To get past the current point where it is hanging, we would suggest you pre-create the windows service (OracleService) manually using oradim (see examples above) on the standby server and then restart the CSD process.

 

Have more questions? Submit a request

Comments