In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The steps for starting the Oracle service and the listener under Linux are sorted out as follows:
1. Install oracle
2. Create oracle system users
3. / bash_profile under / home/oracle adds several environment variables: ORACLE_SID,ORACLE_BASE,ORACLE_HOME:
Export ORACLE_SID=test export ORACLE_BASE=oracle_install_dir export ORACLE_HOME=xxx
4. Startup steps: note that $represents the shell command prompt, where oracle is above version 9.0.
$su-oracle $sqlplus / nolog sql > conn / as sysdba sql > startup (generally no parameters are required, as long as the environment variable is set) sql > quit (exit sql mode) $lsnrctl start (start listener) close oracle $lsnrctl stop (close listener, before you close the application) $sqlplus / nolog
Sql > shutdown its parameters: shutdown has four parameters. The meanings of the four parameters are as follows:
Normal needs to wait for all users to disconnect before shutting down the database task
Immediate waits for the user to complete the current statement before disconnecting the user and does not allow new users to connect.
Transactional waits for the user to disconnect after completing the current transaction and does not allow new users to connect to the database
Abort shuts down the database without waiting, forcibly disconnects the connection and shuts down the database directly
The first three methods do not lose user data. The fourth is not recommended in the case of no already!
Frequently encountered problems:
1) permission problem, solution: switch to oracle user
2) do not turn off the listener. Solution: turn off the listener.
3) some oracle instances are not closed. The solution: shut down oracle instances.
4) incomplete setting of environment variables. Solution: modify environment variables
Summary of startup and shutdown methods of Oracle database
First, several startup modes:
1, startup nomount non-installation startup, this way startup can be executed: rebuild the control file, rebuild the database to start instance, that is, start SGA and background processes, this startup only needs init.ora files.
2, startup mount dbname installation starts, this way can be executed: database log archiving, database recovery, renaming some database files such as system tablespaces or log files. Execute nomount, and then open the control file.
3. Startup open dbname first executes "nomount", then "mount", and then opens all database files, including Redo log files. In this way, you can access the data in the database.
4. Startup, which is equal to the following three commands startup nomountalter database mountalter database open
5. Startup restrict constraint startup this way can start the database, but when only users with certain privileges are allowed to access non-privileged users, the following prompt appears: ERROR:ORA-01035: ORACLE only allows users with RESTRICTED SESSION permissions to use.
6. Startup force forced startup mode when the database cannot be closed, you can use startup force to close the database, first shut down the database, and then execute the normal start database command
7. Startup pfile= parameter file name with initialization parameter file startup method first read the parameter file, and then start the database according to the settings in the parameter file: startup pfile=E:/Oracle/admin/oradb/pfile/init.ora8, startup EXCLUSIVE
Second, there are several ways to close:
1. Shutdown normal shuts down the database normally.
2. Shutdown immediate shuts down the database immediately. When shutdown immediate is executed in SVRMGRL, the database is not shut down immediately, but only after Oracle performs some cleanup work (terminating the session, releasing session resources). When the database cannot be shut down using shutdown, shutdown immediate can complete the database shutdown operation.
3. Shutdown abort shuts down the database directly, and the session accessing the database will be terminated abruptly. If a large number of operations are being performed in the database, it will take a long time to restart the database after performing shutdown abort.
Summary
The above is the steps of starting Oracle service and monitoring program under Linux introduced by Xiaobian. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support to the website!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.