GAGA LIFE.

インフラエンジニアブログ

スポンサーリンク

Docker上にOracle Database 12.2を構築(Part2)

概要

前回記事で構築した環境の状況を確認しました。

構成確認

--Dockerホスト側
[root@Marshall oradata]# pwd
/mnt/oradata
[root@Marshall oradata]# ll
合計 0
drwxr-xr-x 3 54321 54321 18 5月 4 16:27 dbconfig
drwxr-x--- 4 54321 54321 227 5月 4 16:23 orcl
[root@Marshall oradata]# ls -la dbconfig/orcl/
合計 24
drwxr-xr-x 2 54321 54321 117 5月 4 16:27 .
drwxr-xr-x 3 54321 54321 18 5月 4 16:27 ..
-rw-r--r-- 1 54321 54321 234 5月 4 16:20 listener.ora
-rw-r----- 1 54321 54321 3584 5月 5 15:13 orapworcl
-rw-r--r-- 1 54321 54321 786 5月 4 16:27 oratab
-rw-r----- 1 54321 54321 2560 5月 5 15:00 spfileorcl.ora
-rw-r--r-- 1 54321 54321 53 5月 4 16:20 sqlnet.ora
-rw-r--r-- 1 54321 54321 183 5月 4 16:27 tnsnames.ora
[root@Marshall oradata]# ls -la orcl/
合計 2207172
drwxr-x--- 4 54321 54321 227 5月 4 16:23 .
drwxrwxrwx 4 oracle docker 34 5月 4 16:27 ..
-rw-r----- 1 54321 54321 18726912 5月 5 15:24 control01.ctl
-rw-r----- 1 54321 54321 18726912 5月 4 17:08 control02.ctl
drwxr-x--- 2 54321 54321 104 5月 4 16:27 pdb1
drwxr-x--- 2 54321 54321 111 5月 4 16:23 pdbseed
-rw-r----- 1 54321 54321 209715712 5月 5 15:00 redo01.log
-rw-r----- 1 54321 54321 209715712 5月 5 15:24 redo02.log
-rw-r----- 1 54321 54321 209715712 5月 5 08:08 redo03.log
-rw-r----- 1 54321 54321 545267712 5月 5 15:24 sysaux01.dbf
-rw-r----- 1 54321 54321 849354752 5月 5 15:19 system01.dbf
-rw-r----- 1 54321 54321 137371648 5月 5 15:00 temp01.dbf
-rw-r----- 1 54321 54321 68165632 5月 5 15:24 undotbs01.dbf
-rw-r----- 1 54321 54321 5251072 5月 5 15:05 users01.dbf
 --コンテナ側
[oracle@aaeca05e3663 oradata]$ pwd
/opt/oracle/oradata
[oracle@aaeca05e3663 oradata]$ ll
total 0
drwxr-xr-x 3 oracle oinstall 18 May 4 07:27 dbconfig
drwxr-x--- 4 oracle oinstall 227 May 4 07:23 orcl
[oracle@aaeca05e3663 oradata]$ ls -la dbconfig/orcl/
total 24
drwxr-xr-x 2 oracle oinstall 117 May 4 07:27 .
drwxr-xr-x 3 oracle oinstall 18 May 4 07:27 ..
-rw-r--r-- 1 oracle oinstall 234 May 4 07:20 listener.ora
-rw-r----- 1 oracle oinstall 3584 May 5 06:13 orapworcl
-rw-r--r-- 1 oracle oinstall 786 May 4 07:27 oratab
-rw-r----- 1 oracle oinstall 2560 May 5 06:00 spfileorcl.ora
-rw-r--r-- 1 oracle oinstall 53 May 4 07:20 sqlnet.ora
-rw-r--r-- 1 oracle oinstall 183 May 4 07:27 tnsnames.ora
[oracle@aaeca05e3663 oradata]$ ls -la orcl/
total 2207172
drwxr-x--- 4 oracle oinstall 227 May 4 07:23 .
drwxrwxrwx 4 1000 983 34 May 4 07:27 ..
-rw-r----- 1 oracle oinstall 18726912 May 5 06:25 control01.ctl
-rw-r----- 1 oracle oinstall 18726912 May 4 08:08 control02.ctl
drwxr-x--- 2 oracle oinstall 104 May 4 07:27 pdb1
drwxr-x--- 2 oracle oinstall 111 May 4 07:23 pdbseed
-rw-r----- 1 oracle oinstall 209715712 May 5 06:00 redo01.log
-rw-r----- 1 oracle oinstall 209715712 May 5 06:25 redo02.log
-rw-r----- 1 oracle oinstall 209715712 May 4 23:08 redo03.log
-rw-r----- 1 oracle oinstall 545267712 May 5 06:25 sysaux01.dbf
-rw-r----- 1 oracle oinstall 849354752 May 5 06:19 system01.dbf
-rw-r----- 1 oracle oinstall 137371648 May 5 06:00 temp01.dbf
-rw-r----- 1 oracle oinstall 68165632 May 5 06:25 undotbs01.dbf
-rw-r----- 1 oracle oinstall 5251072 May 5 06:05 users01.dbf

管理者ユーザーのパスワード変更

---コンテナ側で実行(setPassword.shの引数に任意のパスワードを指定)
oracle@aaeca05e3663 ~]$ pwd
/home/oracle
[oracle@aaeca05e3663 ~]$ ll
total 0
lrwxrwxrwx 1 oracle oinstall 26 May 4 07:00 setPassword.sh -> /opt/oracle/setPassword.sh
[oracle@aaeca05e3663 ~]$ ll /opt/oracle
total 40
drwxr-xr-x 3 oracle oinstall 18 May 4 08:55 admin
-rwxr-xr-x 1 oracle dba 1148 May 3 20:45 checkDBStatus.sh
drwxr-xr-x 2 oracle oinstall 6 May 4 07:00 checkpoints
-rwxr-xr-x 1 oracle dba 2953 May 3 20:45 createDB.sh
-rw-rw-r-- 1 oracle dba 9203 May 3 20:45 dbca.rsp.tmpl
drwxrwxr-x 1 oracle oinstall 34 May 4 07:00 diag
drwxrwx--- 1 oracle dba 89 May 4 07:00 oraInventory
drwxrwxrwx 4 1000 983 34 May 4 07:27 oradata
drwxr-xr-x 1 oracle oinstall 22 May 4 06:55 product
-rwxr-xr-x 1 oracle dba 6140 May 3 20:45 runOracle.sh
-rwxr-xr-x 1 oracle dba 1015 May 3 20:45 runUserScripts.sh
drwxr-xr-x 4 oracle dba 34 May 4 06:48 scripts
-rwxr-xr-x 1 oracle dba 758 May 3 20:45 setPassword.sh
-rwxr-xr-x 1 oracle dba 678 May 3 20:45 startDB.sh
[oracle@aaeca05e3663]$ ./setPassword.sh XXXXXXX
The Oracle base remains unchanged with value /opt/oracle
SQL*Plus: Release 12.2.0.1.0 Production on Sat May 5 06:13:55 2018
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL>
User altered.
SQL>
User altered.
SQL>
Session altered.
SQL>
User altered.
SQL> Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

インスタンス停止/起動

▽インスタンス停止
[oracle@aaeca05e3663 ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Sat May 5 06:29:02 2018
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> shu immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
--アラートログ
:
2018-05-05T06:29:15.753610+00:00
ARCH: Archival disabled due to shutdown: 1089
Shutting down archive processes
Archiving is disabled
JIT: pid 2627 requesting stop
2018-05-05T06:29:15.822213+00:00
Stopping background process VKTM
2018-05-05T06:29:24.255962+00:00
Instance shutdown complete (OS id: 2627)
 ▽インスタンス起動
SQL> startup
ORACLE instance started.
Total System Global Area 1610612736 bytes
Fixed Size 8793304 bytes
Variable Size 520094504 bytes
Database Buffers 1073741824 bytes
Redo Buffers 7983104 bytes
Database mounted.
Database opened.
--アラートログ
:
2018-05-05T06:30:45.105541+00:00
Pluggable database PDB1 opened read write
Starting background process CJQ0
2018-05-05T06:30:45.269758+00:00
CJQ0 started with pid=40, OS id=2906
Completed: ALTER DATABASE OPEN

初期化パラメータ

SQL> show parameter
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
DBFIPS_140 boolean FALSE
O7_DICTIONARY_ACCESSIBILITY boolean FALSE
active_instance_count integer
allow_global_dblinks boolean FALSE
allow_group_access_to_sga boolean FALSE
approx_for_aggregation boolean FALSE
approx_for_count_distinct boolean FALSE
approx_for_percentile string none
aq_tm_processes integer 1
archive_lag_target integer 0
asm_diskgroups string
asm_diskstring string
asm_io_processes integer 20
asm_power_limit integer 1
asm_preferred_read_failure_groups string
audit_file_dest string /opt/oracle/admin/orcl/adump
audit_sys_operations boolean FALSE
audit_syslog_level string
audit_trail string NONE
autotask_max_active_pdbs integer 2
awr_pdb_autoflush_enabled boolean FALSE
awr_snapshot_time_offset integer 0
background_core_dump string partial
background_dump_dest string /opt/oracle/product/12.2.0.1/dbhome_1/rdbms/log
backup_tape_io_slaves boolean FALSE
bitmap_merge_area_size integer 1048576
blank_trimming boolean FALSE
buffer_pool_keep string
buffer_pool_recycle string
cdb_cluster boolean FALSE
cdb_cluster_name string orcl
cell_offload_compaction string ADAPTIVE
cell_offload_decryption boolean TRUE
cell_offload_parameters string
cell_offload_plan_display string AUTO
cell_offload_processing boolean TRUE
cell_offloadgroup_name string
circuits integer
client_result_cache_lag big integer 3000
client_result_cache_size big integer 0
clonedb boolean FALSE
clonedb_dir string
cluster_database boolean FALSE
cluster_database_instances integer 1
cluster_interconnects string
commit_logging string
commit_point_strength integer 1
commit_wait string
commit_write string
common_user_prefix string C##
compatible string 12.2.0
containers_parallel_degree integer 65535
control_file_record_keep_time integer 7
control_files string /opt/oracle/oradata/orcl/control01.ctl
control_management_pack_access string DIAGNOSTIC+TUNING
core_dump_dest string /opt/oracle/diag/rdbms/orcl/orcl/cdump
cpu_count integer 4
create_bitmap_area_size integer 8388608
create_stored_outlines string
cursor_bind_capture_destination string memory+disk
cursor_invalidation string IMMEDIATE
cursor_sharing string EXACT
cursor_space_for_time boolean FALSE
data_guard_sync_latency integer 0
data_transfer_cache_size big integer 0
db_16k_cache_size big integer 0
db_2k_cache_size big integer 0
db_32k_cache_size big integer 0
db_4k_cache_size big integer 0
db_8k_cache_size big integer 0
db_big_table_cache_percent_target string 0
db_block_buffers integer 0
db_block_checking string FALSE
db_block_checksum string TYPICAL
db_block_size integer 8192
db_cache_advice string ON
db_cache_size big integer 0
db_create_file_dest string
db_create_online_log_dest_1 string
db_create_online_log_dest_2 string
db_create_online_log_dest_3 string
db_create_online_log_dest_4 string
db_create_online_log_dest_5 string
db_domain string
db_file_multiblock_read_count integer 128
db_file_name_convert string
db_files integer 200
db_flash_cache_file string
db_flash_cache_size big integer 0
db_flashback_retention_target integer 1440
db_index_compression_inheritance string NONE
db_keep_cache_size big integer 0
db_lost_write_protect string NONE
db_name string orcl
db_performance_profile string
db_recovery_file_dest string
db_recovery_file_dest_size big integer 0
db_recycle_cache_size big integer 0
db_securefile string PREFERRED
db_ultra_safe string OFF
db_unique_name string orcl
db_unrecoverable_scn_tracking boolean TRUE
db_writer_processes integer 1
dbwr_io_slaves integer 0
ddl_lock_timeout integer 0
default_sharing string metadata
deferred_segment_creation boolean TRUE
dg_broker_config_file1 string /opt/oracle/product/12.2.0.1/dbhome_1/dbs/dr1orcl.dat
dg_broker_config_file2 string /opt/oracle/product/12.2.0.1/dbhome_1/dbs/dr2orcl.dat
dg_broker_start boolean FALSE
diagnostic_dest string /opt/oracle
disable_pdb_feature big integer 0
disk_asynch_io boolean TRUE
dispatchers string (PROTOCOL=TCP) (SERVICE=orclXDB)
distributed_lock_timeout integer 60
dml_locks integer 2216
dnfs_batch_size integer 4096
dst_upgrade_insert_conv boolean TRUE
enable_automatic_maintenance_pdb boolean TRUE
enable_ddl_logging boolean FALSE
enable_dnfs_dispatcher boolean FALSE
enable_goldengate_replication boolean FALSE
enable_pluggable_database boolean TRUE
enabled_PDBs_on_standby string *
encrypt_new_tablespaces string CLOUD_ONLY
event string
exafusion_enabled integer 1
external_keystore_credential_locatio string
n
fal_client string
fal_server string
fast_start_io_target integer 0
fast_start_mttr_target integer 0
fast_start_parallel_rollback string LOW
file_mapping boolean FALSE
fileio_network_adapters string
filesystemio_options string none
fixed_date string
gcs_server_processes integer 0
global_names boolean FALSE
global_txn_processes integer 1
hash_area_size integer 131072
heat_map string OFF
hi_shared_memory_address integer 0
hs_autoregister boolean TRUE
ifile file
inmemory_adg_enabled boolean TRUE
inmemory_clause_default string
inmemory_expressions_usage string ENABLE
inmemory_force string DEFAULT
inmemory_max_populate_servers integer 0
inmemory_query string ENABLE
inmemory_size big integer 0
inmemory_trickle_repopulate_servers_ integer 1
percent
inmemory_virtual_columns string MANUAL
instance_abort_delay_time integer 0
instance_groups string
instance_mode string READ-WRITE
instance_name string orcl
instance_number integer 0
instance_type string RDBMS
instant_restore boolean FALSE
java_jit_enabled boolean TRUE
java_max_sessionspace_size integer 0
java_pool_size big integer 0
java_restrict string none
java_soft_sessionspace_limit integer 0
job_queue_processes integer 4000
large_pool_size big integer 0
ldap_directory_access string NONE
ldap_directory_sysauth string no
license_max_sessions integer 0
license_max_users integer 0
license_sessions_warning integer 0
listener_networks string
local_listener string
lock_name_space string
lock_sga boolean FALSE
log_archive_config string
log_archive_dest string
log_archive_dest_1 string
log_archive_dest_10 string
log_archive_dest_11 string
log_archive_dest_12 string
log_archive_dest_13 string
log_archive_dest_14 string
log_archive_dest_15 string
log_archive_dest_16 string
log_archive_dest_17 string
log_archive_dest_18 string
log_archive_dest_19 string
log_archive_dest_2 string
log_archive_dest_20 string
log_archive_dest_21 string
log_archive_dest_22 string
log_archive_dest_23 string
log_archive_dest_24 string
log_archive_dest_25 string
log_archive_dest_26 string
log_archive_dest_27 string
log_archive_dest_28 string
log_archive_dest_29 string
log_archive_dest_3 string
log_archive_dest_30 string
log_archive_dest_31 string
log_archive_dest_4 string
log_archive_dest_5 string
log_archive_dest_6 string
log_archive_dest_7 string
log_archive_dest_8 string
log_archive_dest_9 string
log_archive_dest_state_1 string enable
log_archive_dest_state_10 string enable
log_archive_dest_state_11 string enable
log_archive_dest_state_12 string enable
log_archive_dest_state_13 string enable
log_archive_dest_state_14 string enable
log_archive_dest_state_15 string enable
log_archive_dest_state_16 string enable
log_archive_dest_state_17 string enable
log_archive_dest_state_18 string enable
log_archive_dest_state_19 string enable
log_archive_dest_state_2 string enable
log_archive_dest_state_20 string enable
log_archive_dest_state_21 string enable
log_archive_dest_state_22 string enable
log_archive_dest_state_23 string enable
log_archive_dest_state_24 string enable
log_archive_dest_state_25 string enable
log_archive_dest_state_26 string enable
log_archive_dest_state_27 string enable
log_archive_dest_state_28 string enable
log_archive_dest_state_29 string enable
log_archive_dest_state_3 string enable
log_archive_dest_state_30 string enable
log_archive_dest_state_31 string enable
log_archive_dest_state_4 string enable
log_archive_dest_state_5 string enable
log_archive_dest_state_6 string enable
log_archive_dest_state_7 string enable
log_archive_dest_state_8 string enable
log_archive_dest_state_9 string enable
log_archive_duplex_dest string
log_archive_format string %t_%s_%r.dbf
log_archive_max_processes integer 4
log_archive_min_succeed_dest integer 1
log_archive_start boolean FALSE
log_archive_trace integer 0
log_buffer big integer 7456K
log_checkpoint_interval integer 0
log_checkpoint_timeout integer 1800
log_checkpoints_to_alert boolean FALSE
log_file_name_convert string
long_module_action boolean TRUE
max_datapump_jobs_per_pdb integer 100
max_dispatchers integer
max_dump_file_size string unlimited
max_idle_time integer 0
max_iops integer 0
max_mbps integer 0
max_pdbs integer 4098
max_shared_servers integer
max_string_size string STANDARD
memory_max_target big integer 0
memory_target big integer 0
nls_calendar string
nls_comp string BINARY
nls_currency string
nls_date_format string
nls_date_language string
nls_dual_currency string
nls_iso_currency string
nls_language string AMERICAN
nls_length_semantics string BYTE
nls_nchar_conv_excp string FALSE
nls_numeric_characters string
nls_sort string
nls_territory string AMERICA
nls_time_format string
nls_time_tz_format string
nls_timestamp_format string
nls_timestamp_tz_format string
noncdb_compatible boolean FALSE
object_cache_max_size_percent integer 10
object_cache_optimal_size integer 10240000
ofs_threads integer 4
olap_page_pool_size big integer 0
one_step_plugin_for_pdb_with_tde boolean FALSE
open_cursors integer 300
open_links integer 4
open_links_per_instance integer 4
optimizer_adaptive_plans boolean TRUE
optimizer_adaptive_reporting_only boolean FALSE
optimizer_adaptive_statistics boolean FALSE
optimizer_capture_sql_plan_baselines boolean FALSE
optimizer_dynamic_sampling integer 2
optimizer_features_enable string 12.2.0.1
optimizer_index_caching integer 0
optimizer_index_cost_adj integer 100
optimizer_inmemory_aware boolean TRUE
optimizer_mode string ALL_ROWS
optimizer_secure_view_merging boolean TRUE
optimizer_use_invisible_indexes boolean FALSE
optimizer_use_pending_statistics boolean FALSE
optimizer_use_sql_plan_baselines boolean TRUE
os_authent_prefix string ops$
os_roles boolean FALSE
outbound_dblink_protocols string ALL
parallel_adaptive_multi_user boolean FALSE
parallel_degree_limit string CPU
parallel_degree_policy string MANUAL
parallel_execution_message_size integer 16384
parallel_force_local boolean FALSE
parallel_instance_group string
parallel_max_servers integer 160
parallel_min_percent integer 0
parallel_min_servers integer 16
parallel_min_time_threshold string AUTO
parallel_servers_target integer 64
parallel_threads_per_cpu integer 2
pdb_file_name_convert string
pdb_lockdown string
pdb_os_credential string
permit_92_wrap_format boolean TRUE
pga_aggregate_limit big integer 2G
pga_aggregate_target big integer 512M
plscope_settings string IDENTIFIERS:NONE
plsql_ccflags string
plsql_code_type string INTERPRETED
plsql_debug boolean FALSE
plsql_optimize_level integer 2
plsql_v2_compatibility boolean FALSE
plsql_warnings string DISABLE:ALL
pre_page_sga boolean TRUE
processes integer 320
processor_group_name string
query_rewrite_enabled string TRUE
query_rewrite_integrity string enforced
rdbms_server_dn string
read_only_open_delayed boolean FALSE
recovery_parallelism integer 0
recyclebin string on
redo_transport_user string
remote_dependencies_mode string TIMESTAMP
remote_listener string
remote_login_passwordfile string EXCLUSIVE
remote_os_authent boolean FALSE
remote_os_roles boolean FALSE
remote_recovery_file_dest string
replication_dependency_tracking boolean TRUE
resource_limit boolean TRUE
resource_manage_goldengate boolean FALSE
resource_manager_cpu_allocation integer 4
resource_manager_plan string SCHEDULER[0x4AC8]:DEFAULT_MAINTENANCE_PLAN
result_cache_max_result integer 5
result_cache_max_size big integer 7872K
result_cache_mode string MANUAL
result_cache_remote_expiration integer 0
resumable_timeout integer 0
rollback_segments string
sec_case_sensitive_logon boolean TRUE
sec_max_failed_login_attempts integer 3
sec_protocol_error_further_action string (DROP,3)
sec_protocol_error_trace_action string TRACE
sec_return_server_release_banner boolean FALSE
serial_reuse string disable
service_names string orcl
session_cached_cursors integer 50
session_max_open_files integer 10
sessions integer 504
sga_max_size big integer 1536M
sga_min_size big integer 0
sga_target big integer 1536M
shadow_core_dump string partial
shared_memory_address integer 0
shared_pool_reserved_size big integer 16M
shared_pool_size big integer 0
shared_server_sessions integer
shared_servers integer 1
shrd_dupl_table_refresh_rate integer 60
skip_unusable_indexes boolean TRUE
smtp_out_server string
sort_area_retained_size integer 0
sort_area_size integer 65536
spatial_vector_acceleration boolean FALSE
spfile string /opt/oracle/product/12.2.0.1/dbhome_1/dbs/spfileorcl.ora
sql92_security boolean TRUE
sql_trace boolean FALSE
sqltune_category string DEFAULT
standby_archive_dest string ?#/dbs/arch
standby_db_preserve_states string NONE
standby_file_management string MANUAL
star_transformation_enabled string FALSE
statistics_level string TYPICAL
streams_pool_size big integer 0
tape_asynch_io boolean TRUE
target_pdbs integer 3
temp_undo_enabled boolean FALSE
thread integer 0
threaded_execution boolean FALSE
timed_os_statistics integer 0
timed_statistics boolean TRUE
trace_enabled boolean TRUE
tracefile_identifier string
transactions integer 554
transactions_per_rollback_segment integer 5
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS1
unified_audit_sga_queue_size integer 1048576
uniform_log_timestamp_format boolean TRUE
use_dedicated_broker boolean FALSE
use_large_pages string TRUE
user_dump_dest string /opt/oracle/product/12.2.0.1/dbhome_1/rdbms/log
utl_file_dir string
workarea_size_policy string AUTO
xml_db_events string enable

スポンサーリンク