You can surely automate these tasks to come up when the system comes up.You will need to write a shell script and put all the commands and test it to doulbe check weather it is performing the task.After performing the above task you will have to copy the above file to the following directory
Name the file as
The letters S is used to execute the file during startup and the no 100 is the sequence in which the files should be executed
Why are you Invoking the listener twice beacause whatever no of listener services you create they are all in listener.ora file so thru one command you should be able to start all the services in the listener.ora file and that is
Why dont you try the following code
su -c user1
./ap.sh start all
su -c user2
Create the following file and remember to input the exact path in ur script file
But, the problem I'm facing is that after loggging in as dba user(user1) the script does not continue to execute! How to make the script continue to execute after logging in?
The reason the errors svrmgrl, lsnrctl not found comes is, as nothing happens after logging in as dba user(user1), I type exit at the prompt and so it comes to root n continues to execute the script and gives these error.
THE PROBLEM NOW IS 'HOW TO MAKE THE SCRIPT CONTINUE TO EXECUTE AFTER LOGGING IN'