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.


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


Bharath Machireddy said…
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: ).
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
EZaccounting said…
I Would like to thank you for this article. From this article I got more and more useful information. This is so helpful to me. Keep updating more articles.
Ubs accounting
Myob Singapore
Best Accounting software Singapore


Popular posts from this blog

Basics of RDBMS

Data Small set of information becomes data, this set of information helps make decision. Data is always some useful information. Database Place where you store the data. Database represents some aspect of the real world called "miniworld". A database is designed, built and populated with data for a specific purpose. It has intended group of users and some preconceived applications in which these users are interested. In other words, a database has some source from which data is derived, some degree of interaction with events in the real world and an audience that is actively interested in the contents of the database. Database can also be defined as collection of one or more tables. Ex: Mobile, human brain etc DBMS (Database Management System ) Is a program that stores retrieves and modifies data in the database on request. Study of different techniques of design, development and maintenance of the database Types of DBMS These types are based upon their m

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. Wri

Answers for SQL Functions

1. SQL> SELECT empno, ename FROM emp WHERE Length(ename) = 4; 2. SQL> SELECT empno, ename, job FROM emp where Length(job)=7; 3. SQL> SELECT Length('qspiders') - Length(replace('qspiders','s','')) FROM dual; 4. SQL>  SELECT empno, ename, job FROM emp WHERE Instr(job,'MAN') >0; 5. SQL> SELECT empno, ename, job FROM emp WHERE Instr(job, 'MAN') =1; 6. SQL> SELECT empno, ename, job FROM emp WHERE (Length(ename) - Length(Replace(ename, 'L',''))) = 1; 7. SQL> SELECT * FROM dept WHERE Instr(dname,'O') > 0; 8. SQL> SELECT Concat(ename,' working as a ') || Concat(job, ' earns ') || Concat(sal, '  in ') || Conc at('dept ',deptno) AS text from emp; OR SQL> SELECT Concat(Concat(Concat(Concat(Concat(Concat(Concat(ename,' working as a '), job),' earns '), sal),'  in '),'dept '), deptno) AS text FROM emp; 9. SQL