Instances where the control file needs to be backed up
Oracle Version --> 11G
Control file needs to backed up
1. When you add or rename datafiles
2. Add or Drop redo log members
3. Dropping tablespaces
4. After any ALTER DATABASE commandAre there any more instances where we have to backup the control file?
T.Boyd wrote:
Oracle Version --> 11G
Control file needs to backed up
1. When you add or rename datafiles
2. Add or Drop redo log members
3. Dropping tablespaces
4. After any ALTER DATABASE commandAre there any more instances where we have to backup the control file?Anything that actually updates the control file. like maybe taking a backup with rman?
"set controlfile autoback on" is your friend.
"set it and forget it."
Similar Messages
-
SAP data extraction mapping, where the JCO files need to be copied?
Hi All,
I have the following environment.
OWB client: Windows7
OWB server: Linux x86_64
SAP Server: Windows Server 2003
I need to create OWB mapping to extract data from SAP to Oracle target.
Please let me know what are the JCO files required and where do i need to copy them?
Do i need to copy them on both the owb client and server or is it enough to copy them on the client machine alone?
Thanks and Regards,
Pnreddy.OWB client isn't supported on Windows 64-bit, just wanted to let you know since you mentioned Windows 7..
For the windows you will require 3 files sapjcorfc.dll, librfc32.dll and sapjco.jar. You can get them from the SAP install cd or download them from http://service.sap.com/connectors for your SAP version. You will need to have a SAPnet account to do that.
You can place the files sapjcorfc.dll and sapjco.jar in OWB_HOME\owb\lib\int, and librfc32.dll in OWB_HOME\owb\bin and also set the PATH to reference this directories.
For linux you will need librfcccm.so, libsapjcorfc.so and sapjco.jar. Also set the LD_LIBRARY_PATH to reference these files locations.
If you are only extracting metadata from SAP then you need it only on the OWB client but if you plan to execute ABAP programs on the SAP system you will need to set it up on the server side. -
Need help in writing the control file for SQLLOADER
Is it possible to error out the Sqlloader in case the data fields in the data file for a row are more than the fields stated in the control file?
i.e. My data file is something like
aaa,bbb,cc
dd,eee
And my ctl file has just 2 columns in it. Is it possible to write a control file which will cause the Sqlloader to error out?
Thanks...Nisha,
Again I posted test example in your other post but here is how can do that
CREATE TABLE mytest111 (
col1 NUMBER,
col2 NUMBER,
col3 NUMBER
LOAD DATA
TRUNCATE INTO TABLE MYTEST111
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
col1 integer external,
col2 integer external
#mytest.dat
1,2,3
1,2
SQL*Loader: Release 10.2.0.1.0 - Production on Fri Apr 10 11:40:39 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Control File: mytest.ctl
Data File: mytest.dat
Bad File: mytest.bad
Discard File: none specified
(Allow all discards)
Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array: 64 rows, maximum of 256000 bytes
Continuation: none specified
Path used: Conventional
Table USIUSER.MYTEST111, loaded from every logical record.
Insert option in effect for this table: TRUNCATE
TRAILING NULLCOLS option in effect
Column Name Position Len Term Encl Datatype
COL1 FIRST * , O(") CHARACTER
COL2 NEXT * , O(") CHARACTER
Table MYTEST111:
2 Rows successfully loaded.
0 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
Space allocated for bind array: 33024 bytes(64 rows)
Read buffer bytes: 1048576
Total logical records skipped: 0
Total logical records read: 2
Total logical records rejected: 0
Total logical records discarded: 0
Run began on Fri Apr 10 11:40:39 2009
Run ended on Fri Apr 10 11:40:40 2009
Elapsed time was: 00:00:00.99
CPU time was: 00:00:00.06
{code}
Regards -
Relocate SYSTEM TS and edit the control file in oracle10g !
Friends ,
I want to change my SYSTEM and SYSAUX tablespace's lcation as well as rename the filename in oracle10g database . is it possible to do ?
And also I want to edit the control file and rebuild a new controlfile . is it possible ?
Plz inform me ....
Waiting for ur reply ......Here below I just rename the file (with host command line), but the Oracle commands are exactly same if you move the files.
SQL> select file_name from dba_data_files where tablespace_name in ('SYSTEM','SYSAUX');
FILE_NAME
/data/oracle/cdev10/system01.dbf
/data/oracle/cdev10/sysaux01.dbf
SQL> startup force mount
ORACLE instance started.
Total System Global Area 1002438656 bytes
Fixed Size 2088832 bytes
Variable Size 469762176 bytes
Database Buffers 507510784 bytes
Redo Buffers 23076864 bytes
Database mounted.
SQL> !mv /data/oracle/cdev10/system01.dbf /data/oracle/cdev10/system_01.dbf
SQL> !mv /data/oracle/cdev10/sysaux01.dbf /data/oracle/cdev10/sysaux_01.dbf
SQL> alter database rename file '/data/oracle/cdev10/system01.dbf' to '/data/oracle/cdev10/system_01.dbf';
Database altered.
SQL> alter database rename file '/data/oracle/cdev10/sysaux01.dbf' to '/data/oracle/cdev10/sysaux_01.dbf';
Database altered.
SQL> alter database open;
Database altered.
SQL> select file_name from dba_data_files where tablespace_name in ('SYSTEM','SYSAUX');
FILE_NAME
/data/oracle/cdev10/system_01.dbf
/data/oracle/cdev10/sysaux_01.dbf
SQL>What's the need to rebuild the ctlfile ?
Nicolas. -
Restore - filename for datafile is missing in the control file
I am practicing RMAN recovery procedures and I encountered a problem that I do not know how to solve.
1) I took a hot backup of my test database.
2) Create tablespace TS_DATA_TEMP
3) Deleted tablespace TS_DATA which had 2 datafiles
4) Created tablespace TS_DATA with 1 datafile
5) shutdown database
6) logged into RMAN in nomount
7) restore controlfile from autobackup;
8) alter database mount;
9) restore database;
RMAN> restore database;
Starting restore at 22-AUG-08
using channel ORA_DISK_1
the filename for datafile 5 is missing in the control file
skipping datafile 1; already restored to file /u02/oradata/EDM91/system01.dbf
skipping datafile 2; already restored to file /u02/oradata/EDM91/undotbs01.dbf
skipping datafile 6; already restored to file /u02/oradata/EDM91/index
skipping datafile 3; already restored to file /u02/oradata/EDM91/sysaux01.dbf
skipping datafile 7; already restored to file /u03/oradata/EDM91/TS_INDEX01.dbf
skipping datafile 9; already restored to file /u03/oradata/EDM91/TS_LOB01.dbf
skipping datafile 4; already restored to file /u02/oradata/EDM91/users01.dbf
restore not done; all files readonly, offline, or already restored
Finished restore at 22-AUG-08
10) tried to recover
Starting recover at 22-AUG-08
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 08/22/2008 15:04:22
RMAN-06094: datafile 5 must be restored
SQL> select name from v$datafile where file#=5;
NAME
/u04/oradata/EDM91/TS_DATA.dbf
12) alter database backup controlfile to trace
DATAFILE
'/u02/oradata/EDM91/system01.dbf',
'/u02/oradata/EDM91/undotbs01.dbf',
'/u02/oradata/EDM91/sysaux01.dbf',
'/u02/oradata/EDM91/users01.dbf',
'/u04/oradata/EDM91/TS_DATA.dbf',
'/u02/oradata/EDM91/index',
'/u03/oradata/EDM91/TS_INDEX01.dbf',
'/u04/oradata/EDM91/TS_DATA02.dbf',
'/u03/oradata/EDM91/TS_LOB01.dbf'
CHARACTER SET UTF8
So i'm not sure what the problem is. Datafile TS_DATA.dbf is located in the control file but i'm getting the error: the filename for datafile 5 is missing in the control file.
Suggestions on what's wrong with the control file?I found my mistake; a newbie error.
I did not know I needed to include in my restore command the 'until' option when doing incomplete recovery. I only included the 'until' option in the recover command:
original command
restore database;
recover database until sequence =123;
should be
restore database until sequence = 123;
recover database until sequence =123;
I usually run the command using a RUN block with a SET UNTIL SEQUENCE but this case I used the single commands separately.
RUN
+{+
SET UNTIL sequence 123;
RESTORE DATABASE;
RECOVER DATABASE;
+}+ -
In case of a DB crash what happens to the status of the Control File
When a DB is crashed will the Control file that exists in the OS also get corrupted, What happens to the Data Files , how to recover the Control files and Data Files , the DB in case there isn't any Backup media or any Dump available on the DB.
The only one way to recover a database is to be in archivelog mode.
And if I said about recover stricto sensu, that's because even in noarchivelog mode we need to use the command recover until cancel before an open with resetlogs option, even if we haven't any redo/archive logs. That fake a recover, this is what we say a mimic recover. Which is not a recover stricto sensu like it can be the case with archivelog mode.
Nicolas. -
Prevent Instance Shutdown When Control File Can't Be Written To
Our instance keeps shutting down when the system's backup utility backs up the control file (and once an index file) and locks the file. This also occurs when virus scanning. I was wondering if there was a parameter to set to have DB Writer try more than once to write to a file before aborting (and shutting down our instance).
Any help would be appreciated.
Thanks in advance.Referring to the iPod Classic manual at:
http://manuals.info.apple.com/MANUALS/1000/MA1195/en_US/iPod_classic_160GB_User_ Guide.pdf
Several questions come to mind (p. 18):
Have you synced this iPod previously? If not, did you get the Setup Assistant to appear?
Are you trying to add content automatically or manually? -
SQL Loader: refer datafile name in the control file
Hi All:
Database: 10GR2
I have a table as following:
test (
filename varchar2(100),
mydata varchar2(1000)
I am using sql loader to populate data for this table. I also need store the datafile name to column test.filename as part of dataload. How to refer datafile name in the control file?
Again, I am processing multiple files in a batch mode. I need store datafile name in filename column so that I can know which "mydata" come from which datafile.
Thanks in advance!
KevinAs Bravid says, you can't do that from within SQL*Loader, unless the control files are dynamically generated by a script and the filename included as the default value for that particular column as a hardcoded literal.
It's easier if you use external tables as the table definition contains the "location" which is the list of filenames it is accessing, and the value can be queried as well as being dynamically changed (though if you're dynamically changing it, then you'll programatically know the filename anyway. hint hint!)
;) -
FMS - change directory where the log files are located?
I want to change the logs files directory from:
C:\Program Files (x86)\Adobe\Flash Media Server 3.5/logs
to:
D:\fmsLogs
Please halp me to understand...
in adobe in:
Home / Flash Media Server 3.5 Configuration and Administration Guide / XML configuration files reference
it says:
in Logger.xml in Directory
Specifies the directory where the log files are located.
By default, the log files are located in the logs directory in the server installation directory.
Example:
<Directory>${LOGGER.LOGDIR}</Directory>
what this meens: ${LOGGER.LOGDIR} ?
in order to change the logs files directory from:
C:\Program Files (x86)\Adobe\Flash Media Server 3.5/logs
to:
D:\fmsLogs
do i need to write this:
<Directory>D:\fmsLogs</Directory>
or what do i neet to write?
it is totaly not understandable from this example...
big thanks for any halp
cheinanYou can change LOGGER.LOGDIR in fms.ini to your preferred location i.e. D:\fmsLogs and restart FMS.
Now if you want to change for individual logs - you can change in Logger.xml - by default logger.xml will use value from fms.ini -
Solaris 9 Oracle 9i
If one has got 2 sets of the control file eg control01, control02. can one delete one set if one needs space desperately and have a backup copy somewhere?
Thanx.NPD wrote:
so this means it can be deleted if one wants toIf you could, it is highly not recommanded. You'd go to a not safely situation (imagine you lose the other one for some reason...). Furthermore, controflile are not Giga file size, I'm pretty sure you'll gain almost peanuts of space by removing a controlfile.
Nicolas. -
alter database backup controlfile to trace;
How do I re create the control file using what's in trace(Oracle 9i Solaris 9)
Thanx.See Note 1012929.6 How to Recreate the Controlfile, the trace contains the syntax to recreate the controlfile, you can copy the contents to a sql file such as newctl.sql, edit the contents removing the header and make other changes such as increasing maxlogfiles, then run the sql file.
HTH
Enrique
PS Why do you need to rebuild the controlfile? -
How can i validate the data in the control file?
Consider that the SQLLoader reads the Input data File from the path and it loads the data into the tables based up on the descrition specified in the control File.
First, the table to be filled is created:
create table sql_loader_1 ( load_time date, field_1 Numeric, field_2 varchar2(10)
Sample Control File :
load_1.ctl
load data
infile 'load_1.dat' "str '\r\n'"
insert into table sql_loader_1
load_time sysdate,
field_2 position( 1:10),
field_1 position(11:20)
Note that the positions 11 through 20 are loaded into field_1 and positions 1 through 10 into field_2. The field load_time is filled with the current time (sysdate) of the load.
Here's the data. The name of the file (load_1.dat) had been specified with the infile statement in the control file.
load_1.dat
0123456789abcdefghij
foo bar
here comes a very long line
and the next is
short
Here i want to validate the field_1 (Numeric Datatype) since the data file contains the character value (i.e)abcdefghijGood question for this forum:
Export/Import/SQL Loader & External Tables
Werner -
Can I set an mx control property globaly for all instances of the control.
Is there a way of setting the value of a variable on a control for all instances of the control in the application?
For example, I have several instances of an mx:Label and I want to change the enabled property for all instances at once rather than refer to each one individually by id.One way is to subclass Button and change its enabled getter to watch some static property. You don’t really want to change Button itself because Buttons exist in lots of places like ScrollBars.
-
Restore from OSB. RMAN-06024: no backup or copy of the control file found
I backed up controlfile for standby on production server to OSB media:
-bash-3.00$ rman target / catalog rman/rman@emgc
Recovery Manager: Release 10.2.0.5.0 - Production on Tue Jan 25 15:15:33 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: EMGC (DBID=1838014073)
connected to recovery catalog database
RMAN>
RMAN> CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;
RUN
ALLOCATE CHANNEL ch1 DEVICE TYPE 'SBT_TAPE';
BACKUP CURRENT CONTROLFILE FOR STANDBY tag 'stb_ctl';
RELEASE CHANNEL ch1;
CONFIGURE DEVICE TYPE 'SBT_TAPE' CLEAR;
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
RMAN> 2> 3> 4> 5> 6>
allocated channel: ch1
channel ch1: sid=1085 devtype=SBT_TAPE
channel ch1: Oracle Secure Backup
Starting backup at 25-JAN-11
channel ch1: starting compressed full datafile backupset
channel ch1: specifying datafile(s) in backupset
including standby control file in backupset
channel ch1: starting piece 1 at 25-JAN-11
channel ch1: finished piece 1 at 25-JAN-11
piece handle=1em30ngu_1_1 tag=STB_CTL comment=API Version 2.0,MMS Version 10.3.0.2
channel ch1: backup set complete, elapsed time: 00:00:27
Finished backup at 25-JAN-11
released channel: ch1
RMAN> list backup of controlfile;
old RMAN configuration parameters:
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;
RMAN configuration parameters are successfully reset to default value
starting full resync of recovery catalog
full resync complete
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
1479 Full 512.00K SBT_TAPE 00:00:18 25-JAN-11
BP Key: 1480 Status: AVAILABLE Compressed: YES Tag: STB_CTL
Handle: 1em30ngu_1_1 Media: mf_rman-000003
Standby Control File Included: Ckp SCN: 33567224 Ckp time: 25-JAN-11
RMAN>
On standby server I try to restore this control file but there is some trouble with restore... By the way I can delete that backup piece...
-bash-3.00$ rman target / catalog rman/rman@emgc
Recovery Manager: Release 10.2.0.5.0 - Production on Tue Jan 25 15:34:32 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: emgc (not mounted)
connected to recovery catalog database
RMAN> set DBID=1838014073;
executing command: SET DBID
database name is "EMGC" and DBID is 1838014073
RMAN> RUN
ALLOCATE CHANNEL ch1 DEVICE TYPE 'SBT_TAPE';
crosscheck backup of controlfile;
2> 3> 4> 5>
allocated channel: ch1
channel ch1: sid=1093 devtype=SBT_TAPE
channel ch1: Oracle Secure Backup
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=1em30ngu_1_1 recid=40 stamp=741367328
Crosschecked 1 objects
released channel: ch1
RMAN> list backup of controlfile;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
1479 Full 512.00K SBT_TAPE 00:00:18 25-JAN-11
BP Key: 1480 Status: AVAILABLE Compressed: YES Tag: STB_CTL
Handle: 1em30ngu_1_1 Media: mf_rman-000003
Standby Control File Included: Ckp SCN: 33567224 Ckp time: 25-JAN-11
RMAN> RUN
ALLOCATE CHANNEL ch1 DEVICE TYPE 'SBT_TAPE';
RESTORE CONTROLFILE FROM TAG 'STB_CTL';
2> 3> 4> 5>
allocated channel: ch1
channel ch1: sid=1093 devtype=SBT_TAPE
channel ch1: Oracle Secure Backup
Starting restore at 25-JAN-11
released channel: ch1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 01/25/2011 15:35:20
RMAN-06026: some targets not found - aborting restore
RMAN-06024: no backup or copy of the control file found to restore
RMAN> RUN
ALLOCATE CHANNEL ch1 DEVICE TYPE 'SBT_TAPE';
delete noprompt backup of controlfile;
2> 3> 4> 5>
allocated channel: ch1
channel ch1: sid=1093 devtype=SBT_TAPE
channel ch1: Oracle Secure Backup
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
1480 1479 1 1 AVAILABLE SBT_TAPE 1em30ngu_1_1
deleted backup piece
backup piece handle=1em30ngu_1_1 recid=40 stamp=741367328
Deleted 1 objects
released channel: ch1
RMAN>You cannot specify a tag for a standby control file.
read here
http://download.oracle.com/docs/cd/B10501_01/server.920/a96566/rcmstand.htm#1002594
Edited by: Adigozalov Gurban on Jan 25, 2011 2:14 PM -
How can I find out where the Library files currently used by iTunes are located?
I have had a bit of a nightmare sorting out my iTunes files so I have various versions of Library files all over the place. How can I tell where the Library file that iTunes is currently using is located? In Preferences I can see the Library "Name", but I don't think that is much help. Preferences also shows where my i-Tunes media folder is but not where the Library files are.
Any help greatly appreciated.
JAh, I was assuming you would search in Finder and display some details. All alternative approach is to Option start iTunes and click the Choose option. It should show a file selection box targeted at the folder of the currently active library.
tt2
Maybe you are looking for
-
IOS 8 Photos App - Events Album Sort Order is Screwed
Hi, When I sync my photos (that are grouped into Events) from my Mac iPhoto Library, to my iPhone and view them in the iOS 8 Photos App, all the events are no longer sorted in order - they used to be sorted chronologically in 7.1. To try and find the
-
Hp officejet pro 8500A plus parts number
Hello. I need to find the part number of the part, (or assembly of parts that is available). I have a printer cracked this gear and I just need to fix the printer has been switched on again. Thanks for the reply. Info: one small part I removed so I c
-
Can not set home page it goes back to old one every time I close and reopen.
i change my home page and then after closing and re-opening firefox it goes back to the old home page that it had before, I have had this problem since I went from firefox 3 to 4 to 5, please help.
-
How do i delete an album in photos?
I am trying to delete specific albums from my "photos" application but i cannot find a trash or delete feature. What is the process?
-
Session Variables Won't Persist
Hello all, I'm writing an app for work where a user logs in to a system and then adds and removes entries from a database through a web app. I use session variables to store both the user's login ID and that user's permissions. I get through the logi