Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle manual hot standby

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Sys@newtestCDB > archive log list

Database log mode Archive Mode

Automatic archival Enabled

Archive destination c:\ app\ Administrator\ virtual\ archivelog

Oldest online log sequence 16

Next log sequence to archive 18

Current log sequence 18

Sys@newtestCDB > alter pluggable database all open

Pluggable database altered.

Elapsed: 00:00:13.20

Backup tablespace

Sys@newtestCDB > alter pluggable database all open

Pluggable database altered.

Elapsed: 00:00:13.20

Sys@newtestCDB > alter session set container=clonepdb_plug

Session altered.

Elapsed: 00:00:00.16

Sys@newtestCDB > alter tablespace users begin backup

Tablespace altered.

Elapsed: 00:00:00.23

Copy tablespace files to the security zone

Sys@newtestCDB > alter tablespace users end backup

Tablespace altered.

Elapsed: 00:00:00.01

Sys@newtestCDB > select * from scott.test

EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO 7399 ALLEN SALESMAN 7698 1981-02-20 00:00:00 1600 300 30 7521 WARD SALESMAN 7698 1981-02-22 00:00:00 1250 500 30 7566 JONES MANAGER 7839 1981-04-02 00:00:00 20 7654 MARTIN SALESMAN 7698 1981-09-28 00:00:00 1250 1400 30 7698 BLAKE MANAGER 7839 1981-05-01 00:00:00 2850 30 7782 CLARK MANAGER 78391981-06-09 00:00:00 2450 10 7839 KING PRESIDENT 1981-11-17 00:00:00 5000 10 7844 TURNER SALESMAN 7698 1981-09-08 00:00:00 1500 0 30 7900 JAMES CLERK 7698 1981-12-03 00:00:00 950 30 7902 FORD ANALYST 7566 7698-12-03 00:00:00 20 7934 MILLER CLERK 7782 1982-01-23 00:00:00 1300 10 EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO 7369 SMITH CLERK 7902 1980-12-17 00:00:00 800 20 7499 ALLEN SALESMAN 7698 1981-02- 20 00:00:00 1600 300 30

13 rows selected.

Elapsed: 00:00:00.12

Sys@newtestCDB > truncate table scott.test

Table truncated.

Elapsed: 00:00:00.36

Sys@newtestCDB > select * from scott.test

No rows selected

Elapsed: 00:00:00.02

Sys@newtestCDB > shutdown immediate

Pluggable Database closed.

/ / deleting users01.dbf or moving to another directory causes the database to crash.

Sys@newtestCDB > startup

ORA-01157: cannot identify/lock data file 43-see DBWR trace file

ORA-01110: data file 43:'C:\ APP\ ADMINISTRATOR\ VIRTUAL\ ORADATA\ NEWTEST\ CLONEPDB_PLUG\ USERS01.DBF'

/ / copy the backed up data files back to the directory

Sys@newtestCDB > recover datafile 43

Media recovery complete.

Sys@newtestCDB > alter database open

Database altered.

Elapsed: 00:00:04.93

Sys@newtestCDB > select * from scott.test

No rows selected

Elapsed: 00:00:00.11

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report