合 Oracle DBA面试笔试之高可用OGG系列
- 在Oracle中,什么是OGG?它有哪些优缺点?
- 在Oracle中,RAC、DG和OGG的区别有哪些?
- 在Oracle中,OGG的命令接口是哪个?
- 在Oracle中,请简单描述一下OGG的体系结构
- 在Oracle中,OGG运维常用命令有哪些?
- 在Oracle的OGG中,Logdump工具的作用是什么?
- 在Oracle中,OGG-00446 错误的处理办法
- OGG双主都支持哪些架构?做过哪些案例?
- 1. Oracle Goldengate 支持部署到哪些拓扑?
- 2. Oracle Goldengate 复制链路包含哪些组件?
- 3. Oracle GoldenGate 支持哪些数据库?
- 4. Oracle Goldengate 支持哪些事务类型的复制?
- 5. OGG复制中需要哪些附加日志的开关打开?
- 6. OGG复制中为什么需要附加日志?
- 7. 双向复制中,要考虑哪些因素?
- 8. OGG 可执行程序是否支持部署在ASM Cluster File System (ACFS)?
- 9. OGG可执行程序是否支持部署在Database File System (DBFS)? 哪些文件可以部署在DBFS?
- 10. GLOBALS 文件默认的存放位置是哪?
- 11. 字段数据过滤可以在哪些进程里配置?
- 12. OGG复制过程中,传输进程是否必须要配置?
- 13. 经典抽取和集成集成的主要区别是什么?
- 14. 列出可运行的抽取进程需要的最小参数配置?
- 15. 宏是什么?
- 16. 哪些地方可以调用宏?
- 17. 如何定义一个宏?
- 18. 我想多个进程往一个队列文件中写入数据,是否可行?
- 19. Oracle Goldengate可以加密哪些数据?
- 20. OGG提供哪些密码加密选项?
- 21. AES加密提供哪些加密强度?
- 22. OGG是否提供相应的方法检查OGG的参数语法,而不用通过实际执行?
- 23. 如何在解析日志时,增加缓冲大小,以保存更多交易数据?
- 24. 在discard文件中,可以看到哪些信息?
- 25. 使用什么命令可以切换进程写一个新的队列文件?
- 26. 如何知道参数文件最近是否被修改过?
- 27. GoldenGate 12c关键新特性有哪些?
- 28. OGG 12c安装时有哪些选项?
- 29. OGG 12c中的Credential Store是什么?
- 30. OGG12c如何配置Credentail Store?
- 31. 使用什么命令创建credential store?
- 32. 如何添加授权信息到credential store?
- 33. 如何从Oracle Credential Store中获取信息?
- 34. OGG 12c中有哪些不同的数据加密方法?
- 35. 在 Oracle database 11.2.0.4中如何启用OGG复制?
- 36. 协作模式下,投递进程是怎样工作的?
- 37. 经典投递和协作投递(Coordinated Replicat)的主要区别是什么?
- 38. OGG 12c中如何创建一个协作投递(COORDINATED REPLICATE )进程?
- 39. 在OGG 12c中创建一个投递进程,未指定 DISCARDFILE 参数,会怎样?
- 40. 是否可以让抽取进程在指定的CSN启动?
- 41. 能否解释一下针对Oracle 12c投递时的并行机制?
- 42. OGG12c的集成交付中,读取队列文件的步骤有什么变化?
- 43. 集成投递和协作投递(Coordinated delivery)的区别是什么?
- 44. 尝试列出一些可以提升 OGG投递性能的参数?
- 45. Oracle Goldengate 复制时,需要监控哪些内容?
- 46. 什么情况下使用PASSTHRU模式?
- 47. 什么情况下,会造成抽取或传输进程变慢?
- 48. 造成交付进程慢的主要原因有哪些?
- 49. 抽取进程正常运行了很长时间,突然一下当掉了,一小时之后我重启了这个进程. 在这1小时内,数据库中提交的事务会怎样处理?
- 50. 使用集成抽取模式,并且使用了默认参数,当源端数据量增加时,抽取进程的延时超过1小时甚至更多,而且数据库的性能也在降低。如何解决这种性能问题?
- 51. 为什么需要在交付进程中对表进行拆分投递,应该如何做?
- 52. 如果才能在日志文件中查看长事务?
- 53. 使用什么命令可以查看抽取进程的读取点信息?
- 54. RESTARTCOLLISION 参数与 HANDLECOLLISIONS 的区别是什么?
- 55. 如何查看抽取进程从日志中捕获的数据?
- 56. 在配置了OGG的DB主机中,如果提示RMAN-08147 警告信息,是怎么回事?
- 57. 如何使用logdump查看已经加密过的队列文件?
- 58. 列出一些Logdump中常用的命令,并且可以搜索队列文件中的数据.
- 59. 为什么有必要把OGG抽取进程升级成集成抽取模式?
- 60. 集成投递的目标数据库最低版本要求是多少?
- 61. GoldenGate 集成投递支持哪些数据库?
- 62. 使用集成投递, 在哪里可以查看性能数据统计?
- 63. 添加一张新的抽取取到OGG复制链路中的步骤是怎样的?
- 64. GoldenGate中的 CSN号,相当于Oracle 数据库中的什么对象?
- 65. 如何使用抽取进程生成一个CSV文件?
- 66. OGG安装目录 下的DEFGEN程序 是做什么用的?
- 67. 我们的数据库中有压缩表,做OGG单向同步,需要注意哪些事项.
- 68. 当前数据库是Oracle database 10.2.0.4,想使用集成抽取模式,应该如何做才能实现.
- 69. 现在我需要从一个非exadata平台迁移到exadata,源端使用的是OGG 11.1,目标端是OGG 11.2,这种环境中如何配置OGG进程?
- 70. 使用OGG 初始化的方法有哪些?
- 71. 在源和目标端都有一张表‘TEST’,但表结构不同,我该如何复制这张表的数据?
- 72. OGG中删除队列文件的最佳方式是怎样的?
- 73. 有什么参数可以使OGG只解析归档数据,而不是在线日志?
- 74. 现在有一条单向复制链路,运维人员想针对源和目标端服务器安装操作系统补丁,请说明一下在打补丁前后应该执行的操作步骤.
- 75. 针对Oracle RAC,需要哪些资源才能配置OGG的高可用?
- 76. 在OGG参数文件中,如何添加注释语句?
- OGG是如何实现对DDL的复制?
- 实现DDL与DML复制的区别?
- 说出几种OOG对DDL类型的限制。
- 列举几个主要OGG架构进程及其作用。
- OGG同步DDL的基本配置步骤
- OGG对表有哪些要求?
- OGG异常处理,通过哪个命令可以查找ERROR字样,确定错误原因并根据其信息进行排除。
- OGG为什么要打开数据库级别的补充日志(supplemental log)?
- 介绍下Trail文件
- 参考
在Oracle中,什么是OGG?它有哪些优缺点?
在Oracle中,RAC、DG和OGG的区别有哪些?
在Oracle中,OGG的命令接口是哪个?
在Oracle中,请简单描述一下OGG的体系结构
在Oracle中,OGG运维常用命令有哪些?
在Oracle的OGG中,Logdump工具的作用是什么?
⊙ 在Oracle的OGG中,Logdump工具的作用是什么?
在Oracle中,OGG-00446 错误的处理办法
OGG双主都支持哪些架构?做过哪些案例?
Oracle、MySQL、PG、SQL Server、等数据库都支持,一些案例如下:
- 使用OGG for MySQL微服务快速双向同步RDS数据库:https://www.dbaup.com/shiyongoggweifuwukuaisushuangxiangtongburdsshujuku.html
- OGG用于跨云RDS for MySQL之间配置双主实时同步–OGG远程捕获和投递:https://www.dbaup.com/oggyongyukuayunrdszhijianpeizhishuangzhushishitongbuyuanchengbuhuohetoudi.html
- OGG用于PG数据库之间双主实时同步(RDS for PG亦可)–OGG远程捕获和投递:https://www.dbaup.com/oggyongyupgshujukuzhijianshuangzhushishitongburds-for-pgyikeoggyuanchengbuhuohetoudi.html
- 使用OGG for PG微服务快速双向同步RDS数据库(双主):https://www.dbaup.com/shiyongogg-for-pgweifuwukuaisushuangxiangtongburdsshujukushuangzhu.html
- 使用OGG for Oracle微服务双向同步Oracle数据库搭建双主架构(含DDL):https://www.dbaup.com/shiyongogg-for-oracleweifuwushuangxiangtongbuoracleshujukuhanddl.html
- 使用OGG for mysql微服务搭建双主架构(含DDL):https://www.dbaup.com/shiyongogg-for-mysqlweifuwudajianshuangzhujiagouhanddl.html
- 使用数据泵基于flashback_scn+OGG微服务零停机迁移12c到19c:https://www.dbaup.com/shiyongshujubengjiyuflashback_scnoggweifuwulingtingjiqianyi12cdao19c.html
- 使用数据泵+OGG微服务新参数ENABLE_INSTANTIATION_FILTERING零停机迁移12c到19c :https://www.dbaup.com/shiyongshujubengoggweifuwuxincanshuenable_instantiation_filteringlingtingjiqianyi12cdao19c.html
1. Oracle Goldengate 支持部署到哪些拓扑?
GoldenGate supports the following topologies. More details can be found here.
- Unidirectional
- Bidirectional
- Peer-to-peer
- Broadcast
- Consolidation
- Cascasding
2. Oracle Goldengate 复制链路包含哪些组件?
The replication configuration consists of the following processes.
- Manager
- Extract
- Pump
- Replicate
3. Oracle GoldenGate 支持哪些数据库?
- Oracle Database
- TimesTen
- MySQL
- IBM DB2
- Microsoft SQL Server
- Informix
- Teradata
- Sybase
- Enscribe
- SQL/MX
For the latest list, look here.
4. Oracle Goldengate 支持哪些事务类型的复制?
Goldengate supports both DML and DDL Replication from the source to target.
5. OGG复制中需要哪些附加日志的开关打开?
The following supplemental logging is required.
- Database supplemental logging
- Object level logging
6. OGG复制中为什么需要附加日志?
When a transaction is committed on the source database, only new data is written to the Redo log. However for Oracle to apply these transactions on the destination database, the before image key values are required to identify the effected rows. This data is also placed in the trail file and used to identify the rows on the destination, using the key value the transactions are executed against them.
7. 双向复制中,要考虑哪些因素?
The customer should consider the following points in an active-active replication environment.
- Primary Key: Helps to identify conflicts and Resolve them.
- Sequences: Are not supported. The work around is use to use odd/even, range or concatenate sequences.
- Triggers: These should be disabled or suppressed to avoid using uniqueness issue
- Data Looping: This can easy avoided using OGG itself
- LAG: This should be minimized. If a customer says that there will not be any LAG due to network or huge load, then we don’t need to deploy CRDs. But this is not the case always as there would be some LAG and these can cause Conflicts.
- CDR (Conflict Detection & Resolution): OGG has built in CDRs for all kind of DMLs that can be used to detect and resolve them.
- Packaged Application: These are not supported as it may contain data types which are not support by OGG or it might not allow the application modification to work with OGG.
8. OGG 可执行程序是否支持部署在ASM Cluster File System (ACFS)?
Yes, you can install and configure OGG on ACFS.
9. OGG可执行程序是否支持部署在Database File System (DBFS)? 哪些文件可以部署在DBFS?
No, OGG binaries are not supported on DBFS. You can however store parameter files, data files (trail files), and checkpoint files on DBFS.
10. GLOBALS 文件默认的存放位置是哪?
A GLOBALS file is located under Oracle GoldenGate installation directory (OGG HOME)
11. 字段数据过滤可以在哪些进程里配置?
Filtering of the columns of a table can be set at the Extract, Pump or Replicat level.
12. OGG复制过程中,传输进程是否必须要配置?
A PUMP extract is an option, but it is highly recommended to use this to safe guard against network failures. Normally it is configured when you are setting up OGG replication across the network.
13. 经典抽取和集成集成的主要区别是什么?
经典抽取:
- The Classic Capture mode is the traditional Extract process that accesses the database redo logs (optionally archive logs) to capture the DML changes occurring on the objects specified in the parameter files.
- At the OS level, the GoldenGate user must be a part of the same database group which owns the database redo logs.
- This capture mode is available for other RDBMS as well.
- There are some data types that are not supported in Classic Capture mode.
- Classic capture can’t read data from the compressed tables/tablespaces.
集成抽取 (IC):
- In the Integrated Capture mode, GoldenGate works directly with the database log mining server to receive the data changes in the form of logical change records (LCRs).
- IC mode does not require any special setup for the databases using ASM, transparent data encryption, or Oracle RAC.
- This feature is only available for oracle databases in Version 11.2.0.3 or higher.
- It also supports various object types which were previously not supported by Classic Capture.
- This Capture mode supports extracting data from source databases using compression.
- Integrated Capture can be configured in an online or downstream mode.
14. 列出可运行的抽取进程需要的最小参数配置?
The following are the minimium required parameters which must be defined in the extract parameter file.
- EXTRACT NAME
- USERID
- EXTTRAIL
- TABLE
15. 宏是什么?
Macro is an easier way to build your parameter file. Once a macro is written it can be called from different parameter files. Common parameters like username/password and other parameters can be included in these macros. A macro can either be another parameter file or a library.
16. 哪些地方可以调用宏?
The macros can be called from the following parameter files.
- Manager
- Extract
- Replicat
- Gobals
17. 如何定义一个宏?
A macro statement consists of the following.
- Name of the Macro
- Parameter list
- Macro body
示例:
MACRO #macro_name
PARAMS (#param1, #param2, …)
BEGIN
< macro_body >
END;
18. 我想多个进程往一个队列文件中写入数据,是否可行?
Only one Extract process can write to one exttrail at a time. So you can’t configure multiple extracts to write to the same exttrail.
19. Oracle Goldengate可以加密哪些数据?
Oracle Goldengate provides 3 types of Encryption.
- Data Encryption using Blow fish.
- Password Encryption.
- Network Encryption.
20. OGG提供哪些密码加密选项?
You can encrypt a password in OGG using
- Blowfish algorithm and
- Advance Encryption Standard (AES) algorithm
21. AES加密提供哪些加密强度?
You can encrypt the password/data using the AES in three different keys
a) 128 bit
b) 192 bit and
c) 256 bit
22. OGG是否提供相应的方法检查OGG的参数语法,而不用通过实际执行?
Yes, you can place the SHOWSYNTAX parameter in the parameter file and try starting. If there is any error you will see it.
23. 如何在解析日志时,增加缓冲大小,以保存更多交易数据?
If you are using the Classical Extract you may use the TRANSLOGOPTION ASMBUFSIZE parameter to control the read size for ASM Databases.
24. 在discard文件中,可以看到哪些信息?
When data is discarded, the discard file can contain:
\1. Discard row details
\2. Database Errors
\3. Trail file number
25. 使用什么命令可以切换进程写一个新的队列文件?
You can use the following command to write the trail data to a new trail file.
SEND EXTRACT ext_name, ROLLOVER
26. 如何知道参数文件最近是否被修改过?
When ever a process is started, the parameters in the .prm file for the process is written to the process REPORT. You can look at the older process reports to view the parameters which were used to start up the process. By comparing the older and the current reports you can identify the changes in the parameters.
27. GoldenGate 12c关键新特性有哪些?
The following are some of the more interesting features of Oracle GoldenGate 12c:
- Support for Multitenant Database
- Coordinated Replicat
- Integrated Replicat Mode
- Use of Credential store
- Use of Wallet and master key
- Trigger-less DDL replication
- Automatically adjusts threads when RAC node failure/start
- Supports RAC PDML Distributed transaction
- RMAN Support for mined archive logs
28. OGG 12c安装时有哪些选项?
You can install Oracle GoldenGate 12c using in 2 ways:
\1) Interactive Installation with OUI – Graphical interface
\2) Silent Installation with OUI – Command Interface
29. OGG 12c中的Credential Store是什么?
OGG Crendential Store manages Encrypted Passwords and USERIDs that are used to interact with the local database and Associate them with an Alias. Instead of specifying actual USERID and Password in a command or a parameter file, you can use an alias. The Credential Store is implemented as an autologin wallet within the Oracle Credential Store Framework (CSF).
30. OGG12c如何配置Credentail Store?
Steps to configure Oracle Credential Store are as follows:
\1) By Default Credential Store is is located under “dircrd” directory.
If you want to specify a different location use can specidy “CREDENTIALSTORELOCATION” parameter in GLOBALS file.
Example: CREDENTIALSTORELOCATION /u01/app/oracle/OGG_PASSWD
\2) Goto OGG home and connect to GGSCI.
cd $OGG_HOME
./ggsci
GGSCI>
31. 使用什么命令创建credential store?
ADD CREDENTIALSTORE
32. 如何添加授权信息到credential store?
ALTER CREDENTIALSTORE ADD USER userid,
[PASSWORD password]
[ALIAS alias]
[DOMAIN domain]
Example: GGSCI> ALTER CREDENTIALSTORE ADD USER GGS@orcl, PASSWORD oracle ALIAS extorcl DOMAIN Oracle GoldenGate
33. 如何从Oracle Credential Store中获取信息?
GGSCI> INFO CREDENTIALSTORE
OR
GGSCI> INFO CREDENTIALSTORE DOMAIN OracleGoldenGate
34. OGG 12c中有哪些不同的数据加密方法?
In OGG 12c you can encrypt data with the following 2 methods:
\1) Encrypt Data with Master Key and Wallet
\2) Encrypt Data with ENCKEYS
35. 在 Oracle database 11.2.0.4中如何启用OGG复制?
The database services required to support Oracle GoldenGate capture and apply must be enabled explicitly for an Oracle 11.2.0.4 database. This is required for all modes of Extract and Replicat.
To enable Oracle GoldenGate, set the following database initialization parameter. All instances in Oracle RAC must have the same setting.
ENABLE_GOLDENGATE_REPLICATION=true
36. 协作模式下,投递进程是怎样工作的?
In a Coordinated Mode Replicat operates as follows:
- Reads the Oracle GoldenGate trail.
- Performs data filtering, mapping, and conversion.
- Constructs SQL statements that represent source database DML or DDL transactions (in committed order).
- Applies the SQL to the target through the SQL interface that is supported for the given target database, such as ODBC or the native database interface.
37. 经典投递和协作投递(Coordinated Replicat)的主要区别是什么?
The difference between classic mode and coordinated mode is that Replicat is multi-threaded in coordinated mode. Within a single Replicat instance, multiple threads read the trail independently and apply transactions in parallel. Each thread handles all of the filtering, mapping, conversion, SQL construction, and error handling for its assigned workload. A coordinator thread coordinates the transactions across threads to account for dependencies among the threads.
38. OGG 12c中如何创建一个协作投递(COORDINATED REPLICATE )进程?
You can create the COORDINATED REPLICATE with the following OGG Command:
ADD REPLICAT rfin, COORDINATED MAXTHREADS 50, EXTTRAIL dirdat/et
39. 在OGG 12c中创建一个投递进程,未指定 DISCARDFILE 参数,会怎样?
Starting with OGG 12c, if you don’t specify a DISCARDFILE OGG process now generates a dicard file with default values whenever a process is started with START command through GGSCI.
40. 是否可以让抽取进程在指定的CSN启动?
Yes, Starting with OGG 12c you can now start Extract at a specific CSN in the transaction log or trail.
Example:
START EXTRACT fin ATCSN 12345
START EXTRACT finance AFTERCSN 67890
41. 能否解释一下针对Oracle 12c投递时的并行机制?
Yes. The database parallel process are leveraged on the target database for automatic dependency aware parallel apply.
This key enhancement makes it very easy to maintain throughput and reducing latency. Previously the Replicat process had to manually be broken down into multiple threads.
42. OGG12c的集成交付中,读取队列文件的步骤有什么变化?
The trail generated by the extract process is read by Integrated Delivery and Logical Chase Records (LCR) are created. These LCR’S are then shipped over the network to the destination database.
43. 集成投递和协作投递(Coordinated delivery)的区别是什么?
Integrated delivery is the new 12c mechanism of sending extract trail to the destination in an Oracle enviornment. Coordinated delivery is the new mechanism to send data between now-Oracle databases.
44. 尝试列出一些可以提升 OGG投递性能的参数?
The parameters below can be used to improve the replicat performance:
- BATCHSQL
- GROUPTRANSOPS
- INSERTAPPEND
45. Oracle Goldengate 复制时,需要监控哪些内容?
The lag and checkpoint latency of the Extract, pump and Replicat processes are normally monitored.
46. 什么情况下使用PASSTHRU模式?
In pass-through mode, the Extract process does not look up the table definitions, either from the database or from a data definitions file. This increases the throughput of the data pump, as the object definition look-up is bypassed.
47. 什么情况下,会造成抽取或传输进程变慢?
Some of the possible reasons are:
- Long running batch transactions on a table.
- Insufficient memory on the Extract side. Uncommitted, long running transactions can cause writing of a transaction to a temporary area (dirtmp) on disk. Once the transaction is committed it is read from the temporary location on the file system and converted to trail files.
- Slow or overburdened Network.
48. 造成交付进程慢的主要原因有哪些?
Some of the possible reasons are: