国产xxxx99真实实拍_久久不雅视频_高清韩国a级特黄毛片_嗯老师别我我受不了了小说

資訊專欄INFORMATION COLUMN

修改數據庫資源信息

IT那活兒 / 2464人閱讀
修改數據庫資源信息

點擊上方“IT那活兒”,關注后了解更多內容,不管IT什么活兒,干就完了!!!





需  求



預發布PRE改為準生產ZSC:
  • 主機名修改hf-ahla-db-09-pre -》 hf-ahla-db-09-zsc;

  • 實例名修改 pre標識換zsc;

  • unique name修改 pre標識換zsc;

  • 監聽標識修改 pre標識換zsc;

  • 其他保持不變。





前期檢查



查看數據庫相關資源信息:
[grid@hf-ahla-db-09-pre ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE hf-ahla-db-09-pre
ora.LISTENER.lsnr
ONLINE ONLINE hf-ahla-db-09-pre
ora.LISTENER_ADG.lsnr
ONLINE ONLINE hf-ahla-db-09-pre
ora.UDRDG.dg
OFFLINE OFFLINE hf-ahla-db-09-pre
ora.asm
ONLINE ONLINE hf-ahla-db-09-pre Started
ora.ons
ONLINE ONLINE hf-ahla-db-09-pre
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.carpre.carro.svc
1        ONLINE ONLINE hf-ahla-db-09-pre
ora.carpre.carrw.svc
1        OFFLINE OFFLINE
ora.carpre.db
1        ONLINE ONLINE hf-ahla-db-09-pre Open,Readonly
ora.crmpre.crmro.svc
1        ONLINE ONLINE hf-ahla-db-09-pre
ora.crmpre.crmrw.svc
1        OFFLINE OFFLINE
ora.crmpre.db
1        ONLINE ONLINE hf-ahla-db-09-pre Open,Readonly
ora.cssd
1        ONLINE ONLINE hf-ahla-db-09-pre
ora.diskmon
1        OFFLINE OFFLINE
ora.evmd
1        ONLINE ONLINE hf-ahla-db-09-pre
ora.shqpre.db
1        ONLINE ONLINE hf-ahla-db-09-pre Open,Readonly
ora.shqpre.shqro.svc
1        ONLINE ONLINE hf-ahla-db-09-pre
ora.shqpre.shqrw.svc
1        OFFLINE OFFLINE
ora.tbcpre.db
1        ONLINE ONLINE hf-ahla-db-09-pre Open,Readonly
ora.tbcpre.tbcro.svc
1        ONLINE ONLINE hf-ahla-db-09-pre
ora.tbcpre.tbcrw.svc
1        OFFLINE OFFLINE
ora.tjdpre.db
1        ONLINE ONLINE hf-ahla-db-09-pre Open,Readonly
ora.tjdpre.tjdro.svc
1        ONLINE ONLINE hf-ahla-db-09-pre
ora.tjdpre.tjdrw.svc
1        OFFLINE OFFLINE



[oracle@hf-ahla-db-09-pre ~]$ ps -ef|grep pmon
oracle 5230     1  0 10:33 ? 00:00:00 ora_pmon_tjdpre
oracle 22802 22645  0 11:15 pts/10   00:00:00 grep --color=auto pmon
oracle 38583     1  0 10:16 ? 00:00:00 ora_pmon_crmpre
grid 40715     1  0 May06 ? 00:03:45 asm_pmon_+ASM
oracle 40919     1  0 10:16 ? 00:00:00 ora_pmon_shqpre
oracle 41964     1  0 10:17 ? 00:00:00 ora_pmon_carpre
oracle 48760     1  0 10:24 ? 00:00:00 ora_pmon_tbcpre



SYS@tjdpre>show parameter name

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert string
db_name string      shqtj
db_unique_name string      tjdpre
global_names boolean     FALSE
instance_name string      tjdpre
lock_name_space string
log_file_name_convert string
processor_group_name string
service_names string      tjdro



SYS@crmpre>show parameter name

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
cell_offloadgroup_name string
db_file_name_convert string
db_name string      orcyehoo
db_unique_name string      crmpre
global_names boolean     FALSE
instance_name string      crmpre
lock_name_space string
log_file_name_convert string
processor_group_name string
service_names string      crmro



SYS@shqpre>show parameter name

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
cell_offloadgroup_name string
db_file_name_convert string
db_name string      ahladb
db_unique_name string      shqpre
global_names boolean     FALSE
instance_name string      shqpre
lock_name_space string
log_file_name_convert string
processor_group_name string
service_names string      shqro

SYS@carpre>show parameter name

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert string
db_name string      cxcddb
db_unique_name string      carpre
global_names boolean     FALSE
instance_name string      carpre
lock_name_space string
log_file_name_convert string
processor_group_name string
service_names string      carro



SYS@tbcpre>show parameter name

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
cell_offloadgroup_name string
db_file_name_convert string
db_name string      tbc
db_unique_name string      tbcpre
global_names boolean     FALSE
instance_name string      tbcpre
lock_name_space string
log_file_name_convert string
processor_group_name string
service_names string      tbcro




SQL> select path from v$asm_disk;

PATH
--------------------------------------------------------------------------------
/dev/mapper/rootvg-lv_asmdata_udr_001
/dev/mapper/rootvg-lv_asmdata_udr_025
/dev/mapper/rootvg-lv_asmdata_udr_026
/dev/mapper/rootvg-lv_asmdata_udr_035
/dev/mapper/rootvg-lv_asmdata_udr_037
/dev/mapper/rootvg-lv_asmdata_udr_020
/dev/mapper/rootvg-lv_asmdata_udr_003
/dev/mapper/rootvg-lv_asmdata_udr_054
/dev/mapper/rootvg-lv_asmdata_udr_070
/dev/mapper/rootvg-lv_asmdata_udr_069
/dev/mapper/rootvg-lv_asmdata_udr_008

PATH
--------------------------------------------------------------------------------
/dev/mapper/rootvg-lv_asmdata_udr_062
/dev/mapper/rootvg-lv_asmdata_udr_067
/dev/mapper/rootvg-lv_asmdata_udr_014
/dev/mapper/rootvg-lv_asmdata_udr_015
/dev/mapper/rootvg-lv_asmdata_udr_068
/dev/mapper/rootvg-lv_asmdata_udr_058
/dev/mapper/rootvg-lv_asmdata_udr_060
/dev/mapper/rootvg-lv_asmdata_udr_066
/dev/mapper/rootvg-lv_asmdata_udr_056
/dev/mapper/rootvg-lv_asmdata_udr_061
/dev/mapper/rootvg-lv_asmdata_udr_047

PATH
--------------------------------------------------------------------------------
/dev/mapper/rootvg-lv_asmdata_udr_063
/dev/mapper/rootvg-lv_asmdata_udr_055
/dev/mapper/rootvg-lv_asmdata_udr_002
/dev/mapper/rootvg-lv_asmdata_udr_057
/dev/mapper/rootvg-lv_asmdata_udr_028
/dev/mapper/rootvg-lv_asmdata_udr_048
/dev/mapper/rootvg-lv_asmdata_udr_039
/dev/mapper/rootvg-lv_asmdata_udr_034
/dev/mapper/rootvg-lv_asmdata_udr_044
/dev/mapper/rootvg-lv_asmdata_udr_033
/dev/mapper/rootvg-lv_asmdata_udr_016

PATH
--------------------------------------------------------------------------------
/dev/mapper/rootvg-lv_asmdata_udr_045
/dev/mapper/rootvg-lv_asmdata_udr_004
/dev/mapper/rootvg-lv_asmdata_udr_053
/dev/mapper/rootvg-lv_asmdata_udr_011
/dev/mapper/rootvg-lv_asmdata_udr_017
/dev/mapper/rootvg-lv_asmdata_udr_007
/dev/mapper/rootvg-lv_asmdata_udr_027
/dev/mapper/rootvg-lv_asmdata_udr_042
/dev/mapper/rootvg-lv_asmdata_udr_023
/dev/mapper/rootvg-lv_asmdata_udr_046
/dev/mapper/rootvg-lv_asmdata_udr_040

PATH
--------------------------------------------------------------------------------
/dev/mapper/rootvg-lv_asmdata_udr_051
/dev/mapper/rootvg-lv_asmdata_udr_018
/dev/mapper/rootvg-lv_asmdata_udr_059
/dev/mapper/rootvg-lv_asmdata_udr_012
/dev/mapper/rootvg-lv_asmdata_udr_022
/dev/mapper/rootvg-lv_asmdata_udr_064
/dev/mapper/rootvg-lv_asmdata_udr_013
/dev/mapper/rootvg-lv_asmdata_udr_005
/dev/mapper/rootvg-lv_asmdata_udr_065
/dev/mapper/rootvg-lv_asmdata_udr_049
/dev/mapper/rootvg-lv_asmdata_udr_010

PATH
--------------------------------------------------------------------------------
/dev/mapper/rootvg-lv_asmdata_udr_006
/dev/mapper/rootvg-lv_asmdata_udr_021
/dev/mapper/rootvg-lv_asmdata_udr_041
/dev/mapper/rootvg-lv_asmdata_udr_030
/dev/mapper/rootvg-lv_asmdata_udr_031
/dev/mapper/rootvg-lv_asmdata_udr_009
/dev/mapper/rootvg-lv_asmdata_udr_036
/dev/mapper/rootvg-lv_asmdata_udr_052
/dev/mapper/rootvg-lv_asmdata_udr_043
/dev/mapper/rootvg-lv_asmdata_udr_032
/dev/mapper/rootvg-lv_asmdata_udr_029

PATH
--------------------------------------------------------------------------------
/dev/mapper/rootvg-lv_asmdata_udr_038
/dev/mapper/rootvg-lv_asmdata_udr_050
/dev/mapper/rootvg-lv_asmdata_udr_019
/dev/mapper/rootvg-lv_asmdata_udr_024

70 rows selected.


[root@hf-ahla-db-09-pre ~]# hostname
hf-ahla-db-09-pre





操  作



1. 備份oracle不同實例的以及asm的參數文件:

SYS@tbcpre>create pfile from spfile;

File created.

asm:
SQL> create pfile from spfile;
create pfile from spfile
*
ERROR at line 1:
ORA-01565: error in identifying file
+UDRDG/asm/asmparameterfile/registry.253.1043685383
ORA-17503: ksfdopn:10 Failed to open file
+UDRDG/asm/asmparameterfile/registry.253.1043685383
ORA-15001: diskgroup "UDRDG" does not exist or is not mounted

2. 查看資源組信息:

SQL> show parameter name

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_unique_name string +ASM
instance_name string +ASM
lock_name_space string
service_names string +ASM


SQL>
 show parameter type

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_type string asm



SQL>
 show parameter large

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
large_pool_size big integer 16M
use_large_pages string TRUE


SQL>
 show parameter diskstring

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
asm_diskstring string /dev/mapper/*



SQL>
 show parameter login

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile string EXCLUSIVE
SQL>

SQL>
 show parameter diskgroup

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
asm_diskgroups string DATA

3. 先修改主機名:

hostnamectl set-hostname hf-ahla-db-09-zsc
修改/etc/hosts:
[root@hf-ahla-db-09-pre ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

***.***.***.229  hf-ahla-db-09-zsc

#nbu
***.***.***.120   hf-ust-app01-nbu

4. 刪除原先配置

[root@hf-ahla-db-09-pre ~]# find / -name roothas.pl
/home/grid/18370031/files/crs/install/roothas.pl
/home/grid/28429134/27735020/files/crs/install/roothas.pl
/home/oracle/28429134/27735020/files/crs/install/roothas.pl
/u01/app/11.2.0.4/grid/crs/install/roothas.pl
/u01/app/11.2.0.4/grid/.patch_storage/18370031_Aug_15_2014_16_14_40/files/crs/install/roothas.pl
/u01/app/11.2.0.4/grid/.patch_storage/27735020_Sep_20_2018_02_02_56/files/crs/install/roothas.pl
/u01/app/oracle/product/11.2.0.4/dbhome_1/crs/install/roothas.pl
/u01/app/oracle/product/11.2.0.3/dbhome_1/crs/install/roothas.pl
用/u01/app/11.2.0.4/grid/crs/install/roothas.pl來執行刪除配置操作。
/u01/app/11.2.0.4/grid/crs/install/roothas.pl -deconfig -force

5. 安裝資源配置

/u01/app/11.2.0/grid/crs/install/roothas.pl


6. 查看資源狀態


crsctl stat res -t
設置開機自啟動。
/u01/app/11.2.0/grid/bin/crsctl modify resource "ora.cssd" -init -attr "AUTO_START=1"
查看資源狀態,并停止has服務。
ps -ef|grep d.bin
crsctl stop has
ps -ef|grep d.bin
依次在不同庫的參數文件下修改db_unique_name、fal_client、log_archive_config、log_archive_dest_1。
添加參數instance_name。結果只看到這三個庫的備份pfile:
-rw-r--r--. 1 oracle dba           3215 May 25 13:30 initcrmpre.ora
-rw-r--r--. 1 oracle dba           2708 May 25 13:30 initshqpre.ora
-rw-r--r--. 1 oracle dba           3407 May 25 13:31 inittbcpre.ora
==》對tjdpre與carpre多帶帶根據目錄創建:
create pfile=/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/inittjdpre.ora from spfile;

create pfile=/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/initcarpre.ora from spfile;
--這里先修改tjdpre的參數文件:
[oracle@hf-ahla-db-09-pre dbs]$ cat inittjdpre.ora
tjdudr.__db_cache_size=48049946624
tjdpre.__db_cache_size=48049946624
tjdudr.__java_pool_size=134217728
tjdpre.__java_pool_size=134217728
tjdudr.__large_pool_size=268435456
tjdpre.__large_pool_size=134217728
tjdudr.__oracle_base=/u01/app/oracle#ORACLE_BASE set from environment
tjdpre.__oracle_base=/u01/app/oracle#ORACLE_BASE set from environment
tjdudr.__pga_aggregate_target=8589934592
tjdpre.__pga_aggregate_target=8589934592
tjdudr.__sga_target=53687091200
tjdpre.__sga_target=53687091200
tjdudr.__shared_io_pool_size=0
tjdpre.__shared_io_pool_size=0
tjdudr.__shared_pool_size=4966055936
tjdpre.__shared_pool_size=4831838208
tjdudr.__streams_pool_size=0
tjdpre.__streams_pool_size=268435456
*.archive_lag_target=1800
*.audit_trail=none
*.compatible=11.2.0.0.0
*.control_file_record_keep_time=31
*.control_files=+DATA/tjdudr/controlfile/current.265.1043715485,+DATA/tjdudr/controlfile/current.266.1043715485
*.db_block_size=8192
*.db_create_file_dest=+DATA
*.db_create_online_log_dest_1=+DATA
*.db_domain=
*.db_files=500
*.db_flashback_retention_target=4320
*.db_lost_write_protect=none
*.db_name=shqtj
*.db_recovery_file_dest_size=4398046511104
*.db_recovery_file_dest=+DATA
*.db_unique_name=tjdzsc=========================================修改點
*.diagnostic_dest=/u01/app/oracle
*.enable_ddl_logging=TRUE
*.fal_client=tjdzsc=====================================修改點
*.fal_server=tjdust
*.job_queue_processes=100
*.local_listener=
*.log_archive_config=DG_CONFIG=(tjdust,tjdzsc)==================修改點
*.log_archive_dest_1=LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=tjdzsc=======修改點
*.log_archive_dest_2=
*.log_archive_dest_3=
*.log_archive_max_processes=6
*.open_cursors=300
*.open_links=0
*.open_links_per_instance=0
*.parallel_max_servers=128
*.parallel_servers_target=400
*.pga_aggregate_target=8g
*.processes=3000
*.remote_login_passwordfile=EXCLUSIVE
*.sessions=2500
*.sga_max_size=50g
*.sga_target=50g
*.standby_file_management=AUTO
*.undo_tablespace=UNDOTBS1
*.instance_name=tjdzsc===========新增
--tbcpre
[oracle@hf-ahla-db-09-pre dbs]$ cat inittbcpre.ora
tbcudr.__db_cache_size=26843545600
tbcpre.__db_cache_size=26709327872
tbcudr.__java_pool_size=939524096
tbcpre.__java_pool_size=939524096
tbcudr.__large_pool_size=134217728
tbcpre.__large_pool_size=134217728
tbcudr.__oracle_base=/u01/app/oracle#ORACLE_BASE set from environment
tbcpre.__oracle_base=/u01/app/oracle#ORACLE_BASE set from environment
tbcudr.__pga_aggregate_target=8589934592
tbcpre.__pga_aggregate_target=8589934592
tbcudr.__sga_target=32212254720
tbcpre.__sga_target=32212254720
tbcudr.__shared_io_pool_size=0
tbcpre.__shared_io_pool_size=0
tbcudr.__shared_pool_size=4026531840
tbcpre.__shared_pool_size=4160749568
tbcudr.__streams_pool_size=0
tbcpre.__streams_pool_size=0
*._b_tree_bitmap_plans=false
*._bloom_filter_enabled=false
*._external_scn_logging_threshold_seconds=21600
*._external_scn_rejection_threshold_hours=24
*._gby_hash_aggregation_enabled=false
*._index_partition_large_extents=false
*._keep_remote_column_size=TRUE
*._ksmg_granule_size=134217728
*._lm_sync_timeout=1200
*._lm_tickets=5000
*._memory_imm_mode_without_autosga=FALSE
*._nlj_batching_misses_enabled=0
*._optim_peek_user_binds=false
*._optimizer_mjc_enabled=false
*._optimizer_null_aware_antijoin=false
*._optimizer_squ_bottomup=FALSE
*._optimizer_use_feedback=false
*._partition_large_extents=false
*._px_use_large_pool=true
*._smu_debug_mode=134217728
*._undo_autotune=FALSE
*._use_adaptive_log_file_sync=false
*.archive_lag_target=1800
*.audit_trail=none
*.compatible=11.2.0.4.0
*.control_file_record_keep_time=31
*.control_files=+DATA/tbcudr/controlfile/current.267.1043715581,+DATA/tbcudr/controlfile/current.268.1043715581
*.db_block_size=8192
*.db_create_file_dest=+DATA
*.db_create_online_log_dest_1=+DATA
*.db_domain=
*.db_file_multiblock_read_count=32
*.db_files=1024
*.db_flashback_retention_target=4320
*.db_lost_write_protect=none
*.db_name=tbc
*.db_recovery_file_dest_size=2199023255552
*.db_recovery_file_dest=+DATA
*.db_securefile=PERMITTED
*.db_unique_name=tbczsc=========================修改點
*.deferred_segment_creation=FALSE
*.diagnostic_dest=/u01/app/oracle
*.distributed_lock_timeout=240
*.enable_ddl_logging=true
*.enable_goldengate_replication=TRUE
*.event=10949 trace name context forever:28401 trace name context forever, level 1
*.fal_client=tbczsc===============================修改點
*.fal_server=tbcust
*.fast_start_parallel_rollback=low
*.filesystemio_options=SETALL
*.global_names=FALSE
*.job_queue_processes=1000
*.local_listener=
*.log_archive_config=DG_CONFIG=(tbcust,tbczsc)=====================修改點
*.log_archive_dest_1=LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=tbczsc=========修改點
*.log_archive_dest_2=
*.log_archive_dest_3=
*.log_archive_dest_state_2=ENABLE
*.log_archive_format=%d_%t_%s_%r.dbf
*.max_shared_servers=0
*.nls_territory=AMERICA
*.open_cursors=2000
*.open_links=0
*.open_links_per_instance=0
*.parallel_execution_message_size=16384
*.parallel_max_servers=128
*.parallel_servers_target=400
*.pga_aggregate_target=8g
*.processes=3000
*.query_rewrite_enabled=TRUE
*.query_rewrite_integrity=trusted
*.remote_login_passwordfile=EXCLUSIVE
*.resource_manager_plan=force:
*.session_cached_cursors=200
*.sessions=1655
*.sga_max_size=32212254720
*.sga_target=32212254720
*.shared_servers=0
*.standby_file_management=AUTO
*.star_transformation_enabled=FALSE
*.timed_statistics=TRUE
*.undo_management=AUTO
*.undo_retention=10800
*.undo_tablespace=UNDOTBS1
*.instance_name=tbczsc===========新增


--shqpre


[oracle@hf-ahla-db-09-pre dbs]$ cat initshqpre.ora
shqudr.__db_cache_size=47110422528
shqpre.__db_cache_size=47110422528
shqudr.__java_pool_size=939524096
shqpre.__java_pool_size=939524096
shqudr.__large_pool_size=134217728
shqpre.__large_pool_size=134217728
shqudr.__oracle_base=/u01/app/oracle#ORACLE_BASE set from environment
shqpre.__oracle_base=/u01/app/oracle#ORACLE_BASE set from environment
shqudr.__pga_aggregate_target=8589934592
shqpre.__pga_aggregate_target=8589934592
shqudr.__sga_target=53687091200
shqpre.__sga_target=53687091200
shqudr.__shared_io_pool_size=0
shqpre.__shared_io_pool_size=0
shqudr.__shared_pool_size=5234491392
shqpre.__shared_pool_size=4966055936
shqudr.__streams_pool_size=0
shqpre.__streams_pool_size=268435456
*._b_tree_bitmap_plans=FALSE
*._bloom_filter_enabled=FALSE
*._gby_hash_aggregation_enabled=FALSE
*._index_partition_large_extents=FALSE
*._optimizer_mjc_enabled=FALSE
*._optimizer_squ_bottomup=TRUE
*._smu_debug_mode=134217728
*.archive_lag_target=1800
*.audit_trail=none
*.compatible=11.2.0.0.0
*.control_file_record_keep_time=31
*.control_files=+DATA/shqudr/controlfile/current.271.1043715717,+DATA/shqudr/controlfile/current.272.1043715717
*.db_block_size=8192
*.db_create_file_dest=+DATA
*.db_create_online_log_dest_1=+DATA
*.db_domain=
*.db_file_multiblock_read_count=32
*.db_files=1500
*.db_flashback_retention_target=4320
*.db_lost_write_protect=none
*.db_name=ahladb
*.db_recovery_file_dest_size=2199023255552
*.db_recovery_file_dest=+DATA
*.db_unique_name=shqzsc======================修改點
*.diagnostic_dest=/u01/app/oracle
*.distributed_lock_timeout=240
*.enable_ddl_logging=true
*.enable_goldengate_replication=TRUE
*.event=10949 trace name context forever:28401 trace name context forever, level 1
*.fal_client=shqzsc=================================修改點
*.fal_server=shqust
*.fast_start_parallel_rollback=low
*.global_names=FALSE
*.job_queue_processes=150
*.local_listener=
*.log_archive_config=DG_CONFIG=(shqust,shqzsc)======================修改點
*.log_archive_dest_1=LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=shqzsc=========修改點
*.log_archive_dest_2=
*.log_archive_dest_3=
*.max_shared_servers=0
*.open_cursors=3000
*.open_links=0
*.open_links_per_instance=0
*.parallel_execution_message_size=16384
*.parallel_max_servers=128
*.parallel_servers_target=400
*.pga_aggregate_target=8G
*.processes=3000
*.query_rewrite_enabled=TRUE
*.query_rewrite_integrity=trusted
*.remote_login_passwordfile=EXCLUSIVE
*.resource_manager_plan=force:
*.session_cached_cursors=200
*.sessions=4000
*.sga_max_size=50g
*.SGA_target=50g
*.shared_servers=0
*.standby_file_management=AUTO
*.star_transformation_enabled=FALSE
*.timed_statistics=TRUE
*.undo_retention=10800
*.undo_tablespace=UNDOTBS1
*.use_large_pages=ONLY
*.instance_name=shqzsc===========新增
--crmpre
[oracle@hf-ahla-db-09-pre dbs]$ cat initcrmpre.ora
crmudr.__db_cache_size=47378857984
crmpre.__db_cache_size=47110422528
crmudr.__java_pool_size=939524096
crmpre.__java_pool_size=939524096
crmudr.__large_pool_size=134217728
crmpre.__large_pool_size=134217728
crmudr.__oracle_base=/u01/app/oracle#ORACLE_BASE set from environment
crmpre.__oracle_base=/u01/app/oracle#ORACLE_BASE set from environment
crmudr.__pga_aggregate_target=8589934592
crmpre.__pga_aggregate_target=8589934592
crmudr.__sga_target=53687091200
crmpre.__sga_target=53687091200
crmudr.__shared_io_pool_size=0
crmpre.__shared_io_pool_size=0
crmudr.__shared_pool_size=4966055936
crmpre.__shared_pool_size=4966055936
crmudr.__streams_pool_size=0
crmpre.__streams_pool_size=268435456
*._b_tree_bitmap_plans=false
*._bloom_filter_enabled=false
*._gby_hash_aggregation_enabled=false
*._index_partition_large_extents=false
*._keep_remote_column_size=TRUE
*._ksmg_granule_size=134217728
*._lm_sync_timeout=1200
*._lm_tickets=5000
*._memory_imm_mode_without_autosga=FALSE
*._nlj_batching_misses_enabled=0
*._optim_peek_user_binds=FALSE
*._optimizer_mjc_enabled=false
*._optimizer_null_aware_antijoin=false
*._optimizer_squ_bottomup=FALSE
*._optimizer_use_feedback=false
*._partition_large_extents=false
*._px_use_large_pool=true
*._smu_debug_mode=134217728
*._undo_autotune=FALSE
*._use_adaptive_log_file_sync=false
*.archive_lag_target=1800
*.audit_trail=none
*.compatible=11.2.0.4.0
*.control_file_record_keep_time=31
*.control_files=+DATA/crmudr/controlfile/current.273.1043715771,+DATA/crmudr/controlfile/current.274.1043715771
*.db_block_size=8192
*.db_create_file_dest=+DATA
*.db_create_online_log_dest_1=+DATA
*.db_domain=
*.db_file_multiblock_read_count=32
*.db_files=1500
*.db_flashback_retention_target=4320
*.db_lost_write_protect=none
*.db_name=orcyehoo
*.db_recovery_file_dest_size=2199023255552
*.db_recovery_file_dest=+DATA
*.db_unique_name=crmzsc================================修改點
*.diagnostic_dest=/u01/app/oracle
*.distributed_lock_timeout=240
*.enable_ddl_logging=true
*.enable_goldengate_replication=TRUE
*.event=10949 trace name context forever:28401 trace name context forever, level 1
*.fal_client=crmzsc================================修改點
*.fal_server=crmust
*.fast_start_parallel_rollback=low
*.global_names=FALSE
*.job_queue_processes=100
*.local_listener=
*.log_archive_config=DG_CONFIG=(crmust,crmzsc)============================修改點
*.log_archive_dest_1=LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=crmzsc================修改點
*.log_archive_dest_2=
*.log_archive_dest_3=
*.log_archive_dest_state_3=enable
*.log_archive_format=%d_%t_%s_%r.dbf
*.max_shared_servers=0
*.open_cursors=2000
*.open_links=0
*.open_links_per_instance=0
*.parallel_execution_message_size=16384
*.parallel_max_servers=128
*.parallel_servers_target=400
*.pga_aggregate_target=8G
*.processes=3000
*.query_rewrite_enabled=TRUE
*.query_rewrite_integrity=trusted
*.remote_login_passwordfile=EXCLUSIVE
*.resource_manager_plan=force:
*.instance_name=crmzsc===========新增
--carpre
[oracle@hf-ahla-db-09-pre dbs]$ cat initcarpre.ora
carudr.__db_cache_size=47915728896
carpre.__db_cache_size=48184164352
carudr.__java_pool_size=134217728
carpre.__java_pool_size=134217728
carudr.__large_pool_size=268435456
carpre.__large_pool_size=134217728
carudr.__oracle_base=/u01/app/oracle#ORACLE_BASE set from environment
carpre.__oracle_base=/u01/app/oracle#ORACLE_BASE set from environment
carudr.__pga_aggregate_target=8589934592
carpre.__pga_aggregate_target=8589934592
carudr.__sga_target=53687091200
carpre.__sga_target=53687091200
carudr.__shared_io_pool_size=0
carpre.__shared_io_pool_size=0
carudr.__shared_pool_size=5100273664
carpre.__shared_pool_size=4966055936
carudr.__streams_pool_size=0
carpre.__streams_pool_size=0
*.aq_tm_processes=0
*.archive_lag_target=1800
*.audit_trail=none
*.compatible=11.2.0.0.0
*.control_file_record_keep_time=31
*.control_files=+DATA/carudr/controlfile/current.269.1043715643,+DATA/carudr/controlfile/current.270.1043715643
*.db_block_size=8192
*.db_create_file_dest=+DATA
*.db_create_online_log_dest_1=+DATA
*.db_domain=
*.db_files=1000
*.db_flashback_retention_target=4320
*.db_lost_write_protect=none
*.db_name=cxcddb
*.db_recovery_file_dest_size=2199023255552
*.db_recovery_file_dest=+DATA
*.db_unique_name=carzsc=========================修改點
*.diagnostic_dest=/u01/app/oracle
*.enable_ddl_logging=TRUE
*.fal_client=carzsc=====================================修改點
*.fal_server=carust
*.job_queue_processes=150
*.local_listener=
*.log_archive_config=DG_CONFIG=(carust,carzsc)========================修改點
*.log_archive_dest_1=LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=carzsc==========修改點
*.log_archive_dest_2=
*.log_archive_dest_3=
*.open_cursors=300
*.open_links=0
*.open_links_per_instance=0
*.parallel_max_servers=128
*.parallel_servers_target=400
*.pga_aggregate_target=8g
*.processes=3000
*.remote_login_passwordfile=EXCLUSIVE
*.sec_case_sensitive_logon=FALSE
*.sessions=4000
*.sga_max_size=50g
*.sga_target=50g
*.standby_file_management=AUTO
*.instance_name=carzsc===========新增
--從主即ust上$ORACLE_HOME/dbs目錄下拷貝密碼文件到ahla上并且重命名。
先通過scp傳輸過去,然后mv重名名。
==》發現Permission denied,權限被阻止了是因為接收地目錄權限位置,設置個臨時目錄給777,然后再cp到相應目錄即可。
在grid用戶下開啟has服務并檢查:
crsctl start has
crsctl check has
crsctl stat resource
crsctl stat res -t
編輯listener.ora
[grid@hf-ahla-db-09-zsc admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/11.2.0.4/grid/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER_ADG =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hf-ahla-db-09-zsc)(PORT = 1207))
(SEND_BUF_SIZE=10485760)(RECV_BUF_SIZE=10485760)
)

ADR_BASE_LISTENER_ADG = /u01/app/grid

SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER_ADG = OFF

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_ADG = ON

LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hf-ahla-db-09-zsc)(PORT = 1521))
)

ADR_BASE_LISTENER = /u01/app/grid

SID_LIST_LISTENER_ADG =
(SID_LIST =
(SID_DESC =
(SDU=65535)
(GLOBAL_DBNAME = crmzsc)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0.4/dbhome_1)
(SID_NAME = crmzsc)
)
(SID_DESC =
(SDU=65535)
(GLOBAL_DBNAME = shqzsc)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0.4/dbhome_1)
(SID_NAME = shqzsc)
)
(SID_DESC =
(SDU=65535)
(GLOBAL_DBNAME = carzsc)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0.3/dbhome_1)
(SID_NAME = carzsc)
)
(SID_DESC =
(SDU=65535)
(GLOBAL_DBNAME = tjdzsc)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0.3/dbhome_1)
(SID_NAME = tjdzsc)
)
(SID_DESC =
(SDU=65535)
(GLOBAL_DBNAME = tbczsc)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0.4/dbhome_1)
(SID_NAME = tbczsc)
)
)

SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER = OFF

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER = ON
然后grid用戶下執行:
srvctl add listener==========這里因為生產環境是兩個監聽,因此是錯誤的。
srvctl add listener -l LISTENER
srvctl add listener -l LISTENER_ADG

srvctl start listener
--添加asm資源:
srvctl add asm
crsctl modify resource "ora.asm" -init -attr "AUTO_START=1"
然后sqlplus / as sysasm登陸asm實例,以備份的pfile文件來啟動:
startup pfile=init+ASM.ora
然后創建spfile:
create spfile=+DATA from pfile=/u01/app/11.2.0/grid/dbs/init+ASM.ora;
將監聽重新修改下:
srvctl modify asm  -l LISTENER
srvctl modify asm  -l LISTENER_ADG========新增
--生產上有很多的資源都需要重新注冊到OCR里===================新增。
--添加服務資源:
srvctl add service -d crmzsc -s crmpre.crmro==》錯誤寫法,資源那顯示前面一個點是db_unique_name,而-d包含了。
srvctl add service -d crmzsc -s crmpre.crmrw====>這步省略,原資源狀態就是不可用。
srvctl add service -d crmzsc -s crmzsc
srvctl add service -d shqzsc -s shqro
srvctl add service -d tbczsc -s tbcro
srvctl add service -d tjdzsc -s tjdro
srvctl add service -d carzsc -s tjdrw
--添加ons資源:
srvctl add ons
停啟has服務,查看資源狀態:
crsctl stop has
crsctl start has
crsctl stat res -t
ps -ef|grep pmon
切換環境變量來登錄不同數據庫。
export ORACLE_SID=carzsc
然后以修改后的pfile來登陸數據庫到nomount狀態。
創建spfile。
關庫。
以這個為范例修改,不同實例下添加不同的庫資源。
--添加數據庫資源,oracle來執行:
srvctl add database -d crmzsc -n orcyehoo -o /u01/app/oracle/11.2.0/dbhome_1 -icrmzsc
srvctl add database -d shqzsc -n ahladb -o /u01/app/oracle/11.2.0/dbhome_1 -i shqzsc
srvctl add database -d tbczsc -n tbc -o /u01/app/oracle/11.2.0/dbhome_1 -i tbczsc
srvctl add database -d tjdzsc -n shqtj -o /u01/app/oracle/11.2.0/dbhome_1 -i tjdzsc
srvctl add database -d carzsc -n cxcddb -o /u01/app/oracle/11.2.0/dbhome_1 -i carzsc
修改主備庫的tnsnames.ora。
然后根據環境變量起庫即可。


本文作者:張德橋

本文來源:IT那活兒(上海新炬王翦團隊)

文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。

轉載請注明本文地址:http://specialneedsforspecialkids.com/yun/129596.html

相關文章

  • HTTP面試指南

    摘要:報文主體并不是一定要有的。緩存緩存作用減少了冗余的數據傳輸,節省了網費。當資源發生改變時,也隨之發生變化。本人水平有限,有不足之處,望大家指出改正。 前言 或許你在面試時遇到過這樣的問題:從輸入URL到瀏覽器顯示頁面發生了什么?簡單的回答就是: DNS解析 TCP建立連接 發送HTTP請求 服務器處理請求 如果有緩存直接讀緩存 沒有緩存返回響應內容 TCP斷開連接 瀏覽器解...

    FreeZinG 評論0 收藏0
  • HTTP緩存理解

    摘要:原因是,服務端在進行標識比較后,只返回部分,通過狀態碼通知客戶端使用緩存,不再需要將報文主體部分返回給客戶端。 Http 緩存機制作為 web 性能優化的重要手段,對于從事 Web 開發的同學們來說,應該是知識體系庫中的一個基礎環節。在介紹HTTP緩存之前,作為知識鋪墊,先簡單介紹一下HTTP報文 準備 HTTP報文就是瀏覽器和服務器間通信時發送及響應的數據塊。瀏覽器向服務器請求數據,...

    jackzou 評論0 收藏0
  • 瀏覽器緩存小結

    摘要:原文鏈接瀏覽器緩存瀏覽器緩存強緩存協商緩存強緩存釋義客戶端第一次問服務器要某個資源時,服務器丟還給客戶端所請求的這個資源同時,告訴客戶端將這個資源保存在本地,并且在未來的某個時點之前如果還需要這個資源,直接從本地獲取就行了,不用向服務器請求 原文鏈接:瀏覽器緩存 瀏覽器緩存 強緩存 & 協商緩存 強緩存 釋義: 客戶端第一次問服務器要某個資源時,服務器丟還給客戶端所請求的這個資源...

    pepperwang 評論0 收藏0
  • 瀏覽器緩存小結

    摘要:原文鏈接瀏覽器緩存瀏覽器緩存強緩存協商緩存強緩存釋義客戶端第一次問服務器要某個資源時,服務器丟還給客戶端所請求的這個資源同時,告訴客戶端將這個資源保存在本地,并且在未來的某個時點之前如果還需要這個資源,直接從本地獲取就行了,不用向服務器請求 原文鏈接:瀏覽器緩存 瀏覽器緩存 強緩存 & 協商緩存 強緩存 釋義: 客戶端第一次問服務器要某個資源時,服務器丟還給客戶端所請求的這個資源...

    CollinPeng 評論0 收藏0
  • http緩存詳細分析

    摘要:如果發送請求的時間在之前,那么本地緩存始終有效,否則就會發送請求到服務器來獲取資源。不使用本地緩存,需要使用協商緩存。直接禁止瀏覽器緩存數據。 每天系統復習一個知識點 http緩存 http緩存主要分為了兩類 強緩存(本地緩存)和協商緩存 瀏覽器在請求某一資源時,會先獲取改資源緩存的header信息,判斷是否命中強緩存(expires的信息和cache-control)若命中直接從緩存...

    luoyibu 評論0 收藏0
  • 關于RESTful API 設計的總結

    摘要:互聯網通信協議協議,是一個無狀態協議。具體來說,就是協議里面,四個表示操作方式的動詞。版本號的版本號和客戶端的版本號是毫無關系的,不要讓將它們用于提交應用市場的版本號傳遞到服務器,而是提供類似于之類的版本號。版本號拼接在中。 為什么要用 RESTful RESTful 給我的最大感覺就是規范、易懂和優雅,一個結構清晰、易于理解的 API 完全可以省去許多無意義的溝通和文檔。并且 RES...

    andong777 評論0 收藏0

發表評論

0條評論

IT那活兒

|高級講師

TA的文章

閱讀更多
最新活動
閱讀需要支付1元查看
<