In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Before, we have studied Microsoft's sqlserver and Oracle's mysql, and also understood the role of database systems. These two database management systems are suitable for background databases such as software, websites, games and so on. For example, we have built dynamic websites when we are learning mysql. But oracle is a very safe and perfect large-scale database management software, which has absolute advantages in telecom, banking, securities and other large-scale applications. So let's introduce the installation and basic use of oracle to the builders today. Oracle can be installed on windows and linux systems, but enterprises are more likely to install on linux, so I'll take redhat6.5 as an example.
First, install redhat6.5
1) choose simplified Chinese (to better support the Chinese version of oracle)
II. Preparation for the installation of oracle
1. System and configuration requirements
1) confirm the version of the linux system
III. Formal installation of oracle
1. Download the oracle11g package to the system / home/oracle
4. Verify the installation results
1. Access the OEM platform (OEM platform can be used for image management oracle, which is more convenient).
Enter: https://oracleserver:1158/em/, in the browser. Enter user name: sys, password pwd123, and select SYSDBA as the connection identity.
Common system control commands
1. Execute the "lsnrctl start" command to start the oracle listener.
2. Execute the "lsnrctl status" command to view the status of the oracle listener.
3. Execute the "emctl stop dbconsole" command to close the OEM management console.
4. Execute "dbshut $ORACLE_HOME" command to stop the database instance.
5. Execute the "dbstart $ORACLE_HOME" command to start the database instance.
6. When using the sqlplus command tool, if you log in as Super Admin sys, you can also enable and close the default database instance by executing the "STARTUP;" and "SHUTDOWN IMMEDIATE;" instructions in the "SQL >" environment.
Configure oracle command line to turn the page and clear the screen
8. Create a database
If you choose not to build a database when installing an oracle product, you must first create a database to use the oracle system, or you can create a second database if you choose to build a database when installing an oracle product.
There are two ways to create a database: one is through a graphical interface, and the other is using the create database command, which is described below.
In linux, run the database configuration assistant (DBCA) and execute DBCA under the $ORACLE_HOME/bin directory
1. Execute netca to enable snooping (this step is required if it is not enabled) (in order to enable clients to connect to oracle instances, and some commands also need to enable snooping)
9. Start and shut down the database
1. Startup of the database
Starting (startup) a database requires three steps
1) start the oracle instance
2) install the database by the instance
3) Open the database
In the startup command, you can control the different startup steps of the database through different options.
NOMOUNT options:
Nomount: you already know where the control file is through the parameter file, but you haven't read the control file yet. The main function is to start an instance, read the init.ora initialization parameter file, start the background process, and initialize the global SGA
MOUNT options:
Read the control file, through the control file to know other files (data files and log files), at this time did not read data files and log files, this state is called mount status. The instance was started and the database was installed, but the database was not opened. This open mode is often used in database maintenance operations, such as renaming data files, changing the redo log and opening the archiving mode, and so on. In this open mode, in addition to seeing the list of SGA systems, the system will also give a "database loaded" prompt.
Open options:
After reading the control file, the data file and log file are found, and the database is in the OPEN state.
Startupnomount | mount | open
Shudownnormal | immedieate | transactional | abort
Note: if you only execute the startup command, all the three steps of starting the instance, installing the instance and opening the database will be completed. This is that the system will not only see all the prompts in the previous startup mount mode, but also give a prompt of "the database has been opened". At this time, the database system is in a normal working state and can receive user requests.
If you use the startup nomount command or the startup mount command, you must use the alter database command to open the database, for example: if you open the database in startup nomount mode, that is, the instance has been started, but the database is not installed and opened, you must run the following two commands before the database can start correctly.
ALTER DATABASE MOUNT
ALTER DATABASE OPEN
If you start the database in startup mount mode, you only need to run the following command to open the database
ALTER DATABASE OPEN
2. Execute the startup command
6. Database shutdown
Normal: this is the default option, when using this option, no new user connections are allowed, but all current connections are allowed to continue. Only when all users (voluntarily) log out can the database be truly shut down.
In general, a normal database shutdown makes no sense, and even if only database control is running, there are always users who have not logged in. It may take a few days or more to shut down a database (if the user has not shut down himself)
Immediate: when using this option, no new user connections are allowed, and all currently connected sessions are terminated. Any active transaction will be rolled back and the database will then be shut down. It is a common way to close the database and close the database quickly.
Transactional: when using this option, no new user connections are allowed, existing sessions that do not exist in a transaction are terminated, and sessions currently in a transaction are allowed to terminate after the transaction is completed. As soon as all sessions are terminated, the data is closed (using shutdown immediate)
Abort: in the case of oracle, using this option is equivalent to a power outage. The instance is terminated immediately. At this point, no data is written to disk. But the next time you start the database, it is slow (instance recovery is required). This approach is recommended in the following situations.
1) the database has been in an abnormal working state and cannot be shut down with shutdown normal or shutdown immediate commands.
2) the database needs to be shut down immediately
3) encountered a problem when starting the database instance
Using Navicat for Oracle tools to manage oracle remotely and graphically
1. Install the software Navicat for Oracle on the win7 host.
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: 297
*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.