Oracle11g installation/use:

Oracle11g installation/use:

Ahhh~ I have stopped working on project notes for a while, and
I am not very cold about the installation of tutorials. There are a lot of books on Baidu B station videos... and the next step is crazy...
But if you do the Oracle notes, just do everything at once~ Otherwise, you will feel uncomfortable...

Install Oracle11g

(Because I have already installed some examples and pictures from other articles~)
This time I introduce the 11 version, and the installation methods for other versions are similar... The
Oracle version has 9i 10/11g, and the latest one has 12c, respectively, indicating different eras~ i Internet g grid distributed computing c cloud (cloud storage...)
Note:

 在安装之前,你一定要保证你的电脑中没有了之前安装的Oracle数据库的残留物,也就是说如果你之前安装过oracle数据库,一定要清除干净了,才能安装。

start installation

Unzip the database folder of the installation file , then right-click the properties of the application setup.exe inside .
Suggestion: and run this program as an administrator;
Insert picture description hereInsert picture description here
a small black box will appear. Nothing needs to be set, just wait for the black box to disappear, and then wait for the installation window to appear .
Insert picture description here
Uncheck "I want to receive security updates via My Oracle Support"
click "Next" button, an error message appears, "e-mail address is not specified", ignore this error , click "Yes" button.

Choose according to your own needs in the installation options. Here we choose "Create and configure a database" and then "Next"; in the
Insert picture description here
system category, we choose "Desktop" and then "Next";
Insert picture description here
in a typical installation.
We can choose the oracle installation directory and database location , and wait for a series of location options... The
first choice for any software installation is definitely not the system disk, so we choose D drive here and create an "oracle" folder under D drive. We choose the enterprise version for the
database version ; (the enterprise version is also free for learning and use ).
The database name can be orcl by default , and the
management password should be filled in according to our own habits. The password suggested by oracle is more complicated. Here we choose the password and fill it in as "orcl" for easy remembering and not easy to forget.
The password set here can be understood as a default password for all users. Of course, it can also be modified separately for different users... Here you need to specify it~

Then click "Next": 会提示口令不符建议标准是否继续安装 we choose to continue the installation, ignore the password suggestion; a
Insert picture description here
pop-up asks: xxxx whether to continue, no accidents are to choose "Yes"
in the summary window: click the Finish button to continue the installation ~
Insert picture description here
after the database is installed Appears: Database Configuraction Assistant page.
Insert picture description here
Here are the default settings provided during Oracle installation: System users and current status.
In order to facilitate later use, you can unlock the SCOTT user. The Oracle default System sys user unlock status.
Of course, you can also manually unlock the user: alter user scott (or the user who needs to unlock) account unlock; this operation needs to be done under the System or sys user.

**Finally, the installation is successful, and you can close it.**
Insert picture description here
Among them, Enterprise Manager Database Control URL-(orl):htps.//localhost 1158/em is: the URL address of the enterprise management console.
The localhost in the UFL address can also be written as the computer name:
https:// / local computer name:1158/em Use the local computer name to connect to the URL... After the
Oracle installation is completed, the
service will be registered in the system. there are two services must enable these services registered in
other words: OracleOraDb11g_ home 1TNSListenerand OracleServiceORCLservices, Oracle will not work otherwise.

[For other operations later: configure and uninstall the database... please follow other tutorials ]

Start the database under Windows

The startup/shutdown of the Oracle service under the Windows operating system is managed in the
background service mode; the startup and shutdown of the Oracle instance is done through the background service management interface. (Each instance of Oracle is started as a service)

Three common Oracle services

Open the service window: use the win + r shortcut to open the run window, enter the command·services.msc` and press Enter.

(1) OracleServiceSID
service is a database service that for the SID (system identifier, the global database name database installation time!)
This is the default service from the start, you can start the database automatically, if not started when connecting to the database to be wrong, you must Start
(2) OracleOraDb11g_home1TNSListener
listener service, required for remote access, (must be started)
(3) OracleDBConsoleSID
Oracle database console service, (not required)
Insert picture description here
Oracle ORCL VSS Writer Service: Oracle volume mapping copy write service, (not Must start)
OracleJobSchedulerORCL: Oracle job scheduling (timer) service, (not required to start)
OracleMTSRecoveryService: server control (not required to start)
OracleOraDb11g_home1ClrAgent: part of the Oracle database .NET extension service. (Not required to start) The
service naming may be different due to different personal installation environments. . .

Connect to the database

When creating a new database, Oracle will create some default database users. Such as System Sys Scott. . .
You can use these users to connect to the database. Sys and System users are both Oracle system users
and Scott users are: The Oracle test account contains some test style sheets. . .
To connect to the database, you can use Oracle's own SOL*Plus and SOL Develper tools, or you can use the PL/SOL Developer tool provided by a third party.

SOL * More

Oracle's SOL Plus is a client tool that interacts with the Oracle database. You can run SQL Plus commands to manipulate SQL statements:
In the Start menu, select "All Programs"-"Oracle-OraDb11g homel"-Application Development "SQL*PLUS" command, enter the DOS interface and
Insert picture description here
enter: Scott / ok username/password Log in to operate the database... (please add or not add a semicolon at the end~)
Insert picture description here

PL/SOL Developer

Compared with Oracle's own SQL*Plus tool, this tool is a third-party tool, which is more convenient to use~
Insert picture description here

use

Please click .

Oracle uses SSM

Oracle operation SSM
is no different from Mysql, it can't be the connection URL for SQL~ The driver is different (Mysql's 3306 Oracle's port 1521~)
Mysql directly connects to the database, and Oracle connects to the user. . . In the end, it is the operation table ~
modify the database access data source of Mybatis:

		<!-- 数据源 -->
	<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
		<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />     <!--加载驱动-->
		<!-- 连接URL: jdbc:oracle:thin:@<host>:<port>:<SID> -->
		<property name="url" value="jdbc:oracle:thin:@127.0.0.1:1521/orcl"></property>  <!-- 对于url连接,有时候会出现关键子建议使用: <![CDATA[ ... ]]> 包含,避免 < & 等关键字; -->
		<property name="username" value="scott"></property>		<!-- 登录用户 -->
		<property name="password" value="ok"></property>		<!-- 用户密码 -->
	</bean>

Guess you like

Origin blog.csdn.net/qq_45542380/article/details/109149627