In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Repair method of building files to local storage in rac archiving mode (the following is testing and careful operation in production environment)
Simulated misoperation
Node 1 add data file
Click (here) to collapse or open
SQL > alter tablespace netdata add datafile 'netdata03.dbf' size 20m
Node 2 query
Click (here) to collapse or open
SQL > select file_name from dba_data_files
ERROR:
ORA-01157: cannot identify/lock data file 7-see DBWR trace file
ORA-01110: data file 7:'/ u01 *
Add errors to datafile offline
Click (here) to collapse or open
SQL > alter database datafile 7 offline
Database altered. Modify file path
Click (here) to collapse or open
SQL > alter database rename file'/ u01ActionActionActionActionproduct 11.2.0anddbAction1According to dbsUniplex netdata02.dbf'to'+ DATA1/DEVDB/DATAFILE/netdata02.dbf'
Database altered.recovery datafile
Click (here) to collapse or open
SQL > recover datafile 7
Media recovery complete.datafile online
Click (here) to collapse or open
SQL > alter database datafile 7 online
Database altered.
Node 2 query is normal
Click (here) to collapse or open
SQL > select file_name from dba_data_files
FILE_NAME
+ DATA1/devdb/datafile/users.269.937046643
+ DATA1/devdb/datafile/undotbs1.276.937046643
+ DATA1/devdb/datafile/sysaux.277.937046643
+ DATA1/devdb/datafile/system.268.937046635
+ DATA1/devdb/datafile/undotbs2.267.937047083
+ DATA1/devdb/datafile/netdata.284.937049537
+ DATA1/devdb/datafile/netdata02.dbf
7 repair method of building files to local storage in rows selected.rac non-archiving mode
Click (here) to collapse or open
SQL > archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 175
Current log sequence 177
SQL >
SQL > show parameters cluster
NAME TYPE VALUE
-
Cluster_database boolean TRUE
Cluster_database_instances integer 2
Cluster_interconnects string misoperation simulation
Click (here) to collapse or open
SQL > alter tablespace netdata add datafile 'netdata03.dbf' size 20m
Tablespace altered.
SQL > select file_name from dba_data_files
ERROR:
ORA-01157: cannot identify/lock data file 8-see DBWR trace file
ORA-01110: data file 8:'/ u01 *
Click (here) to collapse or open
SQL > alter database datafile 8 offline
Alter database datafile 8 offline
*
ERROR at line 1:
ORA-01145: offline immediate disallowed unless media recovery enabled
Close the library
Click (here) to collapse or open
[grid@rac1-213-11 ~] $srvctl stop database-d devdb-o immediatecp file to asm
Click (here) to collapse or open
[grid@rac1-213-11] $asmcmd
ASMCMD > pwd
+ DATA1/DEVDB/DATAFILE
ASMCMD > cp / u01/app/oracle/product/11.2.0/db_1/dbs/netdata03.dbf.
Copying / u01/app/oracle/product/11.2.0/db_1/dbs/netdata03.dbf-> + DATA1/DEVDB/DATAFILE/netdata03.dbf
ASMCMD > quit Boot to mount
Click (here) to collapse or open
[grid@rac1-213-11] $srvctl start database-d devdb-o mount
、
Modify file path
Click (here) to collapse or open
[root@rac1-213-11] # su-oracle
[oracle@rac1-213-11] $sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Sun Jul 1 22:02:50 2018
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP
Data Mining and Real Application Testing options
SQL > alter database rename file'/ u01ActionApplicationoracleUniplicationproduct 11.2.0anddbAction1According to dbsAction1According to netdata03.dbf'to'+ DATA1/DEVDB/DATAFILE/netdata03.dbf'
Database altered. Node 2 query is normal
Click (here) to collapse or open
SQL > select open_mode from v$database
OPEN_MODE
-
READ WRITE
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.