有没有办法用bat文件启动/停止oracle 12c?

时间:2017-03-04 21:20:13

标签: oracle oracle12c

有没有办法用bat文件启动oracle 12c?就像过去的11g一样。

当你在pc / mac上使用有限的资源时,如何启动和停止所有oracle 12c操作,这些操作将更容易管理资源。

1 个答案:

答案 0 :(得分:2)

As you mention a "bat" file, I assume you are talking about Windows.

Oracle installs two Windows services: the listener and the database instance. Typically they are called OracleOraDB12Home1TNSListener for the listener and OracleServiceORCL for the instance.

Especially the name of the service for the instance may be different depending on the SID you chose during installation.

Just set those two services to "manual" (not "automatic") then they won't be started when Windows start.

To start Oracle later, create a .bat file with the following commands:

net start OracleOraDB12Home1TNSListener
net start OracleServiceORCL

You have to adjust the names of the services to your installation. Check the "Services" app in the control panel

To stop the Oracle services, just use stop instead of start