第一、
MQ(压队列) PGA share pool
三层结构
应用服务器--->中间件--->数据库
第二、
TCP/IP
第三、
应用层:应用层、表示层、会话层
数据流层:传输层、网络层、数据链路层、物理层
第四、
数据链路层
802.3/802.2
摩尔斯密码
第五、
物理层
电信、电缆
第六、
网线:500m
光纤:3公里
第七、
MAC:十六进制的地址
第八、
封装 ( encapsulate/encapsulation):数据要通过网络进行传输,要从高层一层一层的向下传送,如果一个主机要传送数据到别的主机,先把数据装到一个特殊协议报头中,这个过程叫-----封装
封装分为:切片和加控制信息
解封装:上述的逆向过程
第九、
防火墙、Selinux给关闭
第十、
NDS、TNS文档
第十一、
/u01/app/oracle/product/11.2.0/db_1/network/admin/samples
[oracle@ocp samples]$ ls
listener.ora sqlnet.ora tnsnames.ora
[oracle@ocp samples]$
tnsnames.ora:连接
listener.ora:接收
第十二、
schema
instant name
service name
db name
db unique name
global name
----------------
第十三、
SYS@orcl>show parameter name;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert string
db_name string orcl
db_unique_name string orcl
global_names boolean FALSE
instance_name string orcl
lock_name_space string
log_file_name_convert string
processor_group_name string
service_names string orcl
-----------------------
第十四、实例名称
[oracle@ocp ~]$ echo $ORACLE_SID
orcl
------------------------
第十五、
PGA:
-------------------------
第十六、监听
[oracle@ocp ~]$ lsnrctl
------------------------
第十七、
[oracle@ocp ~]$ lsnrctl status listener
----------------------
第十八、数据库连接
[oracle@ocp home]$ sqlplus sys/oracle as dba
----------------------
第十九、
[oracle@ocp home]$ lsnrctl start listener
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 09-MAR-2019 11:09:49
Copyright (c) 1991, 2011, Oracle. All rights reserved.
TNS-01106: Listener using listener name LISTENER has already been started
-----------------------
第二十、
netmgr
---------------------
第二十一、
[oracle@ocp home]$ sqlplus sys/oracle@ocptest as sysdba
sys:用户名
oracle:密码
---------------------
第二十二、
[oracle@ocp admin]$ sqlplus sys/oracle@ocp/orcl:1521 as sysdba --- TCP/IP连接
----------------------
第二十三、
LDAP服务器:域控服务器
----------------------
第二十四、
[oracle@ocp admin]$ sqlplus sys/oracle@ocp/orcl:1521 as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Sat Mar 9 11:40:41 2019
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SYS@ocp/orcl:1521>conn sys/oracle@ocp/orcl:1521 as sysdba
Connected.
SYS@ocp/orcl:1521>alter user hr identified by hr account unlock;
User altered.
SYS@ocp/orcl:1521>
--------------------
第二十五、
1521 在哪个层 65535端口、IP地址
路由器
sys/oracle
------------------
第二十六、
1111.1111.1111.1111
私有、公有
----------------------
第二十七、
291 netstat -ntlp
292 lsof -i:1521
293 lsof -i:1521
-------------------------
第二十八、
网络层、数据链路层、物理层---防火墙、路由器、交换机
--------------------------
第二十九、
[oracle@ocp admin]$ tnsping ocptest
---------------------------
[oracle@ocp admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Sat Mar 9 13:22:16 2019
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SYS@orcl>show parameter listener
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
listener_networks string
local_listener string
remote_listener string
SYS@orcl>
---------------------------
第三十、
SYS@orcl>show parameter dispatch
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
dispatchers string (PROTOCOL=TCP) (SERVICE=orclXD
B)
max_dispatchers integer
SYS@orcl>
-----------------------------
第三十一、
share server
----------------------------
第三十二、
SGA、PGA
-----------------------------
第三十三、
SYS@orcl>alter system set dispatchers='(PROTOCOL=TCP)(DISPATCHERS=3)';
System altered.
SYS@orcl>startup force;
-------------------------
第三十四、
alter system set dispatchers='(PROTOCOL=TCP)(DISPATCHERS=3)'
------------------------
第三十五、
连接占内存的情况
Shared Server
Dedicated Server
------------------------
第三十六、
SYS@ocptest>alter system set dispatchers='(PROTOCOL=TCP)(SERVICE=orclXD)';
System altered.
SYS@ocptest>shutdown immediate;
--------------------------
第三十七、
数据库和应用最多就255个连接池;session
-------------------------
第三十八、
bi publisher
isoft
---------------------------
第三十九、
prod1
select * from sh.sales@prod1;
create synonym sales for sh.sales@prod1;
select * form sales;
------------------------------
第四十、
动态监听:默认的,数据库在内存中运行的程序找监听;(默认)
静态监听:监听找数据库(RMAN、DG)
--------------------------------
第四十一、
lsnrctl reload listener
------------------------------
第四十二、
show parameter listener;
alter system
startup force;
--------------------------------
第四十三、
alter system register ; --- 手动提交注册信息
alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=
![]()
ocp)(PORT=1522))' --- 修改端口
--------------------------------
第四十四、
SYS@orcl>startup force;
ORACLE instance started.
Total System Global Area 1925062656 bytes
Fixed Size 1345772 bytes
Variable Size 1107298068 bytes
Database Buffers 805306368 bytes
Redo Buffers 11112448 bytes
Database mounted.
Database opened.
SYS@orcl>show parameter name;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert string
db_name string orcl
db_unique_name string orcl
global_names boolean FALSE
instance_name string orcl
lock_name_space string
log_file_name_convert string
processor_group_name string
service_names string orcl
SYS@orcl>
-------------------------------
[oracle@ocp admin]$ lsnrctl status listener
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 09-MAR-2019 14:53:30
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ocp)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias listener
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 09-MAR-2019 14:47:21
Uptime 0 days 0 hr. 6 min. 9 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/ocp/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocp)(PORT=1522)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXD" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service... 动态
The command completed successfully
[oracle@ocp admin]$
---------------------------------------
sqlplus / as sysdba ---- OS验证(没有tnsname.ora照样进数据库,操作系统验证)
sqlplus sys/oracle@ocptest / as sysdba --- TCP/IP验证
sqlplus sys/oracle@ocp/orcl:1521 as sysdba --- TCP/IP连接
show parameter name;
-----------------------------------
cd $ORACLE_HOME
----------------------------------
SYS@ocptest>show parameter os
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_lost_write_protect string NONE
diagnostic_dest string /u01/app/oracle
optimizer_index_cost_adj integer 100
os_authent_prefix string ops$
os_roles boolean FALSE
remote_os_authent boolean FALSE
remote_os_roles boolean FALSE
timed_os_statistics integer 0
SYS@ocptest>
-------------------------------------------
SYS@ocptest>col name for a30;
SYS@ocptest>col value for a20;
------------------------------------------
SYS@ocptest>help set;
-----------------------------------------
SYS@ocptest>set pagesize 200;
SYS@ocptest>set line 300;
SYS@ocptest>set linesize 300;
-----------------------------------------
oracle sqlplus 格式化输出
-----------------------------------------
运维工具:
1、sqlplus developer
2、toad
3、https://www.cnblogs.com/roucheng/p/oraclesqlplus.html
------------------------------------------
脚本之家
https://www.jb51.net/softjc/585877.html
--------------------------------------
1、alter system set local_listener=''; ---- 清空数据库配置
--------------------------------------
[oracle@ocp admin]$ pwd
/u01/app/oracle/product/11.2.0/db_1/network/admin
[oracle@ocp admin]$ vi tnsnames.ora
2、改配置文件
3、重启数据库
---------------------------------------
select * from dba_objects;
---------------------------------------