Database Recovery problem

Hi all,
When i try to recover a database from production server into a dev server i'm facing a problem in system datafile. I'm giving the details below:
SVRMGR> recover database using backup controlfile until cancel;
ORA-00283: recovery session canceled due to errors
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '/u05/oracle/oradata/STAMPS/system01.dbf'
SVRMGR>
$ oerr ora 1110
01110, 00000, "data file %s: '%s'"
// *Cause: Reporting file name for details of another error
// *Action: See associated error message
$ oerr ora 1157
01157, 00000, "cannot identify/lock data file %s - see DBWR trace file"
// *Cause: The background process was either unable to find one of the data
// files or failed to lock it because the file was already in use.
// The database will prohibit access to this file but other files will
// be unaffected. However the first instance to open the database will
// need to access all online data files. Accompanying error from the
// operating system describes why the file could not be identified.
// *Action: Have operating system make file available to database. Then either
// open the database or do ALTER SYSTEM CHECK DATAFILES.
SVRMGR> select * from v$recover_file;
FILE# ONLINE ERROR CHANGE# TIME
1 ONLINE FILE NOT FOUND 0
2 ONLINE 21722359 14-DEC-99
3 ONLINE 21722363 14-DEC-99
4 ONLINE 21722400 14-DEC-99
5 ONLINE 21722450 14-DEC-99
6 ONLINE 21722456 14-DEC-99
7 ONLINE 21722463 14-DEC-99
8 ONLINE 21722568 14-DEC-99
9 ONLINE 21722869 14-DEC-99
10 ONLINE 21723622 14-DEC-99
11 ONLINE 21723744 14-DEC-99
12 ONLINE 21723784 14-DEC-99
13 ONLINE 21724141 14-DEC-99
14 ONLINE 21724394 14-DEC-99
14 rows selected.
SVRMGR>
SVRMGR> select * from v$datafile where file#=1;
FILE# CREATION_C CREATION_ TS# RFILE# STATUS ENABLED CHECKPO
INT CHECKPOIN UNRECOVERA UNRECOVER LAST_CHANG LAST_TIME OFFLINE_CH ONLINE_CHA ON
LINE_TI BYTES BLOCKS CREATE_BYT BLOCK_SIZE NAME
PLUGGED_IN
1 4 06-NOV-99 0 1 SYSTEM READ WRITE 21722
301 14-DEC-99 0 0 0
0 0 0 2048 /u05/oracle/oradata/STAMPS/s
ystem01.dbf 0
1 row selected.
SVRMGR>
SVRMGR> select name from V$datafile;
NAME
/u05/oracle/oradata/STAMPS/system01.dbf
/u05/oracle/oradata/STAMPS/oemrep01.dbf
/u05/oracle/oradata/STAMPS/rbs01.dbf
/u05/oracle/oradata/STAMPS/temp01.dbf
/u05/oracle/oradata/STAMPS/users01.dbf
/u05/oracle/oradata/STAMPS/indx01.dbf
/u05/oracle/oradata/STAMPS/USERS_STAMPS01.dbf
/u07/oracle/oradata/STAMPS/USERS_STAMPS02.dbf
/u05/oracle/oradata/STAMPS/USERS_STAMPS03.dbf
/u05/oracle/oradata/STAMPS/USERS_STAMPS04.dbf
/u04/oracle/oradata/STAMPS/USERS_INDEX.dbf
/u06/oracle/oradata/STAMPS/USERS_INDEX2.dbf
/u04/oracle/oradata/STAMPS/USERS_INDEX3.dbf
/u04/oracle/oradata/STAMPS/USERS_INDEX4.dbf
14 rows selected
$ ls -lta /u05/oracle/oradata/STAMPS/system01.dbf
-rwxrwxrwx 1 oracle dba 183503330 Dec 14 22:19 /u05/oracle/oradata/STAMPS/system01.dbf
$
$ ls -lta /u05/oracle/oradata/STAMPS
total 7155936
-rwxrwxrwx 1 oracle dba 4413440 Dec 18 12:25 control01.ctl
-rwxrwxrwx 1 oracle dba 4413440 Dec 18 12:25 control02.ctl
-rwxrwxrwx 1 oracle dba 4413440 Dec 18 12:25 control03.ctl
drwxrwxrwx 2 oracle dba 2048 Dec 18 12:05 .
lrwxrwxrwx 1 oracle dba 183503330 Dec 18 12:05 system01.dbf
drwxrwxrwx 4 oracle dba 96 Dec 18 12:02 ..
-rwxrwxrwx 1 oracle dba 6857728 Dec 14 22:33 stamps_1927.dbf
-rwxrwxrwx 1 oracle dba 9216 Dec 14 22:33 stamps_1926.dbf
-rwxrwxrwx 1 oracle dba 17482752 Dec 14 22:33 stamps_1925.dbf
-rwxrwxrwx 1 oracle dba 173017088 Dec 14 22:33 USERS_INDEX4.dbf
-rwxrwxrw x 1 oracle dba 162531328 Dec 14 22:31 USERS_INDEX3.dbf
-rwxrwxrwx 1 oracle dba 382732288 Dec 14 22:30 USERS_INDEX2.dbf
-rwxrwxrwx 1 oracle dba 104859648 Dec 14 22:28 USERS_INDEX.dbf
-rwxrwxrwx 1 oracle dba 209717248 Dec 14 22:28 USERS_STAMPS04.dbf
-rwxrwxrwx 1 oracle dba 964691968 Dec 14 22:27 USERS_STAMPS03.dbf
-rwxrwxrwx 1 oracle dba 377489408 Dec 14 22:22 USERS_STAMPS02.dbf
-rwxrwxrwx 1 oracle dba 209717248 Dec 14 22:20 USERS_STAMPS01.dbf
-rwxrwxrwx 1 oracle dba 10487808 Dec 14 22:20 indx01.dbf
-rwxrwxrwx 1 oracle dba 10487808 Dec 14 22:19 users01.dbf
-rwxrwxrwx 1 oracle dba 102432768 Dec 14 22:19 temp01.dbf
-rwxrwxrwx 1 oracle dba 46493696 Dec 14 22:19 rbs01.dbf
-rwxrwxrwx 1 oracle dba 5244928 Dec 14 22:19 oemrep01.dbf
Thanks...Karthik
null

Hi Karthik,
Does this :
lrwxrwxrwx 1 oracle dba 183503330 Dec 18 12:05 system01.dbf
point to some file?
if the link is not pointing to any particular file then there wont be any file to recover.
Check if all the files have been brought to the devl box and there are no hanging links.
Hope this helps,
Mandar

Similar Messages

  • Standby database recovery problems....

    HP-UX 11.23
    oracle 10.2.0.2
    I know that this has been discussed quite a bit. I've spent a number of hours on this forum alone today just reading through the search hits. I've tried some of the 'tricks' that have been described in the threads. But I'm still getting the same error....
    My standby database lost connectivity with my primary, and stopped receiving logs. I got no notification, because my scripts were not set up to catch this event...
    The retention policy on my primary is 30 days of archive logs. After that, they are deleted. (I don't agree with it, but not my call)
    The standby got more than 30 days out of sync, so I decided to just refresh the whole standby.
    Since cold backups are not an option, I did an alter system checkpoint to flush all archive logs. Then I issued a complete hot backup.
    Once completed, I went ahead and created a fresh standby control file, as well as a fresh backup control file. In that exact order.
    I transferred all db files, archive logs, and control files over to the standby.
    I ran the commands:
    startup nomount;
    (SUCCESSFUL)
    alter database mount standby database;
    (SUCCESSFUL)
    recover standby database;
    I let it run through all the archive log files until it errored saying it couldn't find "X" file being the next sequence that wasn't in the directory. Which to my understanding, is normal...time to quit recovery.
    When I entered cancel, I get the following error.
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    ORA-00279: change 7313561157126 generated at 12/17/2008 19:01:02 needed for
    thread 1
    ORA-00289: suggestion : /oraarch/swesc/1_13729_640853326.arc
    ORA-00280: change 7313561157126 for thread 1 is in sequence #13729
    ORA-00278: log file '/oraarch/swesc/1_13728_640853326.arc' no longer needed for
    this recovery
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    CANCEL
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01152: file 1 was not restored from a sufficiently old backup
    ORA-01110: data file 1: '/ora1/oradata/peregrine/system01.dbf'
    So my understanding of this is that it means that you still need to apply logs.
    So I grabbed the logs that had been auto created during the time that I was rebuilding everything and applied them.
    Same errors.
    I'm at a loss here. How can it still be out of sync? Is there a way to force it to a specific sequence so that I can successfully open it and then shut it down to complete the sequence?
    Thanks.

    Thanks OrionNet. Great info!!
    Here is the response.
    OrionNet wrote:
    select * from v$archive_gap
    NO ROWS SELECTED.
    and all the logs got applied
    select applied , count(*) from v$archived_log;
    -- This should return 1 rows with "YES", number of logs applied.
    I had to change change this as it complained about "not a single-group group function
    I changed it by adding group by applied to the end...
    NO ROWS SELECTED
    Then you should try activating standby database
    SQL> alter database force nomount pfile='....'; -- or without the pfile
    SQL> alter database mount standby database;
    -- If all the archived logs have been applied to your standby then stop recovery
    SQL> alter database recover manated standby cancel;
    -- Note if it fails on activating the database ;shutdown and mount it again and activate (skip stopping recovery step).
    SQL> alter database activate standby database;
    IF successfull, then perform followin
    SQL> alter database open;Regards
    OrionNet;
    I thought that in a primary/standby scenario, thiat this action would automatically shut down the primary.  I can't have that.
    HOLDING OFF ON REST FOR RESPONSE...
    Edited by: WillyB on Dec 17, 2008 9:40 PM

  • Problem in performing multiple Point-In-Time Database Recovery using RMAN

    Hello Experts,
    I am getting an error while performing database point in time recovery multiple times using RMAN. Details are as follows :-
    Environment:
    Oracle 11g, ASM,
    Database DiskGroups : DG_DATA (Data files), DG_ARCH(Archive logs), DG_REDO(Redo logs Control file).
    Snapshot DiskGroups :
    Snapshot1 (taken at 9 am): SNAP1_DATA, SNAP1_ARCH, +SNAP1_REDO
    Snapshot2 (taken at 10 am): SNAP2_DATA, SNAP2_ARCH, +SNAP2_REDO
    Steps performed for point in time recovery:
    1. Restore control file from snapshot 2.
         RMAN> RESTORE CONTROLFILE from '+SNAP2_REDO/orcl/CONTROLFILE/Current.256.777398261';
    2. For 2nd recovery, reset incarnation of database to snapshot 2 incarnation (Say 2).
    3. Catalog data files from snapshot 1.
    4. Catalog archive logs from snapshot 2.
    5. Perform point in time recovery till given time.
         STARTUP MOUNT;
         RUN {
              SQL "ALTER SESSION SET NLS_DATE_FORMAT = ''dd-mon-yyyy hh24:mi:ss''";
              SET UNTIL TIME "06-mar-2013 09:30:00";
              RESTORE DATABASE;
              RECOVER DATABASE;
              ALTER DATABASE OPEN RESETLOGS;
    Results:
    Recovery 1: At 10.30 am, I performed first point in time recovery till 9:30 am, it was successful. Database incarnation was raised from *2* to *3*.
    Recovery 2: At 11:10 am, I performed another point in time recovery till 9:45 am, while doing it I reset the incarnation of DB to *2*, it failed with following error :-
    Starting recover at 28-FEB-13
    using channel ORA_DISK_1
    starting media recovery
    media recovery failed
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 03/06/2013 11:10:57
    ORA-00283: recovery session canceled due to errors
    RMAN-11003: failure during parse/execution of SQL statement: alter database recover if needed
    start until time 'MAR 06 2013 09:45:00'
    ORA-00283: recovery session canceled due to errors
    ORA-00313: open failed for members of log group 1 of thread 1
    ORA-00312: online log 1 thread 1: '+DG_REDO/orcl/onlinelog/group_1.257.807150859'
    ORA-17503: ksfdopn:2 Failed to open file +DG_REDO/orcl/onlinelog/group_1.257.807150859
    ORA-15012: ASM file '+DG_REDO/orcl/onlinelog/group_1.257.807150859' does not exist
    Doubts:
    1. Why did recovery failed 2nd time, but not 1st time and why is RMAN looking for online redo log group_1.257.807150859 in 2nd recovery ?
    3. I tried restoring control file from AutoBackup, in that case both 1st and 2nd recovery succeeded.
    However for this to work, I always need to keep the AutoBackup feature enabled.
    How reliable is control file AutoBackup ? Is there any alternative to using AutoBackup, can I restore control file from snapshot backup only ?
    4. If I restore control file from AutoBackup, then from what point of time/SCN does RMAN restores the control file ?
    Please help me out in this issue.
    Thanks.

    992748 wrote:
    Hello experts,
    I'm little newbie to RMAN recovery. Please help me in these doubts:
    1. If I have datafiles, archive logs & control files backup, but current online REDO logs are lost, then can I perform incomplete database recovery ?yes, if you have backups of everything else
    2. Till what maximum time/scn can incomplete database recovery be performed ??Assuming the only thing lost is the redo logs, you can recover to the last scn in the last archivelog.
    3. What is role of online REDO logs in incomplete database recovery ? They provide the final redo changes - the ones that have not been written to archivelogs
    Are they required for incomplete recovery ?It depends on how much incomplete recovery you need to do.
    Think of all of your changes as a constant stream of redo information. As a redolog fills, it is copied to archive, then (eventually) reused. over time, your redo stream is in archivelog_1, continuing into archvivelog_2, then to 3, and eventually, when you get to the last archivelog, into the online redo. A recovery will start with the oldest necessary point in the redo stream and continue forward. Whether or not you need the online redo for a PIT recovery depends on how far forward you need to recover.
    But you should take every precaution to prevent loss of online redo logs .. starting with having multiple members in each redo group ... and keeping those multiple members on physically separate disks.

  • Failure during database recovery on Homogeneous System Copy

    Dear all,
    i am trying to do system copy, and it fails after the execution step:  database recovery
    MaxDB: 7.6.5.15
    SAP Netweaver 7 Ehp 1
    apparantly this is something to do with LOAD_SYSTAB.
    I could run load_systab [-u <sysdba_user>,<sysdba_user_password>] manually, but the Log file of SAPinst shows the following:
    WARNING[E] 2009-09-28 17:17:57.328
               CJSlibModule::writeError_impl()
    The dbmcli call for action LOAD_SYSTAB failed. SOLUTION: Check the logfile XCMDOUT.LOG.
    TRACE      2009-09-28 17:17:57.546 [iaxxejsbas.hpp:408]
               handleException<ESAPinstJSError>()
    Converting exception into JS Exception EJSException.
    TRACE      2009-09-28 17:17:57.562
    Function setMessageIdOfExceptionMessage: dbmodada.actorext.dbmcliCallFailed
    WARNING[E] 2009-09-28 17:17:57.562
               CJSlibModule::writeError_impl()
    The dbmcli call for action LOAD_SYSTAB failed. SOLUTION: Check the logfile XCMDOUT.LOG.
    TRACE      2009-09-28 17:17:57.562 [iaxxejsbas.hpp:483]
               EJS_Base::dispatchFunctionCall()
    JS Callback has thrown unknown exception. Rethrowing.
    ERROR      2009-09-28 17:17:57.781 [sixxcstepexecute.cpp:950]
    FCO-00011  The step sdb_instance_load_systables with step key |NW_ABAP_OneHost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_CreateDB|ind|ind|ind|ind|0|0|NW_ADA_DB|ind|ind|ind|ind|6|0|SdbPreInstanceDialogs|ind|ind|ind|ind|4|0|SdbInstanceDialogs|ind|ind|ind|ind|1|0|SDB_INSTANCE_CREATE|ind|ind|ind|ind|0|0|sdb_instance_load_systables was executed with status ERROR .
    TRACE      2009-09-28 17:17:58.93 [iaxxgenimp.cpp:752]
                CGuiEngineImp::showMessageBox
    <html> <head> </head> <body> <p> An error occurred while processing option SAP NetWeaver 7.0 including Enhancement Package 1 Support Release 1 > Software Life-Cycle Options > System Copy > MaxDB > Target System Installation > Central System > Based on AS ABAP > Central System. You can now: </p> <ul> <li> Choose <i>Retry</i> to repeat the current step. </li> <li> Choose <i>View Log</i> to get more information about the error. </li> <li> Stop the option and continue with it later. </li> </ul> <p> Log files are written to C:\Program Files/sapinst_instdir/NW701/LM/COPY/ADA/SYSTEM/CENTRAL/AS-ABAP/. </p> </body></html>
    TRACE      2009-09-28 17:17:58.109 [iaxxgenimp.cpp:1255]
               CGuiEngineImp::acceptAnswerForBlockingRequest
    Waiting for an answer from GUI
    XCMDOUT.LOG shows only the SAP users data from the source system, and not for the target system which is having the error.
    Could somebody please advise me what to do?
    Thank you,
    Mariana

    Dear Christian,
    yes, I solved this LOAD_SYSTAB problem.
    This is what I did:
    1. check XCMDOUT.LOG
    2. However in my case, I did not see any clue there, so I read this link about LOAD_SYSTAB http://maxdb.sap.com/doc/7_7/45/11cbd6459d7201e10000000a155369/content.htm
    I tried it manually, and it worked: dbmcli u2013d <DB_ID> u2013u DBMUser,password1 load_systab u2013u superdba,password2
    From there, I know that I entered the wrong SYSADM User (superdba) password, this password was in my case the same one a SAPinst Master Password.
    According to https://websmp130.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=25591
    a new installation of MaxDB database, by default, the credential for SYSADM is: "superdba,admin"
    So, accordingly, the solution is:
    change the SYSADM for the <DB_ID> in DBMGUI: D7D - Configuration - Database User area, exactly as the SAPinst Master Passwort.
    Hope this helps.
    Regards,
    Mariana

  • Database restore problem with BRTOOLS

    Hi Experts,
    I am tring to migrate an SAP system from host A to host B.
    OS: windows server 2003 DB: oracle 10g
    Homogeneous migration.
    The database were backed up with BRTOOLS (whole database offline backup) to Location L:\QCO_BCK @hostA
    After that I moved folder QCO_BCK together with folder "sapbackup" from hostA to hostB, placed under F:\QCO_BCK
    And then start to perform "whole database reset" with BRTOOLS, but BRTOOLS can not verify the datafile/control files since they are under different location(hostA and hostB), So, I modified initQCO.ora and the BRTOOLS log file begprhrg.afd, all the relevant directories were changed from L:\ to F:\, after trying again, BRTOOLS performed well, all datafiles, redo logs, control files were copied to the right location, but problems encountered at step 7 - "open database and post-processing", BRTOOLS returns oracle error message:
    ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
    ORA-01110: data file 1: 'H:\oracle\QCO\sapdata5\system_1\SYSTEM.DATA1'
    database can be mounted but can not be open.
    I think this is because the control file is the old one which records the old file locations in hostA, in hostA, file SYSTEM.DATA1 actually located under H:\ but in hostB, it is copied under D:\
    My question is:
    1.  Is it obligatory by BRTOOLS that the file structure on hostB(new) must be totally the same as hostA(old)? if the file (for example) SYSTEM.DATA1 is located at H:\ of hostA, then, in new hostB, it must be located at the same directory H:\?
    2. Is there any workaround to open the database in this situation? like modifing the control file?
    Thank you in advance.
    Freshman

    Hi Sunny and Juan,
    Thanks so much for your valuable information for me.
    Yes, before restoring the DB, I used oraBRCopy tool to generate CONTROL.SQL and CONTROL.TRC file. But I didn't execute CONTROL.SQL after that. I'd like to know which timepoint should I execute it to generate the new control file? (file directory had already been corrected within CONTROL.SQL). is it before doing step 7: open database and post-processing, I should open a new command windows to enter SQLPlus to execute CONTROL.SQL? I tried to do this:
    SQL>conn / as sysdba
    Connected to an idle instance.
    SQL>@C:\CONTROL.SQL
    Oracle instance started
    Total system global area xxx bytes
    Fixed size xxx
    varianble size xxx
    Control file created.
    SQL>alter database open;
    alter database open
    Error at line 1
    ORA-01589 must use RESETLOGS or NORESETLOGS option for database open.
    SQL>alter databse open resetlogs;
    Error at line 1
    ORA-01092: oracle instance terminated.Disconnected forced.
    Strange thing is, in my last trial, when I execute step 7: open database and post processing, BRRECOVER gives me two sub options:
    1 ~ Reset logs option (reset_logs) ..[resetlogs]
    2 * Open databse command (command) .[alter database open resetlogs]
    the final result is:
    ORA-01139: Resetlogs option only valid after and incomplete database recovery.
    I am not familiar with oracle db and is totally confused/frastrated now... Please kindly help.
    Thank you very much
    Freshman

  • Database Recovery Scripts

    Does anyone have a set of database recovery scripts for various scenarios for 8i and 9i databases running on Windows 2000 and 2003?
    Cheers,
    Derek.

    >>
    We do a cold backup each night and have archive on. The scenarios are any that may occur i.e., media failure, dropped tables, lost control files etc.
    >>
    Hey Derek, the problem with cold backup is incase of media recovery required, you can't simply resotre the datafile/s which have/has problems. You need to restore complete database.
    Its difficult to have incomplete reocvery or point-in-time recovery having cold backups.
    I strongly recommend you start thinking about online backups. You need to assess your business requirements, and much you can efforts to loose?
    jaffar

  • Troublesho​oting System Recovery Problems

    A System Recovery is a useful tool to return your Windows 8 tablet back to factory defaults. However, what do you do when the System Recovery isn't working!?
    A full System Recovery can be a lengthy process as there is a lot of data being transferred. Patience is the key, as a full Recovery can take two to four hours to complete.
    For more information check out HP's Troubleshooting HP System Recovery Problems for Windows 8. This document will help you get your Windows 8 tablet back up and running.
    TIP: If you are planning on using the System Recovery make sure that you do not change or delete the HP Recovery Partition as that will make all but impossible to Restore your tablet using the HP Recovery Manager.
    Please click “Accept as Solution ” if you feel my post solved your issue.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Thank you,
    BHK6
    I work on behalf of HP

    Have you created this disc on your own or you use original toshiba disc?
    Do you use it for the first time?

  • Questions About Database Recovery (-30975)

    Hello,
    In Berkeley 4.5.20, we are seeing the following error sporadically, but more frequently than we'd like (which is, to say, not at all): "BerkeleyDbErrno=-30975 - DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery"
    This exception is being thrown mostly, if not exclusively, during the environment open call. Still investigating.
    I will post my environment below, but first some questions.
    1. How often should a database become become corrupt?
    2. What are the causes of this corruption? Can they be caused by "chance?" (I.e. app is properly coded.) Can they be caused by improper coding? If so, is there a list of common things to check?
    3. Does Oracle expect application developers to create their own recovery handlers, especially for apps that require 100% uptime? E.g. using DB_ENV->set_event_notify or filtering on DB_RUNRECOVERY.
    Our environment:
    Windows Server 2003 SP2
    Berkeley DB 4.5.20
    set_verbose(DB_VERB_WAITSFOR, 1);
    set_cachesize(0, 65536 * 1024, 1);
    set_lg_max(10000000);
    set_lk_detect(DB_LOCK_YOUNGEST);
    set_timeout(60000000, DB_SET_LOCK_TIMEOUT);
    set_timeout(60000000, DB_SET_TXN_TIMEOUT);
    set_tx_max(100000);
    set_flags(DB_TXN_NOSYNC, 1);
    set_flags(DB_LOG_AUTOREMOVE, 1);
    set_lk_max_lockers(10000);
    set_lk_max_locks(10000);
    set_lk_max_objects(10000);
    open(sPath, DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL | DB_THREAD | DB_INIT_TXN | DB_RECOVER, 0);
    set_pagesize     (4096);
    u_int32_t dbOpenFlags = DB_CREATE | DB_AUTO_COMMIT;
    pDbPrimary->open(NULL, strFile, NULL, DB_HASH, dbOpenFlags, 0);
    We also have a number of secondary databases.
    One additional piece of information that might be relevant is that the databases where this happens (we have 8 in total managed by our process,) seem to be the two specific databases that at times aren't opened until well after the process is up and running due to the nature of their data. This is to say that 6 of the other databases are normally opened during startup of our service. We are still investigating this to see if this is consistently true.

    Here is the output from the error logs (we didn't have this properly set up until now) when this error opening the environment happens:
    12/17/2007 17:18:12 (e64/518) 1024: Berkeley Error: CDbBerkeley MapViewOfFile: Not enough storage is available to process this command.
    12/17/2007 17:18:12 (e64/518) 1024: Berkeley Error: CDbBerkeley PANIC: Not enough space
    12/17/2007 17:18:12 (e64/518) 1024: Berkeley Error: CDbBerkeley DeleteFile: C:\xxxxxxxx\Database\xxxJOB_OAT\__db.003: Access is denied.
    12/17/2007 17:18:12 (e64/518) 1024: Berkeley Error: CDbBerkeley MapViewOfFile: Not enough storage is available to process this command.
    12/17/2007 17:18:12 (e64/518) 1024: Berkeley Error: CDbBerkeley PANIC: Not enough space
    12/17/2007 17:18:12 (e64/518) 1024: Berkeley Error: CDbBerkeley PANIC: DB_RUNRECOVERY: Fatal error, run database recovery
    12/17/2007 17:18:30 (e64/518) 1024: Berkeley Error: CDbBerkeley unable to join the environment
    12/17/2007 17:18:30 (e64/518) 1024: Berkeley Error: CDbBerkeley DeleteFile: C:\xxxxxxxx\Database\xxxJOB_OAT\__db.003.del.0547204268: Access is denied.
    12/17/2007 17:18:30 (e64/518) 1024: Berkeley Error: CDbBerkeley DeleteFile: C:\xxxxxxxx\Database\xxxJOB_OAT\__db.003: Access is denied.
    12/17/2007 17:19:18 (e64/518) 1024: Database EInitialize failed. (C:\xxxxxxxx\Database\xxxJOB_OAT: BerkeleyDbErrno=-30975 - DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery)
    The last line is generated by a DbException and was all we were seeing up until now.
    I also set_verbose(DB_VERB_RECOVERY, 1) and set_msgcall to the same log file. We get verbose messages on the 1st 7 database files that open successfully, but none from the last one, I assume because they output to set_errcall instead.
    There is 67GB of free space on this disk by the way, so not sure what "Not enough space" means.
    Thanks again for your help.

  • Database termination Problem

    Hi every body ..plz help me on this..
    We are facing database termination problem in ECC6 production syste.
    Database: Oracle 10.2, O/S: Windows 2003. Spam  :27, SP level 13.
    Error is:
    Errors in file f:\oracle\p02\saptrace\background\p02_ckpt_6520.trc:
    ORA-00206: error in writing (block 3, # blocks 1) of control file
    ORA-00202: control file: 'D:\ORACLE\P02\ORIGLOGB\CNTRL\CNTRLP02.DBF'
    ORA-27072: File I/O error
    OSD-04008: WriteFile() failure, unable to write to file
    O/S-Error: (OS 33) The process cannot access the file because another process has locked a portion of the file.
    When we are performing backup then data base termination occuring freequently.
    Give right solution as early as possible.
    Thanks,
    Nani.

    Hi,
    Have a look at below snote which actually speaks about the oracle error codes
    Snote :  546006
    within the Snote it says :-
    " If you cannot access a database file (for instance a data file, control file or RedoLog) for whatever reason, an ORA-270xx appears. The actual cause comes from additional error messages (usually in the operating system) that occur on ORA-270xx. "
    And as per your last update
    " ORA-00206: error in writing (block 3, # blocks 1) of control file
    ORA-00202: control file: 'D:\ORACLE\P02\ORIGLOGB\CNTRL\CNTRLP02.DBF' "
    i think there is problem accessing the database control file. Hence you  are facing the above problem.
    I think if you recreate your control file i think, it should resolve the problem.
    Hope it will be helpful to resolve your problem.
    Rgds
    Radhakrishna D S

  • Oracle 10g Database startup problem Please help

    i am trying to start database but getting error;
    SQL> startup
    ORACLE instance started.
    Total System Global Area 281018368 bytes
    Fixed Size 788776 bytes
    Variable Size 229373656 bytes
    Database Buffers 50331648 bytes
    Redo Buffers 524288 bytes
    Database mounted.
    ORA-16038: log 2 sequence# 44103 cannot be archived
    ORA-19809: limit exceeded for recovery files
    ORA-00312: online log 2 thread 1: 'D:\ORADATA\ASDB\REDO02.LOG'
    Please guide and help
    Thanks,
    Waheed.

    The error stack is interpreted as follows:
    ORA-16038:     log string sequence# string cannot be archived
    Cause:     An attempt was made to archive the named file, but the file could not be archived. Examine the secondary error messages to determine the cause of the error.
    Action:     No action is required
    ORA-19809:     limit exceeded for recovery files
    Cause:     The limit for recovery files specified by the DB_RECOVERY_FILE_DEST_SIZE was exceeded.
    Action:     The error is accompanied by 19804. See message 19804 for further details.
    ORA-19804:     cannot reclaim string bytes disk space from string limit
    Cause:     Oracle cannot reclaim disk space of specified bytes from the DB_RECOVERY_FILE_DEST_SIZE limit.
    Action:     There are five possible solutions: 1) Take frequent backup of recovery area using RMAN. 2) Consider changing RMAN retention policy. 3) Consider changing RMAN archivelog deletion policy. 4) Add disk space and increase DB_RECOVERY_FILE_DEST_SIZE. 5) Delete files from recovery area using RMAN.
    ORA-00312:     online log string thread string: 'string'
    Cause:     This message reports the filename for details of another message.
    Action:     Other messages will accompany this message. See the associated messages for the appropriate action to take.
    DB_RECOVERY_FILE_DEST_SIZE specifies (in bytes) the hard limit on the total space to be used by target database recovery files created in the flash recovery area. You should increase this value.
    On the other hand, out from the context I guessed it is a 10gRx database, but you should specify this on your thread, as well as specify os details.
    ~ Madrid

  • Immediate HELP in Tomcat 5 to Postgresql 7.4 database connectivity problem

    Hi,
    I failed to connect Tomcat 5.0.24 with Postgresql
    7.4.2. The files created by me and the changes i had
    made in the existing files are rates.jsp,
    conversionDAO.java, web.xml and server.xml. The error
    message on the top of the rest of it was "The value of
    useBean class attribute converter.conversionDAO is
    invalid". So far I found out that the coding for
    database connectivity purpose in conversionDAO.java
    cause the error. Another thing is Postgresql jdbc
    driver is required to set in the CLASSPATH for the
    java file to access the Postgresql database. I don't
    know where should I put it in Tomcat for web
    application. Anyway, I put it in
    $CATALINA_HOME/shared/lib according the book i
    refered. I do the database connectivity coding refer
    to the Tomcat Kick Start book from Sams Publishing.
    Below are the coding involved, please show me the
    mistake i had made. Thank you.
    ----server.xml----
    <Context path="/database"
    docBase="${catalina.home}/webapps/database" debug="0"
    reload="true">
    <ResourceParams name="jdbc/conversion">
    <parameter>
    <name>username</name>
    <value>myusername</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>mypassword</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>org.postgresql.Driver</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:postgresql://localhost/conversion</value>
    </parameter>
    </ResourceParams>
    </Context>
    ----web.xml----
    <servlet>
    <servlet-name>conversionDAO</servlet-name>
    <servlet-class>converters.conversionDAO</servlet-class>
    </servlet>
    <resource-ref>
    <res-ref-name>jdbc/conversion</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    ----conversionDAO.java----
    public conversionDAO() throws SQLException,
    NamingException
    Context init = new InitialContext();
    Context ctx = (Context)
    init.lookup("java:comp/env");
    DataSource ds = (DataSource)
    ctx.lookup("jdbc/conversion");
    con = ds.getConnection();
    select = con.prepareStatement(
    "SELECT rate FROM Exchange WHERE src= ? AND dst =

    Immediate HELP in Tomcat 5 to Postgresql 7.4 database connectivity problem (cont.)
    Errors log
    2004-06-06 01:07:53 StandardContext[servlets-examples]SessionListener: contextDestroyed()
    2004-06-06 01:07:53 StandardContext[servlets-examples]ContextListener: contextDestroyed()
    2004-06-06 01:07:53 StandardContext[jsp-examples]SessionListener: contextDestroyed()
    2004-06-06 01:07:53 StandardContext[jsp-examples]ContextListener: contextDestroyed()
    2004-06-06 01:07:59 StandardContext[balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
    2004-06-06 01:08:00 StandardContext[jsp-examples]ContextListener: contextInitialized()
    2004-06-06 01:08:00 StandardContext[jsp-examples]SessionListener: contextInitialized()
    2004-06-06 01:08:00 StandardContext[servlets-examples]ContextListener: contextInitialized()
    2004-06-06 01:08:00 StandardContext[servlets-examples]SessionListener: contextInitialized()
    2004-06-06 01:08:01 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: /rates/rates.jsp(5,0) The value for the useBean class attribute converters.conversionDAO is invalid.
         at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:357)
         at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:141)
         at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1217)
         at org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
         at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
         at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
         at org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
         at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         at org.apache.jasper.compiler.Generator.generate(Generator.java:3261)
         at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:244)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:422)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:507)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:274)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    ----more----

  • "Fatal error, run database recovery " when there are no txns to recover.

    Hi, all.
    I have a DB file containing multiple databases. Without using DBEnvironments, I can open it to get the dbnames. I can open the databases RDONLY,
    and see that their contents are correct. I can open them RW, and everything works.
    But when I try to create a new one, I get this:
    D = bsddb3.db.DB()
    D.open('test.db',dbname='test',dbtype=B.DB_BTREE,flags=B.DB_CREATE)Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    bsddb3.db.DBRunRecoveryError: (-30974, 'DB_RUNRECOVERY: Fatal error, run database recovery -- PANIC: fatal region error detected; run recovery')
    Note that this is in the non-transactional case. There is no Env, and there are no logfiles or __db files. So the error code mystifies me.
    Strace shows that the file is opened RW, and read through.
    B.DB_VERSION_STRING'Berkeley DB 4.8.24: (August 14, 2009)'
    >>>
    So, where to proceed? Many thanks for any and all help.

    Hmm. Other thing to note:
    [tradedesk@vader 2010-05-06.test]$ /usr/local/BerkeleyDB.4.8/bin/db_verify foo.db
    db_verify: Subdatabase entry references page 266 of invalid type 13
    db_verify: Page 0: non-invalid page 40 on free list
    db_verify: trading.db: DB_VERIFY_BAD: Database verification failed
    Not sure how that came about or how to prevent it, but it might have to do wit this issue.

  • Database configuring problem in setup of managed systems in SMD

    Hello,
    i'm doing the setup of a CRM 5.0 in SMD Abap+Java and the setup results returns following:
    "Database configuration problem"  with the exception:
    java.lang.NullPointerException
         at com.sap.smd.server.manager.SMDPluginProperties.setProperty(SMDPluginProperties.java:114)
         at com.sap.smd.agent.plugins.database.ConfigurationTask.configureCustomProperties(ConfigurationTask.java:242)
         at com.sap.smd.agent.plugins.database.ConfigurationTask.configureProperties(ConfigurationTask.java:370)
         at com.sap.smd.agent.plugins.database.ConfigurationTask.execute(ConfigurationTask.java:124)
         at com.sap.sup.admin.setup.AppCfgTasks.configureDbApp(AppCfgTasks.java:115)
         at com.sap.sup.admin.setup.SetupStep.execute(SetupStep.java:202)
         at com.sap.smd.agent.plugins.remotesetup.SapInstance.setup(SapInstance.java:217)
         at com.sap.sup.admin.setup.SapCluster.setup(SapCluster.java:461)
         at com.sap.sup.admin.setup.SapCluster.access$000(SapCluster.java:26)
         at com.sap.sup.admin.setup.SapCluster$SetupRunner.run(SapCluster.java:669)
         at java.lang.Thread.run(Thread.java:534)
    Anybody knows which can be the problem?
    Thanks a lot
    Carlos

    Hi Shriraj,
    ensure that the installation path is correct. I only put /urs/sap/<SID> and you must put /usr/sap/<SID>/DV***/.
    In my case with that the setup returns all in green.
    I hope it helps you
    Regards
    Carlos

  • SIMPLE Database Design Problem !

    Mapping is a big problem for many complex applications.
    So what happens if we put all the tables into one table called ENTITY?
    I have more than 300 attributeTypes.And there will be lots of null values in the records of that single table as every entityType uses the same table.
    Other than wasting space if I put a clustered index on my entityType coloumn in that table.What kind of performance penalties to I get?
    Definition of the table
    ENTITY
    EntityID > uniqueidentifier
    EntityType > Tells the entityTypeName
    Name >
    LastName >
    CompanyName > 300 attributeTypes
    OppurtunityPeriod >
    PS:There is also another table called RELATION that points the relations between entities.

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    check the coloumn with WHERE _entityType='PERSON'
    as there is is clustered index on entityType...there
    is NO performance decrease.
    there is also a clustered index on RELATION table on
    relationType
    when we say WHERE _entityType ='PERSON' or
    WHERE relationType='CONTACTMECHANISM'.
    it scans the clustered index first.it acts like a
    table as it is physically ordered.I was thinking in terms of using several conditions in the same select, such as
    WHERE _entityType ='PERSON'
      AND LastName LIKE 'A%' In your case you have to use at least two indices, and since your clustered index comes first ...
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Have you ever thought of using constraints in your
    modell? How would you realize those?
    ...in fact we did.We have arranged the generic object
    model in an object database.The knowledge information
    is held in the object database.So your relational database is used only as a "simple" storage, everything has go through your object database.
    But the data schema is held in the RDBMS with code
    generation that creates a schema to hold data.If you think that this approach makes sense, why not.
    But in able to have a efficent mapping and a good
    performance we have thought about building only one
    table.The problem is we know we are losing some space
    but the thing is harddisk is much cheaper than RAM
    and CPU.So our trade off concerated on the storage
    cost.But I still wonder if there is a point that I
    have missed in terms performance?Just test your approach by using sufficiently data - only you know how many records you have to store in your modell.
    PS: it is not wise effective using generic object
    models also in object databases as CPU cost is a lot
    when u are holding the data.I don't know if I'd have taken your approach - using two database systems to hold data and business logic.
    PS2: RDBMS is a value based system where object
    databases are identity based.we are trying to be in
    the gray area of both worlds.Like I wrote: if your approach works and scales to the required size, why not? I would assume that you did a load test with your approach.
    What I would question though is that your discussing a "SIMPLE Database Design" problem. I don't see anything simple in your approach when it comes to implementation.
    C.

  • Database connection problem when i try store the values in JTable

    Hi Sir,
    I have a database connection problem when i try to store the data's in a JTable.I think the problem is with in the database connection.I have used 3 vectors here.The database which i have used is
    Access.Where the program is compiling well.But when i run it only the first column heading is printed and error message showing that
    "Invalid Cursor State".I need to solve this problem.pls. do help me.
    I will provide u with the code.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.util.*;
    import java.sql.*;
    public class DataBaseVector extends JPanel
    //Container contentPane=getContentPane();
    JScrollBar jsb = new JScrollBar(JScrollBar.HORIZONTAL);
    JScrollBar jsb1 = new JScrollBar(JScrollBar.VERTICAL);
    Image i1;
    String url="jdbc:odbc:Ananth";
    Vector col=new Vector();
    Vector rows=new Vector();
    Vector rdata=new Vector();
    Connection conn;
    public DataBaseVector()
    //super("JTable With ScrollBars");
    this.setLayout(new BorderLayout());
    UIManager.put("ScrollBar.track",Color.red);
    UIManager.put("ScrollBar.thumb",Color.blue);
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    conn=DriverManager.getConnection(url); // Is there any problem here?
    Statement st=conn.createStatement();
    ResultSet rs=st.executeQuery("Select * from AccountMaster");
    // rs is the result set obtained
    ResultSetMetaData rsmd=rs.getMetaData();
    int cols=rsmd.getColumnCount();
    for(int i=1;i<=cols;i++)
    col.addElement(rsmd.getColumnName(i));
    rdata.addElement(rs.getString(i));
    rows.addElement(rdata);
    }catch(Exception e)
         System.out.println("The Error Message was:"+e.getMessage());
    JTable jt=new JTable(rows,col);
    int v=ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED;
    int h=ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED;
    JScrollPane jsp=new JScrollPane(jt,v,h);
    this.add(jsp,BorderLayout.CENTER);
    this.add(jsb, BorderLayout.SOUTH);
    this.add(jsb1, BorderLayout.EAST);
    public static void main(String args[])
    JFrame jf=new JFrame();
    JPanel frame=new DataBaseVector();
    jf.getContentPane().add(frame);
    jf.setSize(800,600);
    jf.setVisible(true);
    Thanx,
    m.ananthu

    The problem is ResultSet.next() is not called.
    Try this and modify the table creation as you need.
    ResultSetMetaData rsmd=rs.getMetaData();
    int cols=rsmd.getColumnCount();
         while(rs.next()) {
              for(int i=1;i<=cols;i++)
                        col.addElement(rsmd.getColumnName(i));
                        rdata.addElement(rs.getString(i));
              rows.addElement(rdata);
    Hope this helps

Maybe you are looking for