How to start the Sun One Directory Server on startup if the service fails to register on Windows Server 2008
search cancel

How to start the Sun One Directory Server on startup if the service fails to register on Windows Server 2008


Article ID: 166482


Updated On:




As per the release notes of all versions of PolicyCenter since PolicyCenter was released with version 7 of the Sun One Directory Server, under some circumstances the service may fail to register correctly, and may therefore fail to start with the other PolicyCenter services at system boot time.


A realiable method to ensure that the process is started when the server boots is to use the Windows Task Scheduler.

The process is as follows:
Create a batch file which starts the service, containing lines analogous to the following:
cd \program files\sun\\dsee_zip_distribution\sun-dsee7\dsee7
bin\dsadm start dsinst
Save this file as “startds.bat” in a directory you have set aside, and in the drop-down of the Save As dialogue, ensure that “All Files” is selected.
To confirm this file is working, you may like to ensure that the directory service is stopped, and at a cmd, from the path in the above batch file, we can run “bin\dsadm stop dsinst” to stop it, and then “bin\dsadm info dsinst” for confirmation, then use the batch file to start your directory service and confirm again with “bin\dsadm info dsinst”.
Bring up the Task Scheduler and create an “on startup” event driven task.
Click Start Type “Task” and choose Task Scheduler
Click “Create Basic Task” in the menu on the right
Enter a name for your task, and click Next
Choose “When the computer starts” from the menu, and click Next
Choose “Start a program” and click Next
Click Browse, and locate your batch file, and click next
Click Finish
In the "Active Tasks" section at the bottom of this page, locate your newly created task
Double-click your task, which will locate it in the Task Scheduler library, and list the task at the top of the Task Scheduler window
Right-Click the task and choose Properties
At the bottom of this pane in the security options section, change the radio button from "Run only when user is logged on" to "Run whether user is logged on or not", you may prefer to choose a service account for this, so that any password changes do not affect the running of this scheduled task.