Skip to main content

How to create batch file to start and stop Oracle Service on Windows


Everytime you want to start or stop a database service you will have to either do this using sqlplus prompt or through windows services. There is a much simpler way of stopping or starting a database.

Follow the steps below.

Create a file with an extension .bat for example start.bat

Open this file and add the following line in it.

NET START OracleServiceORCL


Create another file as stop.bat, open this file and add the following line.

NET STOP OracleServiceORCL

Here I have 3 words,

1. NET helps start and stop services.
2. START/STOP -- Keyword means start or stop the services
3. OracleServiceORCL -- This is the service name of the database which has been installed on my windows.


To start the database just double click on start.bat and to stop the database double click on stop.bat.

To know the service name of the database on your machine, follow the steps below.

1. Go to Control Panel --> Administrative Tools --> Click on Services icon.

This will open a window show below.

















Here scroll down to names starting with alphabet O check for anything starting with Oracle.

















Highlighted service name is the one which has to be used. If you have installed only one Oracle database on your windows then if your database name is ORCL then you will have to start only one service and that service would be "OracleServiceORCL".


To know how to start/stop the database using SQLPLUS CLICK HERE

To know how to start/stop using services menu CLICK HERE


Comments

Bharath Machireddy said…
sir,
i have tried this and working fine .

but if we double click that .bat file ,it won't working ,after clicking run as administrator it works fine.


thank you
khawaja asif hameed said…
Sir you are right but after running JAZN.jar file script my isqlplus/dba was not running or in simple word authentication required windows not been successfully done.
Rajiv said…
Alert!: Oracle has announced their marquee event JavaOne and Oracle Develop 2012 being held in Hyderabad on 3-4 May. Registrations have also started (Link: http://www.oracle.com/javaone/in-en/index.html?pcode=WWMK11024795MPP084&src=7268797&Act=155 ).
Zoomi786 said…
Hi Mithun,
when i tried to start enterprize manager i got this massege...what should i do?

Error: java.lang.Exception: Exception in sending Request :: null
suresha said…
Hi sir,
I am working in Oracle india pvt ltd .as business operation analyst.i want to go development side ,thats why i want to do Oracle DB course .have you teach oracle db course?Please suugest me


Thank you
Kiran Rao said…
Sir i want to download so called "BIBLE" of SQL/PLSQL which you had shown in your last class i tried but not getting that link.. Now am working for Estuate software since 26-nov-2012 in an ERP domain in mangalore so please help in downloading that i got this job through JSPIDERS actually had other job in banagalore also that is in QSG Technologies but i selected ESTUATE since my native is UDUPI .. Hope you will reply soon since i want to download it badly ..
zuan said…
Thanks for sharing an informative blog keep rocking bring more details.I like the helpful info you provide in your articles. I’ll bookmark your weblog and check again here regularly. I am quite sure I will learn much new stuff right here! Good luck for the next!
mobile application development training online
web designing course with placement in chennai
web designing training institute in chennai
web design and development training
mobile app development course
mobile application development course
learn mobile application development
mobile app development training
Nannie Co Pam said…
Great Article. Thank you for sharing! Really an awesome post for every one.

IEEE Final Year projects Project Centers in Chennai are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. For experts, it's an alternate ball game through and through. Smaller than expected IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble. Final Year Project Domains for IT It gives you tips and rules that is progressively critical to consider while choosing any final year project point.

Spring Framework has already made serious inroads as an integrated technology stack for building user-facing applications. Spring Framework Corporate TRaining the authors explore the idea of using Java in Big Data platforms.
Specifically, Spring Framework provides various tasks are geared around preparing data for further analysis and visualization. Spring Training in Chennai
Ravi said…

You write this post very carefully I think, which is easily understand to me. Not only this, other post is also good. As a newbie this info is really helpful for me. Thanks to you.
Tally Training in Chennai
Tally ERP 9 Training
tally classes
Tally Training institute in Chennai
Tally course in Chennai

Popular posts from this blog

SQL Interview Questions on Subqueries

SUB Queries:
1. List the employees working in research department 2. List employees who are located in New York and Chicago
3. Display the department name in which ANALYSTS are working
4. Display employees who are reporting to JONES
5. Display all the employees who are reporting to Jones Manager
6. Display all the managers in SALES and ACCOUNTING department
7. Display all the employee names in Research and Sales Department who are having at least 1 person reporting to them
8. Display all employees who do not have any reportees
9. List employees who are having at least 2 reporting
10. List the department names which are having more than 5 employees
11. List department name having at-least 3 salesman
12. List employees from research and accounting having at-least 2 reporting
13. Display second max salary
14. Display 4th max salary
15. Display 5th max salary  -- Answer for nth Max Salary
Co-Related Subqueries:
16. Write a query to get 4th max salary from EMP table
17. Write a query to get 2nd…

'Linux-x86_64 Error: 28: No space left on device' While trying to start the database -- Error

SQL> startup mount pfile='/tmp/initdlfasp12.ora'
ORA-27102: out of memory
Linux-x86_64 Error: 28: No space left on device


This as you can see is on Linux x86 with 64 bit processor. We got this error after we changed SGA on 10gR2 database. So was sure that this is something to do with the OS.

Parameters to check for this are shmall.

shmall is the total amount of shared memory, in pages, that the system can use at one time.

$cat /proc/sys/kernel/shmmax
53687091200

$ getconf PAGE_SIZE
4096

As per Oracle SHMALL should be set to the total amount of physical RAM divided by page size.

Our system has 64GB memory, so change kernel.shmall = 1024 * 1024 * 1024 * 64 / 4096 = 16777216


Once this value is calculated you can modify Linux system configuration file directly.

$ su - root
vi /etc/sysctl.conf file:
kernel.shmall=16777216

and

# sysctl -p

Once this is done the database was started without any problem.

Abnormal Program Termination. An internal error has occurred. Please provide the following files to Oracle Support./ Installing Oracle 10g on Windows 7/Vista

This video will take you through the steps to install Oracle 10g Release 2 on Windows 7 (Same steps work for Windows Vista). Usually if you install Oracle database on window 7/Vista you would get an error,

Abnormal Program Termination. An internal error has occurred. Please provide the following files to Oracle Support.
"Unknown"
"Unknown"
"Unknown"

Follow the steps shown in this video to successfully install Oracle Database on Windows 7/Vista.