Can't open database
SQL> create controlfile set database TESTDBS
2 logfile group 1 ('/usr/oracle/oradata/dbs005/TESTDBS/redo01.log') size 100m, group 2 ('/usr/oracle/oradata/dbs005/TESTDBS/redo02.log') size 100m
datafile '/usr/oracle/oradata/dbs005/TESTDBS/data_clone_01.dbf' size 30m, '/usr/oracle/oradata/dbs005/TESTDBS/data_clone_02.dbf' size 50m
3 4 character set WE8MSWIN1252;
character set WE8MSWIN1252
ERROR at line 4:
ORA-01969: You must specify RESETLOGS or NORESETLOGS
can you help me? when to use alter resetlogs option?
When you recreate the control file you need to open with resetlogs. You also need to make sure that
all of the data files have been recovered to the same SCN number. You should included the version of
Oracle and what happened to the database before this point. Are the data files where they should be?
this space intentionally left blank
Is this create statement created by you or is it a backup trace file of a controlfile? Is it a recreate or a create/rename for a database?
When you recreate a controlfile for an already excisting database you need to put once the resetlogs or noresetlogs in the statement. If you don’t want data loss at all then you should use noresetlogs but if you can afford some dataloss then resetlogs is the best option.
CREATE CONTROLFILE REUSE DATABASE "TESTDBS" NORESETLOGS ARCHIVELOG/NOARCHIVELOG
CREATE CONTROLFILE REUSE DATABASE "TESTDBS" RESETLOGS ARCHIVELOG/NOARCHIVELOG
If you create a new database(name) then like it is already said in the post above:
CREATE CONTROLFILE SET DATABASE "TESTDBS" RESETLOGS ARCHIVELOG/NOARCHIVELOG
Click Here to Expand Forum to Full Width