《收获,不止Oracle》读书笔记一

news2024/11/15 2:05:37

当今时代

技术人员,真正的差距其实在意识

1.忽略了知识的重点

20%的知识,解决80%的问题

2.从未考虑知识落地

知识要落地, 要思考应用的场合。

学习任何技术都是一样的,没有思考过你所学的某项技术有什么用,没有想过如何落地,如何应用到实际工作中去,都是毫无意义的学习,纯属浪费生命。

3.选择技术使用场景

 

1.该如何请教他人

2.问题该怎样描述

3.失误不只是粗心,

 

 

 

准确地把握需求,尽可能少做事!不要小看这句话,这是一句永不过时的化。——少做事。

保证精简学习的内容,要最快地掌握。将学习和工作结合在一起,带着知识点该如何落地应用以及什么时候该选择什么技术的想法去学习。这样目的性极强的探索性质的学习,往往学习一遍就够了。

强调知识的落地,探讨最多的话题就是,学习这些知识有什么用,

第一章意识,少做事从学习开始

 

 学什么先了解要做什么

数据库应用可用分为:

  • 数据库开发: SQL语句的增删改查,PL/SQL逻辑处理
  • 数据库管理:安装、部署、调参、备份恢复、数据迁移、分配用户、权限管控、表空间划分、故障定位、问题分析、数据库诊断修复
  • 数据库优化:解决性能问题,提升数据库运行效率
  • 数据库设计:深入了解需求业务和数据库原理,数据库模型建设、数据库对象的设计(表、索引)

 

 

 

 

第二章 震惊,体验物理体系之旅

 Oracle体系结构图

 一、Oracle由实例和数据库组成

二、实例由一个共享内存区SGA(System Global Area)和一系列后台进程组成的,其中SGA主要被划分为共享池(shared pool)、数据缓存区(db cache)和日志缓存区(log buffer)三类。后台进程包括PMON,SMON,LCKn,RECO,CKPT,DBWR,LGWR,ARCH等系列进程。

三、数据库是由数据文件、参数文件、日志文件、控制文件、归档日志文件等一系列文件组成的,其中归档日志最终可能会被转移到新的存储介质中,用于备份恢复使用。

四、PGA(Program Global Area)区,和SGA明显区别在于,PGA不是共享内存,是私有不共享的,用户对数据库发起的无论查询还是更新的任何操作,都先在PGA进行预处理,然后才进入实例区域,由SGA和后台进程共同完成。

PGA的具体作用:

第一,保护用户的连接信息。会话属性、绑定变量

第二,保护用户权限等重要信息,

第三,当发起的指令需要排序时,PGA中可进行排序。

查看回滚段的相关参数

undo_management 为AUTO表示自动进行回滚段管理,回滚段空间不够时候可以自动扩展

undo_retention 为 900, DML语句需要记录前镜像,当COMMIT后,表示回滚段保留的前镜像被打上了可以覆盖重新使用的标记。但是要在900秒后方可允许。

undo_tablespace  为UNDOTBS1,表示回滚段表空间的名字为UNDOTBS1

SQL> show parameter undo

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
temp_undo_enabled                    boolean                           FALSE
undo_management                      string                            AUTO
undo_retention                       integer                           900
undo_tablespace                      string                            UNDOTBS1
SQL> 

查看SGA及PGA的大小分配

SQL> show user
USER is "SYS"
SQL> show parameter sga

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
allow_group_access_to_sga            boolean                           FALSE
lock_sga                             boolean                           FALSE
pre_page_sga                         boolean                           TRUE
sga_max_size                         big integer                       600M
sga_min_size                         big integer                       0
sga_target                           big integer                       0
unified_audit_sga_queue_size         integer                           1048576
SQL> show parameter pga

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
pga_aggregate_limit                  big integer                       2G
pga_aggregate_target                 big integer                       200M
SQL> 

查看共享池和数据缓存区的大小分配

SQL> 
SQL> show user;
USER is "SYS"
SQL> show parameter shared_pool_size

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
shared_pool_size                     big integer                       0
SQL> show parameter db_cache_size

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
db_cache_size                        big integer                       0
SQL> 

使用ipcs-m 查看共享内存的命令

[oracle@oracle-db-19c ~]$ ipcs -m

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x00000000 0          oracle     600        9138176    128                     
0x00000000 1          oracle     600        612368384  64                      
0x00000000 2          oracle     600        7639040    64                      
0x8239f754 3          oracle     600        16384      64                      
0x00000000 8          oracle     600        524288     2          dest         

[oracle@oracle-db-19c ~]$ 

查看日志缓存区的大小

SQL> 
SQL> show user;
USER is "SYS"
SQL> show parameter log_buffer

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
log_buffer                           big integer                       7136K
SQL> 

参数的设置如何修改?

alter system命令增加了一个新的选项scope。scope参数有3个可选值:memory、spfile和both.

  • memory :只改变当前实例运行,重新启动数据库后失效。
  • spfile:只改变spfile的设置,不改变当前实例运行,重新启动数据库后生效
  • both:同时改变实例及spfile,当前更改立即生效,重新启动数据库后仍然有效。

可以通过alter system或导入导出来更改spfile的内容

针对RAC环境,alter system还可以指定sid参数,对不同实例进行不同的设置。

通过spfile修改参数的完整命令如下:

alter system set <parameter_name>=<value> scope=memory|spfile|both[sid=<sid_name>]
  • 如果当前实例使用的pfile而非spfile,则scope=spfile或scope=both会产生错误
  • 如果实例以pfile启动,则scope的默认值为memory,若以spfile启动,则默认值为both.
  • 有些参数必须重启才能生效,如log_buffer.
  • scope的默认值为both

修改SGA的大小(scope=spfile的方式)

SQL> set pagesize 200
SQL> set linesize 200
SQL> 
SQL> show parameter sga

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
allow_group_access_to_sga            boolean                           FALSE
lock_sga                             boolean                           FALSE
pre_page_sga                         boolean                           TRUE
sga_max_size                         big integer                       600M
sga_min_size                         big integer                       0
sga_target                           big integer                       0
unified_audit_sga_queue_size         integer                           1048576
SQL> 
SQL> show user
USER is "SYS"
SQL> 
SQL> alter system set sga_target=500M scope=spfile;

System altered.

SQL> show parameter sga

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
allow_group_access_to_sga            boolean                           FALSE
lock_sga                             boolean                           FALSE
pre_page_sga                         boolean                           TRUE
sga_max_size                         big integer                       600M
sga_min_size                         big integer                       0
sga_target                           big integer                       0
unified_audit_sga_queue_size         integer                           1048576
SQL> 
SQL> 
SQL> show user
USER is "SYS"
SQL> show parameter sga

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
allow_group_access_to_sga            boolean                           FALSE
lock_sga                             boolean                           FALSE
pre_page_sga                         boolean                           TRUE
sga_max_size                         big integer                       600M
sga_min_size                         big integer                       0
sga_target                           big integer                       0
unified_audit_sga_queue_size         integer                           1048576
SQL> alter system set sga_target=600M scope=both;

System altered.

SQL> show parameter sga

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
allow_group_access_to_sga            boolean                           FALSE
lock_sga                             boolean                           FALSE
pre_page_sga                         boolean                           TRUE
sga_max_size                         big integer                       600M
sga_min_size                         big integer                       0
sga_target                           big integer                       600M
unified_audit_sga_queue_size         integer                           1048576
SQL> 

log_buffer等参数修改后必须重启才能生效。(需要重启之后才能生效)

[oracle@oracle-db-19c ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jan 2 21:30:22 2023
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> show user
USER is "SYS"
SQL> show con_name;

CON_NAME
------------------------------
CDB$ROOT
SQL> show parameter log_buffer;

NAME                                 TYPE
------------------------------------ ---------------------------------
VALUE
------------------------------
log_buffer                           big integer
7136K
SQL> set pagesize 200
SQL> set linesize 200
SQL> show parameter log_buffer;

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
log_buffer                           big integer                       7136K
SQL> alter system set log_buffer=15000K scope=memory;
alter system set log_buffer=15000K scope=memory
                 *
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified


SQL> alter system set log_buffer=15000K scope=both;
alter system set log_buffer=15000K scope=both
                 *
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified


SQL> alter system set log_buffer=15000K scope=spfile;

System altered.

SQL> show parameter log_buffer;

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
log_buffer                           big integer                       7136K
SQL> 

SQL> 
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> 
SQL> startup
ORACLE instance started.

Total System Global Area  629145392 bytes
Fixed Size                  9137968 bytes
Variable Size             197132288 bytes
Database Buffers          406847488 bytes
Redo Buffers               16027648 bytes
Database mounted.
Database opened.
SQL> 
SQL> show user;
USER is "SYS"
SQL> show parameter log_buffer;

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
log_buffer                           big integer                       15000K
SQL> 

进程的体会

[oracle@oracle-db-19c ~]$ 
[oracle@oracle-db-19c ~]$ ps -ef | grep oracle
avahi        997       1  0 Jan01 ?        00:00:02 avahi-daemon: running [oracle-db-19c.local]
oracle      1728       1  0 Jan01 ?        00:00:01 /u01/app/oracle/product/19.3.0/dbhome_1/bin/tnslsnr LISTENER -inherit
oracle      2320       1  0 Jan01 ?        00:00:00 /usr/lib/systemd/systemd --user
oracle      2325    2320  0 Jan01 ?        00:00:00 (sd-pam)
oracle      2340    2320  0 Jan01 ?        00:00:00 /usr/bin/pulseaudio --daemonize=no --log-target=journal
oracle      2349       1  0 Jan01 ?        00:00:00 /usr/bin/gnome-keyring-daemon --daemonize --login
oracle      2355    2286  0 Jan01 tty2     00:00:00 /usr/libexec/gdm-wayland-session --register-session gnome-session
oracle      2357    2320  0 Jan01 ?        00:00:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
oracle      2360    2355  0 Jan01 tty2     00:00:00 /usr/libexec/gnome-session-binary
oracle      2471    2360  0 Jan01 tty2     00:01:00 /usr/bin/gnome-shell
oracle      2516    2320  0 Jan01 ?        00:00:00 /usr/libexec/gvfsd
oracle      2523    2320  0 Jan01 ?        00:00:00 /usr/libexec/gvfsd-fuse /run/user/1501/gvfs -f -o big_writes
oracle      2526    2471  0 Jan01 tty2     00:00:00 /usr/bin/Xwayland :0 -rootless -terminate -accessx -core -auth /run/user/1501/.mutter-Xwaylandauth.1Q8PW1 -listen 4 -listen 5 -displayfd 6
oracle      2535    2320  0 Jan01 ?        00:00:00 /usr/libexec/at-spi-bus-launcher
oracle      2540    2535  0 Jan01 ?        00:00:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
oracle      2547    2320  0 Jan01 ?        00:00:00 /usr/libexec/at-spi2-registryd --use-gnome-session
oracle      2554    2471  0 Jan01 tty2     00:00:02 ibus-daemon --xim --panel disable
oracle      2558    2554  0 Jan01 tty2     00:00:00 /usr/libexec/ibus-dconf
oracle      2560    2554  0 Jan01 tty2     00:00:00 /usr/libexec/ibus-extension-gtk3
oracle      2562    2320  0 Jan01 ?        00:00:00 /usr/libexec/xdg-permission-store
oracle      2567       1  0 Jan01 tty2     00:00:00 /usr/libexec/ibus-x11 --kill-daemon
oracle      2571    2320  0 Jan01 ?        00:00:00 /usr/libexec/ibus-portal
oracle      2573    2320  0 Jan01 ?        00:00:00 /usr/libexec/gnome-shell-calendar-server
oracle      2592    2320  0 Jan01 ?        00:00:00 /usr/libexec/dconf-service
oracle      2598    2320  0 Jan01 ?        00:00:00 /usr/libexec/gvfs-udisks2-volume-monitor
oracle      2607    2320  0 Jan01 ?        00:00:00 /usr/libexec/gvfs-mtp-volume-monitor
oracle      2611    2320  0 Jan01 ?        00:00:00 /usr/libexec/gvfs-gphoto2-volume-monitor
oracle      2615    2320  0 Jan01 ?        00:00:00 /usr/libexec/gvfs-afc-volume-monitor
oracle      2620    2320  0 Jan01 ?        00:00:00 /usr/libexec/gvfs-goa-volume-monitor
oracle      2624    2320  0 Jan01 ?        00:00:00 /usr/libexec/goa-daemon
oracle      2628    2320  0 Jan01 ?        00:00:00 /usr/libexec/evolution-source-registry
oracle      2653    2320  0 Jan01 ?        00:00:11 /usr/libexec/goa-identity-service
oracle      2664    2360  0 Jan01 tty2     00:00:00 /usr/libexec/gsd-power
oracle      2665    2360  0 Jan01 tty2     00:00:00 /usr/libexec/gsd-print-notifications
oracle      2668    2360  0 Jan01 tty2     00:00:00 /usr/libexec/gsd-rfkill
oracle      2670    2360  0 Jan01 tty2     00:00:00 /usr/libexec/gsd-screensaver-proxy
oracle      2678    2360  0 Jan01 tty2     00:00:00 /usr/libexec/gsd-sharing
oracle      2691    2360  0 Jan01 tty2     00:00:05 /usr/libexec/gsd-smartcard
oracle      2692    2360  0 Jan01 tty2     00:00:00 /usr/libexec/gsd-sound
oracle      2694    2320  0 Jan01 ?        00:00:00 /usr/libexec/evolution-calendar-factory
oracle      2696    2360  0 Jan01 tty2     00:00:00 /usr/libexec/gsd-xsettings
oracle      2713    2360  0 Jan01 tty2     00:00:00 /usr/libexec/gsd-wacom
oracle      2714    2554  0 Jan01 tty2     00:00:00 /usr/libexec/ibus-engine-simple
oracle      2728    2360  0 Jan01 tty2     00:00:00 /usr/libexec/gsd-account
oracle      2733    2360  0 Jan01 tty2     00:00:00 /usr/libexec/gsd-a11y-settings
oracle      2738    2360  0 Jan01 tty2     00:00:00 /usr/libexec/gsd-color
oracle      2743    2360  0 Jan01 tty2     00:00:00 /usr/libexec/gsd-clipboard
oracle      2749    2360  0 Jan01 tty2     00:00:04 /usr/libexec/gsd-housekeeping
oracle      2750    2360  0 Jan01 tty2     00:00:00 /usr/libexec/gsd-datetime
oracle      2754    2360  0 Jan01 tty2     00:00:00 /usr/libexec/gsd-media-keys
oracle      2759    2360  0 Jan01 tty2     00:00:00 /usr/libexec/gsd-keyboard
oracle      2761    2360  0 Jan01 tty2     00:00:00 /usr/libexec/gsd-mouse
oracle      2805    2360  0 Jan01 tty2     00:00:19 /usr/bin/gnome-software --gapplication-service
oracle      2827    2694  0 Jan01 ?        00:00:00 /usr/libexec/evolution-calendar-factory-subprocess --factory all --bus-name org.gnome.evolution.dataserver.Subprocess.Backend.Calendarx2694x2 --own-path /org/gnome/evolution/dataserver/Subprocess/Backend/Calendar/2694/2
oracle      2836       1  0 Jan01 tty2     00:00:00 /usr/libexec/gsd-printer
oracle      2838       1  0 Jan01 tty2     00:03:07 /usr/bin/vmtoolsd -n vmusr --blockFd 3 --uinputFd 4
oracle      2847    2360  0 Jan01 tty2     00:00:00 /usr/libexec/tracker-miner-apps
oracle      2859    2360  0 Jan01 tty2     00:00:00 /usr/libexec/tracker-miner-fs
oracle      2872    2320  0 Jan01 ?        00:00:00 /usr/libexec/evolution-addressbook-factory
oracle      2885    2360  0 Jan01 tty2     00:00:00 /usr/libexec/gsd-disk-utility-notify
oracle      2892    2320  0 Jan01 ?        00:00:00 /usr/libexec/tracker-store
oracle      2941    2872  0 Jan01 ?        00:00:00 /usr/libexec/evolution-addressbook-factory-subprocess --factory all --bus-name org.gnome.evolution.dataserver.Subprocess.Backend.AddressBookx2872x2 --own-path /org/gnome/evolution/dataserver/Subprocess/Backend/AddressBook/2872/2
oracle      3118    2320  0 Jan01 ?        00:00:00 /usr/libexec/gvfsd-metadata
root      113173  113110  0 20:20 pts/0    00:00:00 su - oracle
oracle    113174  113173  0 20:20 pts/0    00:00:00 -bash
oracle    113221  113174  0 20:20 pts/0    00:00:00 rlwrap sqlplus / as sysdba
oracle    113222  113221  0 20:20 pts/1    00:00:00 sqlplus   as sysdba
root      114023  113977  0 20:32 pts/2    00:00:00 su - oracle
oracle    114024  114023  0 20:32 pts/2    00:00:00 -bash
root      116914  116791  0 21:21 pts/3    00:00:00 su - oracle
oracle    116915  116914  0 21:21 pts/3    00:00:00 -bash
oracle    117683  116915  0 21:30 pts/3    00:00:00 rlwrap sqlplus / as sysdba
oracle    117684  117683  0 21:30 pts/5    00:00:00 sqlplus   as sysdba
oracle    117952       1  0 21:33 ?        00:00:00 ora_pmon_cdb1
oracle    117954       1  0 21:33 ?        00:00:00 ora_clmn_cdb1
oracle    117956       1  0 21:33 ?        00:00:00 ora_psp0_cdb1
oracle    117958       1  0 21:33 ?        00:00:00 ora_vktm_cdb1
oracle    117962       1  0 21:33 ?        00:00:00 ora_gen0_cdb1
oracle    117964       1  0 21:33 ?        00:00:00 ora_mman_cdb1
oracle    117968       1  0 21:33 ?        00:00:00 ora_gen1_cdb1
oracle    117971       1  0 21:33 ?        00:00:00 ora_diag_cdb1
oracle    117973       1  0 21:33 ?        00:00:00 ora_ofsd_cdb1
oracle    117976       1  0 21:33 ?        00:00:00 ora_dbrm_cdb1
oracle    117978       1  0 21:33 ?        00:00:00 ora_vkrm_cdb1
oracle    117980       1  0 21:33 ?        00:00:00 ora_svcb_cdb1
oracle    117982       1  0 21:33 ?        00:00:00 ora_pman_cdb1
oracle    117984       1  0 21:33 ?        00:00:00 ora_dia0_cdb1
oracle    117986       1  0 21:33 ?        00:00:00 ora_dbw0_cdb1
oracle    117988       1  0 21:33 ?        00:00:00 ora_lgwr_cdb1
oracle    117990       1  0 21:33 ?        00:00:00 ora_ckpt_cdb1
oracle    117992       1  0 21:33 ?        00:00:00 ora_lg00_cdb1
oracle    117994       1  0 21:33 ?        00:00:00 ora_smon_cdb1
oracle    117996       1  0 21:33 ?        00:00:00 ora_lg01_cdb1
oracle    117998       1  0 21:33 ?        00:00:00 ora_smco_cdb1
oracle    118000       1  0 21:33 ?        00:00:00 ora_reco_cdb1
oracle    118002       1  0 21:33 ?        00:00:00 ora_w000_cdb1
oracle    118004       1  0 21:33 ?        00:00:00 ora_lreg_cdb1
oracle    118006       1  0 21:33 ?        00:00:00 ora_w001_cdb1
oracle    118008       1  0 21:33 ?        00:00:00 ora_pxmn_cdb1
oracle    118012       1  1 21:33 ?        00:00:03 ora_mmon_cdb1
oracle    118014       1  0 21:33 ?        00:00:00 ora_mmnl_cdb1
oracle    118016       1  0 21:33 ?        00:00:00 ora_d000_cdb1
oracle    118018       1  0 21:33 ?        00:00:00 ora_s000_cdb1
oracle    118020       1  0 21:33 ?        00:00:00 ora_tmon_cdb1
oracle    118023       1  0 21:33 ?        00:00:00 ora_m000_cdb1
oracle    118029  117684  2 21:33 ?        00:00:05 oraclecdb1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle    118031       1  0 21:33 ?        00:00:00 ora_tt00_cdb1
oracle    118033       1  0 21:33 ?        00:00:00 ora_tt01_cdb1
oracle    118035       1  0 21:33 ?        00:00:00 ora_tt02_cdb1
oracle    118060       1  0 21:33 ?        00:00:00 ora_w002_cdb1
oracle    118062       1  0 21:33 ?        00:00:00 ora_aqpc_cdb1
oracle    118071       1  0 21:33 ?        00:00:00 ora_p000_cdb1
oracle    118073       1  0 21:33 ?        00:00:00 ora_p001_cdb1
oracle    118075       1  0 21:33 ?        00:00:00 ora_p002_cdb1
oracle    118077       1  0 21:33 ?        00:00:00 ora_p003_cdb1
oracle    118079       1  0 21:33 ?        00:00:00 ora_p004_cdb1
oracle    118081       1  0 21:33 ?        00:00:00 ora_p005_cdb1
oracle    118083       1  0 21:33 ?        00:00:00 ora_p006_cdb1
oracle    118085       1  0 21:33 ?        00:00:00 ora_p007_cdb1
oracle    118087       1  0 21:33 ?        00:00:00 ora_w003_cdb1
oracle    118096       1  0 21:34 ?        00:00:00 ora_w004_cdb1
oracle    118102       1  0 21:34 ?        00:00:00 ora_qm02_cdb1
oracle    118106       1  1 21:34 ?        00:00:01 ora_q002_cdb1
oracle    118108       1  0 21:34 ?        00:00:00 ora_q003_cdb1
oracle    118290       1  0 21:34 ?        00:00:00 ora_m001_cdb1
oracle    118292       1  0 21:34 ?        00:00:01 ora_m002_cdb1
oracle    118294       1  0 21:34 ?        00:00:00 ora_m003_cdb1
oracle    118314       1  0 21:34 ?        00:00:01 ora_cjq0_cdb1
oracle    118322       1  0 21:34 ?        00:00:00 ora_p008_cdb1
oracle    118324       1  0 21:34 ?        00:00:00 ora_p009_cdb1
oracle    118326       1  0 21:34 ?        00:00:00 ora_p00a_cdb1
oracle    118328       1  0 21:34 ?        00:00:00 ora_p00b_cdb1
root      118369  116863  0 21:37 pts/4    00:00:00 su - oracle
oracle    118370  118369  0 21:37 pts/4    00:00:00 -bash
oracle    118429  118370  0 21:37 pts/4    00:00:00 ps -ef
oracle    118430  118370  0 21:37 pts/4    00:00:00 grep --color=auto oracle
[oracle@oracle-db-19c ~]$ 

查看Oracle实例名

SQL> 
SQL> show user
USER is "SYS"
SQL> show parameter instance_name

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
instance_name                        string                            cdb1
SQL> 

为了能够更加准确的进行搜索,改用以下方式:

[oracle@oracle-db-19c ~]$ ps -ef | grep cdb1
oracle    117952       1  0 21:33 ?        00:00:00 ora_pmon_cdb1
oracle    117954       1  0 21:33 ?        00:00:00 ora_clmn_cdb1
oracle    117956       1  0 21:33 ?        00:00:00 ora_psp0_cdb1
oracle    117958       1  0 21:33 ?        00:00:02 ora_vktm_cdb1
oracle    117962       1  0 21:33 ?        00:00:00 ora_gen0_cdb1
oracle    117964       1  0 21:33 ?        00:00:00 ora_mman_cdb1
oracle    117968       1  0 21:33 ?        00:00:00 ora_gen1_cdb1
oracle    117971       1  0 21:33 ?        00:00:00 ora_diag_cdb1
oracle    117973       1  0 21:33 ?        00:00:00 ora_ofsd_cdb1
oracle    117976       1  0 21:33 ?        00:00:00 ora_dbrm_cdb1
oracle    117978       1  0 21:33 ?        00:00:00 ora_vkrm_cdb1
oracle    117980       1  0 21:33 ?        00:00:00 ora_svcb_cdb1
oracle    117982       1  0 21:33 ?        00:00:00 ora_pman_cdb1
oracle    117984       1  0 21:33 ?        00:00:00 ora_dia0_cdb1
oracle    117986       1  0 21:33 ?        00:00:00 ora_dbw0_cdb1
oracle    117988       1  0 21:33 ?        00:00:00 ora_lgwr_cdb1
oracle    117990       1  0 21:33 ?        00:00:00 ora_ckpt_cdb1
oracle    117992       1  0 21:33 ?        00:00:00 ora_lg00_cdb1
oracle    117994       1  0 21:33 ?        00:00:00 ora_smon_cdb1
oracle    117996       1  0 21:33 ?        00:00:00 ora_lg01_cdb1
oracle    117998       1  0 21:33 ?        00:00:00 ora_smco_cdb1
oracle    118000       1  0 21:33 ?        00:00:00 ora_reco_cdb1
oracle    118002       1  0 21:33 ?        00:00:00 ora_w000_cdb1
oracle    118004       1  0 21:33 ?        00:00:00 ora_lreg_cdb1
oracle    118006       1  0 21:33 ?        00:00:00 ora_w001_cdb1
oracle    118008       1  0 21:33 ?        00:00:00 ora_pxmn_cdb1
oracle    118012       1  1 21:33 ?        00:00:04 ora_mmon_cdb1
oracle    118014       1  0 21:33 ?        00:00:00 ora_mmnl_cdb1
oracle    118016       1  0 21:33 ?        00:00:00 ora_d000_cdb1
oracle    118018       1  0 21:33 ?        00:00:00 ora_s000_cdb1
oracle    118020       1  0 21:33 ?        00:00:00 ora_tmon_cdb1
oracle    118023       1  0 21:33 ?        00:00:00 ora_m000_cdb1
oracle    118029  117684  1 21:33 ?        00:00:05 oraclecdb1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle    118031       1  0 21:33 ?        00:00:00 ora_tt00_cdb1
oracle    118033       1  0 21:33 ?        00:00:00 ora_tt01_cdb1
oracle    118035       1  0 21:33 ?        00:00:00 ora_tt02_cdb1
oracle    118060       1  0 21:33 ?        00:00:00 ora_w002_cdb1
oracle    118062       1  0 21:33 ?        00:00:00 ora_aqpc_cdb1
oracle    118071       1  0 21:33 ?        00:00:00 ora_p000_cdb1
oracle    118073       1  0 21:33 ?        00:00:00 ora_p001_cdb1
oracle    118075       1  0 21:33 ?        00:00:00 ora_p002_cdb1
oracle    118077       1  0 21:33 ?        00:00:00 ora_p003_cdb1
oracle    118079       1  0 21:33 ?        00:00:00 ora_p004_cdb1
oracle    118081       1  0 21:33 ?        00:00:00 ora_p005_cdb1
oracle    118083       1  0 21:33 ?        00:00:00 ora_p006_cdb1
oracle    118085       1  0 21:33 ?        00:00:00 ora_p007_cdb1
oracle    118087       1  0 21:33 ?        00:00:00 ora_w003_cdb1
oracle    118096       1  0 21:34 ?        00:00:00 ora_w004_cdb1
oracle    118102       1  0 21:34 ?        00:00:00 ora_qm02_cdb1
oracle    118106       1  0 21:34 ?        00:00:01 ora_q002_cdb1
oracle    118108       1  0 21:34 ?        00:00:00 ora_q003_cdb1
oracle    118290       1  0 21:34 ?        00:00:00 ora_m001_cdb1
oracle    118292       1  0 21:34 ?        00:00:01 ora_m002_cdb1
oracle    118294       1  0 21:34 ?        00:00:00 ora_m003_cdb1
oracle    118314       1  0 21:34 ?        00:00:01 ora_cjq0_cdb1
oracle    118516  118370  0 21:40 pts/4    00:00:00 grep --color=auto cdb1
[oracle@oracle-db-19c ~]$ 

查看Oracle归档进程

[oracle@oracle-db-19c ~]$ ps -ef | grep arc
oracle    118591  118370  0 21:41 pts/4    00:00:00 grep --color=auto arc
[oracle@oracle-db-19c ~]$ 

查看Oracle归档是否开启

SQL> 
SQL> show user
USER is "SYS"
SQL> 
SQL> archive log list;
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            /u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch
Oldest online log sequence     80
Current log sequence           82
SQL> 

将Oracle归档开启的方法

SQL> 
SQL> show user
USER is "SYS"
SQL> 
SQL> archive log list;
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            /u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch
Oldest online log sequence     80
Current log sequence           82
SQL> 
SQL> 
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.

Total System Global Area  629145392 bytes
Fixed Size                  9137968 bytes
Variable Size             197132288 bytes
Database Buffers          406847488 bytes
Redo Buffers               16027648 bytes
Database mounted.
SQL> alter database archivelog;

Database altered.

SQL> alter database open;

Database altered.

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch
Oldest online log sequence     80
Next log sequence to archive   82
Current log sequence           82
SQL> 

查看Oracle归档进程

[oracle@oracle-db-19c ~]$ 
[oracle@oracle-db-19c ~]$ ps -ef | grep arc
oracle    119280       1  0 22:01 ?        00:00:00 ora_arc0_cdb1
oracle    119284       1  0 22:01 ?        00:00:00 ora_arc1_cdb1
oracle    119286       1  0 22:01 ?        00:00:00 ora_arc2_cdb1
oracle    119288       1  0 22:01 ?        00:00:00 ora_arc3_cdb1
[oracle@oracle-db-19c ~]$ 

3.启停的体会

参数文件及控制文件和数据库的启动与关闭是息息相关的,数据库的启动可分为三个阶段,分别nomount、mount和open.

在启动的过程中可以直接输入startup启动,也可以startup nomount、startup mount和alter database open三步分别启动。

① startup nomount阶段

Oracle必须读取到数据库的参数文件(pfile或者spfile),如果读不到该参数文件,数据库根本无法nomount成功。如果读到参数文件,将完成一件非常重要的事,就是根据参数文件中的内存分配策略分配相应的内存区域,并启动相应的后台进程。换言之,创建实例instance.

查看Oracle的spfile参数情况


SQL> show user
USER is "SYS"
SQL> show parameter spfile;

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
spfile                               string                            /u01/app/oracle/product/19.3.0
                                                                       /dbhome_1/dbs/spfilecdb1.ora
SQL>

② startup mount阶段

实例已经创建了,Oracle继续根据参数文件中描述的控制文件的名称及位置,去查找控制文件,一旦查找到立即锁定该控制文件。控制文件里记录了数据库中的数据文件、日志文件、检查点信息等非常重要的信息,所以Oracle成功锁定控制文件,就为后续读取操作这些文件打下了基础,锁定控制文件成功就表示数据库mount成功,为实例和数据库之间桥梁的搭建打下了基础。

③ alter database open阶段

“根据控制文件记录的信息,定位到数据库文件、日志文件等,从而正式打通了实例和数据库之间的桥梁。

Oracle启动的三个步骤

SQL> 
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> 
SQL> startup nomount
ORACLE instance started.

Total System Global Area  629145392 bytes
Fixed Size                  9137968 bytes
Variable Size             197132288 bytes
Database Buffers          406847488 bytes
Redo Buffers               16027648 bytes
SQL> 
SQL> alter database mount;

Database altered.

SQL> 
SQL> alter database open;

Database altered.

SQL> 

关闭Oracle

SQL> 
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> 

观察Oracle关闭后的共享内存情况

[oracle@oracle-db-19c ~]$ 
[oracle@oracle-db-19c ~]$ ipcs -m

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x00000000 8          oracle     600        524288     2          dest         

[oracle@oracle-db-19c ~]$ 

观察Oracle进程情况


[oracle@oracle-db-19c ~]$ 
[oracle@oracle-db-19c ~]$ ps -ef | grep cdb1
oracle    120526  117684  0 22:25 ?        00:00:00 oraclecdb1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle    120545  118370  0 22:27 pts/4    00:00:00 grep --color=auto cdb1
[oracle@oracle-db-19c ~]$ 

启动Oracle到nomount状态

[oracle@oracle-db-19c ~]$ 
[oracle@oracle-db-19c ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jan 2 22:28:13 2023
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup nomount
ORACLE instance started.

Total System Global Area  629145392 bytes
Fixed Size                  9137968 bytes
Variable Size             197132288 bytes
Database Buffers          406847488 bytes
Redo Buffers               16027648 bytes
SQL> 

观察Oracle启动后内存分配和进程情况

[oracle@oracle-db-19c ~]$ 
[oracle@oracle-db-19c ~]$ 
[oracle@oracle-db-19c ~]$ ipcs -m           

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x00000000 8          oracle     600        524288     2          dest         
0x00000000 21         oracle     600        9138176    68                      
0x00000000 22         oracle     600        603979776  34                      
0x00000000 23         oracle     600        16027648   34                      
0x8239f754 24         oracle     600        16384      34                      

[oracle@oracle-db-19c ~]$ ps -ef | grep cdb1
oracle    120587       1  0 22:28 ?        00:00:00 ora_pmon_cdb1
oracle    120589       1  0 22:28 ?        00:00:00 ora_clmn_cdb1
oracle    120591       1  0 22:28 ?        00:00:00 ora_psp0_cdb1
oracle    120593       1  0 22:28 ?        00:00:00 ora_vktm_cdb1
oracle    120597       1  0 22:28 ?        00:00:00 ora_gen0_cdb1
oracle    120599       1  0 22:28 ?        00:00:00 ora_mman_cdb1
oracle    120603       1  0 22:28 ?        00:00:00 ora_gen1_cdb1
oracle    120606       1  0 22:28 ?        00:00:00 ora_diag_cdb1
oracle    120608       1  0 22:28 ?        00:00:00 ora_ofsd_cdb1
oracle    120611       1  0 22:28 ?        00:00:00 ora_dbrm_cdb1
oracle    120613       1  0 22:28 ?        00:00:00 ora_vkrm_cdb1
oracle    120615       1  0 22:28 ?        00:00:00 ora_svcb_cdb1
oracle    120617       1  0 22:28 ?        00:00:00 ora_pman_cdb1
oracle    120619       1  0 22:28 ?        00:00:00 ora_dia0_cdb1
oracle    120621       1  0 22:28 ?        00:00:00 ora_dbw0_cdb1
oracle    120623       1  0 22:28 ?        00:00:00 ora_lgwr_cdb1
oracle    120625       1  0 22:28 ?        00:00:00 ora_ckpt_cdb1
oracle    120627       1  0 22:28 ?        00:00:00 ora_lg00_cdb1
oracle    120629       1  0 22:28 ?        00:00:00 ora_smon_cdb1
oracle    120631       1  0 22:28 ?        00:00:00 ora_lg01_cdb1
oracle    120633       1  0 22:28 ?        00:00:00 ora_smco_cdb1
oracle    120635       1  0 22:28 ?        00:00:00 ora_reco_cdb1
oracle    120637       1  0 22:28 ?        00:00:00 ora_w000_cdb1
oracle    120639       1  0 22:28 ?        00:00:00 ora_lreg_cdb1
oracle    120641       1  0 22:28 ?        00:00:00 ora_w001_cdb1
oracle    120643       1  0 22:28 ?        00:00:00 ora_pxmn_cdb1
oracle    120647       1  0 22:28 ?        00:00:00 ora_mmon_cdb1
oracle    120649       1  0 22:28 ?        00:00:00 ora_mmnl_cdb1
oracle    120651       1  0 22:28 ?        00:00:00 ora_d000_cdb1
oracle    120653       1  0 22:28 ?        00:00:00 ora_s000_cdb1
oracle    120655       1  0 22:28 ?        00:00:00 ora_tmon_cdb1
oracle    120656  120581  0 22:28 ?        00:00:00 oraclecdb1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle    120659       1  0 22:28 ?        00:00:00 ora_m000_cdb1
oracle    120661       1  0 22:28 ?        00:00:00 ora_m001_cdb1
oracle    120726  118370  0 22:29 pts/4    00:00:00 grep --color=auto cdb1
[oracle@oracle-db-19c ~]$ 

4.文件的体会

“没有参数文件,无法创建实例,数据库无法 nomount 成功;没有控制文件,数据库无法mount;没有数据文件,数据库无法打开使用(此外没有了数据文件,数据也没地方保存了,数据库也失去意义了);没有日志和归档文件,数据库就失去了保护伞,变得很不安全。因此所有这些文件都非常重要。

查看参数文件、控制文件、数据文件、日志文件、归档文件和告警文件

参数文件位置:

SQL> show user
USER is "SYS"
SQL> 
SQL> 
SQL> show parameter spfile;

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
spfile                               string                            /u01/app/oracle/product/19.3.0
                                                                       /dbhome_1/dbs/spfilecdb1.ora
SQL> 

控制文件位置:

SQL> 
SQL> show user
USER is "SYS"
SQL> show parameter control

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
control_file_record_keep_time        integer                           7
control_files                        string                            /u02/oradata/CDB1/control01.ct
                                                                       l, /u02/oradata/CDB1/control02
                                                                       .ctl
control_management_pack_access       string                            DIAGNOSTIC+TUNING
SQL> 

数据文件位置:

[oracle@oracle-db-19c ~]$ 
[oracle@oracle-db-19c ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jan 2 22:38:11 2023
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> select file_name from dba_data_files;

FILE_NAME
--------------------------------------------------------------------------------
/u02/oradata/CDB1/system01.dbf
/u02/oradata/CDB1/sysaux01.dbf
/u02/oradata/CDB1/undotbs01.dbf
/u02/oradata/CDB1/users01.dbf

SQL> 

日志文件位置:

SQL> 
SQL> select group#,member from v$logfile;

    GROUP#
----------
MEMBER
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
         3
/u02/oradata/CDB1/redo03.log

         2
/u02/oradata/CDB1/redo02.log

         1
/u02/oradata/CDB1/redo01.log


SQL> 

归档文件位置:

SQL> show user
USER is "SYS"
SQL> 
SQL> show parameter recovery;

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
db_recovery_file_dest                string
db_recovery_file_dest_size           big integer                       0
recovery_parallelism                 integer                           0
remote_recovery_file_dest            string
SQL> 

警告日志文件(位于bdump目录下,以alert大头的文件)

SQL> 
SQL> set linesize 1000
SQL> show parameter dump

NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
background_core_dump                 string                            partial
background_dump_dest                 string                            /u01/app/oracle/product/19.3.0
                                                                       /dbhome_1/rdbms/log
core_dump_dest                       string                            /u01/app/oracle/diag/rdbms/cdb
                                                                       1/cdb1/cdump
max_dump_file_size                   string                            unlimited
shadow_core_dump                     string                            partial
user_dump_dest                       string                            /u01/app/oracle/product/19.3.0
                                                                       /dbhome_1/rdbms/log
SQL> 
[oracle@oracle-db-19c ~]$ cd /u01/app/oracle/product/19.3.0//dbhome_1/rdbms/log
[oracle@oracle-db-19c log]$ ls -lart alert*
-rw-r-----. 1 oracle oinstall 138 Nov 30 10:26 alert_cdb1.log
[oracle@oracle-db-19c log]$ 

5.监听的体会

lsnrctl status命令是查看监听状态的命令,其中Listener Parameter File和Listener Log File定位了监听文件listener.ora以及对应的日志:

[oracle@oracle-db-19c ~]$ lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 02-JAN-2023 22:44:06

Copyright (c) 1991, 2019, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle-db-19c)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                30-NOV-2022 20:33:47
Uptime                    33 days 2 hr. 10 min. 19 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/19.3.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/oracle-db-19c/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle-db-19c.centlinux.com)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "86b637b62fdf7a65e053f706e80a27ca" has 1 instance(s).
  Instance "cdb1", status READY, has 1 handler(s) for this service...
Service "cdb1" has 1 instance(s).
  Instance "cdb1", status READY, has 1 handler(s) for this service...
Service "cdb1XDB" has 1 instance(s).
  Instance "cdb1", status READY, has 1 handler(s) for this service...
Service "cndbapdb" has 1 instance(s).
  Instance "cdb1", status READY, has 1 handler(s) for this service...
Service "cndbapdb2" has 1 instance(s).
  Instance "cdb1", status READY, has 1 handler(s) for this service...
Service "cndbapdb3" has 1 instance(s).
  Instance "cdb1", status READY, has 1 handler(s) for this service...
Service "cndbapdb4_fresh" has 1 instance(s).
  Instance "cdb1", status READY, has 1 handler(s) for this service...
Service "cndbapdb6" has 1 instance(s).
  Instance "cdb1", status READY, has 1 handler(s) for this service...
Service "ec78d5cef183e2dbe0538a08a8c09e00" has 1 instance(s).
  Instance "cdb1", status READY, has 1 handler(s) for this service...
Service "ee89fbf58254959fe0538a08a8c0629a" has 1 instance(s).
  Instance "cdb1", status READY, has 1 handler(s) for this service...
Service "ee926813d203a023e0538a08a8c0e91e" has 1 instance(s).
  Instance "cdb1", status READY, has 1 handler(s) for this service...
Service "ee926813d209a023e0538a08a8c0e91e" has 1 instance(s).
  Instance "cdb1", status READY, has 1 handler(s) for this service...
Service "ee966433cff1b7d7e0538a08a8c04375" has 1 instance(s).
  Instance "cdb1", status READY, has 1 handler(s) for this service...
Service "eea6240cf3422d52e0538a08a8c0c03f" has 1 instance(s).
  Instance "cdb1", status READY, has 1 handler(s) for this service...
Service "eecfd8030e829ae2e0538a08a8c02b62" has 1 instance(s).
  Instance "cdb1", status READY, has 1 handler(s) for this service...
Service "pdb1" has 1 instance(s).
  Instance "cdb1", status READY, has 1 handler(s) for this service...
Service "pdb2" has 1 instance(s).
  Instance "cdb1", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@oracle-db-19c ~]$ 

lsnrctl stop命令是关闭监听的命令:

[oracle@oracle-db-19c ~]$ 
[oracle@oracle-db-19c ~]$ lsnrctl stop

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 02-JAN-2023 22:45:39

Copyright (c) 1991, 2019, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle-db-19c)(PORT=1521)))
The command completed successfully
[oracle@oracle-db-19c ~]$ 

查看关闭Oracle监听后的情况

[oracle@oracle-db-19c ~]$ lsnrctl stop

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 02-JAN-2023 22:45:39

Copyright (c) 1991, 2019, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle-db-19c)(PORT=1521)))
The command completed successfully
[oracle@oracle-db-19c ~]$ 
[oracle@oracle-db-19c ~]$ lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 02-JAN-2023 22:46:05

Copyright (c) 1991, 2019, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle-db-19c)(PORT=1521)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 2: No such file or directory
[oracle@oracle-db-19c ~]$ 

开启ORACLE监听

[oracle@oracle-db-19c ~]$ 
[oracle@oracle-db-19c ~]$ lsnrctl start

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 02-JAN-2023 22:47:05

Copyright (c) 1991, 2019, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/19.3.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 19.0.0.0.0 - Production
System parameter file is /u01/app/oracle/product/19.3.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/oracle-db-19c/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle-db-19c.centlinux.com)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle-db-19c)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                02-JAN-2023 22:47:06
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/19.3.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/oracle-db-19c/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle-db-19c.centlinux.com)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
[oracle@oracle-db-19c ~]$ 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/134744.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

P1827 [USACO3.4] 美国血统 American Heritage

题目描述 农夫约翰非常认真地对待他的奶牛们的血统。然而他不是一个真正优秀的记帐员。他把他的奶牛 们的家谱作成二叉树&#xff0c;并且把二叉树以更线性的“树的中序遍历”和“树的前序遍历”的符号加以记录而 不是用图形的方法。 你的任务是在被给予奶牛家谱的“树中序遍历…

计算机网络 | 湖科大教书匠

一、因特网概述 1、网络、互联网和因特网 网络是由若干结点和连接这些结点的链路组成 多个网络还可以通过路由器互联起来&#xff0c;这样就构成了一个覆盖范围更大的网络&#xff0c;互联网 因此&#xff0c;互联网是网络的网络&#xff08;Network of Networks&#xff0…

hadoop+ranger+kerberos页面权限配置(四)

一、原理介绍 hdfs 指令测试&#xff1a;hdfs dfs -mkdir /ranger 原理&#xff1a;根据路径进行文件夹操作赋权。一旦指定文件夹权限&#xff0c;则该用户可以操作该文件夹及该文件夹底下的子文件夹。 yarn 指令测试&#xff1a;hadoop jar /home/hadoop/module/hadoop-3.2.2…

跨平台数据库管理器DbGate

本文软件由网友 zxc 推荐&#xff1b;隔了很久才开始写&#xff0c;又隔了很久才想起来发 &#x1f602; 什么是 DbGate &#xff1f; DbGate 是跨平台的数据库管理器。支持 MySQL、PostgreSQL、SQL Server、MongoDB、SQLite 等的数据库管理器。能够在 Windows、Linux、Mac 下运…

Z函数(扩展KMP)

1,定义 z函数存储字符串s(长度n&#xff0c;下标从0开始&#xff09;与其所有后缀s[i,n-1](0<i<n-1)的最大公共前缀LCP的值&#xff08;一般默认z[0]0,有时是n) 2,思路 叫他扩展KMP是有原因的&#xff0c;因为思想相近&#xff0c;我们求取z[i]&#xff0c;尝试利用前…

20230102单独编译原厂RK3588开发板的开发板rk3588-evb1-lp4-v10的Android12的内核

20230102单独编译原厂RK3588开发板的开发板rk3588-evb1-lp4-v10的Android12的内核 2023/1/2 20:52 《RK3588_Android12_SDK_Developer_Guide_CN.pdf》 原厂的开发板rk3588-evb1-lp4-v10单独编译内核的方式&#xff1a; cd kernel-5.10 export PATH../prebuilts/clang/host/linu…

redis的常见命令

Redis 所有的 key&#xff08;键&#xff09;都是字符串。在谈基础数据结构时&#xff0c;我们讨论的是存储值的数据类型&#xff0c;主要包括常见的 5 种数据类型&#xff0c;分别是&#xff1a;String、List、Set、Zset、Hash 数据结构介绍 Redis 是一个 key-value 的数据库…

Java基础漏洞(一)

最近在复习一些Java基础&#xff0c;填补自己的知识漏洞。 1.转义字符 (1)\t代表的是制表符&#xff0c;\n代表的是空格&#xff0c;\r则代表的是回车 public class Main{public static void main(String[] args) {System.out.println("年龄\t性别\t身高\n18\t男\t183&…

《小猫猫大课堂》4——数组,操作符,常见关键字

更新不易&#xff0c;麻烦多多点赞&#xff0c;欢迎你的提问&#xff0c;感谢你的转发&#xff0c; 最后的最后&#xff0c;关注我&#xff0c;关注我&#xff0c;关注我&#xff0c;你会看到更多有趣的博客哦&#xff01;&#xff01;&#xff01; 喵喵喵&#xff0c;你对我…

十三、网络编程、UDP、TCP协议

JMM(了解) JMM就是Java内存模型(java memory model)。因为在不同的硬件生产商和不同的操作系统下&#xff0c;内存的访问有一定的差异&#xff0c;所以会造成相同的代码运行在不同的系统上会出现各种问题。所以java内存模型(JMM)屏蔽掉各种硬件和操作系统的内存访问差异&#…

python 办公自动后,第一天:创建excel写入数据

1&#xff0c;python第三方模块&#xff1a;xlwt写入excel文件 #pycharm 中安装pip install xlwt #xlwr 用户写入文件模块 #pip install xlwt # pip list 查看安装的模块 # pip install import xlwt#创建excelwb xlwt.Workbook()# 选择工作簿sh wb.add_sheet(第一个sheet页…

LVGL学习笔记11 - 按钮矩阵Button Matrix

目录 1. 构造矩阵 2. Parts 2.1 LV_PART_MAIN 2.2 LV_PART_ITEMS 3. 样式 3.1 按钮大小 3.2 间距 3.3 控制按钮 3.4 控制map 3.5 Check唯一性 4. 事件 4.1 LV_EVENT_VALUE_CHANGED 4.2 LV_EVENT_LONG_PRESSED 4.3 LV_EVENT_DRAW_PART_BEGIN 按钮矩阵是多个按钮的组…

臻图信息搭建土壤墒情监测应用平台,推进现代农业信息化发展

“十四五”期间&#xff0c;国家高度重视土壤生态环境监测等问题&#xff0c;先后出台了一系列规范性文件&#xff0c;为我国土壤防治领域建立了一套标准、导则、指南和管理等解决对策&#xff0c;使我国土壤修复法律法规和标准化建设呈现出系列化和系统化趋势&#xff0c;有效…

计算机视觉实战-----pytorch官方demo(Lenet网络)实现

系列文章目录 文章目录系列文章目录前言零、环境搭建一、下载CIFAR10数据集二、测试图片三、模型搭建四、开始train五、测试六、tensorboard可视化总结前言 通过一个官方列子&#xff0c;清楚深度学习中图像的训练的整个流程 零、环境搭建 pycharm下载&#xff1a;pycharm官网…

【C语言】算法好题初阶(每日小细节010)

1.存在重复元素 力扣传送门、 这道题目的解题思路就是先排序然后比较相邻元素是不是有相等的&#xff0c;有就是true否者false 排序的算法比较多大&#xff0c;但是我用插入和快排plus版都没有过... 但是非递归的归并过了&#xff0c;对排序算法感兴趣的小伙伴可以去看我的博…

一款统计摸鱼时长的开源项目

对于我们程序员&#xff0c;在工作中一天8小时&#xff0c;不可能完全在写代码了&#xff0c;累了刷刷论坛、群里吹吹牛&#xff0c;这都是非常正常的。虽然一天下来&#xff0c;可能我们都可以按时完成工作&#xff0c;但是我们不知道&#xff0c;时间都花在哪里了&#xff0c…

小米万兆路由器里的Docker安装MySQL8.0

小米2022年12月份发布了万兆路由器&#xff0c;里面可以使用Docker。 今天尝试在小米的万兆路由器里安装MySQL8.0。 准备工作 请参考https://engchina.blog.csdn.net/article/details/128515422的准备工作。 创建存储 请参考https://engchina.blog.csdn.net/article/detail…

Faster RCNN网络源码解读(Ⅹ) --- FastRCNN部分正负样本采样及FastRCNN部分损失计算

目录 一、回顾以及本篇博客内容概述 二、代码解析 2.1 ROIHeads类&#xff08;承接上篇博客的2.5节&#xff09; 2.1.1 初始化函数 __init__回顾 2.1.2 正向传播forward回顾 2.1.3 select_training_samples 2.1.4 add_gt_proposals 2.1.5 assign_targets_to_proposals…

【Git】Git瘦身,清理Git历史提交/.git大文件清理(云效、UI 自动化项目)

目前项目是存在云效(codeup.aliyun.com)上 本地清理后&#xff0c;还需要到云效上清理「存储空间管理」 一、清理/瘦身效果二、到底是什么在占空间&#xff1f;1、先看一下项目里&#xff0c;什么最占空间&#xff1f;2、往下看在/.git里&#xff0c;什么最占空间&#xff1f;三…

车载诊断协议UDS——读取故障服务Service 19

汽车控制器诊断功能,可以通过诊断服务读取车内控制器故障信息。如本文所分享的内容,通过Service 19服务读取车内控制器故障信息。 一、DTC显示类型 在OEM定义的诊断需求规范中,会定义DTC(诊断故障码)与具体控制器具体故障类型相关联(一个DTC故障码对应一个具体故障)…