Database Oracle installation and access

Database Oracle installation and access

Database is indispensable in the testing work. Now the oracle database is becoming more and more popular, and if you learn oracle, you will be familiar with other databases. First teach you how to install the database. Let me introduce you a lightweight oracle database, that is, Oracle10G Express Edition (OracleXEUniv), compared to the huge original official version, the Express Edition is only 206MB. And it can be installed on your own computer, and it doesn't affect the speed when you run. It can be used for personal development and learning, which is convenient and practical! ! !

The installation of Oracle XE mainly includes two sets of components, Server and Client. If you want to run the oracle database on a single machine, you only need to install a server, which has all the functions of a client at the same time. If you have to practice remote access to data, it's a big deal to install a client on another machine to play.

1. Download the installation package

Download link:
http://download.oracle.com/otn/nt/oracle10g/xe/10201/OracleXEUniv.exe

Database Oracle installation and access

2. Installation

Step 1: Double-click the OracleXEUniv.exe server installation package (there is a longer loading process), and then the following page will pop up.

Database Oracle installation and access

Step 2: Click Next to jump to the license agreement page and select "I accept the terms of the license agreement".

Database Oracle installation and access

Step 3: Click Next and select the installation path.

Database Oracle installation and access

Database Oracle installation and access

Step 4: Click Next, enter the database password (lanxin2017), the entered password and the confirmed password must be consistent.

Database Oracle installation and access

Step 5: After the password input is completed, the next button changes from grayed out to a clickable button. Click next

Database Oracle installation and access

Step 6: Enter the installation review page, click Install

Database Oracle installation and access

Step 7: Complete the installation

Database Oracle installation and access

Check the program, oracle database 10g express version has been installed.

Database Oracle installation and access

3. Access the database

There are mainly two tools for accessing the database,

1) Command line tool, which is SQL*PLUS that comes with ORACLE.

2) SQL Developer, a graphical interface tool provided by ORACLE. These tools may be on the same server as the database or installed on another machine

1. Use SQL*PLUS for access

Database Oracle installation and access

1) Execute the "Run sql command line" in the oracle directory in the start menu, that is, the sqlplus program.

Database Oracle installation and access

2) Connect the database command: connect sys as sysdba. Then enter the database password and press Enter.

Database Oracle installation and access

3) Create user SQL> create user lanxin2017 identified by lanxin2017; Press Enter to prompt the user to create successfully.

Database Oracle installation and access

4) Display the current user: show user

Database Oracle installation and access

5) Grant dba to lanxin2017; Grant database permissions

Database Oracle installation and access

grant connect,resource,dba to lanxin2017;

CONNECT role: - is a typical right granted to end users, the most basic

RESOURCE role: - is granted to developers

DBA role: - is granted to database maintenance personnel

6) Clear the screen and exit. Use the $ followed by the window command symbol to use the window command

Clear screen: $cls

Exit: $exit

7) Check the current time of the system

Database Oracle installation and access

8) Clear cache commands

Command: clear buffer

Database Oracle installation and access

2. Use SQL Developer to access

1) Double-click the sql developer.exe application to open

Database Oracle installation and access

Database Oracle installation and access

2) The first time you enter SQL Developer, you need to set the connection parameters. First, right-click on the Connection on the left side of the window to open a new connectionDatabase Oracle installation and access

 

 

3) After the connection is successful, the display is as follows

Database Oracle installation and access

Let me share some of my favorite information, I hope it can help everyone

This information is organized around [software testing]. The main content includes: python automated testing exclusive video, Python automated detailed information, a full set of interview questions and other knowledge content. For friends of software testing, it should be the most comprehensive and complete preparation warehouse. This warehouse has accompanied me through a lot of bumpy roads, and I hope it can also help you. Pay attention to WeChat public account: Programmer Erhei, you can get it directly
 

Guess you like

Origin blog.csdn.net/m0_52668874/article/details/114949886