Blame

d2accd feagor 2025-12-06 09:51:32
1
# Controlfile_Перенос
2
3
Для отдельной БД(не находящейся в кластере)
4
614bd5 feagor 2025-12-06 09:57:31
5
[^footnote_identifier] Выполните следующие шаги для переноса Controlfile из /u01 в /u03
d2accd feagor 2025-12-06 09:51:32
6
649226 feagor 2025-12-06 09:54:28
7
#### 1. Получить местонахождение текущего Controlfile
ff3b3c feagor 2025-12-06 09:51:56
8
```ora
9
SQL> show parameter control_files
d2accd feagor 2025-12-06 09:51:32
10
NAME TYPE VALUE
11
------------------------------------ -------------------------------- ------------------------------
12
control_files string /u01/oracle/dbaclass/control01.ctl
ff3b3c feagor 2025-12-06 09:51:56
13
```
d2accd feagor 2025-12-06 09:51:32
14
649226 feagor 2025-12-06 09:54:28
15
#### 2. Установить новое местоположение для Controlfile
16
```ora
d2accd feagor 2025-12-06 09:51:32
17
SQL> alter system set control_files='/u03/oracle/dbaclass/control01.ctl' scope=spfile;
18
System altered.
649226 feagor 2025-12-06 09:54:28
19
```
d2accd feagor 2025-12-06 09:51:32
20
649226 feagor 2025-12-06 09:54:28
21
#### 3.Перезапустить базу в состоянии nomount
22
```ora
d2accd feagor 2025-12-06 09:51:32
23
shutdown immediate;
24
startup nomount
649226 feagor 2025-12-06 09:54:28
25
```
d2accd feagor 2025-12-06 09:51:32
26
649226 feagor 2025-12-06 09:54:28
27
#### 4. Скопировать с помощью RMAN Controlfile в новое место
28
```bash
d2accd feagor 2025-12-06 09:51:32
29
rman target /
30
RMAN> restore controlfile from '/u01/oracle/dbaclass/control01.ctl';
31
32
Starting restore at 13-JAN-19
33
using target database control file instead of recovery catalog
34
allocated channel: ORA_DISK_1
35
channel ORA_DISK_1: SID=2201 device type=DISK
36
37
channel ORA_DISK_1: copied control file copy
38
output file name=/u03/oracle/dbaclass/control01.ctl
39
Finished restore at 13-JAN-19
649226 feagor 2025-12-06 09:54:28
40
```
d2accd feagor 2025-12-06 09:51:32
41
f551f9 feagor 2025-12-06 09:56:19
42
#### 5. Смонтировать и открыть базу
43
```ora
d2accd feagor 2025-12-06 09:51:32
44
alter database mount;
45
alter database open;
f551f9 feagor 2025-12-06 09:56:19
46
```
d2accd feagor 2025-12-06 09:51:32
47
f551f9 feagor 2025-12-06 09:56:19
48
#### 6. Повторно проверить местонахождение Controlfile. Должен быть в новом месте
49
```ora
d2accd feagor 2025-12-06 09:51:32
50
SQL> show parameter control_files
51
52
NAME TYPE VALUE
53
------------------------------------ -------------------------------- ------------------------------
54
control_files string /u03/oracle/dbaclass/control01.ctl
f551f9 feagor 2025-12-06 09:56:19
55
```
d2accd feagor 2025-12-06 09:51:32
56
8a410f feagor 2025-12-06 09:57:06
57
[^footnote_identifier]: Взято с https://dbaclass.com/article/move-controlfile-new-location/