Alter database backup controfile to trace...
When you run controlfile to trace, it creates following command within trc file
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "ABC" RESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/u01/app/oracle/oradata/abc/redo01.log' SIZE 50M,
GROUP 2 '/u01/app/oracle/oradata/abc/redo02.log' SIZE 50M,
GROUP 3 '/u01/app/oracle/oradata/abc/redo03.log' SIZE 50M
-- STANDBY LOGFILE
DATAFILE
'/u01/app/oracle/oradata/abc/system01.dbf',
'/u01/app/oracle/oradata/abc/undotbs01.dbf',
'/u01/app/oracle/oradata/abc/sysaux01.dbf',
'/u01/app/oracle/oradata/abc/users01.dbf',
'/u01/app/oracle/oradata/abc/user_test.dbf'
CHARACTER SET WE8ISO8859P1 ;
My question is: when you want to use this create controlfile command, how does the database get tablespaces names (eg. system, undo, sysaux... user_test in this cas) automatically. However The Tablespaces names are not specified within the create controlfile comand
I don't have a 9i environment. What do you get when you query
SELECT * FROM V$CONTROLFILE_RECORD_SECTIONFor example, this is what I see in my 10.2.0.3 database :
SQL> select * from v$controlfile_record_section where type = 'TABLESPACE';
TYPE RECORD_SIZE RECORDS_TOTAL RECORDS_USED FIRST_INDEX
LAST_INDEX LAST_RECID
TABLESPACE 68 100 8 0
0 108
SQL>When you issue RECOVER DATABASE commands, the Rollfoward from Redo
is by datafiles, not by tablespaces.
It is only when you OPEN the database that Oracle matches the Tablespace names.
Surely, you do understand that Tablespace names ARE in the Data Dictionary
and so are DataFile names and that Tablespace IDs are the join between the two ?
Message was edited by:
Hemant K Chitale
Similar Messages
-
Concern in using "alter database backup controlfile to trace"
Is there any impact for an online instance by running the alter database backup controlfile to trace command.
Acutally my problem is the MAXLOGHISTORY is reached 65535 so that I would like to fix this problem otherwise my database is very slow.I recommend you top change that parameter re-creating the controlfile:
CREATE CONTROLFILE
Caution:
Oracle recommends that you perform a full backup of all files in the database before using this statement. For more information, see Oracle9i User-Managed Backup and Recovery Guide.
Purpose
Use the CREATE CONTROLFILE statement to re-create a control file in one of the following cases:
All copies of your existing control files have been lost through media failure.
You want to change the name of the database.
You want to change the maximum number of redo log file groups, redo log file members, archived redo log files, datafiles, or instances that can concurrently have the database mounted and open.
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_54a.htm#SQLRF01203
Joel Pérez
http://otn.oracle.com/experts -
Can't do ALTER DATABASE BACKUP CONTROLFILE
when I do:
ALTER DATABASE BACKUP CONTROLFILE TO '/export/home/user1/contrlfilesdbb';
i got error messages:
ERROR at line 1:
ORA-01580: error creating control backup file /export/home/user1/contrlfilesdbb
ORA-27038: created file already exists
Additional information: 1
why there is such problem?
Help, please!
thank you.
Message was edited by:
user482717no, you should not change the permission on the actual controlfile! i was re-reading through your post and you are trying to backup your controlfile to a directory name and not a file name. you need to specify the filename you want to backup to, not just the directory.
for example:
alter database backup controlfile to '/export/home/user1/ctrlfilesdbb/bkupctrl.ctl' reuse;
you do know that this is not just a copy of the current control file but a series of scripts that based on your recovery needs can be edited to create a new control file, right? -
I want to format my hard disk. but i want to take a copy of my oracle database
so anyone can please give me the solution for how to take a back up and again how to reload to my new oracle database? if it succeeded is it possible to retain all the schemas of my old database?One way to do this is to take a cole backup
and restore with backup controlfile.
1. alter database backup controlfile to trace
2. find this trace and backup it to another drive
3. shutdown immediate
4. Backup you database files - if you don't know them (issue when db is open select name from v$session) on another drive5. format you r drive
6. restore your files from backup
7. Open trace file and creater a script from it yous copy and paste one of two cases
8. if it is win nt. make an instance oradi,m -NEW -SID db
9. sqlplus /nolog
10. conn / as sysdba
11. startup nomount
12. execute script created in point 7
For more detail instructions please refer to User Managed Backup and Recovery Guide
Best Regards
Krystian Zieja / mob -
Alter database ...
Hi,
alter database backup controlfile to trace
to which trace file the control file is copied ?Is it alert.log in bdump (background dump)?
Is control file backed up to trace automatically or we do need to execute the command ?
if we do need to apply the archive logs then can we backup the control file to trace and start apllying the archive logs?
Thanks,
AUMto which trace file the control file is copied ?The one with most recent timestamp.
Is it alert.log in bdump (background dump)?Not by default
Is control file backed up to trace automatically no
or we do need to execute the command ?There is no "need" to execute the command. DB runs fine without it.
if we do need to apply the archive logsapply logs to WHAT exactly & WHY?
then can we backup the control file to trace and start apllying the archive logs?no
the file that results is a text file.
What problem are you actually trying to solve.
I suggest you spend some time Reading The Fine Manuals at http://tahiti.oracle.com -
Alter database datafile online:
I wanted to do an online backup of a datafile.
This is what happened (in archive mode):
alter database datafile <filename> offline
copied file with O/S command
alter database datafile <filename> online
ERROR at line 1:
ORA-01113: file 5 needs media recovery
so then I had to do this:
recover datafile <filename>
Then I was able to proceed.
Why this error? Is it normal?
DA
And now, when I try to backup the control file, this is what happens:
alter database backup controlfile to 'C:\control_file_backups'
ERROR at line 1:
ORA-01580: error creating control backup file C:\control_file_backups
ORA-27038: skgfrcre: file exists
OSD-04010: <create> option specified, file already exists
Message was edited by:
Dan A
Just changed it to
alter database backup controlfile to trace;
no problem now.
Message was edited by:
Dan AI wanted to do an online backup of a datafile.
This is what happened (in archive mode):
alter database datafile <filename> offline
copied file with O/S command
alter database datafile <filename> online
ERROR at line 1:
ORA-01113: file 5 needs media recovery
so then I had to do this:
recover datafile <filename>
Then I was able to proceed.
Why this error? Is it normal?
its normal whenver a datfile is taken offline either by you or automatically by oracle you need media recovery.
>
And now, when I try to backup the control file, this
is what happens:
alter database backup controlfile to
'C:\control_file_backups'
ERROR at line 1:
ORA-01580: error creating control backup file
C:\control_file_backups
ORA-27038: skgfrcre: file exists
OSD-04010: <create> option specified, file already
exists
check at c there probably control_file_backups exist?
Khurram -
Add date to backup controlfile to trace command
A little background:
I'm writting a rman script and want to include a controlfile to trace and a pfile.
The commands I'm using are:
alter database backup controlfile to trace as 'd:\oracle\backup\controlfile.bak';
create pfile='d:\oracle\backup\pfile.bak' from spfile;
However, I want the file to be controlfile.bak.theDate, ie controlfile.bak.20090323, as I want to keep so many days worth and not overwrite the file.
How can I add the date in this way?
Thanks in advance.I'm writting a rman script and want to include a controlfile to trace and a pfile.The commands I'm using are:
alter database backup controlfile to trace as 'd:\oracle\backup\controlfile.bak';
create pfile='d:\oracle\backup\pfile.bak' from spfile;
However, I want the file to be controlfile.bak.theDate, ie controlfile.bak.20090323, as I want to keep so many days worth and not overwrite the file.
How can I add the date in this way?>
But why do you want to do so when RMAN itself can take the controlfile backup and of the pfile automatically.Why do want to get the trace of controlfile.In you script simply add
backup current controlfile format '/location/ctl_%d_%T';
backup spfile format 'location/sp_%d_%T';
%d ---> The name of the database.
%T ---> The year, month, and day (YYYYMMDD)
Every time you take a backup, the controlfile and spfile with unique name will be present along with the database backup.
Anand -
Dear Team ,
During Full Online backup . I am facing the problem . The BRBACKUP Detail Log is
BR0051I BRBACKUP 7.00 (18)
BR0055I Start of database backup: bdzbskui.fnt 2008-10-21 09.42.40
BR0477I Oracle pfile /oracle/PRD/102_64/dbs/initPRD.ora created from spfile /oracle/PRD/102_64/dbs/spfilePRD.ora
BR0280I BRBACKUP time stamp: 2008-10-21 09.42.41
BR0301E SQL error -1587 at location BrCtlCopy-1, SQL statement:
'/* BRBACKUP */ ALTER DATABASE BACKUP CONTROLFILE TO '/oracle/PRD/sapbackup/cntrlPRD.dbf''
ORA-01587: error during control file backup file copy
ORA-27091: unable to queue I/O
ORA-27072: File I/O error
HPUX-ia64 Error: 2: No such file or directory
Additional information: 4
Additional information: 195
Additional information: 417792
BR0320E Copying of control file to /oracle/PRD/sapbackup/cntrlPRD.dbf failed
BR0314E Collection of information on database files failed
BR0056I End of database backup: bdzbskui.fnt 2008-10-21 09.42.41
BR0280I BRBACKUP time stamp: 2008-10-21 09.42.41
BR0054I BRBACKUP terminated with errors
please help
manuone active control file is enough for database to run, you can do copy/paste on line, but make sure that what you do. make sure that all the control files are in same in size.
i suggest you make a copy of existing control file and then perform copy.
For example the control files details:
SQL> show parameter control_files;
NAME TYPE VALUE
control_files string /oracle/PRD/sapdata1/cntrl/cntrlPRD.dbf,
/oracle/PRD/sapdata2/cntrl/cntrlPRD.dbf,
/oracle/PRD/saparch/cntrl/cntrlPRD.dbf
cheers,
-Sunil -
While running "alter database create control.....".
oracle8i/windowsNT
got a very big tracefile(750kb).
at the end of file,desired script was there.,
Normally the size of tracefile would be 3kb.
"create controlfile....."
max_dump_file_size=10240
PLEASE CLARIFY
[email protected]
[email protected]What's the content of this file ?
What's the exact command used?
Is it
ALTER DATABASE BACKUP CONTROLFILE TO TRACEOr
ALTER DATABASE CREATE STANDBY CONTROLFILE ...
"alter database create control.....". Is not correct syntax -
Alter database begin backup; missing keyword error
Hi all,
I am trying to put my database in backup mode using the command "alter database begin backup", but it is giving error shown below:
$ sqlplus '/as sysdba'
SQL*Plus: Release 9.2.0.5.0 - Production on Wed Nov 25 16:52:58 2009
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.5.0 - Production
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
N05PCS07 READ WRITE
SQL> alter database begin backup;
alter database begin backup
ERROR at line 1:
ORA-00905: missing keyword
NE one can tell why the command is failing??
pls...
Thanks in advance.
SHAILESHHello,
All the former posts are right, alter database begin backup; doesn't exists in 9.2 althought
you already have in this release the alter database end backup;.
So as to put all the tablespaces in backup mode in one command I suggest you to create a
stored procedure as follows:
CREATE OR REPLACE PROCEDURE begin_backup IS
TYPE RefCurTyp IS REF CURSOR;
cv RefCurTyp;
sql_cv VARCHAR2(400);
tbs VARCHAR2(128);
sql_stmt VARCHAR2(200);
BEGIN
-- Mise en BEGIN BACKUP des TABLESPACES
sql_cv := 'SELECT distinct (A.name) FROM sys.v_$tablespace A, sys.v_$datafile B, sys.v_$backup C where A.TS# = B.TS# and B.FILE# = C.FILE# and C.STATUS = ''NOT ACTIVE''';
OPEN cv FOR sql_cv;
LOOP
FETCH cv INTO tbs;
EXIT WHEN cv%NOTFOUND;
sql_stmt := 'ALTER TABLESPACE '||tbs||' BEGIN BACKUP';
EXECUTE IMMEDIATE sql_stmt;
END LOOP;
CLOSE cv;
END;
Then, I just have to call the Procedure like that:
execute <schema>.begin_backup; and all the tablespaces are in backup mode.
This procedure must be created on a User/Schema with the following privileges:
alter tablespace
select on sys.v_$tablespace
select on sys.v_$datafile
select on sys.v_$backupHope it can help.
Best regards,
Jean-Valentin
Edited by: Lubiez Jean-Valentin on Nov 25, 2009 9:44 PM -
Database creation having a trace of the control file
Hi,
I want to move a database from one server let's say A to another server let's say B I have a copy of all the datafiles, redo logs, control files and init file of the database fron the server A. I have a trace of the control file.
I copied all these files on the server B in the location /dispecer_date/oradata, except init which is in ORACLE_HOME/dbs
I thought that the simplest method to recreate the database is from the backup of the control file writing in sql the command CREATE CONTROLFILE how is written in trace and replacing the word REUSE with the word SET in CREATE CONTROLFILE instruction.
I obtained an error:
ORA-01503: Create controlfile failed
ORA-01160: file is not a data file
ORA-01110: datafile: '/dispecer_date/oradata/system.dbf'
Why? The db_block_size parameter is 4096.
Thank you,
MihaelaHere are the steps .....
sql > shutdown immediate ;
create identical dir structure on server b
copy all datafile,controlfile,redologfiles and pfile to target server ,And put them in same dir as of source.
now on taget server
sql > startup mountpfile = path of the pfile
sql > alter database opn
or
sql > alter database open resetlogs ;
this will do the trick, I don;t think recreating the controlfile is a good option hare , becuse you likly to loose some data if you stick on that one.
hare krishna
Alok -
Standby database errors - Alter database open read only
alter database open read only
AUDIT_TRAIL initialization parameter is changed to OS, as DB is NOT compatible for database opened with read-only access
Signalling error 1152 for datafile 1!
Beginning standby crash recovery.
Serial Media Recovery started
Managed Standby Recovery starting Real Time Apply
Media Recovery Waiting for thread 1 sequence 216
Mon Dec 20 11:58:18 2010
Standby crash recovery need archive log for thread 1 sequence 216 to continue.
Please verify that primary database is transporting redo logs to the standby database.
Wait timeout: thread 1 sequence 216
Standby crash recovery aborted due to error 16016.
Errors in file /u01/app/oracle/diag/rdbms/mdm2/MDM2/trace/MDM2_ora_17442.trc:
ORA-16016: archived log for thread 1 sequence# 216 unavailable
Recovery interrupted!
Completed standby crash recovery.
Signalling error 1152 for datafile 1!
Errors in file /u01/app/oracle/diag/rdbms/mdm2/MDM2/trace/MDM2_ora_17442.trc:
ORA-10458: standby database requires recovery
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '+MDMDG1/mdm2/datafile/system.280.738243341'
ORA-10458 signalled during: alter database open read only...
Mon Dec 20 12:13:46 2010
ALTER DATABASE RECOVER managed standby database using current logfile disconnect
Attempt to start background Managed Standby Recovery process (MDM2)
Mon Dec 20 12:13:46 2010
MRP0 started with pid=23, OS id=18974
MRP0: Background Managed Standby Recovery process started (MDM2)
started logmerger process
Mon Dec 20 12:13:51 2010
Managed Standby Recovery starting Real Time Apply
Parallel Media Recovery started with 2 slaves
Waiting for all non-current ORLs to be archived...
All non-current ORLs have been archived.
Media Recovery Waiting for thread 1 sequence 216
Completed: ALTER DATABASE RECOVER managed standby database using current logfile disconnect
The above lines are from alert log of standby database.
Standby standbase
SQL> alter database open read only;
alter database open read only
ERROR at line 1:
ORA-10458: standby database requires recovery
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '+MDMDG1/mdm2/datafile/system.280.738243341'
Parameters set on primary are
log_archive_dest_1 LOCATION=+MDMDG3/MDM1/ARCH VALID_FOR=(ALL_LOGFILES,ALL_ROLE ) DB_UNIQUE_NAME=MDM1
log_archive_dest_state_1 ENABLE
log_archive_dest_2 SERVICE=MDM2 SYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=MDM2
log_archive_dest_state_2 ENABLE
dg_broker_config_file1 +MDMDG2/mdm/dg_config/dgconfig1_mdm.dat
dg_broker_config_file2 +MDMDG2/mdm/dg_config/dgconfig2_mdm.dat
fal_server MDM2
standby_file_management AUTO
log_archive_config dg_config=(MDM1,MDM2)
db_file_name_convert MDM2, MDM1
ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE availability ;
Standby pfile
*.archive_lag_target=900
*.audit_file_dest='/u01/app/oracle/admin/MDM2/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='+MDMDG1/MDM2/CONTROLFILE/controlfile01.ctl','+MDMDG2/MDM2/CONTROLFILE/controlfile02.ctl'
*.db_block_size=8192
*.db_create_file_dest='+MDMDG1'
*.db_domain=''
*.db_file_name_convert='MDM1','MDM2'
*.db_name='MDM'
*.db_recovery_file_dest='+MDMDG2'
*.db_recovery_file_dest_size=10485760000
*.db_unique_name='MDM2'
*.dg_broker_config_file1='+MDMDG2/MDM/DG_CONFIG/dgconfig1_MDM.dat'
*.dg_broker_config_file2='+MDMDG2/MDM/DG_CONFIG/dgconfig2_MDM.dat'
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=MDM2XDB)'
*.fal_server='MDM11','MDM12'
*.instance_name='MDM2'
*.log_archive_config='dg_config=(MDM1,MDM2)'
*.log_archive_dest_1='LOCATION=+MDMDG3/MDM2/ARCH VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=MDM2'
*.log_archive_dest_2='SERVICE=MDM1 ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=MDM1'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_format='MDM_%t_%s_%r.arc'
*.log_file_name_convert='MDM1','MDM2'
*.memory_target=838860800
*.nls_language='ENGLISH'
*.nls_territory='UNITED KINGDOM'
*.open_cursors=300
*.processes=500
*.remote_login_passwordfile='exclusive'
*.sessions=555
*.standby_file_management='AUTO'
*.undo_tablespace='UNDOTBS1'
On standby ASM
ASMCMD [+] > find * *
+MDMDG1/ASM/
+MDMDG1/ASM/ASMPARAMETERFILE/
+MDMDG1/ASM/ASMPARAMETERFILE/REGISTRY.253.737811541
+MDMDG1/MDM/
+MDMDG1/MDM2/
+MDMDG1/MDM2/CONTROLFILE/
+MDMDG1/MDM2/CONTROLFILE/controlfile01.ctl
+MDMDG1/MDM2/CONTROLFILE/current.265.738243333
+MDMDG1/MDM2/DATAFILE/
+MDMDG1/MDM2/DATAFILE/CANVAS_POPULARITY_DATA.264.738243343
+MDMDG1/MDM2/DATAFILE/CANVAS_POPULARITY_IDX.277.738243343
+MDMDG1/MDM2/DATAFILE/MDM_SRC_DATA.282.738243343
+MDMDG1/MDM2/DATAFILE/MDM_SRC_IDX.275.738243343
+MDMDG1/MDM2/DATAFILE/MIPS_MDM_DATA.283.738243341
+MDMDG1/MDM2/DATAFILE/MIPS_MDM_IDX.276.738243343
+MDMDG1/MDM2/DATAFILE/SYSAUX.281.738243341
+MDMDG1/MDM2/DATAFILE/SYSTEM.280.738243341
+MDMDG1/MDM2/DATAFILE/TEST_TBSP1.273.738243345
+MDMDG1/MDM2/DATAFILE/TEST_TBSP2.272.738243345
+MDMDG1/MDM2/DATAFILE/UNDOTBS1.256.738243343
+MDMDG1/MDM2/DATAFILE/UNDOTBS2.279.738243343
+MDMDG1/MDM2/DATAFILE/USERS.278.738243347
+MDMDG1/MDM2/ONLINELOG/
+MDMDG1/MDM2/ONLINELOG/group_1.259.738243429
+MDMDG1/MDM2/ONLINELOG/group_2.257.738243431
+MDMDG1/MDM2/ONLINELOG/group_21.284.738243505
+MDMDG1/MDM2/ONLINELOG/group_22.261.738243505
+MDMDG1/MDM2/ONLINELOG/group_23.274.738243505
+MDMDG1/MDM2/ONLINELOG/group_3.258.738243431
+MDMDG1/MDM2/ONLINELOG/group_31.262.738243513
+MDMDG1/MDM2/ONLINELOG/group_32.270.738243513
+MDMDG1/MDM2/ONLINELOG/group_33.263.738243513
+MDMDG1/MDM2/ONLINELOG/group_4.260.738243431
+MDMDG2/MDM/
+MDMDG2/MDM/DG_CONFIG/
+MDMDG2/MDM2/
+MDMDG2/MDM2/AUTOBACKUP/
+MDMDG2/MDM2/AUTOBACKUP/2010_12_20/
+MDMDG2/MDM2/AUTOBACKUP/2010_12_20/s_738242861.263.738244155
+MDMDG2/MDM2/CONTROLFILE/
+MDMDG2/MDM2/CONTROLFILE/controlfile02.ctl
+MDMDG2/MDM2/CONTROLFILE/current.271.738243335
+MDMDG2/MDM2/ONLINELOG/
+MDMDG2/MDM2/ONLINELOG/group_1.270.738243429
+MDMDG2/MDM2/ONLINELOG/group_2.269.738243431
+MDMDG2/MDM2/ONLINELOG/group_21.268.738243505
+MDMDG2/MDM2/ONLINELOG/group_22.272.738243505
+MDMDG2/MDM2/ONLINELOG/group_23.262.738243505
+MDMDG2/MDM2/ONLINELOG/group_3.273.738243431
+MDMDG2/MDM2/ONLINELOG/group_31.266.738243513
+MDMDG2/MDM2/ONLINELOG/group_32.265.738243513
+MDMDG2/MDM2/ONLINELOG/group_33.264.738243513
+MDMDG2/MDM2/ONLINELOG/group_4.261.738243431
+MDMDG3/MDM/
+MDMDG3/MDM/ARCH/
+MDMDG3/MDM2/
+MDMDG3/MDM2/ARCH/
-- Please can I know how to open read only standby database.user5846399 wrote:
ORA-16016: archived log for thread 1 sequence# 216 unavailable
Recovery interrupted!archived log for thread 1 sequence# 216
This file is needed for recovery, Find it and move it to the standby database side. -
Backup controlfile to trace as 'c:\prod_ctl.txt'
Hi All,
11.2.0.1
I am examining the output of the trace file, because I want to simulate or test this process.
This file has two(2) sets of command. one(1) is for the intact online logs and the other one(1) is for damage online logs.
Questions:
1. What do u mean by damage online logs. does this mean that i lost all these redo files:
LOGFILE
GROUP 1 'D:\APP\PROD\ORADATA\ORCL\REDO01.LOG' SIZE 50M BLOCKSIZE 512,
GROUP 2 'D:\APP\PROD\ORADATA\ORCL\REDO02.LOG' SIZE 50M BLOCKSIZE 512,
GROUP 3 'D:\APP\PROD\ORADATA\ORCL\REDO03.LOG' SIZE 50M BLOCKSIZE 512
2. Why is that the two(2) sets are just the same set of commands? except for backup controlfile and open resetlogs?
3. Do I need RMAN backup to run this recovery statements?
Thanks,
pK
========
-- The following are current System-scope REDO Log Archival related
-- parameters and can be included in the database initialization file.
-- LOG_ARCHIVE_DEST=''
-- LOG_ARCHIVE_DUPLEX_DEST=''
-- LOG_ARCHIVE_FORMAT=ARC%S_%R.%T
-- DB_UNIQUE_NAME="orcl"
-- LOG_ARCHIVE_CONFIG='SEND, RECEIVE, NODG_CONFIG'
-- LOG_ARCHIVE_MAX_PROCESSES=4
-- STANDBY_FILE_MANAGEMENT=MANUAL
-- STANDBY_ARCHIVE_DEST=%ORACLE_HOME%\RDBMS
-- FAL_CLIENT=''
-- FAL_SERVER=''
-- LOG_ARCHIVE_DEST_1='LOCATION=USE_DB_RECOVERY_FILE_DEST'
-- LOG_ARCHIVE_DEST_1='MANDATORY NOREOPEN NODELAY'
-- LOG_ARCHIVE_DEST_1='ARCH NOAFFIRM EXPEDITE NOVERIFY SYNC'
-- LOG_ARCHIVE_DEST_1='NOREGISTER NOALTERNATE NODEPENDENCY'
-- LOG_ARCHIVE_DEST_1='NOMAX_FAILURE NOQUOTA_SIZE NOQUOTA_USED NODB_UNIQUE_NAME'
-- LOG_ARCHIVE_DEST_1='VALID_FOR=(PRIMARY_ROLE,ONLINE_LOGFILES)'
-- LOG_ARCHIVE_DEST_STATE_1=ENABLE
-- Below are two sets of SQL statements, each of which creates a new
-- control file and uses it to open the database. The first set opens
-- the database with the NORESETLOGS option and should be used only if
-- the current versions of all online logs are available. The second
-- set opens the database with the RESETLOGS option and should be used
-- if online logs are unavailable.
-- The appropriate set of statements can be copied from the trace into
-- a script file, edited as necessary, and executed when there is a
-- need to re-create the control file.
-- Set #1. NORESETLOGS case
-- The following commands will create a new control file and use it
-- to open the database.
-- Data used by Recovery Manager will be lost.
-- Additional logs may be required for media recovery of offline
-- Use this only if the current versions of all online logs are
-- available.
-- After mounting the created controlfile, the following SQL
-- statement will place the database in the appropriate
-- protection mode:
-- ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 'D:\APP\PROD\ORADATA\ORCL\REDO01.LOG' SIZE 50M BLOCKSIZE 512,
GROUP 2 'D:\APP\PROD\ORADATA\ORCL\REDO02.LOG' SIZE 50M BLOCKSIZE 512,
GROUP 3 'D:\APP\PROD\ORADATA\ORCL\REDO03.LOG' SIZE 50M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
'D:\APP\PROD\ORADATA\ORCL\SYSTEM01.DBF',
'D:\APP\PROD\ORADATA\ORCL\SYSAUX01.DBF',
'D:\APP\PROD\ORADATA\ORCL\UNDOTBS01.DBF',
'D:\APP\PROD\ORADATA\ORCL\USERS01.DBF',
'D:\APP\PROD\ORADATA\ORCL\EXAMPLE01.DBF'
CHARACTER SET WE8MSWIN1252
-- Commands to re-create incarnation table
-- Below log names MUST be changed to existing filenames on
-- disk. Any one log file from each branch can be used to
-- re-create incarnation records.
-- ALTER DATABASE REGISTER LOGFILE 'D:\APP\PROD\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2013_12_26\O1_MF_1_1_%U_.ARC';
-- ALTER DATABASE REGISTER LOGFILE 'D:\APP\PROD\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2013_12_26\O1_MF_1_1_%U_.ARC';
-- 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;
-- Commands to add tempfiles to temporary tablespaces.
-- Online tempfiles have complete space information.
-- Other tempfiles may require adjustment.
ALTER TABLESPACE TEMP ADD TEMPFILE 'D:\APP\PROD\ORADATA\ORCL\TEMP01.DBF'
SIZE 20971520 REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M;
-- End of tempfile additions.
-- Set #2. RESETLOGS case
-- The following commands will create a new control file and use it
-- to open the database.
-- Data used by Recovery Manager will be lost.
-- The contents of online logs will be lost and all backups will
-- be invalidated. Use this only if online logs are damaged.
-- After mounting the created controlfile, the following SQL
-- statement will place the database in the appropriate
-- protection mode:
-- ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "ORCL" RESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 'D:\APP\PROD\ORADATA\ORCL\REDO01.LOG' SIZE 50M BLOCKSIZE 512,
GROUP 2 'D:\APP\PROD\ORADATA\ORCL\REDO02.LOG' SIZE 50M BLOCKSIZE 512,
GROUP 3 'D:\APP\PROD\ORADATA\ORCL\REDO03.LOG' SIZE 50M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
'D:\APP\PROD\ORADATA\ORCL\SYSTEM01.DBF',
'D:\APP\PROD\ORADATA\ORCL\SYSAUX01.DBF',
'D:\APP\PROD\ORADATA\ORCL\UNDOTBS01.DBF',
'D:\APP\PROD\ORADATA\ORCL\USERS01.DBF',
'D:\APP\PROD\ORADATA\ORCL\EXAMPLE01.DBF'
CHARACTER SET WE8MSWIN1252
-- Commands to re-create incarnation table
-- Below log names MUST be changed to existing filenames on
-- disk. Any one log file from each branch can be used to
-- re-create incarnation records.
-- ALTER DATABASE REGISTER LOGFILE 'D:\APP\PROD\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2013_12_26\O1_MF_1_1_%U_.ARC';
-- ALTER DATABASE REGISTER LOGFILE 'D:\APP\PROD\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2013_12_26\O1_MF_1_1_%U_.ARC';
-- Recovery is required if any of the datafiles are restored backups,
-- or if the last shutdown was not normal or immediate.
RECOVER DATABASE USING BACKUP CONTROLFILE
-- Database can now be opened zeroing the online logs.
ALTER DATABASE OPEN RESETLOGS;
-- Commands to add tempfiles to temporary tablespaces.
-- Online tempfiles have complete space information.
-- Other tempfiles may require adjustment.
ALTER TABLESPACE TEMP ADD TEMPFILE 'D:\APP\PROD\ORADATA\ORCL\TEMP01.DBF'
SIZE 20971520 REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M;
-- End of tempfile additions.
===============,Hi ,
As far as i understand , one is with :
CREATE CONTROLFILE REUSE DATABASE "ORCL" RESETLOGS NOARCHIVELOG
and the other one is with :
CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS NOARCHIVELOG
The first one (resetlogs) is useful when you are trying to open a database after incomplete recovery (during cloning for example) or while changing the name of the database after restoring and recovering a database during a clone process.
The second one ( noresetlogs )is used when we have a consistent database and we are recreating the controlfile.
In General , you may be using resetlogs while opening a cloned database after incomplete recovery.
Regards
Karan -
Oracle 10g on Windows Server off-line database backup - a few questions
I'd like to do an Oracle off-line backup every night. Please tell me what you think about my plan.
First, run this batch file.
set oracle_sid=PLDG
C:\oracle\product\10.2.0\bin\sqlplusw.exe /nolog @c:\oracle\product\oradata\pldg\shutdb.sql
C:\oracle\product\10.2.0\bin\oradim -shutdown -sid PLDG -shuttype srvc
net stop OracleORADB10GTNSListenerPLDG
This is the shutdb.sql script that the above batch file calls.
set echo on
spool C:\oracle\product\oradata\pldg\shutdb.log
connect /@pledgemaker as sysdba
shutdown immediate
spool off
exit
....that should shut down the database.
Now I will copy the files that the following three queries pulls up to another server.
SQL> select name from sys.v_$datafile;
NAME
C:\ORACLE\PRODUCT\ORADATA\PLDG\SYSTEM01.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\UNDOTBS01.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\SYSAUX01.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\DRSYS01.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\ODM01.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\PLEDGEMAKER_DATA01.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\PLEDGEMAKER_INDX01.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\TOOLS01.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\USERS01.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\XDB01.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\MAILING01.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\BO516_REP01.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\PLEDGEMAKER_DATA02.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\PLEDGEMAKER_DATA03.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\PLEDGEMAKER_INDX02.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\PLEDGEMAKER_INDX03.DBF
SQL> select member from sys.v_$logfile;
MEMBER
C:\ORACLE\PRODUCT\ORADATA\PLDG\REDO01A.LOG
C:\ORACLE\PRODUCT\ORADATA\PLDG\REDO01B.LOG
C:\ORACLE\PRODUCT\ORADATA\PLDG\REDO02A.LOG
C:\ORACLE\PRODUCT\ORADATA\PLDG\REDO02B.LOG
C:\ORACLE\PRODUCT\ORADATA\PLDG\REDO03A.LOG
C:\ORACLE\PRODUCT\ORADATA\PLDG\REDO03B.LOG
SQL> select name from sys.v_$controlfile;
NAME
C:\ORACLE\PRODUCT\ORADATA\PLDG\CONTROL01.CTL
C:\ORACLE\PRODUCT\ORADATA\PLDG\CONTROL02.CTL
C:\ORACLE\PRODUCT\ORADATA\PLDG\CONTROL03.CTL
After copying the above files, I want to start the database back up. First I run this batch file
set oracle_sid=PLDG
net start OracleORADB10GTNSListenerPLDG
C:\oracle\product\10.2.0\bin\oradim -startup -sid PLDG -starttype srvc,inst
Then run this script.
set echo on
spool C:\oracle\product\oradata\pldg\startdb.log
connect /@pledgemaker as sysdba
startup
spool off
exit
- Is this plan complete?
- Will the filenames that the above three queries retrieve ever change in the future? Or do they remain the same?
- There are other files in the C:\ORACLE\PRODUCT\ORADATA\PLDG\ directory, such as TEMP01.DBF. I am assuming that I do not need to back these files up. Is this correct?
Thanks so much for your help!
Edited by: DataHandle on Jun 13, 2012 3:49 PMDataHandle wrote:
Sorry, I should explain my situation better. Currently there is no backup in place right now so I just want to get SOMETHING running and backing up our data. I am an Oracle newbie compared to a lot of the experts on here - I just want to go with the simplest solution so that I can implement it ASAP. Then I can at least sleep at night.
I agree that I should eventually get to learning RMAN and should understand it thoroughly. I've read a lot of the documentation on it but it can be really confusing. I mean there are 666 page books on Oracle backups - it is intimidating.
Anyway, thanks for your help.
Edited by: DataHandle on Jun 14, 2012 9:48 AM
Edited by: DataHandle on Jun 14, 2012 9:49 AMYes, the official documentation can be pretty overwhelming. I suggest you go to amazon and look up "RMAN Backup and Recovery" by Hart and Freeman. It is very well written and cuts through a lot of the clutter of the actual reference manual.
For the immediate, here's what you need to do
log on the the sever as 'oracle' - or whoever owns the oracle installation
then
rman target /
rman> CONFIGURE RETENTION POLICY TO REDUNDANCY 1; << set this how you want -- it's a quick reference in the official docs
rman> CONFIGURE BACKUP OPTIMIZATION ON;
rman> CONFIGURE CONTROLFILE AUTOBACKUP ON;
rman> CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET;
rman> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/oradata/fs91upg/upgbkup/%U'; << set the path to wherever you want to store your backup
rman>the above commnads are one-time setup.
rman> shutdown immediate
rman> startup mount
rman> backup database
rman> alter database open
rman> exitis your database in archivelog mode?
Edited by: EdStevens on Jun 14, 2012 10:47 AM -
Errors in alert log and listener log and "alter database mount exclusive"
Hello!
I need a help.
Database 11R2 works under MS Windows Server.
Whwn I start it using Services, according alert log it is started by command "alter database mount exclusive".
Next - alter database open.
After this, it seams that program, which should put data into database, can not work with it, because I see errors in alert log: ora-12537, 12560, 12535, 12570, 12547.
What does itmean and what to do?
This is extract from alert_log
ORACLE_BASE from environment = C:\Oracle
Mon Feb 04 14:54:53 2013
alter database mount exclusive
Successful mount of redo thread 1, with mount id 1458539517
Database mounted in Exclusive Mode
Lost write protection disabled
Completed: alter database mount exclusive
alter database open
Thread 1 opened at log sequence 3105
Current log# 3 seq# 3105 mem# 0: C:\ORACLE\ORADATA\xxx\REDO03.LOG
Successful open of redo thread 1
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
SMON: enabling cache recovery
Successfully onlined Undo Tablespace 2.
Verifying file header compatibility for 11g tablespace encryption..
Verifying 11g file header compatibility for tablespace encryption completed
SMON: enabling tx recovery
Database Characterset is AL32UTF8
No Resource Manager plan active
Mon Feb 04 14:55:04 2013
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
Mon Feb 04 14:55:06 2013
QMNC started with pid=20, OS id=2860
Completed: alter database open
Mon Feb 04 14:55:11 2013
Starting background process CJQ0
Mon Feb 04 14:55:11 2013
CJQ0 started with pid=25, OS id=2000
Mon Feb 04 14:55:11 2013
db_recovery_file_dest_size of 4977 MB is 0.00% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
Mon Feb 04 15:00:29 2013
Starting background process SMCO
Mon Feb 04 15:00:29 2013
SMCO started with pid=32, OS id=3212
Edited by: kogotok1 on Feb 4, 2013 4:54 PMThank you.
But in the same time - when I see in alert log those error messages ora -12560, 12537,12535,12570 and so on - clients programs, whiie try to connect, hang up.
For sql plus takes 20 minutes to connect.
lsnrctl status gives the following
LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 04-FEB-2013 16:01
:46
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx-BD.mosxxx
.elektra.net)(PORT=1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Produ
ction
Start Date 01-FEB-2013 10:22:48
Uptime 3 days 5 hr. 39 min. 54 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File C:\Oracle\listener.ora
Listener Log File c:\oracle\diag\tnslsnr\xxx-BD\listener\alert\l
og.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xxx-BD.mosxxx.elektra.net)
(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XXX" has 2 instance(s).
Instance "XXX", status UNKNOWN, has 1 handler(s) for this service...
Instance "xxx", status READY, has 1 handler(s) for this service...
Service "XXXDB" has 1 instance(s).
Instance "xxx", status READY, has 1 handler(s) for this service...
The command completed successfully
To tell the truth I am confuse - I thought I have only 1 service "XXXDB" and 1 instance - "xxx".
May be I have wrong entries in tnslsnr.ora?
Maybe you are looking for
-
How do i set up my mac after a hard drive replacmemt
how do i set up my mac book pro after replacing the harddrive
-
Hi All, My requirement is as follows: In my OPA interview screen, I have to enter the account number and clicks a button(It can be submit button). It will fetch all the values related with the policy number using a webservice call and fill in the cor
-
Colors are appearing washed out when saving from Illustrator to PDF
Hey Guys, I am working on a cover page for my office to go along with our bid packages. I have finished adding all of the elements that they wanted and added a little flare to it. Its a really basic document and when I save it into a PDF form, the co
-
JavaFX progress bar with glow effect.
I am hoping someone can help me with this issue. I recently followed James Clarke example of a progress bar with glow effect and it helped with developing a progress bar for an application I was working on. But now, with the JavaFX sdk 1.2 update, th
-
Approving a Change Request through CRM_DNO_MONITOR
I created a change request through CRM_DNO_MONITOR (business transaction service process). I assigned a change manager that that was set up through transaction BP, that was assigned a user name through employee. Now I want to approve the change reque