Stop oracle service linux

Stop oracle service linux

You can start and stop the database manually, set it to automatically after the system shuts down and starts, or using Enterprise Manager.

Shutting Down and Starting Up Using the Configuration Services Script

Execute these commands as root using sudo .

You can start and stop the database using the /etc/init.d/oracle-xe-18c script.

Run the following command to start the listener and database:

Run the following command to stop the database and the listener:

Run the following command to stop and start the listener and database:

Run the following command to start the listener and database:

Run the following command to stop the database and the listener:

Run the following command to stop and start the listener and database:

Shutting Down and Starting Up Using SQL*Plus

You can shut down and start the database using SQL*Plus.

To shutdown the database, login to the oracle user with its environment variables set for access to the XE database, and issue the following SQL*Plus command:

To start the database, issue the commands:

Oracle Database 2 Day DBA for general information about managing a database

Oracle Multitenant Administration Guide for more information about shutting down and starting a PDB

Automating Shutdown and Startup

Oracle recommends that you configure the system to automatically start Oracle Database when the system starts, and to automatically shut it down when the system shuts down. Automating database shutdown guards against incorrect database shutdown.

Источник

2 Stopping and Starting Oracle Software

This chapter describes how to identify Oracle Database processes, and provides basic information about how to stop and restart them. It also describes how to set up automatic startup and shutdown of the Oracle Database. It contains the following sections:

When using Oracle Restart, you can use Service Control Utility (SRVCTL), a command-line interface, to manage Oracle processes (database instance, listener, Oracle ASM instance). With SRVCTL, you can manage the Oracle Restart configuration, see the status of processes managed by Oracle Restart, and start or stop processes such as Oracle Database. SRVCTL has been enhanced to support single instance databases with Oracle Restart on standalone servers and on clusters with Oracle Clusterware.

2.1 Stopping and Starting Oracle Processes

This section describes how to stop and start Oracle processes. It contains the following topics:

2.1.1 Stopping and Starting Oracle Database and Oracle Automatic Storage Management Instances

This section describes how to stop and start Oracle Database and Oracle Automatic Storage Management instances.

2.1.1.1 Stopping an Oracle Database or Oracle Automatic Storage Management Instance

Do not stop an Oracle Automatic Storage Management instance until you have stopped all Oracle Database instances that use Oracle Automatic Storage Management instance to manage their storage.

To stop an Oracle Database or Oracle Automatic Storage Management instance:

Run the following commands to identify the SID and Oracle home directory for the instance that must be shut down:

On Oracle Solaris:

On other operating systems:

The oratab file contains lines similar to the following, which identify the SID and corresponding Oracle home directory for each database or Oracle Automatic Storage Management instance on the system:

Читайте также:  Не работает очистка обновлений windows

Oracle recommends that you use the plus sign (+) as the first character in the SID of Oracle Automatic Storage Management instances.

Run the oraenv or coraenv script, depending on the default shell, to set the environment variables for the instance that must be shut down:

Bourne, Bash, or Korn shell:

When prompted, specify the SID for the instance.

Run the following commands to shut down the instance:

After the instance shuts down, you can quit SQL*Plus.

2.1.1.2 Restarting an Oracle Database or Oracle Automatic Storage Management Instance

If the database instance uses Oracle Automatic Storage Management for storage management, then you must start the Oracle Automatic Storage Management instance before you start the database instance.

To restart an Oracle Database or Oracle Automatic Storage Management instance:

Repeat steps 1 and 2, if required, to set the ORACLE_SID and ORACLE_HOME environment variables to identify the SID and Oracle home directory for the instance you want to start.

Run the following commands to start the instance:

After the instance starts, you can exit from SQL*Plus.

2.1.2 Stopping and Starting Oracle Restart

To stop or start Oracle Restart, run the following command:

Start: This option is used to start Oracle Restart

Syntax and Options:

Stop: This option is used to stop Oracle Restart

Syntax and Options:

Oracle Database Administrator’s Guide for more information about the srvctl commands

2.2 Automating Shutdown and Startup

Oracle recommends that you configure the system to automatically start Oracle Database when the system starts, and to automatically shut it down when the system shuts down. Automating database startup and shutdown guards against incorrect database shutdown.

To automate database startup and shutdown, use the dbstart and dbshut scripts, which are located in the $ORACLE_HOME/bin directory. The scripts refer to the same entries in the oratab file, which are applied on the same set of databases. You cannot, for example, have the dbstart script automatically start sid1 , sid2 , and sid3 , and have the dbshut script shut down only sid1 . However, you can specify that the dbshut script shuts down a set of databases while the dbstart script is not used at all. To do this, include a dbshut entry in the system shutdown file, but do not include the dbstart entry from the system startup files.

The init command in the operating system documentation for more information about system startup and shutdown procedures

2.2.1 Automating Database Startup and Shutdown on Other Operating Systems

To automate database startup and shutdown by using the dbstart and dbshut scripts:

Log in as the root user.

Edit the oratab file for the platform.

To open the file, use one of the following commands:

On Oracle Solaris:

On IBM AIX on POWER Systems (64-Bit) and Linux:

Database entries in the oratab file are displayed in the following format:

In this example, the values Y and N specify whether you want the scripts to start or shut down the database, respectively. For each database for which you want to automate shutdown and startup, first determine the instance identifier (SID) for that database, which is identified by the SID in the first field. Then, change the last field for each to Y .

You can set dbstart to autostart a single-instance database which uses an Automatic Storage Management installation auto-started by Oracle Clusterware. This is the default behavior for an Automatic Storage Management cluster. To do this, you must change the oratab entry of the database and the Automatic Storage Management installation to use a third field with the value W and N , respectively. These values specify that dbstart auto-starts the database only after the Automatic Storage Management instance is started.

Читайте также:  Network mapper kali linux

If you add new database instances to the system and automate the startup for them, then you must edit the entries for those instances in the oratab file.

Change directory to one of the following, depending on the operating system:

Platform Initialization File Directory
Linux and Oracle Solaris /etc/init.d
IBM AIX on POWER Systems (64-Bit) /etc

Create a file called dbora , and copy the following lines into this file:

Change the value of the ORACLE_HOME environment variable to specify the Oracle home directory for the installation. Change the value of the ORACLE environment variable to the user name of the owner of the database installed in the Oracle home directory (typically, oracle ).

This script can only stop Oracle Net listener for which a password has not been set. In addition, if the listener name is not the default name, LISTENER , then you must specify the listener name in the stop and start commands:

Change the group of the dbora file to the OSDBA group (typically dba ), and set the permissions to 750:

Create symbolic links to the dbora script in the appropriate run-level script directories, as follows:

Источник

Stop oracle service linux

This chapter describes how to identify Oracle Database processes, and provides basic information about how to stop and restart them. It also describes how to set up automatic startup and shutdown of the Oracle Database. It contains the following sections:

When using Oracle Restart, you can use Service Control Utility (SRVCTL), a command-line interface, to manage Oracle processes (database instance, listener, Oracle ASM instance). With SRVCTL, you can manage the Oracle Restart configuration, see the status of processes managed by Oracle Restart, and start or stop processes such as Oracle Database. SRVCTL is enhanced to support Oracle Clusterware, and single instance Oracle databases with Oracle Restart.

2.1 Stopping and Starting Oracle Processes

This section describes how to stop and start Oracle processes. It contains the following topics:

2.1.1 Stopping and Starting Oracle Database and Oracle Automatic Storage Management Instances

This section describes how to stop and start Oracle Database and Oracle Automatic Storage Management instances and contains the following topics:

2.1.1.1 Stopping an Oracle Database or Oracle Automatic Storage Management Instance

Do not stop an Oracle Automatic Storage Management instance until you have stopped all Oracle Database instances that use Oracle Automatic Storage Management instance to manage their storage.

To stop an Oracle Database or Oracle Automatic Storage Management instance:

  1. Run the following commands to identify the SID and Oracle home directory for the instance that must be shut down:

On Oracle Solaris:

On other operating systems:

The oratab file contains lines similar to the following, which identify the SID and corresponding Oracle home directory for each database or Oracle Automatic Storage Management instance on the system:

Oracle recommends that you use the plus sign (+) as the first character in the SID of Oracle Automatic Storage Management instances.

Bourne, Bash, or Korn shell:

When prompted, specify the SID for the instance.

After the instance shuts down, you can quit SQL*Plus.

2.1.1.2 Restarting an Oracle Database or Oracle Automatic Storage Management Instance

If the database instance uses Oracle Automatic Storage Management for storage management, then you must start the Oracle Automatic Storage Management instance before you start the database instance.

To restart an Oracle Database or Oracle Automatic Storage Management instance:

  1. Repeat steps 1 and 2, if required, to set the ORACLE_SID and ORACLE_HOME environment variables to identify the SID and Oracle home directory for the instance you want to start.
  2. Run the following commands to start the instance:

After the instance starts, you can exit from SQL*Plus.

2.1.2 Stopping and Starting Oracle Restart

To stop or start Oracle Restart, run the following command:

Start: This option is used to start Oracle Restart

Syntax and Options:

Stop: This option is used to stop Oracle Restart

Syntax and Options:

Oracle Database Administrator’s Guide for more information about the srvctl commands

2.2 About Automating Database Shutdown and Startup

Oracle recommends that you configure the system to automatically start Oracle Database when the system starts, and to automatically shut it down when the system shuts down. Automating database startup and shutdown guards against incorrect database shutdown.

To automate database startup and shutdown, use the dbstart and dbshut scripts, which are located in the $ORACLE_HOME/bin directory. The scripts refer to the same entries in the oratab file, which are applied on the same set of databases. You cannot, for example, have the dbstart script automatically start sid1 , sid2 , and sid3 , and have the dbshut script shut down only sid1 . However, you can specify that the dbshut script shuts down a set of databases while the dbstart script is not used at all. To do this, include a dbshut entry in the system shutdown file, but do not include the dbstart entry in the system startup files.

The init command in the operating system documentation for more information about system startup and shutdown procedures

2.2.1 Automating Database Startup and Shutdown

To automate database startup and shutdown by using the dbstart and dbshut scripts:

  1. Log in as the root user.
  2. Edit the oratab file for the platform.

To open the file, use one of the following commands:

On Oracle Solaris:

On IBM AIX on POWER Systems (64-Bit) and Linux:

Database entries in the oratab file are displayed in the following format:

In this example, the values Y and N specify whether you want the scripts to start or shut down the database, respectively. For each database for which you want to automate shutdown and startup, first determine the instance identifier (SID) for that database, which is identified by the SID in the first field. Then, change the last field for each to Y .

You can set dbstart to autostart a single-instance database which uses an Automatic Storage Management installation auto-started by Oracle Clusterware. This is the default behavior for an Automatic Storage Management cluster. To do this, you must change the oratab entry of the database and the Automatic Storage Management installation to use a third field with the value W and N , respectively. These values specify that dbstart auto-starts the database only after the Automatic Storage Management instance is started.

If you add new database instances to the system and automate the startup for them, then you must edit the entries for those instances in the oratab file.

Linux and Oracle Solaris

IBM AIX on POWER Systems (64-Bit)

Change the value of the ORA_HOME environment variable to specify the Oracle home directory for the installation. Change the value of the ORA_OWNER environment variable to the user name of the owner of the database installed in the Oracle home directory (typically, oracle ).

This script can only stop Oracle Net listener for which a password has not been set. In addition, if the listener name is not the default name, LISTENER , then you must specify the listener name in the stop and start commands:

Источник

Читайте также:  Как установить windows через dos с флешки
Оцените статью
Platform Initialization File Directory