Start oracle from linux

How Do I Start Oracle Service in UNIX or Linux?

I am using a Solaris UNIX based server. How can I start a Oracle service / server in UNIX from a shell prompt? How can I start and stop Oracle database on a Linux based server?

In order to start Oracle service in a UNIX or Linux based system you need to login as a Oracle user. [donotprint]

Tutorial details
Difficulty level Easy
Root privileges No
Requirements None
Est. reading time 5m

[/donotprint]

How To Startup Oracle Database on a Unix/Linux

Use the su — username command to login as oracle user. Open the Terminal or login using ssh and type the following command to login
$ su — oracle

Start Oracle server in UNIX/Linux

Now, use the lsnrctl command to start service (usually located at /home/oracle/oracle/product/10.2.0/db_1/bin directory):
$ lsnrctl start
Next start database:
$ dbstart
If above is not working try to login as sysdba:
$ sqlplus ‘/ as sysdba’
At SQL> type startup command:

Stop Oracle service in UNIX/Linux

To stop Oracle service type following two commands:
$ lsnrctl stop
$ dbshut
If above failed login as sysdba user:
$ sqlplus ‘/ as sysdba’
At SQL> type shutdown command:

  • No ads and tracking
  • In-depth guides for developers and sysadmins at Opensourceflare✨
  • Join my Patreon to support independent content creators and start reading latest guides:
    • How to set up Redis sentinel cluster on Ubuntu or Debian Linux
    • How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
    • How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
    • A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
    • How to protect Linux against rogue USB devices using USBGuard

Join Patreon

🐧 Get the latest tutorials on Linux, Open Source & DevOps via

Category List of Unix and Linux commands
Documentation help • mandb • man • pinfo
Disk space analyzers df • duf • ncdu • pydf
File Management cat • cp • less • mkdir • more • tree
Firewall Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04
Linux Desktop Apps Skype • Spotify • VLC 3
Modern utilities bat • exa
Network Utilities NetHogs • dig • host • ip • nmap
OpenVPN CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04
Package Manager apk • apt
Processes Management bg • chroot • cron • disown • fg • glances • gtop • jobs • killall • kill • pidof • pstree • pwdx • time • vtop
Searching ag • grep • whereis • which
Shell builtins compgen • echo • printf
Text processing cut • rev
User Information groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w
WireGuard VPN Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04

Comments on this entry are closed.

I’m traying to start oracle but it is consuming 90% of a quad core server.
Any tip to solve this problem?

I ran these commands in Fedora 9 (Oracle 11g), but it’s saying:

ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
Usage: /u01/app/oracle/product/11.1.0/db_1/bin/dbstart ORACLE_HOME

hi
i am a system eng. and i missing some script so plz let me know i have a linur server and 10g 0racle databasse and its for flight information display system so i add a new display system and configured it after that i used a commend cd /solids/Disckonmodule/UPT_TFT then enter
after that i update the that one tft who is new one
#./TFTupd.sh PDD011 whatever name but display not come and befour it i updated same type display

so plz help me
thanks and waiting fo rrespons

It is saying su-oracle not found. Please help in this.

First make oracle user and also add this user to group.

I enter the above su – oracle in # prompt. then it’s giving message like this

3004-500 User “oracle” does not exist.

means your id your id in not in that group or may not in sudo fentry.

hi
this means your id is not under oracle group or may be not in sudo entry.

Thanks for this site. I got some help from this site. Last time I got error, I enter su – oracle.
Later I found the oracle installed oracle8 directory. su – oracle8 it success. Working fine.
Thanks.

su -oracle
Here oracle is a user.
you need to create a oracle user first,then try the above command,it works

i m trying to connect with oracle
su – oracle
-bash-3.00$
what can i do ?give this error..

Hi rohit,you r in oracle promt.but os shaows bash promt.dont worry about in that issue.already u r in oracle promt.

for the above procedure to work the environments variables should be set. (oraenv)

Great article, thanks

Manual is especially good for those who want to learn the management of a database in oracle

in my office Oracle dataBase and Oracle Application enable to start.can anyone tell me how to start And Stop the Oracle service in Linux O/S .its very Urgent. Do the needful .Thanks

Maybe “service oracle-xe restart”

Hello,
Thanks for this article.
i have a doubt.
i’m able to start and stop by logging to oracle but my doubt is that when it got created after installing oracle ?

i m new to linux can somebody help me out how to start oracle dba (12g m using) through shell script and m using bourne shell only, in ubuntu os.

Источник

C Administering Oracle Database on Linux

This appendix contains information about administering Oracle Database on Linux. It contains the following topics:

C.1 Extended Buffer Cache Support

This section applies to Linux x86 only.

Oracle Database can allocate and use more than 4 GB of memory for the database buffer cache. This section describes the limitations and requirements of the extended buffer cache feature on Linux x86 systems.

Oracle Database Concepts for more information about the extended buffer cache feature

In-Memory File System

To use the extended buffer cache feature, create an in-memory file system on the /dev/shm mount point equal in size or larger than the amount of memory that you intend to use for the database buffer cache. For example, to create an 8 GB file system on the /dev/shm mount point:

Run the following command as the root user:

To ensure that the in-memory file system is mounted when the system restarts, add an entry in the /etc/fstab file similar to the following:

When Oracle Database starts with the extended buffer cache feature enabled, it creates a file in the /dev/shm directory that corresponds to the Oracle buffer cache.

If an in-memory file system is already mounted on the /dev/shm mount point, then ensure that its size is equal to or larger than the amount of memory that is used for the database buffer cache.

USE_INDIRECT_DATA_BUFFERS Initialization Parameter

To enable the extended buffer cache feature, set the USE_INDIRECT_DATA_BUFFERS initialization parameter to TRUE in the parameter file. This enables Oracle Database to specify a larger buffer cache.

Dynamic Cache Parameters

If the extended cache feature is enabled, then you must use the DB_BLOCK_BUFFERS parameter to specify the database cache size.

Do not use the following dynamic cache parameters while the extended buffer cache feature is enabled:

The following limitations apply to the extended buffer cache feature:

You cannot create or use tablespaces with nondefault block sizes. You can create tablespaces using only the block size specified by the DB_BLOCK_SIZE parameter.

You cannot change the size of the buffer cache while the instance is running.

Oracle Database SQL Reference for more information about the default block size used by the CREATE TABLESPACE command

The default VLM window size is 512 MB. This memory size is allocated to the address space of the process. To increase or decrease this value, set the VLM_WINDOW_SIZE environment variable to the new size in bytes. For example, to set the VLM_WINDOW_SIZE to 256 MB, run the following command:

The value that you specify for the VLM_WINDOW_SIZE environment variable must be a multiple of 64 KB.

Red Hat Enterprise Linux 3 Only: VL M Window Size

To accommodate the VLM window size, you must increase the default maximum size of the per-proce ss locked memory. To increase it, add the following lines to the /etc/security/limits.conf file, where oracle is the user that administers the database:

If you use ssh to log in to the system, then add the following line to the /etc/ssh/sshd_config file to enable the default values to be used when an ssh session is started:

C.2 Using hugetlbfs on SUSE Linux Enterprise Server 9 or Red Hat Enterprise Linux 4

To enable Oracle Database to use large pages (sometimes called huge pages) on SUSE Linux Enterprise Server 9, or Red Hat Enterprise Linux 4, set the value of the vm.nr_hugepages kernel parameter to specify the number of large pages that you want to reserve. You must specify a sufficient number of large pages to hold the entire SGA for the database instance. To determine the required parameter value, divide the SGA size for the instance by the size of a large page, then round up the result to the nearest integer.

To determine the default large page size, run the following command:

For example, if /proc/meminfo lists the large page size as 2 MB, and the total SGA size for the instance is 1.6 GB, then set the value for the vm.nr_hugepages kernel parameter to 820 (1.6 GB / 2 MB = 819.2).

C.3 Using hugetlbfs on Red Hat Enterprise Linux AS 3

Linux on POWER is not supported on Red Hat Linux AS 3.

To use large pages on Red Hat Enterprise Linux AS 3:

Determine the memory required for the large page pool.

To determine this value, convert the size of the SGA of the instance to megabytes, and round up by 4 MB. For example, if the SGA is 2.7 GB, then the appropriate value is 2768 MB.

Depending on the type of your boot loader, perform one of the following procedures:

Add the hugepages option to the appropriate image section in the /etc/lilo.conf file, specifying the number of pages:

Restart the system.

Add the hugepages option to the kernel command in the /etc/grub.conf file, specifying the number of pages as follows:

Restart the system.

Add or edit the following entry in the /etc/sysctl.conf file, specifying the large page pool size in megabytes:

Run the following command to set the kernel parameter values:

To verify that this amount of memory was moved successfully into the large page pool, run the following command:

The lines at the end of the display show how many memory pages were moved into the large page pool.

Start Oracle Database.

C.4 Increasing SGA Address Space

This section applies to Linux x86 only.

Depending on your distribution of Linux, apply the instructions in one of the following sections to increase the SGA address space:

SUSE Linux Enterprise Server 9

To increase the SGA address space on SUSE Linux Enterprise Server 9:

Log in as the oracle user.

In the $ORACLE_HOME/rdbms/lib directory, run the following commands:

If Oracle Database does not start after completing this procedure, or if there are run-time memory errors, then increase the hexadecimal number specified in the first command. For example, if the 0x15000000 value prevents Oracle Database from starting, then specify the value 0x20000000. Lowering this value increases the SGA address space, but could decrease the PGA address space.

Run the following command to determine the process ID of the oracle user’s shell process:

The number returned is the process ID.

Run the following command to switch user to root :

Run the following commands to change the mapped base setting for the oracle user’s shell process, where pid is the process ID identified in step 3:

Run the exit command to return to the oracle user’s shell process, and start Oracle Listener and Oracle Database.

All Oracle processes must get this modified mapped base value. Starting the listener from the shell that has the modified mapped base enables client connections to connect properly.

Red Hat Enterprise Linux AS 3

To increase the SGA address space on Red Hat Enterprise Linux AS 3 or 4:

Log in as the oracle user.

In the $ORACLE_HOME/rdbms/lib directory, run the following commands:

Start Oracle Database.

C.5 Asynchronous I/O Support

On Linux, Automatic Storage Management uses asynchronous I/O by default. Asynchronous I/O is not supported for database files stored on NFS file systems.

Oracle Database supports kernel asynchronous I/O. This feature is disabled by default.

By default, the DISK_ASYNCH_IO initialization parameter in the parameter file is set to TRUE to enable asynchronous I/O on raw devices. To enable asynchronous I/O on file system files:

Ensure that all Oracle Database files are located on file systems that support asynchronous I/O.

Set the FILESYSTEMIO_OPTIONS initialization parameter in the parameter file to one of the following values:

Linux Distribution Recommended Value
SUSE Linux Enterprise Server 9 SETALL
Other distributions ASYNCH

C.6 Direct I/O Support

Direct I/O support is available and supported on Red Hat Enterprise Linux 3 and SUSE Linux Enterprise Server 9.

To use direct I/O on Red Hat Enterprise Linux 3, the driver that you use must support vary I/O.

On Linux on POWER, you can use direct I/O on Red Hat Linux 4.

To enable direct I/O support:

Set the FILESYSTEMIO_OPTIONS initialization parameter to DIRECTIO .

If you are using the asynchronous I/O option, then set the FILESYSTEMIO_OPTIONS initialization parameter to SETALL .

C.7 semtimedop Support

semtimedop is not supported on Linux on POWER.

On Red Hat Enterprise Linux 3 and SUSE Linux Enterprise Server 9, Oracle Database supports the semtimedop() system call (semaphores with a time limitation). To enable support for the feature, run the following command as the oracle user in the $ORACLE_HOME/rdbms/lib directory:

To disable semtimedop() support, run the following command as the oracle user in the $ORACLE_HOME/rdbms/lib directory:

C.8 High-Speed Network Support

This section applies to Linux x86 only.

Oracle Net supports Sockets Direct protocol (SDP) over the InfiniBand network architecture on Red Hat Enterprise Linux AS 3 for Oracle Database 10 g release 1. For this release, SDP support is limited to synchronous I/O only. For information about support for using asynchronous I/O on SDP, refer to the following document:

Do not set the Oracle Net NET_ASYNC_IO and SDP_ASYNC_IO configuration parameters, unless otherwise stated in this document.

C.9 Simultaneous Multithreading (SMT)

If Simultaneous Multithreading (SMT) is enabled, the v$osstat view reports 2 additional rows corresponding to the online logical ( NUM_LCPUS ) and virtual cpus ( NUM_VCPUS ).

Источник

Читайте также:  Программное обеспечение линукс что это
Оцените статью