You can enable the database agent to start automatically whenever the machine starts up. To do so, create an initialization script for starting the agent.
Create an initialization script that starts the agent, as in the sample initialization script that is an attachment to this page.
In your script, set the JAVA and AGENT_HOME values to the paths for your system. Also configure agent options and heap size, as needed.
Enable execution permissions for the script. For example, given an initialization script named db-agent, enter:
sudo chmod 775 db-agent
Place the script in the initialization directory on your system, typically /etc/init.d. Alternatively, create a symbolic link to the script from the init.d directory to the script if you want to keep it in another location.
Add the script as a service as follows:
On Red Hat and most Linux Operating Systems, run these commands, replacing db-agent with the name of your file or symbolic link:
chkconfig --add db-agent chkconfig --level 2345 db-agent on
On Ubuntu and Debian Operating Systems, run this command, replacing db-agent with the name of your file or symbolic link:
update-rc.d -f db-agent start 99 2 3 4 5 .
In the command:
The Database Agent now starts automatically upon machine startup. When setting the agent to automatically start up using Task Scheduler when the machine starts or restarts, ensure the agent runs with the highest privileges available.