Sunday, 16 February 2020

SP2-0734: unknown command beginning when recreate controlfile

Create backup for controlfile
SQL> alter database backup controlfile to trace as ‘d:\control\test.trc’;
Database altered.
Recreate Controlfile, Edit the test.trc file and when i try to recreate the control file , it showing SP-0734
SQL> SHUTDOWN ABORTORACLE instance shut down.
SQL> @D:\control\CONTROL.TRC;ORACLE instance started.
Total System Global Area  535662592 bytes
Fixed Size                  1375792 bytes
Variable Size             331350480 bytes
Database Buffers          197132288 bytes
Redo Buffers                5804032 bytes
SP2-0042: unknown command “DATAFILE” – rest of line ignored.
SP2-0734: unknown command beginning “‘D:\CONTRO…” – rest of line ignored.SP2-0734: unknown command beginning “‘D:\CONTRO…” – rest of line ignored.
SP2-0734: unknown command beginning “‘D:\CONTRO…” – rest of line ignored
This happened due to blank line before the DATAFILE clause and after — STANDBY LOGFILE and  remove that space line as well as remove line — STANDBY LOGFILE and re run the script,
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE “AZAR” NORESETLOGS  ARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 8
    MAXINSTANCES 8
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 ‘C:\DATAFILES\AZAR\REDO01.LOG’  SIZE 50M BLOCKSIZE 512,
  GROUP 2 ‘C:\DATAFILES\AZAR\REDO02.LOG’  SIZE 50M BLOCKSIZE 512,
  GROUP 3 ‘C:\DATAFILES\AZAR\REDO03.LOG’  SIZE 50M BLOCKSIZE 512
— STANDBY LOGFILE                                                             [ REMOVE THIS SPACE LINE ]
DATAFILE  ‘C:\DATAFILES\AZAR\SYSTEM01.DBF’,
  ‘C:\DATAFILES\AZAR\SYSAUX01.DBF’,
  ‘C:\DATAFILES\AZAR\UNDOTBS01.DBF’,
  ‘C:\DATAFILES\AZAR\USERS01.DBF’,
  ‘C:\TEST01.DBF’
CHARACTER SET AR8ISO8859P6
;
After removed space
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE “AZAR” NORESETLOGS  ARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 8
    MAXINSTANCES 8
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 ‘C:\DATAFILES\AZAR\REDO01.LOG’  SIZE 50M BLOCKSIZE 512,
  GROUP 2 ‘C:\DATAFILES\AZAR\REDO02.LOG’  SIZE 50M BLOCKSIZE 512,
  GROUP 3 ‘C:\DATAFILES\AZAR\REDO03.LOG’  SIZE 50M BLOCKSIZE 512
DATAFILE
  ‘C:\DATAFILES\AZAR\SYSTEM01.DBF’,
  ‘C:\DATAFILES\AZAR\SYSAUX01.DBF’,
  ‘C:\DATAFILES\AZAR\UNDOTBS01.DBF’,
  ‘C:\DATAFILES\AZAR\USERS01.DBF’,
  ‘C:\TEST01.DBF’
CHARACTER SET AR8ISO8859P6
;
SQL> shutdown abortORACLE instance shut down.
SQL> @D:\control\CONTROL.TRC;
ORACLE instance started.
Total System Global Area  535662592 bytes
Fixed Size                  1375792 bytes
Variable Size             331350480 bytes
Database Buffers          197132288 bytes
Redo Buffers                5804032 bytes
Control file created.
SQL> select status from v$instance;
STATUS
————
MOUNTED
SQL> alter database open;
Database altered.
SQL> select status from v$instance;
STATUS
————
OPEN

Oracle RMAN – ORA-07446: sdnfy: bad value

Check your pfile/spfile for any misconfigured parameters.  Most of the time, it got to do with your bdump, udump or cdump.
Make sure the directory specified is valid
For me, after I created the bdump and cdump folder, it was okay.



Check your pfile/spfile for any misconfigured parameters.  Most of the time, it got to do with your bdump, udump or cdump.
Make sure the directory specified is valid
For me, after I created the bdump and cdump folder, it was okay.

  1. Check your pfile/spfile for any misconfigured parameters.  Most of the time, it got to do with your bdump, udump or cdump.
  2. Make sure the directory specified is valid
For me, after I created the bdump and cdump folder, it was okay.




No comments:

Post a Comment