Cologne Database Tru64 Unix (81740)

zhaozj2021-02-16  104

Cologne Database Tru64 Unix (81740)

Author: David Zhang (Lunar)

Email: moonlunar@163.com

MSN: lunar52@hotmail.com

table of Contents

Production test data .... 3

Open a window, make Checkpoint: ... 4

Collect the necessary system information, check the disk space .... 5

Do hot spare ... 6

View hot-standby logs ... 6

View backup file ... 10

Cologne database .... 10

Establish the necessary directory ... 10

Set instance name ... 11

View the current SID .. 11

Create a new SID .. 12

Modify the listening file (listener.ora) ... 12

Restart monitor ... 13

Modify client TNSNames file ... 14

Modify the backup control file to use the database to create a database ... 14

Copy the parameter file to the pfile directory ... 15

Modify the parameter file of the Cologne database ... 15

Create a password file ... 16

Create a password file and awareness of the control file ... 16

Use new SID, Nomount to start database ... 19

Create a control file ... 19

Restore database ... 20

Use Recover Database Use Backup ControlFile; Restore Database ... 20

Use Recover Database Until Cancel Use Backup ControlFile; Restore Database again ... 21

Open database using resetlogs ... 21

Verify Cologne data (instance name: clonedb, database name: clonedb) ... 22

Compared with old database ... 23

Clear Cologne database .... 25

Determine it is Cologne database ... 25

Shutdown database (SHUTDOWN ABORT) ... 25

Modify the listening file (listener.ora) ... 26

Restart monitor ... 26

Modify client TNSNames file ... 27

Clear database files ... 28

Check disk space ... 29

Production test data

Feptwo> uname -a

Osf1 feptwo v4.0 1229 alpha

Feptwo>

Feptwo>

Feptwo> Env | grep ora

Oracle_sid = O817

ORA_NLS33 = / usr / oracle / app / oracle / Product / 8.1.7 / Ocommon / NLS / Admin / Data

Oracle_Home = / usr / oracle / app / oracle / product / 8.1.7

Feptwo>

Feptwo>

Feptwo> SQLPlus Internal

SQL * Plus: Release 8.1.7.0.0 - Production on Thu Feb 13 12:52:34 2003

(c) CopyRight 2000 Oracle Corporation. All Rights Reserved.

Connected to:

Oracle8i

Enterprise

Edition Release 8.1.7.4.0 - Production

JServer Release 8.1.7.4.0 - Production

SQL> CONN LUNAR / LUNARZ

Connected.

SQL> SELECT * from Tab;

No rows selected

SQL> CREATE TABLE TEST (A Number);

Table created.

SQL> INSERT INTO TEST VALUES (10); 1 row created.

SQL> INSERT INTO TEST VALUES (11);

1 row created.

SQL> C / 11/12

1 * Insert Into Test Values ​​(12)

SQL> /

1 row created.

SQL> commit;

COMMIT COMPLETE.

SQL> SELECT *.

A

------------

10

11

12

SQL> INSERT INTO TEST VALUES (55);

1 row created.

SQL>

Open a window, make CheckPoint:

Digital UNIX (Feptwo) (TTYP2)

Login: Oracle

PASSWORD:

Last login: Thu Feb 13 11:44:42 from 192.168.2.28

Digital UNIX V4.0F (Rev. 1229); WED MAY 16 14:57:14 CST 2001

The Installation Software Has SuccessFully Installed Your System.

There Are Logfiles That Contain A Record of Your Installation.

THESE ARE:

/VAR/ADM/SMLOGS/Install.cdf - Configuration Description File

/VAR/ADM/SMLOGS/Install.log - General Log File

/VAR/ADM/SMLOGS/Install.fs.log - File System Creation Logs

/var/adm/smlogs/setld.log - log for the setld (8) Utility

/VAR/ADM/SMLOGS/FVERIFY.LOG - VERIFICATION LOG file

Feptwo> SQLPlus Internal

SQL * Plus: Release 8.1.7.0.0 - Production on Thu Feb 13 13:38:33 2003

(c) CopyRight 2000 Oracle Corporation. All Rights Reserved.

Connected to:

Oracle8i

Enterprise

Edition Release 8.1.7.4.0 - Production

JServer Release 8.1.7.4.0 - Production

SQL> ALTER System Checkpoint;

SYSTEM altered.

SQL>

Collect the necessary system information, check the disk space

$ DF -K

FileSystem 1024-block used Available Capacity Mounted ON

Root_Domain # root 533664 249580 273608 48% /

/ proc 0 0 0 100% / proc

USR_DOMAIN # usr 6748128 6500991 566192 98% / usr

$

SQL> SELECT SUM (BYTES) / 1024/1024 AS "SUM (M)" from DBA_DATA_FILES;

Sum (M)

------------

372.5

SQL> SELECT NAME FROM V $ ControlFile; Name

-------------------------------------------------- -----------------------------

/usr/oracle/data/oradata/cint208/control01.ctl

/usr/racle/data/oradata/cint208/control02.ctl

/usr/oracle/data/oradata/cint208/control03.ctl

SQL> Column MEMBER FORMAT A50

SQL> SELECT * FROM V $ logfile;

Group # status member

---------- --------------------------------------- -----------------

1 /usr/racle/data/radata/cint208/redo03.log

2 /usr/racle/data/oradata/cint208/redo02.log

3 /usr/oracle/data/oradata/cint208/redo01.log

SQL> SELECT FILE_NAME from DBA_DATA_FILES;

FILE_NAME

-------------------------------------------------- -----------------------------

/usr/racle/data/oradata/cint208/tools01.dbf

/usr/racle/data/oradata/cint208/drsys01.dbf

/usR/oracle/data/oradata/cint208/Users01.dbf

/usr/racle/data/oradata/cint208/indx01.dbf

/usr/oracle/data/oradata/cint208/rbs01.dbf

/usr/oracle/data/oradata/cint208/temp01.dbf

/usr/racle/data/oradata/cint208/system01.dbf

/usr/racle/data/oradata/cint208/testspace1.dbf

Rows SELECTED.

SQL>

Make a hot standby

$ ./doBackup.sh> Full20030213.log

$

View hot-standby logs

FULL20030213.LOG file content:

Thu Feb 13 13:42:00 CST 2003

-------------------------------------------------- ------------------------------

SQL * Plus: Release 8.1.7.0.0 - Production on Thu Feb 13 13:42:00 2003

(c) CopyRight 2000 Oracle Corporation. All Rights Reserved.

Connected to:

Oracle8i

Enterprise

Edition Release 8.1.7.4.0 - Production

JServer Release 8.1.7.4.0 - Production

Thu Feb 13 13:42:01 CST 2003

Connected.

Begining Archive log number is:

1 1 94 512000 1 NO CURRENT

786770 13-Feb-03

2 1 92 512000 1 Yes inactive786734 13-Feb-03

3 1 93 512000 1 Yes inactive

786752 13-Feb-03

Begin Backup TableSpace Tools.Tools01.dbf ...

Successed End Backup this file.

1. Begin Backup TableSpace Drs.drsys01.dbf ...

Successed End Backup this file.

Begin Backup TableSpace Users.Users01.dbf ...

Successed End Backup this file.

1. Begin Backup TableSpace Indx.indx01.dbf ...

Successed End Backup this file.

1. Begin Backup TableSpace Rbs.rbs01.dbf ...

Successed End Backup this file.

1. Begin Backup TableSpace Temp.temp01.dbf ...

Successed End Backup this file.

1. Begin Backup TableSpace System.System01.dbf ...

Successed End Backup this file.

Begin Backup TableSpace Testspace.testspace1.dbf ...

Successed End Backup this file.

2. Begin Backup ControlFile To /usr/oracle/backup/ctl.ctl ...

Successed End Backup The ControlFile.

3. Begin Backup ControlFile to TRACE ...

Successed End Backup The ControlFile.

4. Before Switch Log, The Current Log Is:

1 1 94 512000 1 NO CURRENT

786770 13-Feb-03

2 1 92 512000 1 YES inactive

786734 13-Feb-03

3 1 93 512000 1 Yes inactive

786752 13-Feb-03

5. Begin Backup Switch Current Log ...

Successed End Switch Log.

6. After Switch log, The Ending Archive log number is:

1 1 94 512000 1 YES ACTIVE

786770 13-Feb-03

2 1 95 512000 1 NO CURRENT

786805 13-Feb-03

3 1 93 512000 1 Yes inactive

786752 13-Feb-03

Thu Feb 13 13:43:43 CST 2003

SQL>

SQL> - Set Termout ON;

SQL>

SQL> EXIT;

Disconnected from Oracle8i

Enterprise

Edition Release 8.1.7.4.0 - ProductionJServer Release 8.1.7.4.0 - Production

Thu Feb 13 13:43:45 CST 2003

-------------------------------------------------- -----------------------------

Begin Backup Today Archive Log Files .....

Successed in Backup Archive Files

-------------------------------------------------- -----------------------------

Begin Create Tar File and CP to Tape, please wait ......................

-------------------------------------------------- -----------------------------

Thu Feb 13 13:43:45 CST 2003

Successed In Copy Tape.

Today Oracle Hot Full Backup is finished.

-------------------------------------------------- -----------------------------

View backup file

$ PWD

/ usr / oracle / backup

$ ls

DRSYS_DRSYS01.DBF TEMP_TEMP01.DBF Arch Dobackup.sh

Indx_indx01.dbf testspace_testspace1.dbf controlfile01.ctl doacketup.sql

RBS_RBS01.DBF Tools_Tools01.dbf Createbackup.sh Full20030213.log

System_system01.dbf users_users01.dbf doacketup.log ora_19526.trc

$ ls arch

Arch_1_81.arc arch_1_83.arc arch_1_85.arc arch_1_87.arc arch_1_89.arc Arch_1_91.arc arch_1_93.arc

Arch_1_82.arc arch_1_84.arc arch_1_86.arc arch_1_88.arc arch_1_90.arc arch_1_92.arc arch_1_94.arc

$ DF -K

FileSystem 1024-block used Available Capacity Mounted ON

Root_Domain # root 533664 249580 273608 48% /

/ proc 0 0 0 100% / proc

USR_DOMAIN # USR 6748128 6500991 184752 98% / usr

$

Cologne database

Establish a necessary directory

$ PWD

/ usr / oracle / backup

$ mkdir pfile bdump cdump udump

$ ls -l

Total 382398

-rw-r - r - r - R - R - R - 1 Oracle DBA 5251072 Feb 13 13:42 Indx_indx01.dbf

-rw-r - r - 1 Oracle DBA 57679872 Feb 13 13:42 RBS_RBS01.DBF

-rw-r - r - 1 Oracle DBA 283123712 Feb 13 13:43 system_system01.dbf

-rw-r - r - 1 Oracle DBA 5251072 Feb 13 13:42 TEMP_TEMP01.DBF

-rw-r ----- 1 Oracle DBA 5251072 Feb 13 13:43 testspace_testspace1.dbf

-rw-r - r - 1 Oracle DBA 5251072 Feb 13 13:42 Tools_toOLS01.DBF

-rw-r - r - 1 Oracle DBA 23601152 Feb 13 13:42 users_users01.dbf

DRWXR-XR-X 2 Oracle DBA 8192 Feb 13:43 Arch

DRWXR-XR-X 2 Oracle DBA 8192 Feb 13 13:59 BDUMP

DRWXR-XR-X 2 Oracle DBA 8192 Feb 13 13:59 CDUMP

-rw-r ----- 1 Oracle DBA 843776 Feb 13 13:43 ControlFile01.ctl

-rwxrwxrwx 1 Oracle DBA 3475 Feb 13 12:04 CreateBackup.sh

-rw-r - r - 1 Oracle DBA 7164 Feb 13 13:43 DOBACKUP.LOG

-RWXRWXRWX 1 Oracle DBA 1319 Feb 13 12:22 Dobackup.sh

-rwxrwxrwx 1 Oracle DBA 11370 Feb 13 12:07 Dobackup.sql

-rw-r - r - 1 Oracle DBA 3049 Feb 13 13:43 Full20030213.log

-rw-r ----- 1 Oracle DBA 1922 Feb 13 13:43 ORA_19526.TRC

DRWXR-XR-X 2 Oracle DBA 8192 Feb 13 13:59 Pfile

DRWXR-XR-X 2 Oracle DBA 8192 Feb 13 13:59 UDUMP

Set instance name

View the current SID

Feptwo> Env | grep ora

Oracle_sid = O817

ORA_NLS33 = / usr / oracle / app / oracle / Product / 8.1.7 / Ocommon / NLS / Admin / Data

Oracle_Home = / usr / oracle / app / oracle / product / 8.1.7

Feptwo>

Create a new SID

Feptwo> export oracle_sid = clonedb

Feptwo> Env | grep ora

Oracle_sid = Clonedb

ORA_NLS33 = / usr / oracle / app / oracle / product / 8.1.7 / ocommon / nls / admin / dataracle_home = / usr / oracle / app / oracle / product / 8.1.7

Feptwo>

Modify the listening file (listener.ora)

# Listener.ora NetWork configuration file: /usr/racle/app/racle/product/8.1.7/network/admin/listener.ora

#Enerated by Oracle Configuration Tools.

Listener =

(Description_List =

(Description =

(Address_list =

(Address = (protocol = tcp) (host = feptwo) (port = 1521)))

)

(Address_list =

(Address = (protocol = IPC) (key = extproc))

)

)

)

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SID_NAME = PLSEXTPROC)

(Oracle_Home = /usr/racle/app/oracle/product/8.1.7)

(Program = extproc)

)

(SID_DESC =

(Global_dbname = CINT208)

(Oracle_Home = /usr/racle/app/oracle/product/8.1.7)

(SID_NAME = O817)

)

(SID_DESC =

(Oracle_Home = /usr/racle/app/oracle/product/8.1.7)

(SID_NAME = ClONEDB)

)

)

Restart listening

Feptwo> LSNRCTL

Lsnrctl for dec OSF / 1 AXP: Version 8.1.7.4.0 - Production On 13-Feb-2003 14:07:18

(c) CopyRight 1998 Oracle Corporation. All Rights Reserved.

Welcome to lsnrctl, Type "Help" for Information.

Lsnrctl> Reload

Connecting to (deSCription = (protocol = tcp) (port = feptwo))))

THE Command Complated SuccessFully

LSNRCTL> Status

Connecting to (deSCription = (protocol = tcp) (port = feptwo))))

Status of the listener

---------------------------------------------------------------------------------------------------------------------------------------

Alias ​​Listener

Version TNSLSNR for Dec OSF / 1 AXP: Version 8.1.7.4.0 - Production

Start Date 13-Feb-2003 14:06:19

Uptime 0 days 0 HR. 1 min. 5 SECTRACE level off

Security off

SNMP OFF

Listener parameter file /usr/racle/app/oracle/product/8.1.7/network/admin/listener.ora

Listener log file /usr/racle/app/oracle/product/8.1.7/neetwork/log/listener.log

Services Summary ...

PLSextProc HAS 1 Service Handler (s)

O817 HAS 1 Service Handler (s)

O817 HAS 2 Service Handler (S)

Clonedb Has 1 Service Handler (s)

THE Command Complated SuccessFully

Lsnrctl>

Modify client TNSNames file

# TNSNAMES.ORA NETWORK Configuration File: /usr/racle/app/racle/product/8.1.7/neetwork/admin/tnsnames.ora

#Enerated by Oracle Configuration Tools.

Clonedb =

(Description =

(Address_list =

(Address = (protocol = tcp) (host = feptwo) (port = 1521)))

)

(Connect_data =

(Service_name = clonedb)

)

)

Feptwo> TNSPING Clonedb

TNS

Ping

Utility for Dec OSF / 1 AXP: Version 8.1.7.4.0 - Production on 13-Feb-2003 14:09:14

(c) Copyright 1997 Oracle Corporation. All Rights Reserved.

Attempting to contact (pecol = tcp) (host = feptwo) (port = 1521))

OK (170 msec)

Feptwo>

Modify the backup control file to use the database to create a database

Create ControlFile Set Database "Clones" replandlogs archivelog

MaxLogfiles 16

MaxLogmembers 2

MaxDataFiles 30

MaxInstances 1

MaxLoghistory 226

Logfile

Group 1 '/usr/racle/backup/redo03.log' size 500K,

Group 2 '/usr/oracle/backup/redo02.log' size 500k,

Group 3 '/usr/oracle/backup/redo01.log' size 500K

DataFile

'/usr/racle/backup/system_system01.dbf',

'/usr/oracle/backup/tools_tools01.dbf',

'/usr/oracle/backup/rbs_rbs01.dbf' ,'/usr/oracle/backup/temp_temp01.dbf',

'/usr/racle/backup/Users_users01.dbf',

'/usr/oracle/backup/indx_indx01.dbf',

'/usr/oracle/backup/drsys_drsys01.dbf',

'/usr/oracle/backup/testspace_testspace1.dbf'

Character set zhs16gbk

;

Copy the parameter file to the pfile directory

Feptwo> PWD

/usr/racle/app/racle/product/8.1.7/admin/cint208/pfile

Feptwo> cp $ oracle_home / admin / cint208 / pfile / inito817.ora

/usr/racle/backup/pfile/initclonedb.ora

Feptwo> CD / USR / ORACLE / BACKUP

Feptwo> Ls -l / usr / oracle / backup / pfile

Total 7

-rw-r - r - 1 Oracle DBA 7120 Feb 13 14:14 Initclonedb.ra

Feptwo>

Modify the parameter file of Cologne database

DB_NAME = "clonedb"

Instance_name = clonedb

Service_names = clonedb

Control_files = ("/usr/oracle/backup/control01.ctl",

"/usr/oracle/backup/control02.ctl",

"/usr/racle/backup/control03.ctl")

LOG_ARCHIVE_DEST_1 = "location = / usr / oracle / backup / arch"

Background_dump_dest = / usr / oracle / backup / bdump

Core_dump_dest = / usr / oracle / backup / cdump

User_dump_dest = / usr / oracle / backup / udump

note:

If remove_login_passwordfile = Exclusive, you need to create a password file first;

If remove_login_passwordfile = none, you can establish a password file (ie, an existing OS authentication method) after Cologne.

It is set to remove_login_passwordfile = Exclusive.

Create a password file

$ orapwd file = / usr / oracle / app / oracle / product / 8.1.7 / dbs / orapw password = Oracle Entries = 15

$ ls -l /usr/oracle/app/oracle/product/8.1.7/dbs/orapw

-rwsr ----- 1 Oracle DBA 4096 Feb 13 14:39 /usr/oracle/app/oracle/product/8.1.7/dbs/orapw

$

Create a password file and aware of the payment

1. If the parameter is specified: remove_login_passwordfile = Exclusive, then you must have a password file before you can create a control file, otherwise there will be the following error: SQL> Startup Nomount Pfile = / usr / oracle / backup / pfile / initclones . la

Oracle Instance Started.

Total System Global Area 81884132 Bytes

FIXED SIZE 103396 bytes

Variable size 57401344 bytes

Database buffers 24199168 BYTES

Redo buffers 180224 BYTES

SQL> Create ControlFile Set Database "CloneDB" Resetlogs ArchiveLog

2 MaxLogfiles 16

3 MaxLogmembers 2

4 MaxDataFiles 30

5 MaxInstances 1

6 MaxLoghistory 226

7 logfile

8 group 1 '/usr/racle/backup/redo03.log' size 500k,

9 Group 2 '/usr/racle/backup/redo02.log' size 500K,

10 Group 3 '/usr/racle/backup/redo01.log' size 500K

11 DataFile

12 '/usr/racle/backup/system_system01.dbf',

13 '/usr/oracle/backup/tools_tools01.dbf',

14 '/usr/oracle/backup/rbs_rbs01.dbf',

15 '/usr/oracle/backup/temp_temp01.dbf',

16 '/usr/oracle/backup/Users_users01.dbf',

17 '/usr/oracle/backup/indx_indx01.dbf',

18 '/usr/racle/backup/drsys_drsys01.dbf',

19 '/usr/oracle/backup/testspace_testspace1.dbf'

20 Character Set ZHS16GBK

twenty one ;

Create ControlFile Set Database "Clones" replandlogs archivelog

*

Error At Line 1:

ORA-01503: Create ControlFile Failed

ORA-01990: Error Opening Password File

'/usr/racle/app/racle/product/8.1.7/dbs/orapw'

SQL>

2. If there is a similar to the above error, you must first remove these creation failures, otherwise there will be the following error:

SQL> Startup Nomount Pfile = / usr / oracle / backup / pfile / initclonedb.ora

Oracle Instance Started.total System Global Area 81884132 Bytes

FIXED SIZE 103396 bytes

Variable size 57401344 bytes

Database buffers 24199168 BYTES

Redo buffers 180224 BYTES

SQL> Create ControlFile Set Database "CloneDB" Resetlogs ArchiveLog

2 MaxLogfiles 16

3 MaxLogmembers 2

4 MaxDataFiles 30

5 MaxInstances 1

6 MaxLoghistory 226

7 logfile

8 group 1 '/usr/racle/backup/redo03.log' size 500k,

9 Group 2 '/usr/racle/backup/redo02.log' size 500K,

10 Group 3 '/usr/racle/backup/redo01.log' size 500K

11 DataFile

12 '/usr/racle/backup/system_system01.dbf',

13 '/usr/oracle/backup/tools_tools01.dbf',

14 '/usr/oracle/backup/rbs_rbs01.dbf',

15 '/usr/oracle/backup/temp_temp01.dbf',

16 '/usr/oracle/backup/Users_users01.dbf',

17 '/usr/oracle/backup/indx_indx01.dbf',

18 '/usr/racle/backup/drsys_drsys01.dbf',

19 '/usr/oracle/backup/testspace_testspace1.dbf'

20 Character Set ZHS16GBK

twenty one ;

Create ControlFile Set Database "Clones" replandlogs archivelog

*

Error At Line 1:

ORA-01503: Create ControlFile Failed

ORA-00200: ControlFile Could Not Be CREATED

ORA-00202: ControlFile: '/usr/oracle/backup/control01.ctl'

ORA-27038: SKGFRCRE: File EXISTS

SQL>

3. Solution: Delete these control files for these creation failures

$ ls

Drsys_drsys01.dbf Tools_Tools01.dbf Control02.ctl Full20030213.log

Indx_indx01.dbf users_users01.dbf control03.ctl ora_19526.trc

RBS_RBS01.DBF Arch Createbackup.sh OraPw_clonedb.orationstem_system01.dbf bdump doacketup.log pfile

TEMP_TEMP01.DBF CDump DOBACKUP.SH UDUMP

Testspace_testspace1.dbf control01.ctl doacketup.sql

$ RM Control *

$ ls

DRSYS_DRSYS01.DBF Testspace_testspace1.dbf cdump Full20030213.log

Indx_indx01.dbf Tools_Tools01.dbf Createbackup.sh Ora_19526.TRC

RBS_RBS01.DBF Users_Users01.dbf Dobackup.log ORAPW_Clonedb.ora

System_system01.dbf arch dobackup.sh pfile

Temp_temp01.dbf bdump doacket dobackup.sql udump

$ EXIT

Use new SID, NOMOUNT launch database

Feptwo> Env | grep ora

Oracle_sid = Clonedb

ORA_NLS33 = / usr / oracle / app / oracle / Product / 8.1.7 / Ocommon / NLS / Admin / Data

Oracle_Home = / usr / oracle / app / oracle / product / 8.1.7

Feptwo> SQLPlus Internal

SQL * Plus: Release 8.1.7.0.0 - Production on Thu Feb 13 14:23:10 2003

(c) CopyRight 2000 Oracle Corporation. All Rights Reserved.

Connected to an iDLE Instance.

SQL> Startup Nomount Pfile = / usr / oracle / backup / pfile / initclonedb.ora

Oracle Instance Started.

Total System Global Area 81884132 Bytes

FIXED SIZE 103396 bytes

Variable size 57401344 bytes

Database buffers 24199168 BYTES

Redo buffers 180224 BYTES

SQL>

Create a control file

SQL> Create ControlFile Set Database "CloneDB" Resetlogs ArchiveLog

2 MaxLogfiles 16

3 MaxLogmembers 2

4 MaxDataFiles 30

5 MaxInstances 1

6 MaxLoghistory 2267 logfile

8 group 1 '/usr/racle/backup/redo03.log' size 500k,

9 Group 2 '/usr/racle/backup/redo02.log' size 500K,

10 Group 3 '/usr/racle/backup/redo01.log' size 500K

11 DataFile

12 '/usr/racle/backup/system_system01.dbf',

13 '/usr/oracle/backup/tools_tools01.dbf',

14 '/usr/oracle/backup/rbs_rbs01.dbf',

15 '/usr/oracle/backup/temp_temp01.dbf',

16 '/usr/oracle/backup/Users_users01.dbf',

17 '/usr/oracle/backup/indx_indx01.dbf',

18 '/usr/racle/backup/drsys_drsys01.dbf',

19 '/usr/oracle/backup/testspace_testspace1.dbf'

20 Character Set ZHS16GBK

twenty one ;

Control File Created.

SQL>

Restore database

Use Recover Database Use Backup ControlFile; Restore Database

SQL>

SQL> Recover Database Using Backup ControlFile;

ORA-00279: Change 786788 generated at 02/13/2003 13:42:01 Needed for thread 1

ORA-00289: Suggestion: /usr/oracle/backup/arch/arch_1_94.arc

ORA-00280: Change 786788 for thread 1 is in sequence # 94

Specify log: { = suggested | filename | auto | ca ZENCEL}

Auto

ORA-00279: Change 786805 generated at 02/13/2003 13:43:42 Needed for thread 1

ORA-00289: Suggestion: /usr/oracle/backup/arch/arch_1_95.arc

ORA-00280: Change 786805 for thread 1 is in sequence # 95

ORA-00278: log file '/usr/racle/backup/arch/arch_1_94.arc' no longer needed

For this recovery

ORA-00308: Cannot Open Archived log '/usr/racle/backup/arch/arch_1_95.arc'

ORA-27037: UNABLE TO OBTAIN FILE STATUS

Compaq Tru64 Unix Error: 2: No Such File or Directory

AdditionAl Information: 3

SQL>

Use Recover Database Until Cancel Use Backup ControlFile; Restore Database again

SQL> Recover Database Until Cancel Using Backup ControlFile; ORA-00279: Change 786805 Generated AT 02/13/2003 13:43:42 Needed for Thread 1

ORA-00289: Suggestion: /usr/oracle/backup/arch/arch_1_95.arc

ORA-00280: Change 786805 for thread 1 is in sequence # 95

Specify log: { = suggested | filename | auto | ca ZENCEL}

Cancel

Media recovery canceled.

SQL>

Open database using resetlogs

SQL> ALTER DATABASE OPEN RESETLOGS;

Database altered.

SQL> Host

$ CD / USR / ORACLE / BACKUP

$ ls -l

Total 385990

-rw-r - r - 1 Oracle DBA 5251072 Feb 13 14:50 drsys_drsys01.dbf

-rw-r - r - 1 Oracle DBA 5251072 Feb 13 14:50 index_indx01.dbf

-rw-r - r - 1 Oracle DBA 57679872 Feb 13 14:50 rbs_rbs01.dbf

-rw-r - r - 1 Oracle DBA 283123712 Feb 13 14:50 system_system01.dbf

-rw-r - r - 1 Oracle DBA 5251072 Feb 13 14:50 TEMP_TEMP01.DBF

-rw-r ----- 1 Oracle DBA 5251072 Feb 13 14:50 Testspace_testspace1.dbf

-rw-r - r - 1 Oracle DBA 5251072 Feb 13 14:50 Tools_toOLS01.DBF

-rw-r - r - R - 1 Oracle DBA 23601152 Feb 13 14:50 Users_Users01.dbf

DRWXR-XR-X 2 Oracle DBA 8192 Feb 13:43 Arch

DRWXR-XR-X 2 Oracle DBA 8192 Feb 13 14:23 BDUMP

DRWXR-XR-X 2 Oracle DBA 8192 Feb 13 13:59 CDUMP

-rw-r ----- 1 Oracle DBA 991232 Feb 13 15:02 Control01.ctl

-rw-r ----- 1 Oracle DBA 991232 Feb 13 15:02 Control02.ctl

-rw-r ----- 1 Oracle DBA 991232 Feb 13 15:02 Control03.ctl

-rwxrwxrwx 1 Oracle DBA 3475 Feb 13 12:04 CreateBackup.sh

-rw-r - r - 1 Oracle DBA 7164 Feb 13 13:43 DOBACKUP.LOG

-RWXRWXRWX 1 Oracle DBA 1319 Feb 13 12:22 Dobackup.sh

-rwxrwxrwx 1 Oracle DBA 11370 Feb 13 12:07 Dobackup.SQL-RW-R - R - 1 Oracle DBA 3049 Feb 13 13:43 Full20030213.log

-rw-r ----- 1 Oracle DBA 1922 Feb 13 13:43 ORA_19526.TRC

DRWXR-XR-X 2 Oracle DBA 8192 Feb 13 14:14 Pfile

-rw-r ----- 1 Oracle DBA 513024 Feb 13 14:54 redo01.log

-rw-r ----- 1 Oracle DBA 513024 Feb 13 14:50 redo02.log

-rw-r ----- 1 Oracle DBA 513024 Feb 13 14:50 redo03.log

DRWXR-XR-X 2 Oracle DBA 8192 Feb 13 14:50 UDUMP

$

Verify Cologne data (instance name: clonedb, database name: clonedb)

SQL> Host

$ ENV | grep ora

Oracle_sid = Clonedb

ORA_NLS33 = / usr / oracle / app / oracle / Product / 8.1.7 / Ocommon / NLS / Admin / Data

Oracle_Home = / usr / oracle / app / oracle / product / 8.1.7

$ EXIT

SQL> SELECT Instance_name from V $ Instance;

INSTANCE_NAME

----------------

Clonedb

SQL> SELECT DBID, NAME, CREATED FROM V $ DATABASE

DBID Name Created

---------- -----------------

2205384091 CloneDB 13-Feb-03

SQL> Archive Log List;

Database log mode archive mode

Automatic archival enabled

Archive destination / usr / oracle / backup / arch

Oldest Online Log Sequence 0

Next log sequence to archive 1

Current Log Sequence 1

SQL> CONN LUNAR / LUNARZ

Connected.

SQL> SELECT * from Tab;

TName Tabtype ClusterID

----------------------------------------------

Test Table

SQL> SELECT *.

A

------------

10

11

12

SQL>

Comparison with old database

Digital UNIX (Feptwo) (TTYP2)

Login: Oracle

PASSWORD:

Last login: Thu Feb 13 14:06:56 from 192.168.2.28

Digital UNIX V4.0F (Rev. 1229); Wed May 16 14:57:14 CST 2001THE Installation Software Has SuccessFully Installed your system.

There Are Logfiles That Contain A Record of Your Installation.

THESE ARE:

/VAR/ADM/SMLOGS/Install.cdf - Configuration Description File

/VAR/ADM/SMLOGS/Install.log - General Log File

/VAR/ADM/SMLOGS/Install.fs.log - File System Creation Logs

/var/adm/smlogs/setld.log - log for the setld (8) Utility

/VAR/ADM/SMLOGS/FVERIFY.LOG - VERIFICATION LOG file

Feptwo> Env | grep ora

Oracle_sid = O817

ORA_NLS33 = / usr / oracle / app / oracle / Product / 8.1.7 / Ocommon / NLS / Admin / Data

Oracle_Home = / usr / oracle / app / oracle / product / 8.1.7

Feptwo> SQLPlus Internal

SQL * Plus: Release 8.1.7.0.0 - Production on Thu Feb 13 14:57:28 2003

(c) CopyRight 2000 Oracle Corporation. All Rights Reserved.

Connected to:

Oracle8i

Enterprise

Edition Release 8.1.7.4.0 - Production

JServer Release 8.1.7.4.0 - Production

SQL> Archive log List

Database log mode archive mode

Automatic archival enabled

Archive destination /usr/racle/app/oracle/Product/8.1.7/admin/cint208/arch

Oldest Online Log Sequence 93

Next log sequence to archive 95

Current Log Sequence 95

SQL> SELECT Instance_name from V $ Instance;

INSTANCE_NAME

----------------

O817

SQL> SELECT DBID, NAME, CREATED FROM V $ DATABASE

DBID Name Created

---------- -----------------

2205384091 CINT208 12-JUL-02

SQL> CONN LUNAR / LUNARZ

Connected.

SQL> SELECT * from Tab;

TName Tabtype ClusterID

----------------------------------------------

Test Table

SQL> SELECT *.

A

------------

10

11

1255 (This data has not been archived before Cologne, so there is no in the Cologne database, that is, it is in redo log)

SQL>

Clear Cologne database

Determine the database of Cologne

SQL> Host

$ ENV | grep ora

Oracle_sid = Clonedb

ORA_NLS33 = / usr / oracle / app / oracle / Product / 8.1.7 / Ocommon / NLS / Admin / Data

Oracle_Home = / usr / oracle / app / oracle / product / 8.1.7

$ EXIT

Shutdown database (SHUTDOWN ABORT)

SQL> CONN INTERNAL

Connected.

SQL> Shutdown Abort

Oracle Instance Shut Down.

SQL> EXIT

Disconnected from Oracle8i

Enterprise

Edition Release 8.1.7.4.0 - Production

JServer Release 8.1.7.4.0 - Production

Feptwo>

Modify the listening file (listener.ora)

That paragraph I just added:

(SID_DESC =

(Oracle_Home = /usr/racle/app/oracle/product/8.1.7)

(SID_NAME = ClONEDB)

)

Restart listening

Feptwo> LSNRCTL

Lsnrctl for dec OSF / 1 AXP: Version 8.1.7.4.0 - Production on 13-Feb-2003 15:12:10

(c) CopyRight 1998 Oracle Corporation. All Rights Reserved.

Welcome to lsnrctl, Type "Help" for Information.

Lsnrctl> Reload

Connecting to (deSCription = (protocol = tcp) (port = feptwo))))

THE Command Complated SuccessFully

LSNRCTL> Status

Connecting to (deSCription = (protocol = tcp) (port = feptwo))))

Status of the listener

---------------------------------------------------------------------------------------------------------------------------------------

Alias ​​Listener

Version TNSLSNR for Dec OSF / 1 AXP: Version 8.1.7.4.0 - Production

Start Date 13-Feb-2003 14:06:19

Uptime 0 days 1 hr. 5 min. 58 sec

Trace Level Off

Security off

SNMP OFF

Listener parameter file /usr/racle/app/oracle/product/8.1.7/network/admin/listener.ora

Listener log file /usr/racle/app/oracle/product/8.1.7/neetwork/log/listener.logservices summary ...

PLSextProc HAS 1 Service Handler (s)

O817 HAS 1 Service Handler (s)

O817 HAS 2 Service Handler (S)

THE Command Complated SuccessFully

LSNRCTL> EXIT

Feptwo>

Modify client TNSNames file

# TNSNAMES.ORA NETWORK Configuration File: /usr/racle/app/racle/product/8.1.7/neetwork/admin/tnsnames.ora

#Enerated by Oracle Configuration Tools.

Remove the clonedb connection string:

Clonedb =

(Description =

(Address_list =

(Address = (protocol = tcp) (host = feptwo) (port = 1521)))

)

(Connect_data =

(Service_name = clonedb)

)

)

Feptwo> TNSPING Clonedb

TNS

Ping

Utility for Dec OSF / 1 AXP: Version 8.1.7.4.0 - Production on 13-Feb-2003 15:14:00

(c) Copyright 1997 Oracle Corporation. All Rights Reserved.

TNS-03505: Failed to resolve name

Feptwo>

Clear database files

Feptwo> CD / USR / ORACLE / BACKUP

Feptwo> LS -L

Total 385990

-rw-r - r - 1 Oracle DBA 5251072 Feb 13 14:50 drsys_drsys01.dbf

-rw-r - r - 1 Oracle DBA 5251072 Feb 13 14:50 index_indx01.dbf

-rw-r - r - 1 Oracle DBA 57679872 Feb 13 14:50 rbs_rbs01.dbf

-rw-r - r - 1 Oracle DBA 283123712 Feb 13 14:50 system_system01.dbf

-rw-r - r - 1 Oracle DBA 5251072 Feb 13 14:50 TEMP_TEMP01.DBF

-rw-r ----- 1 Oracle DBA 5251072 Feb 13 14:50 Testspace_testspace1.dbf

-rw-r - r - 1 Oracle DBA 5251072 Feb 13 14:50 Tools_toOLS01.DBF

-rw-r - r - R - 1 Oracle DBA 23601152 Feb 13 14:50 Users_Users01.dbf

DRWXR-XR-X 2 Oracle DBA 8192 Feb 13:43 Arch

DRWXR-XR-X 2 Oracle DBA 8192 Feb 13 14:23 BDUMP

DRWXR-XR-X 2 Oracle DBA 8192 Feb 13 13:59 CDUMP-RW-R ----- 1 Oracle DBA 991232 Feb 13 15:08 Control01.ctl

-rw-r ----- 1 Oracle DBA 991232 Feb 13 15:08 Control02.ctl

-rw-r ----- 1 Oracle DBA 991232 Feb 13 15:08 Control03.ctl

-rwxrwxrwx 1 Oracle DBA 3475 Feb 13 12:04 CreateBackup.sh

-rw-r - r - 1 Oracle DBA 7164 Feb 13 13:43 DOBACKUP.LOG

-RWXRWXRWX 1 Oracle DBA 1319 Feb 13 12:22 Dobackup.sh

-rwxrwxrwx 1 Oracle DBA 11370 Feb 13 12:07 Dobackup.sql

-rw-r - r - 1 Oracle DBA 3049 Feb 13 13:43 Full20030213.log

-rw-r ----- 1 Oracle DBA 1922 Feb 13 13:43 ORA_19526.TRC

DRWXR-XR-X 2 Oracle DBA 8192 Feb 13 14:14 Pfile

-rw-r ----- 1 Oracle DBA 513024 Feb 13 14:54 redo01.log

-rw-r ----- 1 Oracle DBA 513024 Feb 13 14:50 redo02.log

-rw-r ----- 1 Oracle DBA 513024 Feb 13 14:50 redo03.log

DRWXR-XR-X 2 Oracle DBA 8192 Feb 13 14:50 UDUMP

Feptwo> RM Control * * TRC Redo * * DBF

Feptwo> LS -L

Total 68

DRWXR-XR-X 2 Oracle DBA 8192 Feb 13:43 Arch

DRWXR-XR-X 2 Oracle DBA 8192 Feb 13 14:23 BDUMP

DRWXR-XR-X 2 Oracle DBA 8192 Feb 13 13:59 CDUMP

-rwxrwxrwx 1 Oracle DBA 3475 Feb 13 12:04 CreateBackup.sh

-rw-r - r - 1 Oracle DBA 7164 Feb 13 13:43 DOBACKUP.LOG

-RWXRWXRWX 1 Oracle DBA 1319 Feb 13 12:22 Dobackup.sh

-rwxrwxrwx 1 Oracle DBA 11370 Feb 13 12:07 Dobackup.sql

-rw-r - r - 1 Oracle DBA 3049 Feb 13 13:43 Full20030213.log

DRWXR-XR-X 2 Oracle DBA 8192 Feb 13 14:14 Pfile

DRWXR-XR-X 2 Oracle DBA 8192 Feb 13 14:50 UDUMP

Feptwo> RM Arch / * Feptwo> LS Arch

Feptwo> RM -RF BDUMP CDUMP PFILE UDUMP

Feptwo> LS -L

Total 36

DRWXR-XR-X 2 Oracle DBA 8192 Feb 13 15:16 Arch

-rwxrwxrwx 1 Oracle DBA 3475 Feb 13 12:04 CreateBackup.sh

-rw-r - r - 1 Oracle DBA 7164 Feb 13 13:43 DOBACKUP.LOG

-RWXRWXRWX 1 Oracle DBA 1319 Feb 13 12:22 Dobackup.sh

-rwxrwxrwx 1 Oracle DBA 11370 Feb 13 12:07 Dobackup.sql

-rw-r - r - 1 Oracle DBA 3049 Feb 13 13:43 Full20030213.log

Check disk space

Feptwo> DF -K

FileSystem 1024-block used Available Capacity Mounted ON

Root_Domain # root 533664 249580 273608 48% /

/ proc 0 0 0 100% / proc

USR_DOMAIN # usr 6748128 6118494 567240 92% / usr

Feptwo>

Ok, everything is restored, huh, huh.

转载请注明原文地址:https://www.9cbs.com/read-10781.html

New Post(0)