标准版无法支持tts,所以替换/bin/oracle文件试试?

之前我们确认了oracle标准版不支持tts-CSDN博客,那有没有办法绕过这个问题呢?

测试通过将$ORACLE_HOME/bin/oracle的企业版文件替换掉标准版的oracle文件之后,发现可以做tts操作。

缺点在线mv oracle会是alert日志大量告警,此时如果做expdp等操作可能失败,重启数据库后正常。如果停库操作,则cp和mv后,起库可正常。

注意此方法仅供测试使用。

xtts中最后一次的停机时间过程可以是:

  1. 源替换oracle后停库
  2. 源启动库后read only表空间
  3. 源最后一次增量备份导出
  4. 源导出传输表空间元数据
  5. 目标恢复增量
  6. 目标导入tts meta元数据
  7. 目标表空间可读写
  8. 目标停库,还原oracle,起库
WARNING: Oracle executable binary mismatch detected.Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages
Tue Feb 20 12:22:11 2024
WARNING: Oracle executable binary mismatch detected.Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages
Tue Feb 20 12:23:24 2024
WARNING: Oracle executable binary mismatch detected.Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages
Tue Feb 20 12:23:24 2024
WARNING: Oracle executable binary mismatch detected.Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages
Tue Feb 20 12:23:25 2024
WARNING: Oracle executable binary mismatch detected.Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages
Tue Feb 20 12:23:25 2024
DM00 started with pid=28, OS id=12132, job SYS.SYS_IMPORT_TRANSPORTABLE_01
Tue Feb 20 12:23:25 2024
WARNING: Oracle executable binary mismatch detected.Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages
Tue Feb 20 12:23:25 2024
DW00 started with pid=29, OS id=12135, wid=1, job SYS.SYS_IMPORT_TRANSPORTABLE_01
Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x14] [PC:0x7E9E7E2, lstclo()+34] [flags: 0x0, count: 1]
Errors in file /home/db1/oracle/diag/rdbms/newrsb/newrsb/trace/newrsb_dw00_12135.trc  (incident=5038):
ORA-07445: exception encountered: core dump [lstclo()+34] [SIGSEGV] [ADDR:0x14] [PC:0x7E9E7E2] [Address not mapped to object] []
Incident details in: /home/db1/oracle/diag/rdbms/newrsb/newrsb/incident/incdir_5038/newrsb_dw00_12135_i5038.trc
Tue Feb 20 12:23:25 2024
Trace dumping is performing id=[cdmp_20240220122325]
Tue Feb 20 12:23:28 2024
WARNING: Oracle executable binary mismatch detected.Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages
Tue Feb 20 12:23:28 2024
Sweep [inc][5038]: completed
Sweep [inc2][5038]: completed
Tue Feb 20 12:23:28 2024
WARNING: Oracle executable binary mismatch detected.Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages
Tue Feb 20 12:25:16 2024
WARNING: Oracle executable binary mismatch detected.Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages
Tue Feb 20 12:28:36 2024
WARNING: Oracle executable binary mismatch detected.Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages
Tue Feb 20 12:28:36 2024
WARNING: Oracle executable binary mismatch detected.Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages
Tue Feb 20 12:28:36 2024
DM00 started with pid=28, OS id=12409, job SYS.SYS_IMPORT_TRANSPORTABLE_01
Tue Feb 20 12:28:36 2024
WARNING: Oracle executable binary mismatch detected.Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages
Tue Feb 20 12:28:36 2024
DW00 started with pid=29, OS id=12411, wid=1, job SYS.SYS_IMPORT_TRANSPORTABLE_01
Plug in tablespace JYC with datafile'/home/db1/oracle/oradata/newrsb/jyc01.dbf'
Tue Feb 20 12:29:16 2024
WARNING: Oracle executable binary mismatch detected.Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages
Tue Feb 20 12:30:16 2024
WARNING: Oracle executable binary mismatch detected.Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages
Tue Feb 20 12:31:37 2024
WARNING: Oracle executable binary mismatch detected.Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages
Tue Feb 20 12:31:37 2024
WARNING: Oracle executable binary mismatch detected.Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages
Tue Feb 20 12:32:01 2024
WARNING: Oracle executable binary mismatch detected.Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages
Tue Feb 20 12:32:11 2024
WARNING: Oracle executable binary mismatch detected.Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages
Tue Feb 20 12:32:12 2024
WARNING: Oracle executable binary mismatch detected.Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages
[oracle@11g trace]$ tail -f alert_newrsb.logBinary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages
Tue Feb 20 12:32:11 2024
WARNING: Oracle executable binary mismatch detected.Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages
Tue Feb 20 12:32:12 2024
WARNING: Oracle executable binary mismatch detected.Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messagesTue Feb 20 12:34:35 2024
WARNING: Oracle executable binary mismatch detected.Binary of new process does not match binary which started instance
issue alter system set "_disable_image_check" = true to disable these messages
Tue Feb 20 12:34:52 2024
alter tablespace jyc read write
Completed: alter tablespace jyc read write

测试过程如下:

SQL> conn / as sysdba
Connected.
SQL> select name from v$datafile;NAME
--------------------------------------------------------------------------------
/home/db1/oracle/oradata/newrsb/system01.dbf
/home/db1/oracle/oradata/newrsb/sysaux01.dbf
/home/db1/oracle/oradata/newrsb/undotbs01.dbf
/home/db1/oracle/oradata/newrsb/users01.dbf
/home/db1/oracle/oradata/newrsb/jyc01.dbfSQL> select * from jyc.t;ID
----------1SQL> drop tablespace jyc including contents and datafiles;Tablespace dropped.SQL> select TABLESPACE_NAME,STATUS from dba_tablespaces;TABLESPACE_NAME                STATUS
------------------------------ ---------
SYSTEM                         ONLINE
SYSAUX                         ONLINE
UNDOTBS1                       ONLINE
TEMP                           ONLINE
USERS                          ONLINESQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@11g bak]$ ll $ORACLE_HOME/bin/oracle
-rwsr-s--x 1 oracle oinstall 210704056 Dec 15 10:06 /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle
[oracle@11g bak]$ ll $ORACLE_HOME/bin/impdp*
-rwxr-x--x 1 oracle oinstall 179136 Feb 19 17:00 /home/db1/oracle/product/11.2.0/dbhome_1/bin/impdp
-rwxr-x--x 1 oracle oinstall 179144 Feb 19 14:15 /home/db1/oracle/product/11.2.0/dbhome_1/bin/impdp.bak
-rwxr-x--- 1 oracle oinstall      0 Aug 15  2009 /home/db1/oracle/product/11.2.0/dbhome_1/bin/impdpO
[oracle@11g bak]$ ll $ORACLE_HOME/bin/oracle*
-rwsr-s--x 1 oracle oinstall 210704056 Dec 15 10:06 /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle
-rwsr-s--x 1 oracle oinstall 199558504 Feb 19 14:15 /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle.bak
-rwxr-x--- 1 oracle oinstall         0 Aug 15  2009 /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracleO
[oracle@11g bak]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 20 12:10:08 2024Copyright (c) 1982, 2009, Oracle.  All rights reserved.Connected to an idle instance.SQL> startup
ORACLE instance started.Total System Global Area 3256942592 bytes
Fixed Size                  2217752 bytes
Variable Size            1811941608 bytes
Database Buffers         1426063360 bytes
Redo Buffers               16719872 bytes
Database mounted.
Database opened.
SQL> select * from v$version;BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE    11.2.0.1.0      Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - ProductionSQL> show parameter name;NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert                 string
db_name                              string      newrsb
db_unique_name                       string      newrsb
global_names                         boolean     FALSE
instance_name                        string      newrsb
lock_name_space                      string
log_file_name_convert                string
service_names                        string      newrsb
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@11g bak]$ impdp \'/ as sysdba\' dumpfile=se-tts.dmp logfile=tts-imp1.log directory=dmp transport_datafiles='/home/db1/oracle/oradata/newrsb/jyc01.dbf'Import: Release 11.2.0.1.0 - Production on Tue Feb 20 12:10:39 2024Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "SYS"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded
Starting "SYS"."SYS_IMPORT_TRANSPORTABLE_01":  "/******** AS SYSDBA" dumpfile=se-tts.dmp logfile=tts-imp1.log directory=dmp transport_datafiles=/home/db1/oracle/oradata/newrsb/jyc01.dbf 
Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
ORA-39123: Data Pump transportable tablespace job aborted
ORA-01565: error in identifying file '/home/db1/oracle/oradata/newrsb/jyc01.dbf'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3Job "SYS"."SYS_IMPORT_TRANSPORTABLE_01" stopped due to fatal error at 12:10:41[oracle@11g bak]$ ll /home/db1/oracle/oradata/newrsb/jyc01.dbf
ls: cannot access /home/db1/oracle/oradata/newrsb/jyc01.dbf: No such file or directory
[oracle@11g bak]$ rman target /Recovery Manager: Release 11.2.0.1.0 - Production on Tue Feb 20 12:11:19 2024Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.connected to target database: NEWRSB (DBID=3070027563)RMAN> exitRecovery Manager complete.
[oracle@11g bak]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 20 12:13:37 2024Copyright (c) 1982, 2009, Oracle.  All rights reserved.Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> show parameter name;NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert                 string
db_name                              string      newrsb
db_unique_name                       string      newrsb
global_names                         boolean     FALSE
instance_name                        string      newrsb
lock_name_space                      string
log_file_name_convert                string
service_names                        string      newrsb
SQL> @r0.sqlPL/SQL procedure successfully completed.SQL> 
SQL> 
SQL> @r1_1.sql
Entering RollForward
After applySetDataFile
Done: applyDataFileTo
Done: RestoreSetPiece
Done: RestoreBackupPiecePL/SQL procedure successfully completed.SQL> @r1_2.sql
Entering RollForward
After applySetDataFile
Done: applyDataFileTo
Done: RestoreSetPiece
Done: RestoreBackupPiecePL/SQL procedure successfully completed.SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@11g bak]$ impdp \'/ as sysdba\' dumpfile=se-tts.dmp logfile=tts-imp2.log directory=dmp transport_datafiles='/home/db1/oracle/oradata/newrsb/jyc01.dbf'Import: Release 11.2.0.1.0 - Production on Tue Feb 20 12:16:14 2024Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "SYS"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded
Starting "SYS"."SYS_IMPORT_TRANSPORTABLE_01":  "/******** AS SYSDBA" dumpfile=se-tts.dmp logfile=tts-imp2.log directory=dmp transport_datafiles=/home/db1/oracle/oradata/newrsb/jyc01.dbf 
Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
Processing object type TRANSPORTABLE_EXPORT/TABLE
Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
Job "SYS"."SYS_IMPORT_TRANSPORTABLE_01" successfully completed at 12:16:15[oracle@11g bak]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 20 12:16:45 2024Copyright (c) 1982, 2009, Oracle.  All rights reserved.Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> select TABLESPACE_NAME,STATUS from dba_tablespaces;TABLESPACE_NAME                STATUS
------------------------------ ---------
SYSTEM                         ONLINE
SYSAUX                         ONLINE
UNDOTBS1                       ONLINE
TEMP                           ONLINE
USERS                          ONLINE
JYC                            READ ONLY6 rows selected.SQL> drop tablespace jyc including contents and datafiles;Tablespace dropped.SQL> select TABLESPACE_NAME,STATUS from dba_tablespaces;TABLESPACE_NAME                STATUS
------------------------------ ---------
SYSTEM                         ONLINE
SYSAUX                         ONLINE
UNDOTBS1                       ONLINE
TEMP                           ONLINE
USERS                          ONLINESQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@11g bak]$ ll $ORACLE_HOME/bin/oracle*
-rwsr-s--x 1 oracle oinstall 210704056 Dec 15 10:06 /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle
-rwsr-s--x 1 oracle oinstall 199558504 Feb 19 14:15 /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle.bak
-rwxr-x--- 1 oracle oinstall         0 Aug 15  2009 /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracleO
[oracle@11g bak]$ ll $ORACLE_HOME/bin/impdp*
-rwxr-x--x 1 oracle oinstall 179136 Feb 19 17:00 /home/db1/oracle/product/11.2.0/dbhome_1/bin/impdp
-rwxr-x--x 1 oracle oinstall 179144 Feb 19 14:15 /home/db1/oracle/product/11.2.0/dbhome_1/bin/impdp.bak
-rwxr-x--- 1 oracle oinstall      0 Aug 15  2009 /home/db1/oracle/product/11.2.0/dbhome_1/bin/impdpO
[oracle@11g bak]$ cp /home/db1/oracle/product/11.2.0/dbhome_1/bin/impdp /home/db1/oracle/product/11.2.0/dbhome_1/bin/impdp.ee
[oracle@11g bak]$ cp /home/db1/oracle/product/11.2.0/dbhome_1/bin/impdp.bak /home/db1/oracle/product/11.2.0/dbhome_1/bin/impdp.se
[oracle@11g bak]$ mv /home/db1/oracle/product/11.2.0/dbhome_1/bin/impdp.bak /home/db1/oracle/product/11.2.0/dbhome_1/bin/impdp
[oracle@11g bak]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 20 12:18:25 2024Copyright (c) 1982, 2009, Oracle.  All rights reserved.Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> @r0.sqlPL/SQL procedure successfully completed.SQL> @r1_1.sql
Entering RollForward
After applySetDataFile
Done: applyDataFileTo
Done: RestoreSetPiece
Done: RestoreBackupPiecePL/SQL procedure successfully completed.SQL> @r1_2.sql
Entering RollForward
After applySetDataFile
Done: applyDataFileTo
Done: RestoreSetPiece
Done: RestoreBackupPiecePL/SQL procedure successfully completed.SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@11g bak]$ impdp \'/ as sysdba\' dumpfile=se-tts.dmp logfile=tts-imp2.log directory=dmp transport_datafiles='/home/db1/oracle/oradata/newrsb/jyc01.dbf'Import: Release 11.2.0.1.0 - Production on Tue Feb 20 12:18:50 2024Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "SYS"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded
Starting "SYS"."SYS_IMPORT_TRANSPORTABLE_01":  "/******** AS SYSDBA" dumpfile=se-tts.dmp logfile=tts-imp2.log directory=dmp transport_datafiles=/home/db1/oracle/oradata/newrsb/jyc01.dbf 
Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
Processing object type TRANSPORTABLE_EXPORT/TABLE
Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
Job "SYS"."SYS_IMPORT_TRANSPORTABLE_01" successfully completed at 12:18:51[oracle@11g bak]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 20 12:19:05 2024Copyright (c) 1982, 2009, Oracle.  All rights reserved.Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> drop tablespace jyc including contents and datafiles;Tablespace dropped.SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@11g bak]$ ll $ORACLE_HOME/bin/oracle*
-rwsr-s--x 1 oracle oinstall 210704056 Dec 15 10:06 /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle
-rwsr-s--x 1 oracle oinstall 199558504 Feb 19 14:15 /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle.bak
-rwxr-x--- 1 oracle oinstall         0 Aug 15  2009 /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracleO
[oracle@11g bak]$ cp /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle.ee
[oracle@11g bak]$ cp /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle.bak /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle.se
[oracle@11g bak]$ mv /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle.bak /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle
[oracle@11g bak]$ ps -ef|grep ora_smon
oracle    11268      1  0 12:10 ?        00:00:00 ora_smon_newrsb
oracle    11943   4940  0 12:20 pts/1    00:00:00 grep --color=auto ora_smon
[oracle@11g bak]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 20 12:20:06 2024Copyright (c) 1982, 2009, Oracle.  All rights reserved.Connected to:
Oracle Database 11g Release 11.2.0.1.0 - 64bit ProductionSQL> @r_0.sql
SP2-0310: unable to open file "r_0.sql"
SQL> @r0.sqlPL/SQL procedure successfully completed.SQL> @r1_1.sql
Entering RollForward
After applySetDataFile
Done: applyDataFileTo
Done: RestoreSetPiece
Done: RestoreBackupPiecePL/SQL procedure successfully completed.SQL> @r1_2.sql
Entering RollForward
After applySetDataFile
Done: applyDataFileTo
Done: RestoreSetPiece
Done: RestoreBackupPiecePL/SQL procedure successfully completed.SQL> select * from v$version;BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE    11.2.0.1.0      Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - ProductionSQL> exit
Disconnected from Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
[oracle@11g bak]$ impdp \'/ as sysdba\' dumpfile=se-tts.dmp logfile=tts-imp2.log directory=dmp transport_datafiles='/home/db1/oracle/oradata/newrsb/jyc01.dbf'Import: Release 11.2.0.1.0 - Production on Tue Feb 20 12:20:46 2024Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.Connected to: Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
ORA-39006: internal error[oracle@11g bak]$ impdp \'/ as sysdba\' dumpfile=se-tts.dmp logfile=tts-imp1.log directory=dmp transport_datafiles='/home/db1/oracle/oradata/newrsb/jyc01.dbf' TRACE=480300Import: Release 11.2.0.1.0 - Production on Tue Feb 20 12:23:24 2024Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.Connected to: Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
ORA-39006: internal error[oracle@11g bak]$ cp /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle.ee /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle
cp: cannot create regular file ‘/home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle’: Text file busy
[oracle@11g bak]$ cp -p /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle.ee /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle
cp: cannot create regular file ‘/home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle’: Text file busy
[oracle@11g bak]$ ll $ORACLE_HOME/bin/oracle*
-rwsr-s--x 1 oracle oinstall 199558504 Feb 19 14:15 /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle
-rwxr-x--x 1 oracle oinstall 210704056 Feb 20 12:19 /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle.ee
-rwxr-x--- 1 oracle oinstall         0 Aug 15  2009 /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracleO
-rwxr-x--x 1 oracle oinstall 199558504 Feb 20 12:19 /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle.se
[oracle@11g bak]$ chmod 6751 /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle.ee
[oracle@11g bak]$ chmod 6751 /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle.se
[oracle@11g bak]$ ll $ORACLE_HOME/bin/oracle*
-rwsr-s--x 1 oracle oinstall 199558504 Feb 19 14:15 /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle
-rwsr-s--x 1 oracle oinstall 210704056 Feb 20 12:19 /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle.ee
-rwxr-x--- 1 oracle oinstall         0 Aug 15  2009 /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracleO
-rwsr-s--x 1 oracle oinstall 199558504 Feb 20 12:19 /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle.se
[oracle@11g bak]$ cp -p /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle.ee /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle
cp: cannot create regular file ‘/home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle’: Text file busy
[oracle@11g bak]$ cp -p /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle.ee /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle.ee.bak
[oracle@11g bak]$ mv /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle.ee /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle
[oracle@11g bak]$ ll $ORACLE_HOME/bin/oracle*
-rwsr-s--x 1 oracle oinstall 210704056 Feb 20 12:19 /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle
-rwsr-s--x 1 oracle oinstall 210704056 Feb 20 12:19 /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle.ee.bak
-rwxr-x--- 1 oracle oinstall         0 Aug 15  2009 /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracleO
-rwsr-s--x 1 oracle oinstall 199558504 Feb 20 12:19 /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle.se
[oracle@11g bak]$ impdp \'/ as sysdba\' dumpfile=se-tts.dmp logfile=tts-imp2.log directory=dmp transport_datafiles='/home/db1/oracle/oradata/newrsb/jyc01.dbf'Import: Release 11.2.0.1.0 - Production on Tue Feb 20 12:28:36 2024Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "SYS"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded
Starting "SYS"."SYS_IMPORT_TRANSPORTABLE_01":  "/******** AS SYSDBA" dumpfile=se-tts.dmp logfile=tts-imp2.log directory=dmp transport_datafiles=/home/db1/oracle/oradata/newrsb/jyc01.dbf 
Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
Processing object type TRANSPORTABLE_EXPORT/TABLE
Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
Job "SYS"."SYS_IMPORT_TRANSPORTABLE_01" successfully completed at 12:28:37[oracle@11g bak]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 20 12:32:01 2024Copyright (c) 1982, 2009, Oracle.  All rights reserved.Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@11g bak]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 20 12:34:35 2024Copyright (c) 1982, 2009, Oracle.  All rights reserved.Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> alter tablespace jyc read write;Tablespace altered.SQL> conn jyc/jyc
Connected.
SQL> create table j (id int);Table created.SQL> insert into j values(1);1 row created.SQL> commit;Commit complete.SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@11g bak]$ cp -p /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle.se /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle.se.bak
[oracle@11g bak]$ mv /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle.se /home/db1/oracle/product/11.2.0/dbhome_1/bin/oracle
[oracle@11g bak]$ sqlplus jyc/jycSQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 20 12:36:54 2024Copyright (c) 1982, 2009, Oracle.  All rights reserved.Connected to:
Oracle Database 11g Release 11.2.0.1.0 - 64bit ProductionSQL> drop table j;Table dropped.SQL> create table j (id int);Table created.SQL> insert into j values(1);1 row created.SQL>  commit;Commit complete.SQL> drop table j;Table dropped.SQL> create table j (id int);Table created.SQL> select TABLESPACE_NAME,STATUS from dba_tablespaces;TABLESPACE_NAME                STATUS
------------------------------ ---------
SYSTEM                         ONLINE
SYSAUX                         ONLINE
UNDOTBS1                       ONLINE
TEMP                           ONLINE
USERS                          ONLINE
JYC                            ONLINE6 rows selected.SQL> 
最后重启一遍标准版oracle,这样alert就不再报错了。
[oracle@11g bak]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 20 12:43:01 2024Copyright (c) 1982, 2009, Oracle.  All rights reserved.Connected to:
Oracle Database 11g Release 11.2.0.1.0 - 64bit ProductionSQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.Total System Global Area 3256942592 bytes
Fixed Size                  2217752 bytes
Variable Size            1811941608 bytes
Database Buffers         1426063360 bytes
Redo Buffers               16719872 bytes
Database mounted.
Database opened.
SQL> select * from v$version;BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE    11.2.0.1.0      Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production

恢复的脚本如下:

[oracle@11g bak]$ more r0.sql
set serveroutput on;
DECLARE
devtype varchar2(256);
done Boolean;
BEGIN
Devtype:=sys.dbms_backup_restore.deviceAllocate (type=>'',ident=>'t1');
sys.dbms_backup_restore.restoreSetDatafile;
sys.dbms_backup_restore.restoreDatafileTo(dfnumber=>5,toname=>'/home/db1/oracle/oradata/newrsb/jyc01.dbf');
sys.dbms_backup_restore.restoreBackupPiece(done=>done,handle=>'/bak/rsb0_012jhonj_1_1',params=>null);
sys.dbms_backup_restore.deviceDeallocate;
END;
/
[oracle@11g bak]$ more r1_1.sql
set serveroutput on;
DECLARE
outhandle varchar2(512) ;
outtag varchar2(30) ;
done boolean ;
failover boolean ;
devtype VARCHAR2(512);
BEGIN
DBMS_OUTPUT.put_line('Entering RollForward');
devtype := sys.dbms_backup_restore.deviceAllocate;
sys.dbms_backup_restore.applySetDatafile(check_logical => FALSE, cleanup => FALSE) ; 
DBMS_OUTPUT.put_line('After applySetDataFile');
sys.dbms_backup_restore.applyDatafileTo(dfnumber=>5,toname=>'/home/db1/oracle/oradata/newrsb/jyc01.dbf',fuzziness_hint=>0,max_corrupt=>0,islevel0=>0,recid=>0,st
amp=>0);
DBMS_OUTPUT.put_line('Done: applyDataFileTo');
sys.dbms_backup_restore.restoreSetPiece(handle =>'/bak/rsb1_1',tag => null,fromdisk => true, recid => 0,stamp => 0) ;
DBMS_OUTPUT.put_line('Done: RestoreSetPiece');
sys.dbms_backup_restore.restoreBackupPiece(done => done,params => null,outhandle => outhandle,outtag => outtag, failover => failover);
DBMS_OUTPUT.put_line('Done: RestoreBackupPiece');
sys.dbms_backup_restore.restoreCancel(TRUE);
sys.dbms_backup_restore.deviceDeallocate;
END;
/
[oracle@11g bak]$ more r1_2.sql
set serveroutput on;
DECLARE
outhandle varchar2(512) ;
outtag varchar2(30) ;
done boolean ;
failover boolean ;
devtype VARCHAR2(512);
BEGIN
DBMS_OUTPUT.put_line('Entering RollForward');
devtype := sys.dbms_backup_restore.deviceAllocate;
sys.dbms_backup_restore.applySetDatafile(check_logical => FALSE, cleanup => FALSE) ; 
DBMS_OUTPUT.put_line('After applySetDataFile');
sys.dbms_backup_restore.applyDatafileTo(dfnumber=>5,toname=>'/home/db1/oracle/oradata/newrsb/jyc01.dbf',fuzziness_hint=>0,max_corrupt=>0,islevel0=>0,recid=>0,st
amp=>0);
DBMS_OUTPUT.put_line('Done: applyDataFileTo');
sys.dbms_backup_restore.restoreSetPiece(handle =>'/bak/rsb1_2',tag => null,fromdisk => true, recid => 0,stamp => 0) ;
DBMS_OUTPUT.put_line('Done: RestoreSetPiece');
sys.dbms_backup_restore.restoreBackupPiece(done => done,params => null,outhandle => outhandle,outtag => outtag, failover => failover);
DBMS_OUTPUT.put_line('Done: RestoreBackupPiece');
sys.dbms_backup_restore.restoreCancel(TRUE);
sys.dbms_backup_restore.deviceDeallocate;
END;
/

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/695387.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

SpringBoot 使用 JWT 保护 Rest Api 接口

用 spring-boot 开发 RESTful API 非常的方便,在生产环境中,对发布的 API 增加授权保护是非常必要的。现在我们来看如何利用 JWT 技术为 API 增加授权保护,保证只有获得授权的用户才能够访问 API。 一、Jwt 介绍 JSON Web Token (JWT)是一个开…

五种多目标优化算法(NSWOA、MOJS、MOAHA、MOPSO、NSGA2)性能对比(提供MATLAB代码)

一、5种多目标优化算法简介 1.1NSWOA 1.2MOJS 1.3MOAHA 1.4MOPSO 1.5NSGA2 二、5种多目标优化算法性能对比 为了测试5种算法的性能将其求解9个多目标测试函数(zdt1、zdt2 、zdt3、 zdt4、 zdt6 、Schaffer、 Kursawe 、Viennet2、 Viennet3)&#xff0…

设计模式-创建型模式-抽象工厂模式

抽象工厂模式(Abstract Factory Pattern):提供一个创建一系列相关或相互依赖对象的接口,而无须指定它们具体的类。抽象工厂模式又称为Kit模式,它是一种对象创建型模式。 由于工厂方法模式中的每个工厂只生产一类产品&…

stm32——hal库学习笔记(DAC)

这里写目录标题 一、DAC简介(了解)1.1,什么是DAC?1.2,DAC的特性参数1.3,STM32各系列DAC的主要特性 二、DAC工作原理(掌握)2.1,DAC框图简介(F1)2.2…

《穿越科技的前沿:计算机专业必看的电影盛宴》

文章目录 每日一句正能量前言电影推荐推荐一:《黑客帝国》推荐二:《社交网络》推荐三:《源代码》推荐四:《谍影重重》系列推荐五:《旋转木马》 技术与主题后记 每日一句正能量 一个人的一生,就是一座有了年…

探索Go语言中的HTTP路由和中间件

在Go语言中,HTTP路由和中间件是实现Web应用程序核心功能的关键组件。路由负责将传入的HTTP请求分发到适当的处理函数,而中间件则提供了一种在请求处理过程中插入额外逻辑的机制。 HTTP路由 在Go中,net/http标准库提供了基本的路由功能&…

红队-主机发现端口扫描

NMAP扫描(kali) 查看nmap帮助 nmap --help 主机发现,扫描整个C段 sudo nmap -sn 192.168.2.0/24 端口扫描,最小速度10000,扫描全部端口(-p-) sudo nmap --min-rate 10000 -p- 192.168.200.24410000是权衡过的速度…

WebGIS开发技术岗真实面经分享!

24春招在即,很多人都已经在开始踏上面试的征程 面对日益严峻的就业环境,想获得更好的工作机会,没有捷径可走,只有不断提升才是硬道理。在此小编分享几个网友GIS开发岗真实的面试经历,希望对正在求职的你,有…

六、回归与聚类算法 - 线性回归

目录 1、线性回归的原理 1.1 应用场景 1.2 什么是线性回归 1.2.1 定义 1.2.2 线性回归的特征与目标的关系分析 2、线性回归的损失和优化原理 2.1 损失函数 2.2 优化算法 2.2.1 正规方程 2.2.2 梯度下降 3、线性回归API 4、回归性能评估 5、波士顿房价预测 5.1 流…

Nginx 和 Apache 的比较

Nginx和Apache的对比 Nginx和Apache的优缺点比较 (1)nginx相对于apache的优点 ①轻量级,同样起web服务,比apache占用更少的内存及资源 ②抗并发,nginx处理请求是异步非阻塞的,而apache是阻塞型的在高并发下,nginx能保持…

yolov5-tracking-xxxsort yolov5融合六种跟踪算法(二)--目标识别

本次开源计划主要针对大学生无人机相关竞赛的视觉算法开发。 开源代码仓库链接:https://github.com/zzhmx/yolov5-tracking-xxxsort.git 先按照之前的博客配置好环境: yolov5-tracking-xxxsort yolov5融合六种跟踪算法(一)–环境配…

【快速搞定Webpack5】处理样式资源(三)

本次内容我们将学习使用webpack如何处理css、less、sass、scss等样式资源 介绍 webpack本身是不能识别样式资源的,所以我们需要借助loader包来帮助webpack解析样式资源 我们找loader都应该去官方文档中查找对应的loader,然后学习使用。 官方文档找不到…

Linux中安装Nginx及日常配置使用

高性能的http服务器/反向代理服务器。官方测试支持5万并发,CPU、内存等消耗较低且运行稳定 使用场景 Http服务器。 Nginx可以单独提供Http服务,做为静态网页的服务器。虚拟主机。 可以在一台服务器虚拟出多个网站。反向代理与负载均衡。 Nginx做反向代理…

LaWGPT—基于中文法律知识的大模型

文章目录 LaWGPT:基于中文法律知识的大语言模型数据构建模型及训练步骤两个阶段二次训练流程指令精调步骤计算资源 项目结构模型部署及推理 LawGPT_zh:中文法律大模型(獬豸)数据构建知识问答模型推理训练步骤 LaWGPT:基…

c++用户管理信息(双向链表)

c用户管理信息---双向链表 ListStu双向链表--(把前面的单链表改一下,就直接可以用)ListStu.hListStu.cpp ListStu双向链表–(把前面的单链表改一下,就直接可以用) ListStu.h #pragma once #include "…

yarn常用命令小记

安装 npm install -g yarn查看版本 yarn -v初始化项目与依赖管理 yarn init&#xff1a;与npm init一样通过交互式会话生成一个新的package.jason文件以初始化项目&#xff1b;跳过会话可使用yarn init --yes&#xff0c;简写yarn init -yyarn add <package><versi…

【转载】企业资产收集与脆弱性检查工具

简介 云图极速版是针对拥有攻击面管理需求的用户打造的 SaaS 应用&#xff0c;致力于协助用户管理互联网资产攻击面的 SaaS 化订阅服务产品。可实现对备案域名、子域名、IP、端口、服务、网站、漏洞、安全风险等场景进行周期性监控&#xff0c;支持多维度分析攻击面。利用可视化…

java 中开源的html解析库Jsoup 简单例子

下面是一个使用Jsoup库解析HTML的简单Java例子。这个例子展示了如何使用Jsoup从一个HTML字符串中提取数据。 首先&#xff0c;确保你已经将Jsoup作为依赖项添加到你的项目中。如果你使用的是Maven&#xff0c;可以在pom.xml文件中添加以下依赖&#xff1a; &…

《图解设计模式》笔记(一)适应设计模式

图灵社区 - 图解设计模式 - 随书下载 评论区 雨帆 2017-01-11 16:14:04 对于设计模式&#xff0c;我个人认为&#xff0c;其实代码和设计原则才是最好的老师。理解了 SOLID&#xff0c;如何 SOLID&#xff0c;自然而然地就用起来设计模式了。Github 上有一个 tdd-training&…

【达梦数据库】通过系统函数来配置sqllog

环境说明&#xff1a;达梦2024年Q4季度版之后版本支持 通过系统函数进行sqllog参数配置 -- 新增模式 SLOG_CONFIG1 和 SLOG_CONFIG2&#xff1a; SP_SET_SQLLOG_INI([SLOG_CONFIG1]FILE_PATH../log;PART_STOR0;[SLOG_CONFIG2]SWITCH_MODE2;SWITCH_LIMIT128);-- 删除模式名为 S…