Install Oracle in windows environment

installation steps

decompress
insert image description here

insert image description here

insert image description here
insert image description here
insert image description here
insert image description here

insert image description here

insert image description here
Note: "Using a virtual account". There will be "ORA-12518 TNS listener unable to distribute client connection" problem.
"Create a new Windows user", when installing, it will prompt that the account cannot be created. The reason is probably that the password contains the user name. Later, I created an account first, and then "use an existing Windows user".

Created here as a container database
insert image description here

insert image description here
insert image description here

The installation wait time is long, please wait patiently
insert image description here

insert image description here

Configuration Environment

1. Create a new variable home, and then add it to the path: %ORACLE_HOME%\BIN
variable name: ORACLE_HOME
variable value: F:\Oracle\product\11.2.0\dbhome_2 (usually the folder after the version number)
or Set directly in the path: F:\Oracle\product\11.2.0\dbhome_2\BIN

2. NLS_LANG: Configure the character set of the client (can solve the problem of Chinese garbled characters).
Variable name: NLS_LANG
Variable value: SIMPLIFIED CHINESE_CHINA.ZHS16GBK
View server character set: select userenv('language') from dual;

3. TNS_ADMIN: monitor the database tns, and only when PL/SQL logs in can the database connection information be displayed.
Variable name TNS_ADMIN
variable value F:\Oracle\product\11.2.0\dbhome_1\network\admin (your ADMIN directory location)
Your database connection information is stored in the ADMIN folder, and the file is tnsnames.ora

Oracle 12C CDB和PDB

Link: Oracle-CDB&PDB

​ Oracle 12C introduces new features of CDB and PDB. In the multitenant user environment (Multitenant Environment) introduced by ORACLE 12C database, one database container (CDB) is allowed to host multiple pluggable databases (PDB). The full name of CDB is Container Database, which is the database container, and the full name of PDB is Pluggable Database, which can be plugged into the database.

insert image description here

create user

cmd
// 进入数据库
sqlplus /nolog
conn / as sysdba

-- 查看当前连接数据库: 返回cdb或者pdb名称
show con_name;

-- 创建用户
create user c##ggs identified by 123456 default tablespace users temporary tablespace temp;
GRANT CREATE SESSION,CONNECT,RESOURCE,DBA TO c##GGS;
-- 修改任何表的权限
GRANT ALTER ANY TABLE TO c##GGS;
-- 修改系统参数的权限
GRANT ALTER SYSTEM TO c##GGS;
-- 查询任何字典表、任何事务的权限
GRANT SELECT ANY DICTIONARY,SELECT ANY TRANSACTION TO c##GGS;


When using PL/SQL Developer to connect to Oracle, an error "ORA-12541: TNS: No listener" is reported, as shown in the figure below.

insert image description here

You can solve it by following the steps below.

Listener configuration

insert image description here

insert image description here
Select "Reconfigure", as shown in the figure below, and click Next.
insert image description here
3. Select the listening program, as shown in the figure below, select the protocol, generally the default is fine, and click Next.
insert image description here
insert image description here

Select the port number, as shown in the figure below, and click Next.
insert image description here

Select "No", as shown in the figure below, and click Next.
insert image description here
The listener configuration is complete, as shown in the figure below, click Next.

insert image description here
Local network service name configuration
Select "Local network service name configuration", as shown in the figure below, click Next.

insert image description here
Select "Reconfigure", as shown in the figure below, and click Next.

insert image description here
"Network service name" select the name of your own database, as shown in the figure below, click Next.

insert image description here
Fill in the "Service Name", which is actually the full database name when you created the database, as shown in the figure below, and click Next.

insert image description here
Select the protocol, "TCP" is selected by default, as shown in the figure below, click Next.

insert image description hereFill in the "Host Name", which can be your IP address or your host name; select the port number, as shown in the figure below, and click Next.

insert image description here

Fill in the "Network Service Name", which is your own database name, the editor's is "orcl", click Next. "Do you want to configure another service name?" Select "No", click Next to complete.

Guess you like

Origin blog.csdn.net/qq_41604890/article/details/126808992