Startup and shutdown monitoring, database for oracle11g R2 under Linux

Source: Internet
Author: User
Tags session id reserved sqlplus

First, start monitoring and database

1. Start monitoring:

[HTML]View PlainCopy
    1. [Email protected] oracle]# su-oracle
    2. bash-4.1$ Lsnrctl Start

Description

The-,-l,--login is appended to the SU, which means that the environment variable (HOME,SHELL,USER,LOGNAME,PATH, etc.) is the same as the user who wants to switch the user,

The results are as follows, starting successfully:

[HTML]View PlainCopy
  1. Lsnrctl for linux:version 11.2.0.1.0-production on 04-apr-2014 16:15:25
  2. Copyright (c) 1991, Oracle. All rights reserved.
  3. Starting/home/oracle/product/11.2/db_1/bin/tnslsnr:please wait ...
  4. Tnslsnr for Linux:version 11.2.0.1.0-production
  5. System parameter File Is/home/oracle/product/11.2/db_1/network/admin/listener.ora
  6. Log messages Written To/home/oracle/diag/tnslsnr/jtwf/listener/alert/log.xml
  7. Listening on: (description= (address= (protocol=tcp) (host= jtwf) (port= 1521))
  8. Connecting to (description= (address= (protocol=TCP) (host=jtwf) (port=1521))
  9. STATUS of the LISTENER
  10. ------------------------
  11. Alias LISTENER
  12. Version Tnslsnr for Linux:version 11.2.0.1.0-production
  13. Start Date 04-apr-2014 16:15:25
  14. Uptime 0 days 0 hr. 0 min. 0 sec
  15. Trace level off
  16. Security on:local OS Authentication
  17. SNMP OFF
  18. Listener Parameter File/home/oracle/product/11.2/db_1/network/admin/listener.ora
  19. Listener Log File/home/oracle/diag/tnslsnr/jtwf/listener/alert/log.xml
  20. Listening Endpoints Summary ...
  21. (description= (address= (protocol=tcp) (host=jtwf) (port=1521 ))
  22. The listener supports no services
  23. The command completed successfully


2. Start the database:

Connect to Sqlplus

[HTML]View PlainCopy
    1. Su Oracle
    2. bash-4.1$ Sqlplus/nolog


The results are as follows:


[HTML]View PlainCopy
    1. Sql*plus:release 11.2.0.1.0 Production on Fri APR 4 16:15:52 2014
    2. Copyright (c) 1982, Oracle. All rights reserved.
    3. SQL>

Log in as SYSDBA and execute command startup

[HTML]View PlainCopy
    1. SQL> Conn/as sysdba
    2. Connected to an idle instance.
    3. SQL> Startup

The results are as follows:

[HTML]View PlainCopy
    1. ORACLE instance started.
    2. Total System Global area 839282688 bytes
    3. Fixed Size 2217992 bytes
    4. Variable Size 578815992 bytes
    5. Database buffers 251658240 bytes
    6. Redo buffers 6590464 bytes
    7. Database mounted.
    8. Database opened.
    9. SQL>


Second, close the database, monitor

1. Close the database

[HTML]View PlainCopy
    1. Su-oracle
    2. [[email protected] oracle]# su Oracle
    3. bash-4.1$ Sqlplus/nolog

Landing Sqlplus, the results are as follows:

[HTML]View PlainCopy
    1. Sql*plus:release 11.2.0.1.0 Production on Fri APR 4 15:10:59 2014
    2. Copyright (c) 1982, Oracle. All rights reserved.
    3. SQL>


SYSDBA Login:

[HTML]View PlainCopy
    1. SQL>conn/as sysdba
    2. Connected.


To close the database:

[HTML]View PlainCopy
    1. SQL> Shutdown Immediate
    2. Database closed.
    3. Database dismounted.
    4. ORACLE instance shut down.


After you close the database, if you execute a query command, the following error is reported:

[HTML]View PlainCopy
    1. SQL> select * from Vio_business_request;
    2. SELECT * FROM Vio_business_request
    3. *
    4. ERROR at line 1:
    5. Ora-01034:oracle Not available
    6. Process id:14138
    7. Session id:75 Serial number:503
    8. SQL>



Exit Sqlplus:

[HTML]View PlainCopy
    1. SQL> Exit
    2. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit Production
    3. With the partitioning, OLAP, Data Mining and Real application testing options


2. Turn off monitoring:


[HTML]View PlainCopy
    1. bash-4.1$ lsnrctl Stop//Oracle User execution
    2. Lsnrctl for linux:version 11.2.0.1.0-production on 04-apr-2014 15:17:00
    3. Copyright (c) 1991, Oracle. All rights reserved.
    4. Connecting to (description= (address= (protocol=TCP) (host= jtwf) (port= 1521))
    5. The command completed successfullybash-4.1$ Lsnrctl stop
    6. Lsnrctl for linux:version 11.2.0.1.0-production on 04-apr-2014 15:17:00
    7. Copyright (c) 1991, Oracle. All rights reserved.
    8. Connecting to (description= (address= (protocol=TCP) (host= jtwf) (port= 1521))
    9. The command completed successfully

Startup and shutdown monitoring, database for oracle11g R2 under Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.