I know this question must have been asked several time. I just want to know the many ways in which we can have a DB up and running even if we do not have any backup of control file not even the trace of the same.
We are trying to restore a database to a cold backup DBID.However while our datafiles were backuped up for 6 months retention we found out subsequent delete obsolete command wiped out the Control file related to this backup piece..Now what is left with this backup piece is just datafiles..
Can we still recover the database with a subsequent controlfile autobackup for the same DBID.?
recreate paramater file if you lost init.ora or spfile.ora
STEPS
SQL> startup ORA-01078: failure in processing system parameters LRM-00109: could not open parameter file 'D:ORACLEORA92DATABASEINITGPT2.ORA' How to resolve ORA-01078 with LRM-00109 error?
For resolving these error, you should need to replace init.ora or spfile if you have backup of same files. If you don't have backup then go to alert.log and copy all parameters in one file and save as "init.ora". Modify same init.ora with some parameters which need single quotation mark " ' " like background_dump_dest,controlfiles,db_name and "dispatchers ......)". Connect as sysdba in SQL*Plus and execute command "create spfile from pfile=" or startup pfile or startup.
I have to load data file into a table. And the requirement is as below:
Input Data:
1234|20130815|20130822|This is a test, this is the the part 3456|20130823|20130809|This is a test 3456|20130823|20130809|This is a test 3456|20130823|20130809|This is a test 3456|20130823|20130809|Siva 1234
The data should be inserted only in two rows as below:
When Value in first 3 fields is same, 4th field should be appended to the existing value in table.
1234|20130815|20130822|This is a test, this is the the part 3456|20130823|20130809|This is a testThis is a testThis is a testSiva 1234
is there any way you can get the name of the file loading the table in a control file? i have a table with a column called source_file, and need to populate it during the load.
FYI,I have taken control file backup and DB backup also 6 hour before the control file get corrupted,then there are quite lot of DB structure change, so Now how to recover my control file with the upto time DB state , since the backup was taken for control file 6 hour before the file get corrupted, now how do I revery the DB/control file, step by step with syntax as well.
I am just looking to my control file that I have. I have managed to successfully get my control file to load data into the required tables but just for my learning I was trying to amend the when clause with an and condition but keep getting an error.
My code: OPTIONS (DIRECT=TRUE, ERRORS=0, SKIP=1) load data infile 'A:/My Files/Feeds/20130211/data_summary_1_20131214.txt' "STR ' '"
APPEND into table I_DATA_1 WHEN (RID <> 'RID') fields terminated by "~|~" optionally enclosed by '"' TRAILING NULLCOLS ( RID, S_TIMESTAMP timestamp 'DD-MON-RR HH:MI:SS.FF3 PM' )
the above code works perfectly but if i change the following line:
WHEN (RID <> 'RID' AND 'S_TIMESTAMP' IS NOT NULL)than this gives me an error.
I am receiving errors when trying to load the control file. The errors are as follows:
SQL*Loader-500 Unable to open file (homework.ctl) SQL*Loader-553 file not found SQL*Loader-559 SYstem error: The system cannot find the file specified.
My control file is located directly in the C drive (C:\homework.ctl). The control file contains the following
LOAD DATA INFILE 'c:\country.dat' APPEND INTO TABLE homework fields terminated by ',' optionally encloded by '"' (country, month, day) WHEN (month='April')
load data infile 'C:\Documents and Settings\xxxxx\Desktop\abc.txt' APPEND PRESERVE BLANKS INTO TABLE table1
[code]...
When I run the above control file in sqlldr, I'm getting the error as Record 1: Rejected - Error on table table1, column column3. ORA-01481: invalid number format model
In the table the column3 data type is NUMBER(6,2).: The column size in table is 6 and position of column3 in control file is only 4. Also if possible let me know how the same data (send me 2 dummy records) which exactly works for the above control file especially for column3 where decimal number comes in the flat file.
For generating the flat file, for column3, i'm using LPAD(:value,4,0) in the select query column list.
I have a problem with my control file [URL].........
What I did, I have a duplicate of the database with the invalid control file, let's call it DUMDB. I am using my control file and no recovery-catalog-db.
I recreated the control file. Now everything is working fine, new backups can be taken, restores can be made. I just need to restore a backup tagged with "LASTDEV". The control file for this backup is the invalid one. So I need a restore WITHOUT restoring the control file.
using target database control file instead of recovery catalog
List of Backup Sets =================== BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 1 Full 2.77G DISK 00:00:00 26-AUG-11 BP Key: 1 Status: AVAILABLE Compressed: YES Tag: LASTDEV Piece Name: /u03/flash_recovery_area/DUMDB/backupset/o1_mf_nnndf_LASTDEV_75fmkllw_.bkp
List of Datafiles in backup set 1 =========================== File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 1 Full 63166185 26-AUG-11 /u02/oradata/dumdb/system01.dbf 2 Full 63166185 26-AUG-11 /u02/oradata/dumdb/sysaux01.dbf 3 Full 63166185 26-AUG-11 /u02/oradata/dumdb/undotbs01.dbf 5 Full 63166185 26-AUG-11 /u02/oradata/dumdb/stdtbs01.dbf 6 Full 63166185 26-AUG-11 /u02/oradata/dumdb/users.dbf
CODERMAN> crosscheck backupset 1;
using channel ORA_DISK_1 crosschecked backup piece: found to be 'AVAILABLE' backup piece handle=/u03/flash_recovery_area/DUMDB/backupset/o1_mf_nnndf_LASTDEV_75fmkllw_.bkp RECID=1 STAMP=761603187 Crosschecked 1 objects
RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of restore command at 09/11/2011 20:32:25 RMAN-06026: some targets not found - aborting restore RMAN-06023: no backup or copy of datafile 6 found to restore RMAN-06023: no backup or copy of datafile 5 found to restore RMAN-06023: no backup or copy of datafile 3 found to restore RMAN-06023: no backup or copy of datafile 2 found to restore RMAN-06023: no backup or copy of datafile 1 found to restore
This is exactly the same message if you do "RESTORE DATABASE FROM TAG='NONEXISTENTDUMMYTAGXXXX'" Why can the data files not be found even if they are listed in the backup?
We have a database that is accessed by ArcSDE, a product to modify maps. It uses BLOBs to store those maps.
We ran a load on the server and the response time was slow. By running the following query:
select event, total_waits, time_waited, avg_ms, round(ratio_to_report(time_waited) over () * 100) percent from (select substr(event, 1, 30) event, total_waits, time_waited, round(time_waited_micro / total_waits / 1000, 2) avg_ms from v$system_event where wait_class in ('System I/O') union select 'CPU' event, NULL, value, NULL from v$sysstat where statistic# = 12 order by 3 desc) where rownum <= 10;
ALTER DATABASE OPEN RESETLOGS * ERROR at line 1: ORA-00344: unable to re-create online log 'D:\ORADATA\PROD\REDO01B.ORA' ORA-27040: skgfrcre: create error, unable to create file OSD-04002: unable to open file O/S-Error: (OS 5) Access is denied.
I want to use rman to restore all my control files, I just did a level 0 incremental backup and ran the following script.
rman <<EOF connect target sys/sys@GOLD_AUX connect catalog rman/rman@GOLD_CAT RUN { STARTUP FORCE NOMOUNT; RESTORE CONTROLFILE; ALTER DATABASE MOUNT; ALTER DATABASE OPEN RESETLOGS; } EOF
My control files seem to be put back in the correct spot and suggest a way I can restore only my control files and have everything in sync with my datafiles.
I am trying to create a new controlfile. I used "alter database backup controlfile to trace;" and then I copied and pasted the contents of the trace file into the .sql file. My sql script is
Actually, the name of my database was 'STAR' and I changed it to "FIVESTAR" int this .sql script. Now when I run this script with SQL> @ <path of my sql script>, it gives me the following errors:
ERROR at line 1: ORA-01503: CREATE CONTROLFILE failed ORA-01504: database name 'FIVESTAR' does not match parameter db_name 'STAR'
I'm having a problem with SQL loader and the control file. I want to load a delimited file. The script will eventually be automated where the file name is passed in to the script, it's not a static name.
It's a simple SQL loader Unix script that I have created as follows
I took database backup without "change the controlfile configuration autobackup on".. and unfortunately i deleted my controlfile. Then I tried to restore my controlfile but it gives error,now how can i restore controlfile is there any other way to restore controlfile with aautobackup..
I was doing some R&D on my test machine trying to understand how controlfile works. I started up my db and then deleted (renamed)the controlfiles at OS level. I was expecting the db to shutdown. But it dint. Moreover when i queried select name from v$controlfile; it was still reflecting the old controlfile names. To check if it was still functioning, i created a new tablespace with one file and it also got created without any error.
What i dint understand is how could the db still be running when the control file was'nt there and new tablespace and datafile get created? As i understand, whenever a new file is created, an entry is made in the control file. But when control file dint exist where was the data about new tablespace and datafile written?
I have RMAN backup on TAPE. I need to restore control file for particular date on another host. How do I restore control file to new host for particular date?
EXAMPLE:
4949 Full 11.25M SBT_TAPE 00:01:09 06-AUG-12 BP Key: 4949 Status: AVAILABLE Compressed: NO Tag: TAG20120806T223455 Handle: COTSPRD_c-4007601229-20120806-00 Media: 030256 SPFILE Included: Modification time: 28-MAR-12 SPFILE db_unique_name: COTSPRD Control File Included: Ckp SCN: 237324864 Ckp time: 06-AUG-12
Can I rrun command like : RESTORE CONTROLFILE FROM TAG 'TAG20120806T223455;
I need to clone from tape to another server for particular date.
I encountered error ORA-00338 while performing incomplete database recovery:
ORA-00283: recovery session canceled due to errors ORA-00338: log 3 of thread 1 is more recent than control file ORA-00312: online log 3 thread 1: '+DG_REDO/dbase/onlinelog/group_3.267.814820795' Recovery Manager complete.
I performed this recovery on oracle 10g, ASM database.
1. What are possible causes behind this error ORA-00338 ?
2. This error occurs at the start of media recovery, while RMAN is applying archived logs. So does RMAN apply "online REDO" logs after applying "archived" logs required for recovery or before them ?
3. How does rman come to know that online log 3 is more recent than control file ? How can I get scn of online log & control file in my environment ?
Following are few details related to checkpoint scn/change# info. I found in my environment..Before recovery:
--check that it is in archivelog mode SQL> archive log list
-- the data files that will need to be backup by OS command SQL> select sum(bytes) from dba_data_files; SQL> select name from v$datafile;
-- note archivelog sequence before starting the hot backup (need to back the archivelog generated during the backup) SQL> select thread#, max (sequence#) from v$log group by thread# order by thread#;
-- begin the backup SQL> alter database begin backup;
-- use OS command to copy the datafiles
-- remember to end the backup mode SQL> alter database end backup;
-- archive the current online redo log files SQL> alter system archive log current;
-- REMEBER to note the MAXIMM online-redo sequence number select thread#, max (sequence#)from v$log group by thread# order by thread#;
-- backup the control files SQL> alter database backup controlfile to '/oradump/hbackup/O11R2/controlbk.ctl' reuse;
-- backup any archive-redo logd generated during the backup -- select from the v$archived_log mode -- anything thing that appear under this view is safe to backup as long you don't backup the current archive log file that is being written to.simulated a scenario, if 1 of my multiplex control is damage due to media failure ( i just delete it, seem like i got to shutdown first before i can delete it, using window bases oracle, not too sure linux allow you to delete the control file like this)
To what i understand one can restore a missing control file if you have multiplex it. so I did this :
-- while it is being down, i use OS command to copy a good copy of the control file to the missing controlfile location + name.
-- startup
Total System Global Area 535662592 bytes Fixed Size 1384760 bytes Variable Size 243273416 bytes Database Buffers 285212672 bytes Redo Buffers 5791744 bytes ORA-00214: control file 'C:ORACLEXEAPPORACLEORADATAXERENAME_CONTROL01.DBF' version 9539 inconsistent with file 'C:ORACLEXEAPPORACLEORADATAXERENAME_CONTROL.DBF' version 9533I google abit and it mention ,
[URL]........
> You have tried to move one or more copies of control file at the different location when Oracle database was up and running. You have tried to restore from database backup but your backup has not taken properly. It may taken when database is up and running. Your database or system got corrupt/damaged during updation was in process. >
is the error i got because of 1 of the reason above.
I've recently moved jobs and am doing a lot of the normal things getting familiar with my new company's databases.I was checking through our production backup logs and came across something that looks a little funny. From the last two days backups, I see:
select completion_time, marked_corrupt, media_corrupt, logically_corrupt from v$backup_datafile where controlfile_type = 'B' order by completion_time desc
The 01:40 record will come from our nightly command:
BACKUP INCREMENTAL LEVEL=0 FILESPERSET=20 FORMAT 'full_%d_%t_%s_%p' DATABASE INCLUDE CURRENT CONTROLFILE
The 11AM records will come from the command:
BACKUP INCREMENTAL LEVEL=0 FORMAT 'ctl_%t_%s_%p' CURRENT CONTROLFILE;
(I know backups shouldn't still be running at 11am and we don't need level 0 backups every night, that's a seperate issue I'll be addressing! ) I see there's been a similar entry here in v$backup_datafile for all backups that there's records for. The database is up and running just fine. There are no unusual errors being reported by the database in OEM or the alert log.I tried looking at both our control files (yes, should have 3 - something else I've listed to change!) with dbverify which showed no issues - though I'm not sure if this is designed to work with control files.
If so, how could I confirm whether it's an issue with a specific controlfile (I'm assuming it's not an issue with the backup to tape itself, as it's reporting the same corruption every day)?I'd obviously like to diagnose this now while the db is up and running, rather than at 4am some morning during a crash and finding out my backup control files are no good!
I have a csv file extracted from mainframe which has to be loaded into oracle using sqlldr utility.The numbers are in the format +0000003333, -0000003232.44 etc
I have to convert it to 3333 and -3232.44 and insert into the table.
I have used syntax like
Load file....append into table (t_num expression "to_number(':tnum,'99999.999')")
We're running 10.2.0.4 Database on AIX with no catalog Database.We keep all the backup info in controlfiles only.When we do that backup, we're able to successfully back it up (including archivelogs). But I'm unable to find any records in the controlfiles.
SQL> select * from V$BACKUP_SET;
no rows selected
and
SQL> sho parameter control
NAME TYPE VALUE ------------------------------------ ------------------------------ control_file_record_keep_time integer 14