psql: FATAL: no pg_hba.conf entry for host

pg远程登录拒绝

C:\Users\Administrator>psql -h 192.168.222.2 -U u_xifenfei -d db_xifenfei
psql: FATAL:  no pg_hba.conf entry for host "192.168.222.1", user "u_xifenfei", database "db_xifenfei", SSL off

解决方法

vi $PGDATA/pg_hba.conf
--加上
host   all             all           192.168.222.0/24          md5
--重启pg服务
-bash-4.2$ pg_ctl stop
waiting for server to shut down.... done
server stopped
-bash-4.2$ pg_ctl start
waiting for server to start....2018-08-05 23:46:08.237 EDT [44173] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2018-08-05 23:46:08.237 EDT [44173] LOG:  listening on IPv6 address "::", port 5432
2018-08-05 23:46:08.239 EDT [44173] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2018-08-05 23:46:08.250 EDT [44173] LOG:  redirecting log output to logging collector process
2018-08-05 23:46:08.250 EDT [44173] HINT:  Future log output will appear in directory "log".
 done
server started

测试远程访问

C:\Users\Administrator>psql -h 192.168.222.2 -U u_xifenfei -d db_xifenfei
用户 u_xifenfei 的口令:
psql (10.4)
输入 "help" 来获取帮助信息.
db_xifenfei=# select version();
                                                 version
---------------------------------------------------------------------------------------------------------
 PostgreSQL 10.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18), 64-bit
(1 行记录)

pg_rman 备份还原测试

通过试验验证pg_rman的基础使用
创建测试环境
模拟创建新表空间,新数据库,新用户,新schema,并且创建表插入测试数据,这样的环境下,pg_rman 备份还原效果

[root@localhost ~]# psql
Password:
psql.bin (10.4)
Type "help" for help.
postgres=#  CREATE USER u_xifenfei WITH
postgres-#  LOGIN
postgres-#  SUPERUSER
postgres-#  CREATEDB
postgres-#  CREATEROLE
postgres-#  INHERIT
postgres-#  REPLICATION
postgres-#  CONNECTION LIMIT -1
postgres-#  PASSWORD 'xifenfei';
CREATE ROLE
postgres=#  CREATE TABLESPACE tbs_xifenfei
postgres-#    OWNER u_xifenfei
postgres-#    LOCATION '/opt/PostgreSQL/10/tbs_xifenfei';
CREATE TABLESPACE
postgres=#  CREATE DATABASE db_xifenfei
postgres-#      WITH
postgres-#      OWNER = u_xifenfei
postgres-#      ENCODING = 'UTF8'
postgres-#      TABLESPACE = tbs_xifenfei
postgres-#      CONNECTION LIMIT = -1;
CREATE DATABASE
postgres=# \q
[root@localhost ~]# psql -U u_xifenfei
Password for user u_xifenfei:
psql.bin (10.4)
Type "help" for help.
postgres=# \q
[root@localhost ~]# psql -U u_xifenfei -d db_xifenfei
Password for user u_xifenfei:
psql.bin (10.4)
Type "help" for help.
db_xifenfei=#
db_xifenfei=#
db_xifenfei=# create schema u_xifenfei;
CREATE SCHEMA
db_xifenfei=# create table t_xifenfei as select * from pg_tables;
SELECT 69
db_xifenfei=# insert into t_xifenfei select * from t_xifenfei;
INSERT 0 69
db_xifenfei=# insert into t_xifenfei select * from t_xifenfei;
INSERT 0 138
db_xifenfei=# insert into t_xifenfei select * from t_xifenfei;
INSERT 0 276
db_xifenfei=# insert into t_xifenfei select * from t_xifenfei;
INSERT 0 552
db_xifenfei=# insert into t_xifenfei select * from t_xifenfei;
INSERT 0 1104
db_xifenfei=# insert into t_xifenfei select * from t_xifenfei;
INSERT 0 2208
db_xifenfei=# insert into t_xifenfei select * from t_xifenfei;
INSERT 0 4416
db_xifenfei=# insert into t_xifenfei select * from t_xifenfei;
INSERT 0 8832
db_xifenfei=# insert into t_xifenfei select * from t_xifenfei;
INSERT 0 17664
db_xifenfei=# insert into t_xifenfei select * from t_xifenfei;
INSERT 0 35328
db_xifenfei=# insert into t_xifenfei select * from t_xifenfei;
INSERT 0 70656
db_xifenfei=# insert into t_xifenfei select * from t_xifenfei;
INSERT 0 141312
db_xifenfei=# insert into t_xifenfei select * from t_xifenfei;
INSERT 0 282624
db_xifenfei=# insert into t_xifenfei select * from t_xifenfei;
INSERT 0 565248
db_xifenfei=# select count(*) from t_xifenfei;
  count
---------
 1130496
(1 row)
db_xifenfei=#

第一次全备数据库

[root@localhost backup]# pg_rman backup --backup-mode=full \
[root@localhost backup]# --backup-path=/backup -d db_xifenfei -U u_xifenfei -h 127.0.0.1
Password for user u_xifenfei:
INFO: copying database files
INFO: copying archived WAL files
INFO: backup complete
INFO: Please execute 'pg_rman validate' to verify the files are correctly copied.

模拟继续插入数据
t_xifenfei表一共有数据2260992条

b_xifenfei=# insert into t_xifenfei select * from t_xifenfei;
INSERT 0 1130496
db_xifenfei=# select count(*) from t_xifenfei;
  count
---------
 2260992
(1 row)

查看全备情况

[root@localhost 10]#  pg_rman show --backup-path=/backup
=====================================================================
 StartTime           EndTime              Mode    Size   TLI  Status
=====================================================================
2018-08-05 10:47:29  2018-08-05 10:47:43  FULL   611MB     1  DONE

备份归档日志

[root@localhost 10]# pg_rman backup --backup-mode=archive \
[root@localhost 10]# --backup-path=/backup -d db_xifenfei -U u_xifenfei -h 127.0.0.1
Password for user u_xifenfei:
INFO: copying archived WAL files
INFO: backup complete
INFO: Please execute 'pg_rman validate' to verify the files are correctly copied.

检查全备和归档备份情况

[root@localhost 10]#  pg_rman show --backup-path=/backup
=====================================================================
 StartTime           EndTime              Mode    Size   TLI  Status
=====================================================================
2018-08-05 10:54:51  2018-08-05 10:56:07  ARCH   620MB     1  DONE
2018-08-05 10:47:29  2018-08-05 10:47:43  FULL   611MB     1  DONE

停掉pg

[root@localhost data]# su - postgres
Last login: Sun Aug  5 02:19:57 EDT 2018 on pts/1
-bash-4.2$ source pg_env.sh
-bash-4.2$ pg_ctl stop
waiting for server to shut down.... done
server stopped
-bash-4.2$ ps -ef|grep postgres
root      39902  30494  0 11:05 pts/0    00:00:00 su - postgres
postgres  39903  39902  0 11:05 pts/0    00:00:00 -bash
postgres  40021  39903  0 11:06 pts/0    00:00:00 ps -ef
postgres  40022  39903  0 11:06 pts/0    00:00:00 grep --color=auto postgres

删除原库并创建相关目录
注意:对应的空间目录权限为700,所有者和组为postgres

[root@localhost 10]# pwd
/opt/PostgreSQL/10
[root@localhost 10]# mv data data_bak
[root@localhost 10]# mv tbs_xifenfei tbs_xifenfei_bak
[root@localhost 10]# mkdir data
[root@localhost 10]# mkdir tbs_xifenfei
[root@localhost 10]# chmod 700 data
[root@localhost 10]# chmod 700 tbs_xifenfei
[root@localhost 10]# chown postgres:postgres data
[root@localhost 10]# chown postgres:postgres tbs_xifenfei

还原数据库

-bash-4.2$ pg_rman restore --backup-path=/backup
WARNING: pg_controldata file "/opt/PostgreSQL/10/data/global/pg_control" does not exist
INFO: the recovery target timeline ID is not given
INFO: use timeline ID of latest full backup as recovery target: 1
INFO: calculating timeline branches to be used to recovery target point
INFO: searching latest full backup which can be used as restore start point
INFO: found the full backup can be used as base in recovery: "2018-08-05 10:47:29"
INFO: copying online WAL files and server log files
INFO: clearing restore destination
INFO: validate: "2018-08-05 10:47:29" backup and archive log files by SIZE
INFO: backup "2018-08-05 10:47:29" is valid
INFO: restoring database files from the full mode backup "2018-08-05 10:47:29"
INFO: searching incremental backup to be restored
INFO: searching backup which contained archived WAL files to be restored
INFO: backup "2018-08-05 10:47:29" is valid
INFO: restoring WAL files from backup "2018-08-05 10:47:29"
INFO: restoring online WAL files and server log files
INFO: generating recovery.conf
INFO: restore complete
HINT: Recovery will start automatically when the PostgreSQL server is started.

启动pg

-bash-4.2$ pg_ctl start
waiting for server to start....2018-08-05 11:23:40.190 EDT [40855] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2018-08-05 11:23:40.190 EDT [40855] LOG:  listening on IPv6 address "::", port 5432
2018-08-05 11:23:40.193 EDT [40855] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2018-08-05 11:23:40.200 EDT [40855] LOG:  redirecting log output to logging collector process
2018-08-05 11:23:40.200 EDT [40855] HINT:  Future log output will appear in directory "log".
 done
server started
-bash-4.2$ ps -ef|grep postgres
root      40328  21806  0 11:14 pts/3    00:00:00 su - postgres
postgres  40329  40328  0 11:14 pts/3    00:00:00 -bash
postgres  40855      1  0 11:23 pts/3    00:00:00 /opt/PostgreSQL/10/bin/postgres
postgres  40856  40855  0 11:23 ?        00:00:00 postgres: logger process
postgres  40857  40855 57 11:23 ?        00:00:16 postgres: startup process   waiting for 000000010000000000000025
postgres  40859  40855  0 11:23 ?        00:00:00 postgres: checkpointer process
postgres  40860  40855  7 11:23 ?        00:00:02 postgres: writer process
postgres  40862  40855  0 11:23 ?        00:00:00 postgres: stats collector process
postgres  40892  40329  0 11:24 pts/3    00:00:00 ps -ef
postgres  40893  40329  0 11:24 pts/3    00:00:00 grep --color=auto postgres
-bash-4.2$

验证数据库还原结果

-bash-4.2$ psql -U u_xifenfei -d db_xifenfei
Password for user u_xifenfei:
psql.bin (10.4)
Type "help" for help.
db_xifenfei=#  select count(*) from t_xifenfei;
  count
---------
 2260992
(1 row)
db_xifenfei=#

破坏环境之前表条数和还原之后完全匹配,证pg_rman在功能上备份恢复没有问题

PostgreSQL修改归档模式

pg版本

postgres=# select version();
                                                 version
---------------------------------------------------------------------------------------------------------
 PostgreSQL 10.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18), 64-bit
(1 row)

归档配置参数

--pgdata中的postgresql.conf
wal_level = replica
archive_mode = on
archive_command = 'test ! -f /pg_archivedir/%f && cp %p /pg_archivedir/%f'
--重启pg systemctl restart postgresql-10.service
postgres=# show wal_level;
 wal_level
-----------
 replica
(1 row)
postgres=# show archive_mode;
 archive_mode
--------------
 on
(1 row)
postgres=# show archive_command;
                    archive_command
--------------------------------------------------------
 test ! -f /pg_archivedir/%f && cp %p /pg_archivedir/%f
(1 row)

测试归档效果

[root@localhost pg_wal]# ps -ef|grep "postgres: archiver process"
postgres  35300  35293  0 08:43 ?        00:00:00 postgres: archiver process   last was 000000010000000000000004
root      37504  20853  0 09:55 pts/1    00:00:00 grep --color=auto postgres: archiver process
[root@localhost pg_wal]# pwd
/opt/PostgreSQL/10/data/pg_wal
[root@localhost pg_wal]# ls -ltr
total 49156
-rw------- 1 postgres postgres      309 Aug  5 06:05 000000010000000000000002.00000028.backup
-rw------- 1 postgres postgres 16777216 Aug  5 08:43 000000010000000000000006
-rw------- 1 postgres postgres 16777216 Aug  5 08:50 000000010000000000000004
drwx------ 2 postgres postgres       94 Aug  5 08:50 archive_status
-rw------- 1 postgres postgres 16777216 Aug  5 08:53 000000010000000000000005
[root@localhost pg_wal]# ls -l /pg_archivedir/
total 65540
-rw------- 1 postgres postgres 16777216 Aug  5 08:37 000000010000000000000001
-rw------- 1 postgres postgres 16777216 Aug  5 08:37 000000010000000000000002
-rw------- 1 postgres postgres      309 Aug  5 08:37 000000010000000000000002
-rw------- 1 postgres postgres 16777216 Aug  5 08:43 000000010000000000000003
-rw------- 1 postgres postgres 16777216 Aug  5 08:50 000000010000000000000004
--切换日志
postgres=# select pg_switch_wal();
 pg_switch_wal
---------------
 0/5000158
(1 row)
[root@localhost pg_wal]# ps -ef|grep "postgres: archiver process"
postgres  35300  35293  0 08:43 ?        00:00:00 postgres: archiver process   last was 000000010000000000000005
root      37531  20853  0 09:56 pts/1    00:00:00 grep --color=auto postgres: archiver process
[root@localhost pg_wal]# ls -ltr
total 49156
-rw------- 1 postgres postgres      309 Aug  5 06:05 000000010000000000000002
-rw------- 1 postgres postgres 16777216 Aug  5 08:50 000000010000000000000004
-rw------- 1 postgres postgres 16777216 Aug  5 09:55 000000010000000000000005
drwx------ 2 postgres postgres      130 Aug  5 09:55 archive_status
-rw------- 1 postgres postgres 16777216 Aug  5 09:55 000000010000000000000006
[root@localhost pg_wal]# ls -l /pg_archivedir/
total 81924
-rw------- 1 postgres postgres 16777216 Aug  5 08:37 000000010000000000000001
-rw------- 1 postgres postgres 16777216 Aug  5 08:37 000000010000000000000002
-rw------- 1 postgres postgres      309 Aug  5 08:37 000000010000000000000002
-rw------- 1 postgres postgres 16777216 Aug  5 08:43 000000010000000000000003
-rw------- 1 postgres postgres 16777216 Aug  5 08:50 000000010000000000000004
-rw------- 1 postgres postgres 16777216 Aug  5 09:55 000000010000000000000005

PostgreSQL备份工具pg_rman安装

学习oracle的同学都清楚,oracle的rman是最好的备份工具(一般第三方备份软件也基本上是通过调用rman的备份接口实现的)
pg_rman下载地址https://github.com/ossc-db/pg_rman/releases,下载和当前pg版本/操作系统版本对应的pg_rman包
安装pg_rman缺少包
缺少libpq.so.5()和postgresql10-libs相关的包

[root@localhost lib]# rpm -ivh /tmp/pg_rman-1.3.6-1.pg10.rhel7.x86_64.rpm
error: Failed dependencies:
        libpq.so.5()(64bit) is needed by pg_rman-1.3.6-1.pg10.rhel7.x86_64
        postgresql10-libs is needed by pg_rman-1.3.6-1.pg10.rhel7.x86_64

安装pg相关源

[root@localhost tmp]# rpm -ivh pgdg-redhat10-10-2.noarch.rpm
warning: pgdg-redhat10-10-2.noarch.rpm: Header V4 DSA/SHA1 Signature, key ID 442df0f8: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:pgdg-redhat10-10-2               ################################# [100%]
[root@localhost yum.repos.d]# pwd
/etc/yum.repos.d
[root@localhost yum.repos.d]# more pgdg-10-redhat.repo
[pgdg10]
name=PostgreSQL 10 $releasever - $basearch
baseurl=https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-$releasever-$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-10
[pgdg10-source]
name=PostgreSQL 10 $releasever - $basearch - Source
failovermethod=priority
baseurl=https://download.postgresql.org/pub/repos/yum/srpms/10/redhat/rhel-$releasever-$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-10
[pgdg10-updates-testing]
name=PostgreSQL 10 $releasever - $basearch
baseurl=https://download.postgresql.org/pub/repos/yum/testing/10/redhat/rhel-$releasever-$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-10
[pgdg10-source-updates-testing]
name=PostgreSQL 10 $releasever - $basearch - Source
failovermethod=priority
baseurl=https://download.postgresql.org/pub/repos/yum/srpms/testing/10/redhat/rhel-$releasever-$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-10

安装postgresql10-libs包

[root@localhost tmp]# yum install postgresql10-libs
Loaded plugins: langpacks, ulninfo
pgdg10                                         | 4.1 kB  00:00:00
(1/2): pgdg10/7Server/x86_64/group_gz          |  245 B  00:00:01
(2/2): pgdg10/7Server/x86_64/primary_db        | 162 kB  00:00:13
Resolving Dependencies
--> Running transaction check
---> Package postgresql10-libs.x86_64 0:10.4-1PGDG.rhel7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==========================================================================
 Package                 Arch     Version               Repository   Size
==========================================================================
Installing:
 postgresql10-libs       x86_64   10.4-1PGDG.rhel7      pgdg10      354 k
Transaction Summary
==========================================================================
Install  1 Package
Total download size: 354 k
Installed size: 1.3 M
Is this ok [y/d/N]: y
Downloading packages:
postgresql10-libs-10.4-1PGDG.rhel7.x86_64.rpm      | 354 kB  00:00:02
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Installing : postgresql10-libs-10.4-1PGDG.rhel7.x86_64      1/1
  Verifying  : postgresql10-libs-10.4-1PGDG.rhel7.x86_64      1/1
Installed:
  postgresql10-libs.x86_64 0:10.4-1PGDG.rhel7
Complete!

安装pg_rman

[root@localhost tmp]# rpm -ivh pg_rman-1.3.6-1.pg10.rhel7.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:pg_rman-1.3.6-1.pg10.rhel7       ################################# [100%]

查找默认pg_rman安装路径

[root@localhost bin]# find / -name "pg_rman"
/usr/pgsql-10/bin/pg_rman
[root@localhost bin]# cd /usr/pgsql-10/bin
[root@localhost bin]# ls
pg_rman

迁移到pg安装目录中

[root@localhost bin]# mv pg_rman /opt/PostgreSQL/10/bin

pg_rman命令测试

[root@localhost bin]# pg_rman --help
pg_rman manage backup/recovery of PostgreSQL database.
Usage:
  pg_rman OPTION init
  pg_rman OPTION backup
  pg_rman OPTION restore
  pg_rman OPTION show [DATE]
  pg_rman OPTION show detail [DATE]
  pg_rman OPTION validate [DATE]
  pg_rman OPTION delete DATE
  pg_rman OPTION purge
Common Options:
  -D, --pgdata=PATH         location of the database storage area
  -A, --arclog-path=PATH    location of archive WAL storage area
  -S, --srvlog-path=PATH    location of server log storage area
  -B, --backup-path=PATH    location of the backup storage area
  -c, --check               show what would have been done
  -v, --verbose             show what detail messages
  -P, --progress            show progress of processed files
Backup options:
  -b, --backup-mode=MODE    full, incremental, or archive
  -s, --with-serverlog      also backup server log files
  -Z, --compress-data       compress data backup with zlib
  -C, --smooth-checkpoint   do smooth checkpoint before backup
  -F, --full-backup-on-error   switch to full backup mode
                               if pg_rman cannot find validate full backup
                               on current timeline
      NOTE: this option is only used in --backup-mode=incremental or archive.
  --keep-data-generations=NUM keep NUM generations of full data backup
  --keep-data-days=NUM        keep enough data backup to recover to N days ago
  --keep-arclog-files=NUM   keep NUM of archived WAL
  --keep-arclog-days=DAY    keep archived WAL modified in DAY days
  --keep-srvlog-files=NUM   keep NUM of serverlogs
  --keep-srvlog-days=DAY    keep serverlog modified in DAY days
  --standby-host=HOSTNAME   standby host when taking backup from standby
  --standby-port=PORT       standby port when taking backup from standby
Restore options:
  --recovery-target-time    time stamp up to which recovery will proceed
  --recovery-target-xid     transaction ID up to which recovery will proceed
  --recovery-target-inclusive whether we stop just after the recovery target
  --recovery-target-timeline  recovering into a particular timeline
  --hard-copy                 copying archivelog not symbolic link
Catalog options:
  -a, --show-all            show deleted backup too
Delete options:
  -f, --force               forcibly delete backup older than given DATE
Connection options:
  -d, --dbname=DBNAME       database to connect
  -h, --host=HOSTNAME       database server host or socket directory
  -p, --port=PORT           database server port
  -U, --username=USERNAME   user name to connect as
  -w, --no-password         never prompt for password
  -W, --password            force password prompt
Generic options:
  -q, --quiet               don't show any INFO or DEBUG messages
  --debug                   show DEBUG messages
  --help                    show this help, then exit
  --version                 output version information, then exit
Read the website for details. <http://github.com/ossc-db/pg_rman>
Report bugs to <http://github.com/ossc-db/pg_rman/issues>.

PostgreSQL逻辑导出导入

pg_dump命令说明

C:\Users\Administrator>pg_dump --help
pg_dump 把一个数据库转储为纯文本文件或者是其它格式.
用法:
  pg_dump [选项]... [数据库名字]
一般选项:
  -f, --file=FILENAME          输出文件或目录名
  -F, --format=c|d|t|p         输出文件格式 (定制, 目录, tar)
                               明文 (默认值))
  -j, --jobs=NUM               执行多个并行任务进行备份转储工作
  -v, --verbose                详细模式
  -V, --version                输出版本信息,然后退出
  -Z, --compress=0-9           被压缩格式的压缩级别
  --lock-wait-timeout=TIMEOUT  在等待表锁超时后操作失败
  --no-sync                    do not wait for changes to be written safely to disk
  -?, --help                   显示此帮助, 然后退出
控制输出内容选项:
  -a, --data-only              只转储数据,不包括模式
  -b, --blobs                  在转储中包括大对象
  -B, --no-blobs               exclude large objects in dump
  -c, --clean                  在重新创建之前,先清除(删除)数据库对象
  -C, --create                 在转储中包括命令,以便创建数据库
  -E, --encoding=ENCODING      转储以ENCODING形式编码的数据
  -n, --schema=SCHEMA          只转储指定名称的模式
  -N, --exclude-schema=SCHEMA  不转储已命名的模式
  -o, --oids                   在转储中包括 OID
  -O, --no-owner               在明文格式中, 忽略恢复对象所属者
  -s, --schema-only            只转储模式, 不包括数据
  -S, --superuser=NAME         在明文格式中使用指定的超级用户名
  -t, --table=TABLE            只转储指定名称的表
  -T, --exclude-table=TABLE    不转储指定名称的表
  -x, --no-privileges          不要转储权限 (grant/revoke)
  --binary-upgrade             只能由升级工具使用
  --column-inserts             以带有列名的INSERT命令形式转储数据
  --disable-dollar-quoting     取消美元 (符号) 引号, 使用 SQL 标准引号
  --disable-triggers           在只恢复数据的过程中禁用触发器
  --enable-row-security        启用行安全性(只转储用户能够访问的内容)
  --exclude-table-data=TABLE   不转储指定名称的表中的数据
  --if-exists              当删除对象时使用IF EXISTS
  --inserts                    以INSERT命令,而不是COPY命令的形式转储数据
  --no-publications            do not dump publications
  --no-security-labels         不转储安全标签的分配
  --no-subscriptions           do not dump subscriptions
  --no-synchronized-snapshots  在并行工作集中不使用同步快照
  --no-tablespaces             不转储表空间分配信息
  --no-unlogged-table-data     不转储没有日志的表数据
  --quote-all-identifiers      所有标识符加引号,即使不是关键字
  --section=SECTION            备份命名的节 (数据前, 数据, 及 数据后)
  --serializable-deferrable   等到备份可以无异常运行
  --snapshot=SNAPSHOT          为转储使用给定的快照
  --strict-names               要求每个表和/或schema包括模式以匹配至少一个实体
  --use-set-session-authorization
                               使用 SESSION AUTHORIZATION 命令代替
                ALTER OWNER 命令来设置所有权
联接选项:
  -d, --dbname=DBNAME       对数据库 DBNAME备份
  -h, --host=主机名        数据库服务器的主机名或套接字目录
  -p, --port=端口号        数据库服务器的端口号
  -U, --username=名字      以指定的数据库用户联接
  -w, --no-password        永远不提示输入口令
  -W, --password           强制口令提示 (自动)
  --role=ROLENAME          在转储前运行SET ROLE
如果没有提供数据库名字, 那么使用 PGDATABASE 环境变量
的数值.
报告错误至 <pgsql-bugs@postgresql.org>.
C:\Users\Administrator>

导出环境准备

C:\Users\Administrator>psql -U u_xifenfei -d db_xifenfei
用户 u_xifenfei 的口令:
psql (10.4)
输入 "help" 来获取帮助信息.
db_xifenfei=# create table t_dump as select * from pg_tables;
SELECT 69
db_xifenfei=# insert into t_dump select * from t_dump;
INSERT 0 69
…………
db_xifenfei=# insert into t_dump select * from t_dump;
INSERT 0 565248
db_xifenfei=# create table public.t_dump_pub as select * from t_dump;
SELECT 1130496
db_xifenfei=# select count(*) from t_dump;
  count
---------
 1130496
(1 行记录)
db_xifenfei=# select count(*) from public.t_dump_pub;
  count
---------
 1130496
(1 行记录)

导出命令

pg_dump  -U u_xifenfei -f e:/u_xifenfei.sql db_xifenfei
pg_dump  -U u_xifenfei -f e:/u_xifenfei2.sql --inserts db_xifenfei

psql导入说明

C:\Users\Administrator>psql -?
psql是PostgreSQL 的交互式客户端工具。
使用方法:
  psql [选项]... [数据库名称 [用户名称]]
通用选项:
  -c,--command=命令        执行单一命令(SQL或内部指令)然后结束
 -d, --dbname=数据库名称   指定要连接的数据库 (默认:"Administrator")
  -f, --file=文件名      从文件中执行命令然后退出
  -l, --list             列出所有可用的数据库,然后退出
  -v, --set=, --variable=NAME=VALUE
                           设置psql变量NAME为VALUE
                           (例如,-v ON_ERROR_STOP=1)
  -V, --version            输出版本信息, 然后退出
  -X, --no-psqlrc         不读取启动文档(~/.psqlrc)
  -1 ("one"), --single-transaction
                          作为一个单一事务来执行命令文件(如果是非交互型的)
  -?, --help[=options]     显示此帮助,然后退出
      --help=commands      列出反斜线命令,然后退出
      --help=variables     列出特殊变量,然后退出
输入和输出选项:
  -a, --echo-all          显示所有来自于脚本的输入
  -b, --echo-errors        回显失败的命令
  -e, --echo-queries      显示发送给服务器的命令
 -E, --echo-hidden        显示内部命令产生的查询
  -L, --log-file=文件名  将会话日志写入文件
  -n, --no-readline       禁用增强命令行编辑功能(readline)
  -o, --output=FILENAME 将查询结果写入文件(或 |管道)
  -q, --quiet             以沉默模式运行(不显示消息,只有查询结果)
  -s, --single-step       单步模式 (确认每个查询)
  -S, --single-line        单行模式 (一行就是一条 SQL 命令)
输出格式选项 :
 -A, --no-align           使用非对齐表格输出模式
  -F, --field-separator=STRING
             为字段设置分隔符,用于不整齐的输出(默认:"|")
  -H, --html             HTML 表格输出模式
  -P, --pset=变量[=参数]    设置将变量打印到参数的选项(查阅 \pset 命令)
  -R, --record-separator=STRING
             为不整齐的输出设置字录的分隔符(默认:换行符号)
  -t, --tuples-only      只打印记录i
  -T, --table-attr=文本   设定 HTML 表格标记属性(例如,宽度,边界)
  -x, --expanded           打开扩展表格输出
  -z, --field-separator-zero
                           为不整齐的输出设置字段分隔符为字节0
  -0, --record-separator-zero
                           为不整齐的输出设置记录分隔符为字节0
联接选项:
  -h, --host=主机名        数据库服务器主机或socket目录(默认:"本地接口")
  -p, --port=端口        数据库服务器的端口(默认:"5432")
  -U, --username=用户名    指定数据库用户名(默认:"Administrator")
  -w, --no-password       永远不提示输入口令
  -W, --password           强制口令提示 (自动)
更多信息,请在psql中输入"\?"(用于内部指令)或者 "\help"(用于SQL命令),
或者参考PostgreSQL文档中的psql章节.
臭虫报告至 <pgsql-bugs@postgresql.org>.

导入操作

C:\Users\Administrator>psql -U u_xifenfei -d db_xifenfei
用户 u_xifenfei 的口令:
psql (10.4)
输入 "help" 来获取帮助信息.
db_xifenfei=# create database test_pump;
CREATE DATABASE
C:\Users\Administrator>psql -d test_pump -U u_xifenfei -f e:/u_xifenfei.sql
用户 u_xifenfei 的口令:
SET
SET
SET
SET
SET
 set_config
------------
(1 行记录)
SET
SET
SET
CREATE SCHEMA
ALTER SCHEMA
CREATE EXTENSION
COMMENT
SET
SET
CREATE TABLE
ALTER TABLE
CREATE TABLE
ALTER TABLE
COPY 1130496
COPY 1130496

导出/导入数据核对

C:\Users\Administrator>psql -d test_pump -U u_xifenfei
用户 u_xifenfei 的口令:
psql (10.4)
输入 "help" 来获取帮助信息.
test_pump=# \d
                   关联列表
  架构模式  |    名称    |  类型  |   拥有者
------------+------------+--------+------------
 public     | t_dump_pub | 数据表 | u_xifenfei
 u_xifenfei | t_dump     | 数据表 | u_xifenfei
(2 行记录)

PostgreSQL模式理解

在PostgreSQL中schema和oracle中不一样,在oracle中schema基本上可以理解为user,但是在PostgreSQL中user和schema没有严格意义上的对应关系.
创建模式
这里可以看到使用u_xifenfei创建的schema就是属于该用户,默认的public schema属于postgres用户.

db_xifenfei=# \c
您现在已经连接到数据库 "db_xifenfei",用户 "u_xifenfei".
db_xifenfei=# create schema u_xifenfei;
CREATE SCHEMA
db_xifenfei=# \dn
      架构模式列表
    名称    |   拥有者
------------+------------
 public     | postgres
 u_xifenfei | u_xifenfei
(2 行记录)

数据库检索schema的顺序
默认情况下优先检索和用户名一致的schema,然后是public schema

db_xifenfei=# show search_path;
   search_path
-----------------
 "$user", public
(1 行记录)

测试schema的检索顺序
这里比较明显优先使用/找到的是u_xifenfei schema(和用户名匹配的schema),然后再是默认的public schema

db_xifenfei=# create table t_xifenfei as select * from pg_database;
SELECT 4
db_xifenfei=# select pg_relation_filepath('t_xifenfei');
            pg_relation_filepath
---------------------------------------------
 pg_tblspc/16406/PG_10_201707211/16407/16421
(1 行记录)
db_xifenfei=# select count(*) from t_xifenfei;
 count
-------
     4
(1 行记录)
db_xifenfei=# select schemaname,tablename,tableowner,tablespace
db_xifenfei-# from pg_tables where tableowner='u_xifenfei';
 schemaname |  tablename  | tableowner | tablespace
------------+-------------+------------+------------
 public     | t_xifenfei  | u_xifenfei |
 u_xifenfei | t_xifenfei  | u_xifenfei |
(3 行记录)
--public.t_xifenfei和public.t_xifenfei2昨天创建
db_xifenfei=# select count(*) from public.t_xifenfei;
  count
---------
 1310720
(1 行记录)
db_xifenfei=# drop table t_xifenfei;
DROP TABLE
db_xifenfei=# select count(*) from t_xifenfei;
  count
---------
 1310720
(1 行记录)

PostgreSQL的表空间、数据库、用户之间的关系

玩多了Oracle,习惯了使用Oracle的体系架构去对比别的数据库,今天看PostgreSQL发现两者明显不一样:
1. 在数据库/表空间/schema三者关系上的区别
20180803011116


表空间是物理结构,同一表空间下可以有多个数据库
数据库是逻辑结构,是表/索引/视图/存储过程的集合,一个数据库下可以有多个schema
模式是逻辑结构,是对数据库的逻辑划分
2. 在oracle中用户和schema基本上可以画上等同关系,但是pg中两者没有这样严格的对应关系

相关测试实验
创建用户
在pg中role比user少login,其他基本上相同(也就是说如果给role授权login,等同user)

postgres=# CREATE USER u_xifenfei WITH
postgres-# LOGIN
postgres-# SUPERUSER
postgres-# CREATEDB
postgres-# CREATEROLE
postgres-# INHERIT
postgres-# REPLICATION
postgres-# CONNECTION LIMIT -1
postgres-# PASSWORD 'xifenfei';
CREATE ROLE

创建表空间

postgres=# CREATE TABLESPACE tbs_xifenfei
postgres-#   OWNER u_xifenfei
postgres-#   LOCATION 'D:\Program Files\PostgreSQL\tbs_xifenfei';
CREATE TABLESPACE

创建数据库

postgres=# CREATE DATABASE db_xifenfei
postgres-#     WITH
postgres-#     OWNER = u_xifenfei
postgres-#     ENCODING = 'UTF8'
postgres-#     TABLESPACE = tbs_xifenfei
postgres-#     CONNECTION LIMIT = -1;
CREATE DATABASE

查询数据库和表空间信息

postgres=# select oid, datname, datlastsysoid, dattablespace
postgres-#  from pg_catalog.pg_database order by 1,2;
  oid  |   datname   | datlastsysoid | dattablespace
-------+-------------+---------------+---------------
     1 | template1   |         12937 |          1663
 12937 | template0   |         12937 |          1663
 12938 | postgres    |         12937 |          1663
 16407 | db_xifenfei |         12937 |         16406
(4 行记录)
postgres=# select oid,* from pg_catalog.pg_tablespace;
  oid  |   spcname    | spcowner | spcacl | spcoptions
-------+--------------+----------+--------+------------
  1663 | pg_default   |       10 |        |
  1664 | pg_global    |       10 |        |
 16406 | tbs_xifenfei |    16405 |        |
(3 行记录)

使用u_xifenfei用户登录

C:\Users\Administrator>psql -U u_xifenfei -d db_xifenfei
用户 u_xifenfei 的口令:
psql (10.4)
输入 "help" 来获取帮助信息.
db_xifenfei=# \c
您现在已经连接到数据库 "db_xifenfei",用户 "u_xifenfei".

创建测试表

db_xifenfei=# create table t_xifenfei as select * from pg_database;
SELECT 5
db_xifenfei=# select pg_relation_filepath('t_xifenfei');
            pg_relation_filepath
---------------------------------------------
 pg_tblspc/16406/PG_10_201707211/16407/16408
(1 行记录)
db_xifenfei=# insert into t_xifenfei select * from t_xifenfei;
INSERT 0 5
…………
db_xifenfei=# insert into t_xifenfei select * from t_xifenfei;
INSERT 0 327680
db_xifenfei=# select count(*) from t_xifenfei;
  count
---------
 1310720
(1 行记录)

20180803001342


这里可以发现,创建表空间其实对应的是一个文件夹路径,创建数据库是在对应的表空间中创建相关目录和文件,创建表是对应的相关文件.
参考:PostgreSQL tablespace database schema

记录正常open库报ORA-600 2662

数据库版本10.2.0.3 32位

SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE    10.2.0.3.0      Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production

数据库启动alert日志报大量ORA-600和ORA-07445错误

Tue Jul 31 09:56:45 2018
Started redo application at
 Thread 1: logseq 7593, block 46691
Tue Jul 31 09:56:45 2018
Recovery of Online Redo Log: Thread 1 Group 2 Seq 7593 Reading mem 0
  Mem# 0: E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO02.LOG
Tue Jul 31 09:56:45 2018
RECOVERY OF THREAD 1 STUCK AT BLOCK 779 OF FILE 2
Tue Jul 31 09:56:45 2018
RECOVERY OF THREAD 1 STUCK AT BLOCK 4430 OF FILE 2
Tue Jul 31 09:56:45 2018
Hex dump of (file 3, block 23704) in trace file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_p002_248.trc
Corrupt block relative dba: 0x00c05c98 (file 3, block 23704)
Fractured block found during crash/instance recovery
Data in bad block:
 type: 6 format: 2 rdba: 0x00c05c98
 last change scn: 0x0000.05c3cad2 seq: 0x16 flg: 0x06
 spare1: 0x0 spare2: 0x0 spare3: 0x0
 consistency value in tail: 0xe4be0601
 check value in block header: 0x5c03
 computed block checksum: 0x2e7b
Tue Jul 31 09:56:45 2018
Completed redo application
Tue Jul 31 09:56:46 2018
Reread of rdba: 0x00c05c98 (file 3, block 23704) found same corrupted data
RECOVERY OF THREAD 1 STUCK AT BLOCK 40841 OF FILE 8
Tue Jul 31 09:56:46 2018
RECOVERY OF THREAD 1 STUCK AT BLOCK 297 OF FILE 2
Tue Jul 31 09:56:46 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_p002_248.trc:
ORA-00600: internal error code, arguments: [kssadpm1], [], [], [], [], [], [], []
Tue Jul 31 09:56:46 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_p001_2320.trc:
ORA-00600: internal error code, arguments: [545], [0xCA15AE84], [3], [16], [], [], [], []
ORA-00600: internal error code, arguments: [545], [0xCA15AE84], [3], [16], [], [], [], []
ORA-00600: internal error code, arguments: [545], [0xCA15AE84], [3], [16], [], [], [], []
ORA-00600: internal error code, arguments: [545], [0xCA15AE84], [3], [8], [], [], [], []
Tue Jul 31 09:56:46 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_p004_2116.trc:
ORA-00600: internal error code, arguments: [kssdmc: null so], [], [], [], [], [], [], []
ORA-00600: internal error code, arguments: [kssdmc: null so], [], [], [], [], [], [], []
ORA-00600: internal error code, arguments: [kssdmc: null so], [], [], [], [], [], [], []
ORA-00600: internal error code, arguments: [kssdmc: null so], [], [], [], [], [], [], []
ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [unable_to_trans_pc] [PC:0x7C3429C1] [ADDR:0xCA800000] [UNABLE_TO_READ] []
Tue Jul 31 09:56:46 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_p000_220.trc:
ORA-00600: internal error code, arguments: [ksfdchkfobrerr1], [0xBB9852DC], [0xA7EC530C], [], [], [], [], []
Tue Jul 31 09:56:46 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_p003_252.trc:
ORA-00600: internal error code, arguments: [kssrc_test_cleanup:popall], [0xCA000304], [], [], [], [], [], []
Tue Jul 31 09:56:46 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_p001_228.trc:
ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [_kghalf+895] [PC:0x603BEBF3] [ADDR:0xFFFFFFF8] [UNABLE_TO_READ] []
Tue Jul 31 09:56:46 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_lgwr_1848.trc:
ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [_ksarcv+243] [PC:0x5B2223] [ADDR:0x206C000C] [UNABLE_TO_READ] []
Tue Jul 31 09:56:47 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_p000_220.trc:
ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [_kslwlmod+166] [PC:0x46946A] [ADDR:0x54F8] [UNABLE_TO_WRITE] []
ORA-00081: address range [0x75C80047, 0x75C8004B) is not readable
ORA-00600: internal error code, arguments: [ksfdchkfobrerr1], [0xBB9852DC], [0xA7EC530C], [], [], [], [], []
Tue Jul 31 09:56:47 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_ckpt_1852.trc:
ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [_kcbs_dump_adv_state+471] [PC:0x59B403] [ADDR:0xCC60CBAD] [UNABLE_TO_READ] []
ORA-00600: internal error code, arguments: [kssrc_test_cleanup:popall], [0xCA000304], [], [], [], [], [], []
Tue Jul 31 09:56:47 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_pmon_1828.trc:
ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [_kews_idle_wait+378] [PC:0x60BE2E] [ADDR:0x1820D468] [UNABLE_TO_WRITE] []
Tue Jul 31 09:56:47 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_p004_236.trc:
ORA-00081: address range [0x75C80041, 0x75C80045) is not readable
ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [unable_to_trans_pc] [PC:0x7C3429C1] [ADDR:0xCA800000] [UNABLE_TO_READ] []

检查主要坏块
主要影响数据库恢复的坏块,system不言而喻,block 2也比较敏感

E:\>dbv file=E:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\TTTS.DAT
DBVERIFY: Release 10.2.0.3.0 - Production on 星期三 8月 1 00:24:52 2018
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
DBVERIFY - 开始验证: FILE = E:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\TTTS.DAT
页 2 流入 - 很可能是介质损坏
Corrupt block relative dba: 0x02000002 (file 8, block 2)
Fractured block found during dbv:
Data in bad block:
 type: 29 format: 2 rdba: 0x02000002
 last change scn: 0x0000.05c45a54 seq: 0x2 flg: 0x04
 spare1: 0x0 spare2: 0x0 spare3: 0x0
 consistency value in tail: 0x9e601d02
 check value in block header: 0xea86
 computed block checksum: 0xc434
DBVERIFY - 验证完成
检查的页总数: 121600
处理的页总数 (数据): 58606
失败的页总数 (数据): 0
处理的页总数 (索引): 45192
失败的页总数 (索引): 0
处理的页总数 (其它): 4453
处理的总页数 (段)  : 0
失败的总页数 (段)  : 0
空的页总数: 13348
标记为损坏的总页数: 1
流入的页总数: 1
最高块 SCN            : 96716847 (0.96716847)
E:\>dbv FILE = E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
DBVERIFY: Release 10.2.0.3.0 - Production on 星期三 8月 1 00:28:28 2018
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
DBVERIFY - 开始验证: FILE = E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
页 68377 流入 - 很可能是介质损坏
Corrupt block relative dba: 0x00410b19 (file 1, block 68377)
Fractured block found during dbv:
Data in bad block:
 type: 6 format: 2 rdba: 0x00410b19
 last change scn: 0x0000.05c45bdf seq: 0x1 flg: 0x06
 spare1: 0x0 spare2: 0x0 spare3: 0x0
 consistency value in tail: 0x4f3b0601
 check value in block header: 0x465b
 computed block checksum: 0x11c7
DBV-00200: 块 dba 4262777 已标记为损坏
DBVERIFY - 验证完成
检查的页总数: 74240
处理的页总数 (数据): 46209
失败的页总数 (数据): 0
处理的页总数 (索引): 9729
失败的页总数 (索引): 0
处理的页总数 (其它): 1923
处理的总页数 (段)  : 0
失败的总页数 (段)  : 0
空的页总数: 16378
标记为损坏的总页数: 2
流入的页总数: 1
最高块 SCN            : 96757289 (0.96757289)

尝试recover数据库,open数据库

E:\>sqlplus / as sysdba
SQL*Plus: Release 10.2.0.3.0 - Production on 星期二 7月 31 15:40:05 2018
Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> recover database;
完成介质恢复。
SQL> alter database open;
数据库已更改。

数据库报ORA-600 2662错误
该数据库没有增加隐含隐含参数(屏蔽一致性,屏蔽事务),数据库直接启动之后报ORA-600 2662

Tue Jul 31 15:40:15 2018
SMON: enabling cache recovery
Tue Jul 31 15:40:16 2018
Successfully onlined Undo Tablespace 1.
Tue Jul 31 15:40:16 2018
SMON: enabling tx recovery
Tue Jul 31 15:40:16 2018
Database Characterset is ZHS16GBK
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
QMNC started with pid=32, OS id=1152
Tue Jul 31 15:40:17 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_smon_1288.trc:
ORA-00600: internal error code, arguments: [2662], [0], [96736891], [0], [96752794], [4264138], [], []
Tue Jul 31 15:40:18 2018
Non-fatal internal error happenned while SMON was doing logging scn->time mapping.
SMON encountered 1 out of maximum 100 non-fatal internal errors.
Tue Jul 31 15:40:18 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_smon_1288.trc:
ORA-00600: internal error code, arguments: [2662], [0], [96736892], [0], [96752794], [4264138], [], []
Non-fatal internal error happenned while SMON was doing extent coalescing.
SMON encountered 3 out of maximum 100 non-fatal internal errors.
Tue Jul 31 15:40:19 2018
db_recovery_file_dest_size of 2048 MB is 0.00% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
Hex dump of (file 8, block 2) in trace file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_mmon_1740.trc
Corrupt block relative dba: 0x02000002 (file 8, block 2)
Fractured block found during buffer read
Data in bad block:
 type: 29 format: 2 rdba: 0x02000002
 last change scn: 0x0000.05c45a54 seq: 0x2 flg: 0x04
 spare1: 0x0 spare2: 0x0 spare3: 0x0
 consistency value in tail: 0x9e601d02
 check value in block header: 0xea86
 computed block checksum: 0xc434
Reread of rdba: 0x02000002 (file 8, block 2) found same corrupted data
Tue Jul 31 15:40:20 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_smon_1288.trc:
ORA-00600: internal error code, arguments: [2662], [0], [96736902], [0], [96752794], [4264138], [], []
Tue Jul 31 15:40:20 2018
Completed: alter database open
Tue Jul 31 15:40:20 2018
Non-fatal internal error happenned while SMON was doing extent coalescing.
SMON encountered 4 out of maximum 100 non-fatal internal errors.
Tue Jul 31 15:40:21 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_smon_1288.trc:
ORA-00600: internal error code, arguments: [2662], [0], [96736922], [0], [96752794], [4264138], [], []
Non-fatal internal error happenned while SMON was doing extent coalescing.
SMON encountered 5 out of maximum 100 non-fatal internal errors.
Tue Jul 31 15:40:22 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_j000_1076.trc:
ORA-00600: 内部错误代码, 参数: [2662], [0], [96736954], [0], [96754130], [12615382], [], []
Tue Jul 31 15:40:22 2018
DEBUG: Replaying xcb 0xbba2d2e4, pmd 0xab1920fc for failed op 8
Reconstructing  Uhdr 0x800019 for xcb 0xbba2d2e4, pmd 0xab1920fc
Doing block recovery for file 2 block 25
Block recovery from logseq 7594, block 63 to scn 96736910
Tue Jul 31 15:40:22 2018
Recovery of Online Redo Log: Thread 1 Group 3 Seq 7594 Reading mem 0
  Mem# 0: E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO03.LOG
Block recovery completed at rba 7594.82.16, scn 0.96736911
DEBUG: Restoring block headers for xcb 0xbba2d2e4, pmd 0xab1920fc
DEBUG: Finished replay for xcb 0xbba2d2e4, pmd 0xab1920fc for failed op 8
Tue Jul 31 15:40:22 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_j000_1076.trc:
ORA-00603: ORACLE 服务器会话因致命错误而终止
ORA-00600: 内部错误代码, 参数: [2662], [0], [96736955], [0], [96754130], [12615382], [], []
ORA-00600: 内部错误代码, 参数: [2662], [0], [96736954], [0], [96754130], [12615382], [], []
Tue Jul 31 15:40:31 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_smon_1288.trc:
ORA-00600: internal error code, arguments: [2662], [0], [96736963], [0], [96752794], [4264138], [], []
Tue Jul 31 15:40:31 2018
Non-fatal internal error happenned while SMON was doing extent coalescing.
SMON encountered 6 out of maximum 100 non-fatal internal errors.
Tue Jul 31 15:40:41 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_smon_1288.trc:
ORA-00600: internal error code, arguments: [2662], [0], [96736967], [0], [96752794], [4264138], [], []
Tue Jul 31 15:41:03 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_pmon_1448.trc:
ORA-00474: SMON process terminated with error
Tue Jul 31 15:41:03 2018
PMON: terminating instance due to error 474
Tue Jul 31 15:41:03 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_j004_1344.trc:
ORA-00474: SMON process terminated with error
Tue Jul 31 15:41:03 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_j003_2104.trc:
ORA-00474: SMON process terminated with error
Tue Jul 31 15:41:03 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_j002_932.trc:
ORA-00474: SMON process terminated with error
Tue Jul 31 15:41:04 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_j001_1680.trc:
ORA-00474: SMON process terminated with error
Tue Jul 31 15:41:04 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_q000_2336.trc:
ORA-00474: SMON process terminated with error
Tue Jul 31 15:41:05 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_lgwr_552.trc:
ORA-00474: SMON process terminated with error
Tue Jul 31 15:41:05 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_dbw0_1420.trc:
ORA-00474: SMON process terminated with error
Tue Jul 31 15:41:05 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_dbw1_2556.trc:
ORA-00474: SMON process terminated with error
Tue Jul 31 15:41:05 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_psp0_1812.trc:
ORA-00474: SMON process terminated with error
Tue Jul 31 15:41:05 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_mman_1924.trc:
ORA-00474: SMON process terminated with error
Tue Jul 31 15:41:05 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_ckpt_2940.trc:
ORA-00474: SMON process terminated with error
Tue Jul 31 15:41:10 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\bdump\orcl_reco_660.trc:
ORA-00474: SMON process terminated with error
Instance terminated by PMON, pid = 1448
Tue Jul 31 15:41:57 2018

这是一个不常见的错误,没有使用隐含参数强制拉库,数据库正常open成功,但是由于system坏块,导致数据库启动之后报ORA-600 2662错误(再次证明2662不一定只有强制拉库发生,正常open的库也有可能,主要取决block scn和datafile scn,如果不是open过程必须要访问的block,那可能在open之后由于访问需要再报出来该错误).这个问题比较简单,因为open成功之后再crash,而且该坏块引起smon报错但是并没有ora-600 4xxx相关错误,因此根据经验,直接在数据库open之后,处理掉system异常报错对象和坏块对象即可.另外block 2 比较特殊,需要对其上面的对象进行处理

Tue Jul 31 15:55:54 2018
Hex dump of (file 8, block 2) in trace file e:\oracle\product\10.2.0\admin\orcl\udump\orcl_ora_3664.trc
Corrupt block relative dba: 0x02000002 (file 8, block 2)
Completely zero block found during reading space header
Reread of blocknum=2, file=E:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\TTTS.DAT. found same corrupt data
Reread of blocknum=2, file=E:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\TTTS.DAT. found same corrupt data
Reread of blocknum=2, file=E:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\TTTS.DAT. found same corrupt data
Reread of blocknum=2, file=E:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\TTTS.DAT. found same corrupt data
Reread of blocknum=2, file=E:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\TTTS.DAT. found same corrupt data
Tue Jul 31 15:55:54 2018
Errors in file e:\oracle\product\10.2.0\admin\orcl\udump\orcl_ora_3664.trc:
ORA-07445: 出现异常错误: 核心转储 [ACCESS_VIOLATION] [_krbodmpcx+243] [PC:0x2317857] [ADDR:0x8] [UNABLE_TO_READ] []
ORA-19880: 数据文件 E:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\TTTS.DAT 的空间标头已损坏, 块 2 备份已中止

补充ora-600 2662 block记录

          ----------------------------------------
          SO: BB97A97C, type: 24, owner: BB882B10, flag: INIT/-/-/0x00
          (buffer) (CR) PR: BB8029D8 FLG: 0x100000
          class bit: 00000000
          kcbbfbp: [BH: B9FCF268, LINK: BB97A9A0]
          where: kdswh06: kdscgr, why: 0
          BH (B9FCF268) file#: 1 rdba: 0x004110ca (1/69834) class: 1 ba: B9832000
            set: 9 blksize: 8192 bsi: 0 set-flg: 2 pwbcnt: 0
            dbwrid: 0 obj: 573 objn: 575 tsn: 0 afn: 1
            hash: [bb9151ec,bb9151ec] lru: [b9fcf378,b9fcf200]
            ckptq: [NULL] fileq: [NULL] objq: [b9fcf3d0,aa776524]
            use: [bb97a9a0,bb97a9a0] wait: [NULL]
            st: XCURRENT md: SHR tch: 0
            flags:
            LRBA: [0x0.0.0] HSCN: [0xffff.ffffffff] HSUB: [65535]
            Using State Objects
              ----------------------------------------
              SO: BB97A97C, type: 24, owner: BB882B10, flag: INIT/-/-/0x00
              (buffer) (CR) PR: BB8029D8 FLG: 0x100000
              class bit: 00000000
              kcbbfbp: [BH: B9FCF268, LINK: BB97A9A0]
              where: kdswh06: kdscgr, why: 0
            buffer tsn: 0 rdba: 0x004110ca (1/69834)
            scn: 0x0000.05c4549a seq: 0x01 flg: 0x06 tail: 0x549a0601
            frmt: 0x02 chkval: 0xc60a type: 0x06=trans data

Assistant: Download Reference for Oracle Database/GI PSU, SPU(CPU), Bundle Patches, Patchsets and Base Releases—201807

Patchsets

12.1.0.2 (12.1.0.2.0 PATCH SET FOR ORACLE DATABASE SERVER)

21419221

11.2.0.4 (11.2.0.4.0 PATCH SET FOR ORACLE DATABASE SERVER)

13390677

11.2.0.3 (11.2.0.3.0 PATCH SET FOR ORACLE DATABASE SERVER)

10404530

11.2.0.2 (11.2.0.2.0 PATCH SET FOR ORACLE DATABASE SERVER)

10098816

11.1.0.7 (11.1.0.7.0 PATCH SET FOR ORACLE DATABASE SERVER)

6890831

10.2.0.5 (10.2.0.5 PATCH SET FOR ORACLE DATABASE SERVER)

8202632

A10.2.0.4 (10.2.0.4.0 PATCH SET FOR ORACLE DATABASE SERVER)

6810189

B10.2.0.3 (10.2.0.3 PATCH SET FOR ORACLE DATABASE SERVER)

5337014

10.2.0.2 (10.2.0.2 PATCH SET FOR ORACLE DATABASE SERVER)

4547817

10.1.0.5 (10.1.0.5 PATCH SET FOR ORACLE DATABASE SERVER)

4505133

10.1.0.4 (10.1.0.4 PATCH SET FOR ORACLE DATABASE SERVER)

4163362

10.1.0.3 (10.1.0.3 PATCH SET FOR ORACLE DATABASE SERVER)

3761843

9.2.0.8 (9.2.0.8 PATCH SET FOR ORACLE DATABASE SERVER)

4547809

9.2.0.7 (9.2.0.7 PATCH SET FOR ORACLE DATABASE SERVER)

4163445

9.2.0.6 (9.2.0.6 PATCH SET FOR ORACLE DATABASE SERVER)

3948480

9.2.0.5 (ORACLE 9I DATABASE SERVER RELEASE 2 – PATCH SET 4 VERSION 9.2.0.5.0)

3501955

9.2.0.4 (9.2.0.4 PATCH SET FOR ORACLE DATABASE SERVER)

3095277

9.2.0.3 (9.2.0.3 PATCH SET FOR ORACLE DATABASE SERVER)

2761332

9.2.0.2 (9.2.0.2 PATCH SET FOR ORACLE DATABASE SERVER)

2632931

9.0.1.5 (9.0.1.5 PATCHSET)

3301544

9.0.1.4 (9.0.1.4 PATCH SET FOR ORACLE DATABASE SERVER)

2517300

9.0.1.3 (9.0.1.3. PATCH SET FOR ORACLE DATA SERVER)

2271678

8.1.7.4 (8.1.7.4 PATCH SET FOR ORACLE DATA SERVER)

2376472

8.1.7.3 (8.1.7.3 PATCH SET FOR ORACLE DATA SERVER)

2189751

8.1.7.2 (8.1.7.2.1 PATCH SET FOR ORACLE DATA SERVER)

1909158

18.0.0.0

 Description  Database Update  GI Update  Windows Bundle Patch
 JUL2018 (18.3.0.0.180717)  28090523  28096386  NA
 APR2018 (18.2.0.0.180417)  27676517  27681568  NA

12.2.0.1

 Description  Database Update  GI Update  Windows Bundle Patch
 JUL2018 (12.2.0.1.180717)  28163133  28183653  27937914
 APR2018 (12.2.0.1.180417)  27674384  27468969  27426753
 JAN2018 (12.2.0.1.180116)  27105253  27100009  27162931
 NOV2017 (12.2.0.1.171121)  NA  27010638  NA
 OCT2017 (12.2.0.1.171017)  26710464  26737266  26758841
 AUG2017 (12.2.0.1.170814)  26609817  26610291  26204214
 JUL2017 (12.2.0.1.170718)  26123830  26133434  26204212

12.1.0.2

 Description  PSU  GI PSU  Proactive Bundle Patch  Bundle Patch(Windows 32bit & 64bit)
 JUL2018 (12.1.0.2.180717)  27547329  27967747  27968010  27937907
 APR2018 (12.1.0.2.180417)  27338041  27468957  27486326  27440294
 JAN2018 (12.1.0.2.180116)  26925311  27010872  27010930  27162953
 OCT2017 (12.1.0.2.171017)  26713565  26635815  26635880  26720785
 AUG2017(12.1.0.2.170814)  26609783  26610308  26610322  26161726
 JUL2017 (12.1.0.2.170718)  25755742  25901062  26022196  26161724
 APR2017 (12.1.0.2.170418)  25171037  25434003  25433352  25632533
 JAN2017 (12.1.0.2.170117)  24732082  24917825  24968615  25115951
 OCT2016 (12.1.0.2.161018)  24006101  24412235  24448103  24591642
 JUL2016 (12.1.0.2.160719)  23054246  23273629  23273686  23530387
 APR2016 (12.1.0.2.160419)  22291127  22646084  22899531  22809813
 JAN2016 (12.1.0.2.160119)  21948354  22191349  22243551  22310559
 OCT2015  21359755(12.1.0.2.5)  21523234(12.1.0.2.5)  21744410(12.1.0.2.13)  21821214(12.1.0.2.10)
 JUL2015  20831110(12.1.0.2.4)  20996835(12.1.0.2.4)  21188742(12.1.0.2.10)  21126814(12.1.0.2.7)
 APR2015  20299023(12.1.0.2.3)  20485724(12.1.0.2.3)  20698050(12.1.0.2.7)  20684004(12.1.0.2.4)
 JAN2015  19769480(12.1.0.2.2)  19954978(12.1.0.2.2)  20141343(12.1.0.2.4)  19720843(12.1.0.2.1)
 OCT2014  19303936(12.1.0.2.1)  19392646(12.1.0.2.1)  19404326(12.1.0.2.1)  N/A

12.1.0.1

Description

PSU

GI PSU

Bundle Patch

A

B

Windows 64 bit

Windows 32 bit

JUL2016 (12.1.0.1.160719)

23054354

23273935

23273958

23530410

APR2016 (12.1.0.1.160419)

22291141

22654153

22654166

22839614

JAN2016 (12.1.0.1.160119)

21951844

22191492

22191511

22494866

OCT2015

21352619(12.1.0.1.9)

21551666(12.1.0.1.9)

21551685(12.1.0.1.9)

21744907 (12.1.0.1.21)

JUL2015

20831107(12.1.0.1.8)

20996901(12.1.0.1.8)

20996911(12.1.0.1.8)

21076681 (12.1.0.1.20)

APR2015

20299016(12.1.0.1.7)

20485762(12.1.0.1.7)

19971331(12.1.0.1.7)

20558101 (12.1.0.1.18)

JAN2015

19769486(12.1.0.1.6)

19971324(12.1.0.1.6)

19971331(12.1.0.1.6)

20160748 (12.1.0.1.16)

OCT2014

19121550(12.1.0.1.5)

19392372(12.1.0.1.5)

19392451(12.1.0.1.5)

19542943 (12.1.0.1.14)

JUL2014

18522516(12.1.0.1.4)

18705901(12.1.0.1.4)

18705972(12.1.0.1.4)

19062327 (12.1.0.1.11)

APR2014

18031528(12.1.0.1.3)

18139660(12.1.0.1.3)

18413105(12.1.0.1.3)

18448604 (12.1.0.1.7)

JAN2014

17552800(12.1.0.1.2)

17735306 (12.1.0.1.2)

17977915 (12.1.0.1.3)

OCT2013

17027533(12.1.0.1.1)

17272829 (12.1.0.1.1)

17363796(12.1.0.1.1)

17363795(12.1.0.1.1)

11.2.0.4

 Description  PSU  SPU(CPU)  GI PSU  Bundle Patch (Windows 32bit & 64bit)
 JUL2018 (11.2.0.4.180717)  27734982  27870645  27967757  27695940
 APR2018 (11.2.0.4.180417)  27338049  26474853  27475913  27381640
 JAN2018 (11.2.0.4.180116)  26925576  N/A  27107360  27162965
 OCT2017 (11.2.0.4.171017)  26392168  26474853  26635745  26581376
 AUG2017 (11.2.0.4.170814)  26609445  N/A  26610246  26194138
 JUL2017 (11.2.0.4.170718)  25869727  25879656  26030799  26194136
 APR2017 (11.2.0.4.170418)  24732075  25369547  25476126  25632525
 JAN2017  N/A  N/A  N/A  N/A
 OCT2016 (11.2.0.4.161018)  24006111  24433711  24436338  24591646
 JUL2016 (11.2.0.4.160719)  23054359  23177648  23274134  23530402
 APR2016 (11.2.0.4.160419)  22502456  22502493  22646198  22839608
 JAN2016 (11.2.0.4.160119)  21948347  21972320  22191577  22310544
 OCT2015  21352635(11.2.0.4.8)  21352646  21523375(11.2.0.4.8)  21821802 (11.2.0.4.20)
 JUL2015  20760982(11.2.0.4.7)  20803583  20996923(11.2.0.4.7)  21469106 (11.2.0.4.18)
 APR2015  20299013(11.2.0.4.6)  20299015  20485808(11.2.0.4.6)  20544696 (11.2.0.4.15)
 JAN2015  19769489(11.2.0.4.5)  19854503  19955028(11.2.0.4.5)  20127071 (11.2.0.4.12)
 OCT2014  19121551(11.2.0.4.4)  19271443  19380115(11.2.0.4.4)  19651773 (11.2.0.4.10)
 JUL2014  18522509(11.2.0.4.3)  18681862  18706472(11.2.0.4.3)  18842982(11.2.0.4.7)
 APR2014  18031668(11.2.0.4.2)  18139690  18139609(11.2.0.4.2)  18296644(11.2.0.4.4)
 JAN2014  17478514(11.2.0.4.1)  17551709  N/A  17987366(11.2.0.4.1)

11.2.0.3

Description

PSU

SPU(CPU)

GI PSU

Bundle Patch (Windows 64bit)

Bundle Patch (Windows 32bit)

JUL2015

20760997 (11.2.0.3.15)

20803576

20996944 (11.2.0.3.15)

21104036

21104035

APR2015

20299017 (11.2.0.3.14)

20299010

20485830 (11.2.0.3.14)

20420395

20420394

JAN2015

19769496 (11.2.0.3.13)

19854461

19971343 (11.2.0.3.13)

20233168

20233167

OCT2014

19121548 (11.2.0.3.12)

19271438

19440385 (11.2.0.3.12)

19618575

19618574

JUL2014

18522512 (11.2.0.3.11)

18681866

18706488 (11.2.0.3.11)

18940194

18940193

APR2014

18031683 (11.2.0.3.10)

18139695

18139678 (11.2.0.3.10)

18372244

18372243

JAN2014

17540582 (11.2.0.3.9)

17478415

17735354 (11.2.0.3.9)

18075406

17906981

OCT2013

16902043 (11.2.0.3.8)

17082364

17272731 (11.2.0.3.8)

17363850

17363844

JUL2013

16619892 (11.2.0.3.7)

16742095

16742216 (11.2.0.3.7)

16803775

16803774

APR2013

16056266 (11.2.0.3.6)

16294378

16083653 (11.2.0.3.6)

16345834

16345833

JAN2013

14727310 (11.2.0.3.5)

14841409

14727347 (11.2.0.3.5)

16042648

16042647

OCT2012

14275605 (11.2.0.3.4)

14390252

14275572 (11.2.0.3.4)

14613223

14613222

JUL2012

13923374 (11.2.0.3.3)

14038787

13919095 (11.2.0.3.3)

14223718

14223717

APR2012

13696216 (11.2.0.3.2)

13632717

13696251 (11.2.0.3.2)

13885389

13885388

JAN2012

13343438 (11.2.0.3.1)

13466801

13348650 (11.2.0.3.1)

13413168

13413167

11.2.0.2

Description

PSU

SPU(CPU)

GI PSU

Bundle Patch (Windows 64bit)

Bundle Patch (Windows 32bit)

OCT2013

17082367 (11.2.0.2.12)

17082375

17272753 (11.2.0.2.12)

17363838

17363837

JUL2013

16619893 (11.2.0.2.11)

16742100

16742320 (11.2.0.2.11)

16345852

16345851

APR2013

16056267 (11.2.0.2.10)

16294412

16166868 (11.2.0.2.10)

16345846

16345845

JAN2013

14727315 (11.2.0.2.9)

14841437

14841385 (11.2.0.2.9)

16100399

16100398

OCT2012

14275621 (11.2.0.2.8)

14390377

14390437 (11.2.0.2.8)

14672268

14672267

JUL2012

13923804 (11.2.0.2.7)

14038791

14192201 (11.2.0.2.7)

14134043

14134042

APR2012

13696224 (11.2.0.2.6)

13632725

13696242 (11.2.0.2.6)

13697074

13697073

JAN2012

13343424 (11.2.0.2.5)

13343244

13653086 (11.2.0.2.5)

13413155

13413154

OCT2011

12827726 (11.2.0.2.4)

12828071

12827731 (11.2.0.2.4)

13038788

13038787

JUL2011

12419331 (11.2.0.2.3)

12419321

12419353 (11.2.0.2.3)

12714463

12714462

APR2011

11724916 (11.2.0.2.2)

11724984

12311357 (11.2.0.2.2)

11896292

11896290

JAN2011

10248523 (11.2.0.2.1)

N/A

N/A

10432053

10432052

11.2.0.1

Description

PSU

CPU

Bundle Patch (Windows 64bit)

Bundle Patch (Windows 32bit)

JUL2011

12419378 (11.2.0.1.6)

12419278

12429529

12429528

APR2011

11724930 (11.2.0.1.5)

11724991

11731176

11883240

JAN2011

10248516 (11.2.0.1.4)

10249532

10432045

10432044

OCT2010

9952216 (11.2.0.1.3)

9952260

10100101

10100100

JUL2010

9654983 (11.2.0.1.2)

9655013

9736865

9736864

APR2010

9352237 (11.2.0.1.1)

9369797

N/A

N/A

10.2.0.5

Description

PSU

SPU(CPU)

Bundle Patch (Windows 64bit)

Bundle Patch (Windows 32bit)

Bundle Patch (Windows Itanium)

JUL2015

20299014(10.2.0.5.19)

20299021

20420387

20420386

N/A

APR2015

N/A

N/A

N/A

N/A

N/A

JAN2015

19769505(10.2.0.5.18)

19854436

20126868

20126867

N/A

OCT2014

19274523(10.2.0.5.17)

19274521

19618565

19618563

N/A

JUL2014

18522511(10.2.0.5.16)

18681879

18940198

18940196

N/A

APR2014

18031728(10.2.0.5.15)

18139709

18372261

18372259

N/A

JAN2014

17465584(10.2.0.5.14)

17551414

17906974

17906972

N/A

OCT2013

17082365(10.2.0.5.13)

17082371

N/A

17363822

N/A

JUL2013

16619894(10.2.0.5.12)

16742123

16803782

16803780

16803781

APR2013

16056270(10.2.0.5.11)

16270946

16345857

16345855

16345856

JAN2013

14727319(10.2.0.5.10)

14841459

15848062

15848060

15848061

OCT2012

14275629(10.2.0.5.9)

14390396

14553358

14553356

14553357

JUL2012

13923855(10.2.0.5.8)

14038805

14134053

14134051

14134052

APR2012

13632743(10.2.0.5.7)

13632738

13654815

13654814

13870404

JAN2012

13343471(10.2.0.5.6)

13343467

13460968

13460967

N/A

OCT2011

12827745(10.2.0.5.5)

12828105

N/A

12914911

N/A

JUL2011

12419392(10.2.0.5.4)

12419258

12429524

12429523

N/A

APR2011

11724962(10.2.0.5.3)

11725006

12328269

12328268

N/A

JAN2011

10248542(10.2.0.5.2)

10249537

10352673

10352672

N/A

OCT2010

9952230(10.2.0.5.1)

9952270

10099855

10058290

N/A

10.2.0.4

Description

PSU

SPU(CPU)

Bundle Patch (Windows 32bit)

Bundle Patch (Windows 64bit)

Bundle Patch (Windows Itanium)

JUL2013

16619897 (10.2.0.4.17)

16742253

N/A

N/A

N/A

APR2013

16056269 (10.2.0.4.16)

16270931

N/A

N/A

N/A

JAN2013

14736542 (10.2.0.4.15)

14841471

N/A

N/A

N/A

OCT2012

14275630 (10.2.0.4.14)

14390410

N/A

N/A

N/A

JUL2012

13923851 (10.2.0.4.13)

14038814

N/A

N/A

N/A

APR2012

12879933 (10.2.0.4.12)

12879926

13928775

13928776

N/A

JAN2012

12879929 (10.2.0.4.11)

12879912

13654060

N/A

N/A

OCT2011

12827778 (10.2.0.4.10)

12828112

12914908

12914910

12914909

JUL2011

12419397 (10.2.0.4.9)

12419249

12429519

12429521

12429520

APR2011

11724977 (10.2.0.4.8)

11725015

12328501

12328503

12328502

JAN2011

10248636 (10.2.0.4.7)

10249540

10349197

10349200

10349198

OCT2010

9952234 (10.2.0.4.6)

9952272

10084980

10084982

10084981

JUL2010

9654991 (10.2.0.4.5)

9655017

9777076

9777078

9777077

APR2010

9352164 (10.2.0.4.4)

9352191

9393548

9393550

9393549

JAN2010

9119284 (10.2.0.4.3)

9119226

9169457

9169460

9169458

OCT2009

8833280 (10.2.0.4.2)

8836308

8880857

8880861

8880858

JUL2009

8576156 (10.2.0.4.1)

8534387

8559466

8559467

8541782

APR2009

N/A

8290506

8307237

8307238

8333678

JAN2009

N/A

7592346

7584866

7584867

N/A

OCT2008

N/A

7375644

7386320

7386321

N/A

JUL2008

N/A

7150470

7218676

7218677

N/A

10.2.0.3

Description

CPU (Unix/Linux)

Bundle Patch (Windows 32bit)

Bundle Patch (Windows Itanium)

Bundle Patch (Windows 64bit)

JAN2009

7592354

7631956

7631958

7631957

OCT2008

7369190

7353782

7353784

7353785

JUL2008

7150622

7252496

7252497

7252498

APR2008

6864068

6867054

6867055

6867056

JAN2008

6646853

6637237

6637238

6637239

OCT2007

6394981

6430171

6430173

6430174

JUL2007

6079591

6116131

6038242

6116139

APR2007

5901891

5948242

5916262

5948243

JAN2007

5881721

5846376

5846377

5846378

10.2.0.2

Description

CPU (Unix/Linux)

Bundle Patch (Windows 32bit)

Bundle Patch (Windows 64bit)

Bundle Patch (Windows Itanium)

JAN2009

7592355

N/A

N/A

N/A

OCT2008

7375660

N/A

N/A

N/A

JUL2008

7154083

N/A

N/A

N/A

APR2008

6864071

N/A

N/A

N/A

JAN2008

6646850

N/A

N/A

N/A

OCT2007

6394997

6397028

6397030

6397029

JUL2007

6079588

6013105

6013121

6013118

APR2007

5901881

5912173

5912179

5912176

JAN2007

5689957

5716143

5699839

5699824

OCT2006

5490848

5502226

5500921

5500894

JUL2006

5225799

5251025

5251028

5251026

APR2006

5079037

5140461

5140567

5140508

10.2.0.1

Description

CPU (Unix/Linux)

Bundle Patch (Windows 32bit)

Bundle Patch (Windows 64bit)

Bundle Patch (Windows Itanium)

APR2007

5901880

N/A

N/A

N/A

JAN2007

5689937

5695784

5695786

5695785

OCT2006

5490846

5500927

5500954

5500951

JUL2006

5225798

5239698

5239701

5239699

APR2006

5049080

5059238

5059261

5059251

JAN2006

4751931

4751539

4770480

4751549

10.1.0.5

Description

CPU (Unix/Linux)

Bundle Patch (Windows 32bit)

Bundle Patch (Windows Itanium)

JAN2012

13343482

13413002

13413003

OCT2011

12828135

12914905

12914906

JUL2011

12419228

12429517

12429518

APR2011

11725035

11731119

11731120

JAN2011

N/A

N/A

N/A

OCT2010

9952279

10089559

10089560

JUL2010

9655023

9683651

9683652

APR2010

9352208

9390288

9390289

JAN2010

9119261

9187104

9187105

OCT2009

8836540

8785211

8785212

JUL2009

8534394

8656224

8656226

APR2009

8290534

8300356

8300360

JAN2009

7592360

7486619

7586049

OCT2008

7375686

7367493

7367494

JUL2008

7154097

7047034

7047037

APR2008

6864078

6867107

6867108

JAN2008

6647005

6637274

6637275

OCT2007

6395024

6408393

6408394

JUL2007

6079585

6115804

6115818

APR2007

5901877

5907304

5907305

JAN2007

5689908

5716295

5634747

OCT2006

5490845

5500883

5500885

JUL2006

5225797

5251148

5251140

APR2006

5049074

5057606

5057609

JAN2006

4751932

4882231

4882236

10.1.0.4

Description

CPU (Unix/Linux)

Bundle Patch (Windows 32bit)

Bundle Patch (Windows Itanium)

APR2007

5901876

5909871

5909879

JAN2007

5689894

5695771

5695772

OCT2006

5490844

5500878

5500880

JUL2006

5225796

5239736

5239737

APR2006

5049067

5059200

5059227

JAN2006

4751928

4751259

4745040

OCT2005

4567866

4579182

4579188

JUL2005

4392423

4440706

4404600

APR2005

4210374

4287619

4287611

10.1.0.3

Description

CPU (Unix/Linux)

Bundle Patch (Windows 32bit)

Bundle Patch (Windows Itanium)

JAN2007

5923277

N/A

N/A

OCT2006

5566825

N/A

N/A

JUL2006

5435164

N/A

N/A

APR2006

5158022

N/A

N/A

JAN2006

4751926

4741077

4741084

OCT2005

4567863

4567518

4567523

JUL2005

4392409

4389012

4389014

APR2005

4193286

4269715

4158888

JAN2005

4003062

4074232

3990812

10.1.0.2

Description

CPU (Unix/Linux)

Bundle Patch (Windows 32bit)

Bundle Patch (Windows Itanium)

APR2005

4193293

4181849

4213305

JUL2005

4400766

4388944

4388948

JAN2005

4003051

4104364

4083038

9.2.0.8

Description

CPU (Unix/Linux)

Bundle Patch (Windows 32bit)

Bundle Patch (Windows Itanium)

JUL2010

9655027

9683644

9683645

APR2010

9352224

9390286

N/A

JAN2010

9119275

9187106

N/A

OCT2009

8836758

8785185

8785186

JUL2009

8534403

8427417

8427418

APR2009

8290549

8300340

8300346

JAN2009

7592365

7703210

7703212

OCT2008

7375695

7394394

7394402

JUL2008

7154111

7047026

7047029

APR2008

6864082

6867138

6867139

JAN2008

6646842

6637265

6637266

OCT2007

6395038

6417013

6417014

JUL2007

6079582

6130293

6130295

APR2007

5901875

5916268

5916275

JAN2007

N/A

N/A

N/A

OCT2006

5490859

5652380

5639519

9.2.0.7

Description

CPU (Unix/Linux)

Bundle Patch (Windows 32bit)

Bundle Patch (Windows Itanium)

JUL2007

6079579

6146759

6146748

APR2007

5901872

5907274

5907275

JAN2007

5689875

5654905

5654909

OCT2006

5490841

5500873

5500874

JUL2006

5225794

5250980

5250981

APR2006

5049060

5064365

5064364

JAN2006

4751923

4751528

4741074

OCT2005

4567854

4579590

4579599

JUL2005

4547566

N/A

N/A

9.2.0.6

Description

CPU (Unix/Linux)

Bundle Patch (Windows 32bit)

Bundle Patch (Windows Itanium)

OCT2006

5490840

5500865

5500871

JUL2006

5225793

5239794

5239793

APR2006

5049051

5059614

5059615

JAN2006

4751921

4751261

4751262

OCT2005

4567846

4579093

4579097

JUL2005

4392392

4445852

4401917

APR2005

4193295

4269928

4213298

9.2.0.5

Description

CPU (Unix/Linux)

Bundle Patch (Windows 32bit)

Bundle Patch (Windows Itanium)

OCT2006

5689708

N/A

N/A

JUL2006

5435138

N/A

N/A

APR2006

5219762

N/A

N/A

OCT2005

4560421

N/A

N/A

JUL2005

4392256

4387563

4391819

APR2005

4193299

4195791

4214192

JAN2005

4003006

4104374

3990809

9.2.0.4

Description

CPU (Unix/Linux)

Bundle Patch (Windows 32bit)

Bundle Patch (Windows Itanium)

JAN2005

4002994

4104369

4083202

8.1.7.4

Description

CPU (Unix/Linux)

Bundle Patch (Windows 32bit)

JAN2007

5689799

5686514

OCT2006

5490835

5496067

JUL2006

5225788

5236412

APR2006

5045247

5057601

JAN2006

4751906

4751570

OCT2005

4560405

4554818

JUL2005

4392446

4437058

APR2005

4193312

4180163

JAN2005

4002909

3921893

参考:Assistant: Download Reference for Oracle Database/GI Update, Revision, PSU, SPU(CPU), Bundle Patches, Patchsets and Base Releases (文档 ID 2118136.2)