Sur oracle 11.2.0 , dans un environnement de test, j'avais une base de données créé sous un mauvais nom et j'ai voulu la changer dans la perspective de charger un dump issu d'un client.
1/ J'ai commencé par faire un drop de ma base précédente
2/ J'ai ensuite changé le SID :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 [oracle@dblinux home]$ sqlplus SQl> startup mount exclusive restrict;* SQL>shutdown abort; SQL>startup mount exclusive restrict; SQL>drop database;
export ORACLE_SID=PIMG alors qu'avant j'avais ORACLE_SID=dbora
J'ai aussi - par la même occasion - changé ORACLE_UNQNAME=PIMG
3/ J'ai crée un fichier /opt/oracle/product/11.2.0/dbhome_1/dbs/initPIMG.ora
à l'image de l'ancien mais en changant le nom des répertoires notamment les control_files et j'ai crée ces divers répertoires présents dans le fichier.
4/ J'ai crée ma nouvelle BD
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68 ############################################################################## # Copyright (c) 1991, 2001, 2002 by Oracle Corporation ############################################################################## ########################################### # Archive ########################################### log_archive_format=%t_%s_%r.dbf ########################################### # Cache and I/O ########################################### db_block_size=8192 ########################################### # Cursors and Library Cache ########################################### open_cursors=300 ########################################### # Database Identification ########################################### db_domain="" db_name=PIMG ########################################### # File Configuration ########################################### control_files=("/opt/oracle/oradata/PIMG/control01.ctl", "/opt/oracle/flash_recovery_area/PIMG/control02.ctl") db_recovery_file_dest=/opt/oracle/flash_recovery_area db_recovery_file_dest_size=5218762752 ########################################### # Miscellaneous ########################################### compatible=11.2.0.0.0 diagnostic_dest=/opt/oracle memory_target=838860800 ########################################### # NLS ########################################### nls_language="FRENCH" nls_territory="FRANCE" ########################################### # Processes and Sessions ########################################### processes=500 sessions=555 ########################################### # Security and Auditing ########################################### audit_file_dest=/opt/oracle/admin/PIMG/adump audit_trail=db remote_login_passwordfile=EXCLUSIVE ########################################### # Shared Server ########################################### dispatchers="(PROTOCOL=TCP) (SERVICE=PIMGXDB)" ########################################### # System Managed Undo and Rollback Segments ########################################### undo_tablespace=UNDOTBS1
Mes problème sont les suivants :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 SQL> shutdown abort; ORACLE instance shut down. SQL> startup SQL> CREATE DATABASE PIMG 2 LOGFILE 3 GROUP 1 ('/opt/oracle/admin/PIMG/log/redo1.log') size 50M, 4 GROUP 2 ('/opt/oracle/admin/PIMG/log/redo2.log') size 50M, 5 GROUP 3 ('/opt/oracle/admin/PIMG/log/redo3.log') size 50M 6 DATAFILE '/opt/oracle/admin/PIMG/data/system.dbf' SIZE 300M 7 AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED 8 EXTENT MANAGEMENT LOCAL 9 SYSAUX DATAFILE '/opt/oracle/admin/PIMG/data/sysaux.dbf' SIZE 100M 10 AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED 11 SMALLFILE UNDO TABLESPACE undotbs1 12 DATAFILE '/opt/oracle/admin/PIMG/data/undotbs1.dbf' SIZE 100M 13 AUTOEXTEND ON NEXT 10M MAXSIZE 1024M 14 SMALLFILE DEFAULT TEMPORARY TABLESPACE temp 15 TEMPFILE '/opt/oracle/admin/PIMG/data/temp01.dbf' SIZE 100M 16 AUTOEXTEND ON NEXT 10M MAXSIZE 1024M 17 DEFAULT TABLESPACE DATA DATAFILE '/opt/oracle/admin/PIMG/data/data_01.dbf' SIZE 100M 18 19 AUTOEXTEND ON NEXT 10M MAXSIZE 500M 20 EXTENT MANAGEMENT LOCAL AUTOALLOCATE 21 NOARCHIVELOG 22 CHARACTER SET WE8ISO8859P15 23 NATIONAL CHARACTER SET UTF8; Base de donnees creee.
A/ si je renomme mon fichier initdbora.ora en initdbora.ora.old, un STARTUP me renvoie un
ce qui me fait dire que l SID est mal mis à jour. Mon Instance name est toujours 'dbora'.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 LRM-00109: could not open parameter file '/opt/oracle/product/11.2.0/dbhome_1/dbs/initdbora.ora'
Comment faire pour le mettre à jour ?
B/ Si je recopie le fichier initPIMG.ora en initdbora.ora, le startup fonctionne mais uniquement en mode exclusif.
J'ai lu que c'était du à une instance mal arrêtée ou déja démarrée.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 SQL> STARTUP FORCE MOUNT Instance ORACLE lancee. Total System Global Area 835104768 bytes Fixed Size 2217952 bytes Variable Size 494929952 bytes Database Buffers 331350016 bytes Redo Buffers 6606848 bytes ORA-01102: montage de base de donnees en mode EXCLUSIVE
Comment voir quel instance tourne ? Comment faire pour arrêter l'instance mal démarrée ?
Dois-je recréer une nouvelle instance ? Renommer l'instance existante ? Que faire ....
Partager