Problem in recreating control file

Hi,
When i recreate controlfile ... It creates a set of datafile...
FILE# NAME STATUS
84 /u01/app/oracle/product/10.2.0/dbs/MISSING00084 RECOVER
85 /u01/app/oracle/product/10.2.0/dbs/MISSING00085 RECOVER
86 /u01/app/oracle/product/10.2.0/dbs/MISSING00086 RECOVER
Only these datafiles give problem... but these or no way related to my db. And i dint create.

Hi,
I have took the trace of the control file , from that i recreated the control file.
after creating the control file when i query,
select name from v$datafile;
i dint find the files.. but when i gave
alter database open resetlogs;
alter this only the file appears...
oracle version is 10.2.0

Similar Messages

  • Problem while recreating control file : Oracle 10g

    Hi,
    I am using oracle 10g version of database. i have multiple databases. I was not able to start one database which led to control file error. Then I found that the file got corrupted. I used the following syntax to restore my control file.
    STARTUP NOMOUNT
    CREATE CONTROLFILE REUSE DATABASE "mydb" NORESETLOGS NOARCHIVELOG
    MAXLOGFILES 32
    MAXLOGMEMBERS 2
    MAXDATAFILES 30
    MAXINSTANCES 8
    MAXLOGHISTORY 800
    LOGFILE
    GROUP 1 'redolog location' SIZE 500K
    DATAFILE
    'datafilelocation.dbf'
    but it failed with the following error.
    ERROR at line 1:
    ORA-01503: CREATE CONTROLFILE failed
    ORA-01115: IO error reading block from file (block # 1)
    ORA-01110: data file : 'datafilelocation.dbf'
    ORA-27091: unable to queue I/O
    ORA-27070: async read/write failed
    OSD-04006: ReadFile() failure, unable to read from file
    O/S-Error: (OS 23) Data error (cyclic redundancy check).
    Does this mean the datafiles are also corrupted? if yes, please do let me know how i can restore my datafiles. my system is of windows XP 2002.
    thanks,
    Haripriya

    Hi,
    thanks for all your replies. But I am using the full path for the log and for the datafiles. Just didnt want to reveal that before. Anyway below is the complete path that i was using.
    STARTUP NOMOUNT
    CREATE CONTROLFILE REUSE DATABASE "ACMDB" NORESETLOGS NOARCHIVELOG
    MAXLOGFILES 32
    MAXLOGMEMBERS 2
    MAXDATAFILES 30
    MAXINSTANCES 8
    MAXLOGHISTORY 800
    LOGFILE
    GROUP 1 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ACMDB\REDO01.LOG' SIZE 500K,
    GROUP 2 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ACMDB\REDO02.LOG' SIZE 500K,
    GROUP 2 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ACMDB\REDO03.LOG' SIZE 500K
    DATAFILE
    'D:/oracle/product/10.1.0/oradata/acmdb/SYSAUX01.dbf',
    'D:/oracle/product/10.1.0/oradata/acmdb/SYSTEM01.dbf',
    'D:/oracle/product/10.1.0/oradata/acmdb/TEMP01.dbf',
    'D:/oracle/product/10.1.0/oradata/acmdb/UNDOTBS01.dbf',
    'D:/oracle/product/10.1.0/oradata/acmdb/USERS01.dbf'
    It is stull failing. I was not able to open the datafiles also. Looks like those are also very much corrupted. Does this mean my DB is crashed? Is there any way that I can correct the below error or only reinstallation would solve the issue. I do have all the database dump though. Please suggest me with the solution. I would like to make the reinstall as the last option.
    ERROR at line 1:
    ORA-01503: CREATE CONTROLFILE failed
    ORA-01115: IO error reading block from file (block # 1)
    ORA-01110: data file : 'D:/oracle/product/10.1.0/oradata/acmdb/SYSTEM01.dbf'
    ORA-27091: unable to queue I/O
    ORA-27070: async read/write failed
    OSD-04006: ReadFile() failure, unable to read from file
    O/S-Error: (OS 23) Data error (cyclic redundancy check).
    Thanks,
    Haripriya

  • Problem while Creating Control files while Cloning the Oracle DB

    Hi,
    I am failrly new to Oracle Administration. I have got the task of cloning our Production database into a new machine. With the help of various articles found over the web I have followed the below mentioned steps
    1)Executed the Alter database command for getting the control file copy.
    2) Taken the Datafiles,Control and redo log files copies into the Target machine.
    3) Copied the Pfile with the neccessary changes into the target machine.
    4) Edited the Create Control file syntax (generated from step 1) and executed the same on the target machine.
    Now the problem I face is that I get the following error while executing the create Control file syntax
    a)ORA-01503 - Creation of Controlfile failed.
    b) ORA-00219 - Required controlfile size 41760 exceeds max allowable size 20000.
    I am really stuck. Both my machine configurations and O/S installed are the same.
    Please advice me on how to Proceed... Thanking you all in advannce.
    Rgds,
    SN.

    Hi Jaffer,
    This is my code........ The control file has been generated by executing the syntax alter database backup controlfile to trace at the source db .
    STARTUP NOMOUNT pfile=ORADATA:ORAHOME1\ADMIN\ORACLE\PFILE\INIT.ORA;
    CREATE CONTROLFILE set DATABASE "ORACLE" RESETLOGS NOARCHIVELOG
    MAXLOGFILES 32
    MAXLOGMEMBERS 2
    MAXDATAFILES 32
    MAXINSTANCES 16
    MAXLOGHISTORY 65535
    LOGFILE
    GROUP 1 'ORADATA:ORAHOME1\ORADATA\ORACLE\LOG2ORCL.ORA' SIZE 200K,
    GROUP 2 'ORADATA:ORAHOME1\ORADATA\ORACLE\LOG1ORCL.ORA' SIZE 200K
    DATAFILE
    'ORADATA:ORAHOME1\ORADATA\ORACLE\SYS1ORCL.ORA',
    'ORADATA:ORAHOME1\ORADATA\ORACLE\USR1ORCL.ORA',
    'ORADATA:ORAHOME1\ORADATA\ORACLE\RBS1ORCL.ORA',
    'ORADATA:ORAHOME1\ORADATA\ORACLE\BTXIS_DATA.ORA',
    'ORADATA:ORAHOME1\ORADATA\ORACLE\BTXIS_INDEX.ORA',
    'ORADATA:ORAHOME1\ORADATA\ORACLE\BTXIS_KAN_DAT.ORA',
    'ORADATA:ORAHOME1\ORADATA\ORACLE\BTXIS_KAN_INDEX.ORA',
    'ORADATA:ORAHOME1\ORADATA\ORACLE\BTXIS_KIS_DATA.ORA',
    'ORADATA:ORAHOME1\ORADATA\ORACLE\BTXIS_KIS_INDEX.ORA',
    'ORADATA:ORAHOME1\ORADATA\ORACLE\BTXIS_LUB_DATA.ORA',
    'ORADATA:ORAHOME1\ORADATA\ORACLE\BIMBJ01.DBF',
    'ORADATA:ORAHOME1\ORADATA\ORACLE\BIMAT01.DBF',
    'ORADATA:ORAHOME1\ORADATA\ORACLE\BITPA01.DBF',
    'ORADATA:ORAHOME1\ORADATA\ORACLE\BLUBFSINDEFX01.DBF',
    'ORADATA:ORAHOME1\ORADATA\ORACLE\TEMP01.DBF',
    'ORADATA:ORAHOME1\ORADATA\ORACLE\BTXIS_TOOLS.ORA',
    'ORADATA:ORAHOME1\ORADATA\ORACLE\IMPORT1.DBF'
    CHARACTER SET WE8ISO8859P1
    # Recovery is required if any of the datafiles are restored backups,
    # or if the last shutdown was not normal or immediate.
    #RECOVER DATABASE
    # Database can now be opened normally.
    #ALTER DATABASE OPEN;
    # No tempfile entries found to add.
    #

  • Upgraded to 10.2.0.2.0, but problem with 'identifying control file'

    I just applied the metalink patch to upgrade from 10.2.0.1.0 to 10.2.0.2.0 in order to install the SOA Suite. It was a clean install for 10.2.0.1.0, followed by applying the patch. I am now trying to run the new database, but I get an error:
    ORA-00205: error in identifying controle file, check alert log for more info.
    I edited by init.ora file, and the two control files are there as (ora_control1, ora_control2).
    Any help would be greatly appreciated.
    Kind regards,
    Anthony

    We had a similar issue and had to fix it by copying all the data files and control files to backup then ...
    1) run database creation assistant to delete the database
    2) using database creation assistant, create a new database with the same name
    3) shut down the new database
    4) leaving the new spfile in place, copy all the backups back over including controlfiles.
    5) startup the database.
    Don't know if it will help in your situation or not, but worth a try if someone else has the same type of problem.

  • Recreating control file in RAC with noresetlogs

    Hi all,
    I need to recreate the controlfile in a 2-node RAC environment (9i)
    for altering the MAXLOGHISTORY value. I will be using noresetlogs as I
    have all the online logs available with me.
    I referred to metalink note (Note:118931.1) for the same, and to
    clarify the same, it refers to set cluster_database to false and then
    to true after creating the new controlfile.
    Here I have Log Groups 1,2,5,6,7 belongs to instance1 and the rest belongs to
    instance2
    Below is the trace of controlfile...
    create controlfile reuse database "prod" noresetlogs force logging
    archivelog
    maxlogfiles 64
    maxlogmembers 3
    maxdatafiles 800
    maxinstances 32
    maxloghistory 15000
    logfile
    group 1 '/dev/rprod_redo11' size 100m,
    group 2 '/dev/rprod_redo12' size 100m,
    group 3 '/dev/rprod_redo21' size 100m,
    group 4 '/dev/rprod_redo22' size 100m,
    group 5 '/dev/rprod_redo13' size 100m,
    group 6 '/dev/rprod_redo14' size 100m,
    group 7 '/dev/rprod_redo15' size 100m,
    group 8 '/dev/rprod_redo23' size 100m,
    group 9 '/dev/rprod_redo24' size 100m,
    group 10 '/dev/rprod_redo25' size 100m
    -- standby logfile
    datafile
    Please clarify on the same, do the traced controlfile need to have some thread info for redo logs & do I need to make the cluster_database parameter to fale/true.
    Thanks!
    Prat

    1. Create the trace file (with Create control file statements..)
    2. Edit the trace file, to remove the log groups which doesn't belong to Instance 1 (in you case you would be removing groups 3,4,8,9,10).
    3. Shutdown all the instances.
    4. edit the init.ora file to make CLUSTER_DATABASE=FALSE:
    5. startup nomount instance 1.
    6. Run the edited trace file to create the control file.
    7. shutdown instance 1.
    8. edit the init.ora file to make CLUSTER_DATABASE=TRUE;
    9. Startup instance 1;
    10. Add the log groups for the instance 2 (groups 3,4,8,9,10)
    11. Add tempfiles as indicated in the trace file.
    12. Enable thread 2;
    13. Startup instance 2.
    As always, take backups.
    HTH
    Thanks
    Chandra

  • Best script for recreating control file

    Hi
    Yesterday I had a lot of fun trying to refresh a Dev db with an inconsistent backup (just learned that the offline backup from that night finished late and not before the db was started up again, thus making datafile inconsistent).
    Today I will try again. I am waiting for the tape backup to finish restoring to the Dev datafile directory.
    I would love to know if there is a template out there, or if we can agree here, for the best standard for recreating a control file through a @script.
    I will include the one I intend to use here, minus the datafiles.
    I am using the RESETLOGS, since we are using :"SET" database.
    STARTUP NOMOUNT
    CREATE CONTROLFILE SET DATABASE "DEV" RESETLOGS ARCHIVELOG
    -- SET STANDBY TO MAXIMIZE PERFORMANCE
    MAXLOGFILES 16
    MAXLOGMEMBERS 2
    MAXDATAFILES 500
    MAXINSTANCES 1
    MAXLOGHISTORY 19285
    LOGFILE
    GROUP 1 (
    '/oradbi1/oracle/proddata/log01a.dbf',
    '/oradbi1/oracle/proddata/log01b.dbf'
    ) SIZE 10M,
    GROUP 2 (
    '/oradbi1/oracle/proddata/log02a.dbf',
    '/oradbi1/oracle/proddata/log02b.dbf'
    ) SIZE 10M,
    GROUP 3 (
    '/oradbi1/oracle/proddata/log03a.dbf',
    '/oradbi1/oracle/proddata/log03b.dbf'
    ) SIZE 10M
    -- STANDBY LOGFILE
    DATAFILE
    '/oradbi1/oracle/proddata/system01.dbf',
    '/oradbi1/oracle/proddata/applsysd09.dbf',
    '/oradbi1/oracle/proddata/bend06.dbf'
    CHARACTER SET US7ASCII
    RECOVER DATABASE USING BACKUP CONTROLFILE
    ALTER DATABASE OPEN RESETLOGS;
    ALTER TABLESPACE TEMP ADD TEMPFILE '/oradbi1/oracle/proddata/tmp04.dbf'
    SIZE 2040M REUSE AUTOEXTEND OFF;
    ALTER TABLESPACE TEMP ADD TEMPFILE '/oradbi1/oracle/proddata/tmp03.dbf'
    SIZE 2040M REUSE AUTOEXTEND OFF;
    ALTER TABLESPACE TEMP ADD TEMPFILE '/oradbi1/oracle/proddata/tmp02.dbf'
    SIZE 2040M REUSE AUTOEXTEND ON NEXT 10485760 MAXSIZE 32767M;
    ALTER TABLESPACE TEMP ADD TEMPFILE '/oradbi1/oracle/proddata/tmp01.dbf'
    SIZE 2000M REUSE AUTOEXTEND OFF;
    If anyone can see room for improvement on this, please let us know.
    Thanks.
    AIX 5.2
    Oracle 9.2

    I normally break it up into seperate scripts (even though the "trace" file generates a single script file).
    1. The first is the CREATE CONTROLFILE itself. If successful , it also mounts the database.
    The most important portion is to validate that we do have ALL the datafiles included.
    (eg if you are generating from an old controlfile backup and some new datafile(s) have been added since that backup you had better ensure that you add them to the script , else the RECOVER DATABASE will ignore them and they will be unrecoverable after the OPEN RESETLOGS !)
    2. The next portion is the RECOVER DATABASE USING BACKUP CONTROLFILE which I never run non-interactively.
    Always ensure that it is NOT an interactive run. If you really have more than a dozen archivelogs to apply, then you could just enter AUTO after supplying the first 3 or 4 archivelogs and wait for the RECOVER DATABASE to "error" out after it applies the last archivelog.
    3. The next portion is a manual RECOVER to apply any Archivelogs that couldn't be applied by the AUTO -- eg Archives that weren't on disk but which I've restored OR the actual last Active/Current Online Redo Logs that hadn't been applied.
    between step 3 and step 4,
    to be safe : I could SHUTDOWN (it is MOUNTED but not OPEN) and take a Cold Backup of the database files and controlfiles. -- This can help me retry a RESETLOGS or restore a datafile that I might have mistakenly excluded from the CREATE CCF script
    and re-"recover" database -- meaning that Oracle will recover that datafile alone.
    4. Finally I review the alert.log, satisfy myself that I have applied all archivelogs and then manually issue the ALTER DATABASE OPEN RESETLOGS.
    5. Now I add TEMPFILEs (if 10g hasn't done it "automagically")
    6. If I have time, take a Cold Backup OR initiate a Hot Backup asap.
    I know that 10g now provides supported methods of recovering through a RESETLOGS, based on Incarnation ID, ... but still , old habits and old commands die hard.
    Have I answered your question about how to format the CREATE CCF ? No. But I've just added some inputs on how I prefer the next few steps be done.
    Hemant K Chitale
    http://hemantoracledba.blogspot.com
    Edited by: Hemant K Chitale on Oct 22, 2008 10:05 PM
    Added the addition of TEMPFILEs
    Edited by: Hemant K Chitale on Oct 22, 2008 10:20 PM
    Corrected step 2 to be "Always ensure that it is NOT an interactive run"

  • ERROR IN RECREATING CONTROL FILES

    hello,
    I am trying to learn the concepts of database administration.
    I am facing a problem while creating a new control file:
    O.S=Windows 7 ORacle 10g
    What i want to do:
    1. The database has been created, now i have deleted the control file of my database to learn creating a new one.
    2. I have issued the command :
    create controlfile reuse database ipl noresetlogs;
    3. I am getting an error
    Error at line 1:
    ora-01503: create control file failed
    ora-01565: error in identifying file
    '%oracle_home%\database\dbs1%oracle_sid%.ora'
    ora-27041:unable to open file
    osd-04002: unable to open file
    o/s-error: (os2) The system cannot find specified file
    Please help me to solve the issue.
    Also studying from oracle administartion guide ebook:
    I came across
    CREATE CONTROLFILE
    SET DATABASE prod
    LOGFILE GROUP 1 ('/u01/oracle/prod/redo01_01.log',
    '/u01/oracle/prod/redo01_02.log'),
    GROUP 2 ('/u01/oracle/prod/redo02_01.log',
    '/u01/oracle/prod/redo02_02.log'),
    GROUP 3 ('/u01/oracle/prod/redo03_01.log',
    '/u01/oracle/prod/redo03_02.log')
    RESETLOGS
    DATAFILE '/u01/oracle/prod/system01.dbf' SIZE 3M,
    '/u01/oracle/prod/rbs01.dbs' SIZE 5M,
    '/u01/oracle/prod/users01.dbs' SIZE 5M,
    '/u01/oracle/prod/temp01.dbs' SIZE 5M
    MAXLOGFILES 50
    MAXLOGMEMBERS 3
    MAXLOGHISTORY 400
    MAXDATAFILES 200
    MAXINSTANCES 6
    ARCHIVELOG;
    I would like to know the following:
    1.If only the control file is deleted, should we include the datafile clause as well as the log file clause or only create controlfile reuse database ipl noresetlogs command is enough.
    _______________________________________________________________________________________________________________________________________________

    Read the full doc: It will help. Yes You must list datafiles and log files etc. To know the reason, you will have to read the doc. If you are new and trying to learn new concepts, oracle documentation is your best buddy.
    http://docs.oracle.com/cd/B12037_01/server.101/b10759/statements_5003.htm
    Example
    Creating a Controlfile: Example
    This statement re-creates a control file. In this statement, database demo was created with the WE8DEC character set. The example uses the word path where you would normally insert the path on your system to the appropriate Oracle Database directories.
    STARTUP NOMOUNT
    CREATE CONTROLFILE REUSE DATABASE "demo" NORESETLOGS NOARCHIVELOG
    MAXLOGFILES 32
    MAXLOGMEMBERS 2
    MAXDATAFILES 32
    MAXINSTANCES 1
    MAXLOGHISTORY 449
    LOGFILE
    GROUP 1 '/path/oracle/dbs/t_log1.f' SIZE 500K,
    GROUP 2 '/path/oracle/dbs/t_log2.f' SIZE 500K
    # STANDBY LOGFILE
    DATAFILE
    '/path/oracle/dbs/t_db1.f',
    '/path/oracle/dbs/dbu19i.dbf',
    '/path/oracle/dbs/tbs_11.f',
    '/path/oracle/dbs/smundo.dbf',
    '/path/oracle/dbs/demo.dbf'
    CHARACTER SET WE8DEC
    ;

  • Unable to recreate control file.

    Hello experts.
    I'm trying to recreate controlfile in oracle database 10.2 using trace file. by during running script it shows   ERROR at line 8: ORA-01967: invalid option for CREATE CONTROLFILE
    my script create control file script below. please help
    ============================================================
    CREATE CONTROLFILE REUSE DATABASE "TSH1" NORESETLOGS  ARCHIVELOG
        MAXLOGFILES 16
        MAXLOGMEMBERS 3
        MAXDATAFILES 100
        MAXINSTANCES 8
        MAXLOGHISTORY 292
    LOGFILE
      GROUP 1 '/u01/app/oracle/oradata/TSH1/redo01.log'  SIZE 50M BLOCKSIZE 512,
      GROUP 2 '/u01/app/oracle/oradata/TSH1/redo02.log'  SIZE 50M BLOCKSIZE 512,
      GROUP 3 '/u01/app/oracle/oradata/TSH1/redo03.log'  SIZE 50M BLOCKSIZE 512
    DATAFILE
      '/u01/app/oracle/oradata/TSH1/system01.dbf',
      '/u01/app/oracle/oradata/TSH1/undotbs01.dbf',
      '/u01/app/oracle/oradata/TSH1/sysaux01.dbf',
      '/u01/app/oracle/oradata/TSH1/users01.dbf',
      '/u01/app/oracle/oradata/TSH1/oradaxmldb_ts.dbf'
    CHARACTER SET WE8ISO8859P1
    VARIABLE RECNO NUMBER;
    EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CHANNEL','DEVICE TYPE DISK FORMAT   ''/backup/%U''');
    RECOVER DATABASE
    ALTER SYSTEM ARCHIVE LOG ALL;
    ALTER DATABASE OPEN;
    ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/app/oracle/oradata/TSH1/temp01.dbf' REUSE;

    Hi
    Just remove below lines from scripts and run again and please use set instead of reuse in the create control file staetment .
    VARIABLE RECNO NUMBER;
    EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CHANNEL','DEVICE TYPE DISK FORMAT   ''/backup/%U''');
    RECOVER DATABASE
    ALTER SYSTEM ARCHIVE LOG ALL;
    ALTER DATABASE OPEN;
    ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/app/oracle/oradata/TSH1/temp01.dbf' REUSE;
    Regards
    Shivendra Narain Nirala

  • Problem in identifying control file when creating physical standby

    hi there,
    (database version: 10.2.0.4
    plateform linux)
    I'm using the command as below to create physical standby database from backup:
    rman target / auxiliary sys/tiger@paceview
    Recovery Manager: Release 10.2.0.4.0 - Production on Tue Sep 4 18:05:53 2012
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    connected to target database: PACEVIEW (DBID=2092349485)
    connected to auxiliary database: PACEVIEW (not mounted)
    run {
    allocate auxiliary channel c1 device type DISK;
    set until sequence 38;
    duplicate target database for standby dorecover nofilenamecheck;
    released channel: ORA_DISK_1
    allocated channel: c1
    channel c1: sid=35 devtype=DISK
    allocated channel: c2
    channel c2: sid=36 devtype=DISK
    executing command: SET until clause
    Starting Duplicate Db at 04-SEP-12
    contents of Memory Script:
       set until scn  138180211934;
       restore clone standby controlfile;
       sql clone 'alter database mount standby database';
    executing Memory Script
    executing command: SET until clause
    Starting restore at 04-SEP-12
    channel c1: restoring control file
    ORA-19625: error identifying file /backup/rman/paceview/DEL1_standby.ctl
    ORA-27037: unable to obtain file status
    Linux-x86_64 Error: 2: No such file or directory
    Additional information: 3
    ORA-19600: input file is control file  (/backup/rman/paceview/DEL1_standby.ctl)
    ORA-19601: output file is control file  (/PGHProdDB/oradata/paceview/control1.ctl)
    failover to previous backup
    released channel: c1
    released channel: c2
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 09/04/2012 18:01:44
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06026: some targets not found - aborting restore
    RMAN-06024: no backup or copy of the control file found to restorei have already tried crosscheck but still giving same error
    thanks

    Hello;
    So this is what I would do :
    Backup Primary ( change to your directory as need )
    RMAN RUN {
    allocate channel d1 type disk;
    backup format '/u01/backups/PRIMARY/df_t%t_s%s_p%p' database;
    sql 'alter system archive log current';
    backup format '/u01/backups/PRIMARY/al_t%t_s%s_p%p' archivelog all;
    backup current controlfile for standby format '/u01/backups/PRIMARY/sb_t%t_s%s_p%p';
    release channel d1;
    }Move the backup and duplicate like this :
    rman target sys/password@PRIMARY auxiliary /
    RMAN> run {
    allocate channel C1 device type disk;
    allocate auxiliary channel C2 device type disk;
    duplicate target database for standby nofilenamecheck;
    }For complete details of this method see :
    http://www.visi.com/~mseberg/duprman2.html
    Best Regards
    mseberg

  • Problem in creating control files

    Hi
    I am using oracle 9i
    I want to import the excel sheet data into the database.
    Please let me know how to create the control file for sql loader.
    For that i created control file using the following code
    set echo off ver off feed off pages 0
    accept tname prompt 'Enter Name of Table: '
    accept dformat prompt 'Enter Format to Use for Date Columns: '
    spool &tname..ctl
    select 'LOAD DATA'|| chr (10) ||
    'INFILE ''' || lower (table_name) || '.dat''' || chr (10) ||
    'INTO TABLE '|| table_name || chr (10)||
    'FIELDS TERMINATED BY '','''||chr (10)||
    'TRAILING NULLCOLS' || chr (10) || '('
    from user_tables
    where table_name = upper ('&tname');
    select decode (rownum, 1, ' ', ' , ') ||
    rpad (column_name, 33, ' ') ||
    decode (data_type,
    'VARCHAR2', 'CHAR NULLIF ('||column_name||'=BLANKS)',
    'FLOAT', 'DECIMAL EXTERNAL NULLIF('||column_name||'=BLANKS)',
    'NUMBER', decode (data_precision, 0,
    'INTEGER EXTERNAL NULLIF ('||column_name||
    '=BLANKS)', decode (data_scale, 0,
    'INTEGER EXTERNAL NULLIF ('||
    column_name||'=BLANKS)',
    'DECIMAL EXTERNAL NULLIF ('||
    column_name||'=BLANKS)')),
    'DATE', 'DATE "&dformat" NULLIF ('||column_name||'=BLANKS)', null)
    from user_tab_columns
    where table_name = upper ('&tname')
    order by column_id;
    select ')'
    from dual;
    spool off
    and after then i have written in the commond prompt like
    C:\sqlldr username/password@host controlfile
    then it is giving like this
    Commit point reached - logical record count 1
    Any Help?
    Thank you

    What does it say in the .log file?
    What records are in the .bad file?
    How many records in the data file - if 1 then it's all good.
    Excel often puts column headings in the .csv file - you may need to SKIP the first record (look it up in the docs).
    Don't hard code the filename into the control file - it's easier to do that when you load:
    sqlldr u/p control=controlfile data=datafileRead carefully what FLOAT and DECIMAL mean. Unless you are dealing with binary datatypes (you aren't) you probably don't need these. Only DATE needs careful treatment.
    Also, consider pulling the data in using an external table (if it is on the Oracle server already). Again, look it up in the docs - you'll still have to get the control definition right...
    Regards Nigel

  • Recreate control file

    Hi gurus! Need help
    I've lost all my control files + i want to rename my database from testrman to ntstrman. But I am getting an error
    ORA 01503 create control file failed
    ORA 01160 file is not a daatafile
    dataf file is '/oradata/ntstrman/temp01.dbf'
    Can't you please look throw and tell me what am i doing wrong? Thanks.
    create_control.sql:
    create controlfile set database ntstrman
    resetlogs
    maxlogfiles 50
    maxlogmembers 3
    maxloghistory 400
    maxdatafiles 200
    maxinstances 6
    archivelog
    logfile
    group 1 ('/oradata/ntstrman/redo01.log'),
    group 2 ('/oradata/ntstrman/redo02.log'),
    group 3 ('/oradata/ntstrman/redo03.log')
    datafile
    '/oradata/ntstrman/sysaux01.dbf',
    '/oradata/ntstrman/system01.dbf',
    '/oradata/ntstrman/temp01.dbf',
    '/oradata/ntstrman/undotbs01.dbf',
    '/oradata/ntstrman/users01.dbf'
    initntstrman.ora:
    testrman.__db_cache_size=92274688
    ntstrman.__db_cache_size=100663296
    testrman.__java_pool_size=4194304
    testrman.__large_pool_size=4194304
    ntstrman.__large_pool_size=4194304
    testrman.__shared_pool_size=62914560
    ntstrman.__shared_pool_size=54525952
    testrman.__streams_pool_size=0
    *.audit_file_dest='/oradata/admin/ntstrman/adump'
    *.background_dump_dest='/oradata/admin/ntstrman/bdump'
    *.compatible='10.2.0.3.0'
    *.control_files='/oradata/ntstrman/control01.ctl','/oradata/ntstrman/control02.ctl','/oradata/ntstrman/control03.ctl'
    *.core_dump_dest='/oradata/admin/ntstrman/cdump'
    *.db_block_size=8192
    *.db_domain=''
    *.db_file_multiblock_read_count=16
    *.db_name='ntstrman'
    *.db_recovery_file_dest='/oradata/flash_recovery_area'
    *.db_recovery_file_dest_size=2147483648
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=ntstramnXDB)'
    *.job_queue_processes=10
    *.open_cursors=300
    *.pga_aggregate_target=16777216
    *.processes=150
    *.remote_login_passwordfile='EXCLUSIVE'
    *.sga_target=167772160
    *.undo_management='AUTO'
    *.undo_tablespace='UNDOTBS1'
    *.user_dump_dest='/oradata/admin/ntstrman/udump'
    Edited by: Junior Oracle DBA on Oct 20, 2008 3:37 PM

    Hi...
    Please mention the size of the redolog files..which you haven't and secondly, tempfile is not be added in the control file script, create the temporary tablespace later after opening the database
    1. Change the control_files parameter in the pfile, which you have done.
    2. startup nomount pfile='pfile/location/name/';
    3.
    create controlfile set database ntstrman resetlogs archivelog
    maxlogfiles 50
    maxlogmembers 3
    maxloghistory 400
    maxdatafiles 200
    maxinstances 6
    logfile
    group 1 '/oradata/ntstrman/redo01.log' SIZE xxxM,
    group 2 '/oradata/ntstrman/redo02.log' SIZE xxxM,
    group 3 '/oradata/ntstrman/redo03.log' SIZE xxxM
    datafile
    '/oradata/ntstrman/sysaux01.dbf',
    '/oradata/ntstrman/system01.dbf',
    '/oradata/ntstrman/undotbs01.dbf',
    '/oradata/ntstrman/users01.dbf'
    ;4. alter database open resetlogs
    5. create temporary tablespace tempfile 'temp/file/location/name' size xxxM ;
    Link: [http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_5003.htm#SQLRF01203]
    HTH
    Anand

  • Recreating Control File

    Hi
    Can anybody explain when to use "RESETLOGS" and "NORESETLOGS" option while making backup of Control File to TRACE and whats the purpose of using it?
    ALTER DATABASE BACKUP CONTROL FILE TO TRACE RESETLOGS/NORESETLOGS;
    TIA
    Aqueel.

    read the following discussion from asktom site. Very informative and helpful.
    http://asktom.oracle.com/pls/ask/f?p=4950:8:2270402190261165858::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:311016722068
    Jaffar

  • Output is no longer available in the database control file

    Hi All
    in Oracle 10g (10.2.0.1.0) - on suse Linux 9, OEM (10.2.0.1.0); I'm getting when I try to look at RMAN reports that databases reports are "Job output is no longer available in the database control file." - one one database.
    I've searched forum and only found one thread
    (25/9/2007 - Re: rman backups )
    that doesn't have any conclusion to the problem. Has anyone seen this problem before, and do you know if it means there is a problem with the control file?
    Thanks, DW

    Looks like Bug 4659734
    I totally agree with what you say grylew "If you use rman catalogue you shouldn't get this error"; for me, on a Suse 9 Linux server (10.2.0.1.0 db), the error eventually found was ORA-19921 ;
    RMAN-06900: WARNING: unable to generate V$RMAN_STATUS or V$RMAN_OUTPUT row
    RMAN-06901: WARNING: disabling update of the V$RMAN_STATUS and V$RMAN_OUTPUT rows
    ORACLE error from target database:
    ORA-19921: maximum number of 64 rows exceeded
    Which turns out to say it is a bug fixable by only 10.2.0.4.0 patch or 11g. So awaiting 10.2.0.4.0 I guess.
    It all seems to be error assocaited with control file space; and I'f rather keep my control files healthy thanks.
    Besides all this; for me the problem is pretty innocuous; it means OEM mis-reports success of archivelog backups; I can see they're successful in 'job's but not in 'backup reports'.
    Thanks all for help, DW

  • ORA-01190: control file or data file 1 is from before the last RESETLOGS

    hi, experts.
    i have oradb 11g and using it for OIM11
    after some actions in oim i try to get my db to previous state (many times it was done successfully)
    but now i have problem ORA-01190: control file or data file 1 is from before the last RESETLOGS
    im runing in noarchivelog mode
    i have autobackup of controlfile and i have 2 backups of my db
    please help me
    maybe some one know how to restore my backup to new db and then change configuration of wls and oim...

    Hi, Thanks for reply
    List of Database Incarnations
    DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
    1       1       OIMDB    2372279074       PARENT  1          02-APR-10
    2       2       OIMDB    2372279074       PARENT  940976     11-JUL-11
    3       3       OIMDB    2372279074       PARENT  5590849    09-AUG-11
    4       4       OIMDB    2372279074       PARENT  5590850    10-AUG-11
    5       5       OIMDB    2372279074       PARENT  5596482    11-AUG-11
    7       7       OIMDB    2372279074       PARENT  5596483    11-AUG-11
    8       8       OIMDB    2372279074       PARENT  5596484    12-AUG-11
    6       6       OIMDB    2372279074       ORPHAN  5622931    11-AUG-11
    9       9       OIMDB    2372279074       PARENT  5627526    18-AUG-11
    10      10      OIMDB    2372279074       PARENT  5627527    18-AUG-11
    11      11      OIMDB    2372279074       ORPHAN  5627528    18-AUG-11
    12      12      OIMDB    2372279074       CURRENT 5627528    18-AUG-11
    RMAN> list backup;
    List of Backup Sets
    ===================
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    9       Full    1.50G      DISK        00:00:31     12-AUG-11
            BP Key: 9   Status: AVAILABLE  Compressed: NO  Tag: TAG20110812T114515
            Piece Name: D:\APP\999-ILYASOV\FLASH_RECOVERY_AREA\OIMDB\BACKUPSET\2011_08_12\O1_MF_NNNDF_TAG20110812T114515_749PJDCW_.BKP
      List of Datafiles in backup set 9
      File LV Type Ckp SCN    Ckp Time  Name
      1       Full 5627525    12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\SYSTEM01.DBF
      2       Full 5627525    12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\SYSAUX01.DBF
      3       Full 5627525    12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\UNDOTBS01.DBF
      4       Full 5627525    12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\USERS01.DBF
      5       Full 5627525    12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_OIMLOB.DBF
      6       Full 5627525    12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_IASSDPM.DBF
      7       Full 5627525    12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_MDS.DBF
      8       Full 5627525    12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_SOAINFRA.DBF
      9       Full 5627525    12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_OIM.DBF
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    10      Full    9.36M      DISK        00:00:01     12-AUG-11
            BP Key: 10   Status: AVAILABLE  Compressed: NO  Tag: TAG20110812T114515
            Piece Name: D:\APP\999-ILYASOV\FLASH_RECOVERY_AREA\OIMDB\BACKUPSET\2011_08_12\O1_MF_NCSNF_TAG20110812T114515_749PKJJS_.BKP
      SPFILE Included: Modification time: 12-AUG-11
      SPFILE db_unique_name: OIMDB
      Control File Included: Ckp SCN: 5627525      Ckp time: 12-AUG-11
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    11      Full    1.33G      DISK        00:00:26     16-AUG-11
            BP Key: 11   Status: AVAILABLE  Compressed: NO  Tag: TAG20110816T094954
            Piece Name: D:\APP\999-ILYASOV\FLASH_RECOVERY_AREA\OIMDB\BACKUPSET\2011_08_16\O1_MF_NNNDF_TAG20110816T094954_74N183D7_.BKP
      List of Datafiles in backup set 11
      File LV Type Ckp SCN    Ckp Time  Name
      1       Full 6118204    16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\SYSTEM01.DBF
      2       Full 6118204    16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\SYSAUX01.DBF
      3       Full 6118204    16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\UNDOTBS01.DBF
      4       Full 6118204    16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\USERS01.DBF
      5       Full 6118204    16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_OIMLOB.DBF
      6       Full 6118204    16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_IASSDPM.DBF
      7       Full 6118204    16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_MDS.DBF
      8       Full 6118204    16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_SOAINFRA.DBF
      9       Full 6118204    16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_OIM.DBF
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    12      Full    9.36M      DISK        00:00:01     16-AUG-11
            BP Key: 12   Status: AVAILABLE  Compressed: NO  Tag: TAG20110816T094954
            Piece Name: D:\APP\999-ILYASOV\FLASH_RECOVERY_AREA\OIMDB\BACKUPSET\2011_08_16\O1_MF_NCSNF_TAG20110816T094954_74N197JO_.BKP
      SPFILE Included: Modification time: 16-AUG-11
      SPFILE db_unique_name: OIMDB
      Control File Included: Ckp SCN: 6118204      Ckp time: 16-AUG-11How to reset database to right incarnation.?

  • RECREATE DATABASE Using CONTROL File After SUSPEND Database

    Hello All,
    Does someone can tell me if he does achieve recreating a database using "Backup Control File" after putting database in "suspend" mode?
    The procedure looks like this :
    1 - Alter DATABASE Suspend
    2 - A Snapshot of the filesystem where the oracle datafile are located
    3 - Copy of those files to another file systeme
    4 - Startup setting a new database name
    Does someone as do it successfully ?
    Thanks for your answer

    Carlos,
    I tried to do it without putting the tablespaces in backup mode and it didn't work for me. At that time adding the backup mode wasn't a big deal for me, so I didn't investigate the problem thoroughly.
    Logically thinking you sould be able to do:
    1. suspend database
    the SCNs recored in datafiles headers could be incosistent at this point
    2. make a snapshot
    3. mount the backup database
    4. run recover until cancel using backup controlfile - I don't think you can avoid this step in case if you have inconsistent SCNs in the datafiles headers - you'll need to synchronize them
    5. open resetlogs.
    the suspend database should eliminate the possibility of inconsistent data within a block during the backup.
    Just out of curiosity - why don't you want to put the tablespace in the backup mode?
    Mike

Maybe you are looking for

  • Using a hyperlink in an email to reference a particular Change Request

    Didn't know if this is possible or not. I am setting up a Change Notification email for Urgent changes so an email goes out to a group of managers that are listed as Approvers. Trying to capture specific information about the Change itself and put it

  • Problem with nokia e51 plugin installation

    hey guys! i have a problem concerning the installation of the plugin for the usage of the nokia e51 with apple isync. (nokia_e51_1v1.dmg) i have mac osx 10.4.11 and isync 2.4. when i tried to install the plugin i got the message that i have to upgrad

  • Windows 7 64-bit problems

    Hi all. I'm aware that this is a fairly prominent problem and, reading around, I have seen that some people have been able to resolve this particular issue. I am having problems however, and cannot aptly describe the sheer frustration I am feeling. R

  • Implementing WITH clause in ODI

    Hi, I want to convert certain 'WITH' clauses and 'Inline' views of a SQL query in ODI interfaces.Is there any way I can do this? Regards, RAshmik

  • Smartform XSF validation gives error

    Hi, we are printing smartforms to XSF. When we try to validate the xml output in XMLSpy using the DTD file posted on SDN (https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b5d2d190-0201-0010-95b3-a3ff828477ef) we get the error messa