Database hangs in shutdown immediate for cold backup
Dear experts ,
we have scheduled cold backup for our database.
is there any solution to resolve below mentioned errors other than RMAN hot backup or shutdown abort ?
Sat Jan 26 00:20:55 2013
Active call for process 3939 user 'oracle' program '[email protected]'
SHUTDOWN: waiting for active calls to complete.
Sat Jan 26 01:15:59 2013
SHUTDOWN: Active sessions prevent database close operation
Instance shutdown aborted
Hi,
should we daily kill these processes with LOCAL=NO
what is proposed solution in such cases ?
is it not harmful for OS or database to kill these processes daily ?Yon can create shell script to find kill session only when you find active calls in your database alert log. You need not have to kill it on daily basis.
Refer MOS tech notes for more details:
*Alert Log: Shutdown Waiting for Active Calls to Complete [ID 1039389.6]*
*What Is The Fastest Way To Cleanly Shutdown An Oracle Database? [ID 386408.1]*
thanks,
X A H E E R
Similar Messages
-
Database give ORA-600 error after cold backup
HI,
I have oracle 10g install on linux system. i take cold backup of my database using
sql> shutdown immediate
and then copy all files to any other location.
but when i start my database it gives me error like
Errors in file /opt/oracle/fina/bdump/fina_smon_4422.trc:
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [4193], [136], [139], [], [], [], [], []
Fri Dec 4 15:23:18 2009
Errors in file /opt/oracle/fina/bdump/fina_smon_4422.trc:
ORA-00600: internal error code, arguments: [4193], [67], [70], [], [], [], [], []
Fri Dec 4 15:23:19 2009
Doing block recovery for file 2 block 1702
Block recovery from logseq 13, block 3531 to scn 758385
Fri Dec 4 15:23:19 2009
Recovery of Online Redo Log: Thread 1 Group 1 Seq 13 Reading mem 0
Mem# 0 errs 0: /opt/oracle/fina/dbs/redo01.log
Block recovery completed at rba 13.3532.16, scn 0.758386
Doing block recovery for file 2 block 153
Block recovery from logseq 13, block 3531 to scn 758436
Fri Dec 4 15:23:19 2009
Recovery of Online Redo Log: Thread 1 Group 1 Seq 13 Reading mem 0
Mem# 0 errs 0: /opt/oracle/fina/dbs/redo01.log
Block recovery completed at rba 13.3612.16, scn 0.758437
Fri Dec 4 15:23:19 2009
Errors in file /opt/oracle/fina/bdump/fina_smon_4422.trc:
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [4193], [67], [70], [], [], [], [], []
Fri Dec 4 15:23:29 2009
Errors in file /opt/oracle/fina/bdump/fina_smon_4422.trc:
ORA-00600: internal error code, arguments: [4193], [136], [139], [], [], [], [], []
Fri Dec 4 15:23:29 2009
Errors in file /opt/oracle/fina/bdump/fina_pmon_4410.trc:
ORA-00474: SMON process terminated with error
Fri Dec 4 15:23:29 2009
PMON: terminating instance due to error 474
Instance terminated by PMON, pid = 4410i have seen this happen sometime after cold backup database give errors. is taking cold backup of database is not safe.
Please suggest.Umesh,
Since it is case of Ora 600, for which only last solution is oracle support, but i would like to mention that your are getting ORA-00600: internal error code, arguments: [4193].... So, this 4193 is cause to read following links too:
http://www.orafaq.com/forum/t/47048/2/ and. see Metalink note 153788.1 and 39282.1.
Regards
Girish Sharma -
Script for cold backup using RMAN
Dear all,
db_version:-10.2.0.4
os_version:- Windows 2003 server
I wish to schedule a script that will take cold backup of my database using RMAN.
Any help is appreciated ..
Edited by: user12000301 on May 18, 2011 5:02 AMDear All,
Thanks a lot for your valuable time :
However i have managed to do it as follows :
1. First i have configure the parameter of RMAN ( Since it is my UAT in Noarchive log mode), I have never tried RMAN cold backup on the same.
Following is the out put of SHOW ALL;
RMAN> show all;
using target database control file instead of recovery catalog
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 2 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF;
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'D:\DB\RMAN_BKP\BACKUPS%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'D:\DB\RMAN_BKP\BACKUPS\DB_%U.%r';
CONFIGURE MAXSETSIZE TO UNLIMITED;
CONFIGURE ENCRYPTION FOR DATABASE OFF;
CONFIGURE ENCRYPTION ALGORITHM 'AES128';
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'D:\DB\RMAN_BKP\BACKUPS\SNCFDB.ORA';
2. I have created a rman_cold_bkp.bat file which has following entry :
cd c:\oracle10g\bin
set oracle_sid=DB
rman target system/*** @D:\DB\RMAN_BKP\SCRIPT\rman_cold_bkp.rcv log=D:\DB\RMAN_BKP\SCRIPT\rman_cold_bkp.log
exit
3. Whereas rman_cold_bkp.rcv file contains following contents:
run
allocate channel C1 device type disk;
shutdown immediate;
startup mount;
backup database;
alter database open;
release channel C1;
exit
I did checked it and it;s working fine for me :-)
Regards,
Girish -
Stop and start database for cold backup
Hi,
Database :Oracle 10g R1
OS : Red hat 3
I have a RAC database with 2 nodes.
I build this script to make a cold backup of the database. (I will put it in the cron tab).
My question is the SRVCTL will work in this scripts??
# ***** COLDBACKUP ORACLE DATABASE ON LINUX *****
DIRECTORY=/u02/backup/script/; export DIRECTORY
cd ${DIRECTORY}
# ***** SHUTDOWN THE DATABASE *******
export oracle_sid=RCDB
srvctl stop database -d RCDB
# *****cold backup for "RCDB" database on 13-FEB-07 ... *****
# ***** COPY FILES *****
# Redo logs
cp /u02/oradata/RCDB/redo01.log ${DIRECTORY}
cp /u02/oradata/RCDB/redo07.log ${DIRECTORY}
cp /u02/oradata/RCDB/redo03.log ${DIRECTORY}
cp /u02/oradata/RCDB/redo08.log ${DIRECTORY}
# Datafiles
#*********START UP DATABASE AND SERVICES********
srvctl start database -d RCDB
exit
Message was edited by:
ASkika
Message was edited by:
ASkikaI need to put a quick policy backup ... and cold
backup it's what I use and it works.And reduces the availability of your cluster.
The problem about RMAN is that we never use it. I
have to learn about it to make scripts to test....
and this will tack me 2 or 3 days...I'd assume that installing RAC didn't go overnight, so why underfund the crucial part of any database system, the backup?
There's even a step by step guide for backup on the Getting Started: DBAs page.
Samples (and changes) on the latest version of RMAN can be found for example in RMAN Enhancements.
Or take a look at this Oracle Magazine article:Faster Backup, Faster Recovery
Backup and Recovery Basics in the user documentation may also be a good starting point.
C. -
Script for cold backup on windows
looking for a script that can be scheduled nightly to perform
a cold backup to disk of a 8.1.7 database on windows.
while i've seen many, i'm looking for one that will keep 3 days worth
of backups... then write over the oldest etc...
thanks
dgset term off
set head off
set feedback off
set verify off
spool c:\coldbackup.bat
select 'copy '||name||' c:\DBBACKUP' from v$datafile;
select 'copy '||name||' c:\DBBACKUP' from v$controlfile;
select 'copy '||name||' c:\DBBACKUP' from v$tempfile;
select 'copy '||member||' c:\DBBACKUP' from v$logfile;
spool off
shutdown IMMEDIATE
host c:\coldbackup.bat
startup
host del c:\coldbackup.bat
set term on
set head on
set feedback on
set verify on -
Steps for Cold Backup..
Hi,
I am new for DBA, i need to take cold backup, can some help me what are all step (commands) i need to follow to perform the successful cold backup.
Advance Thanks
SureshHi Suresh,
A cold backup is very simple.Hope your Database is test or Development or practise one,If it is production Database You have inform users for suitable downtime depending on size of your Database. You have to peform these basic steps,Which I'm doing it for you:
Step 1:Find the location of all the physical file(Datafiles,controlfiles,redologs):
For Datafile:
SQL> select file_name||' '||tablespace_name||' '||bytes from dba_data_files;
FILE_NAME||''||TABLESPACE_NAME||''||BYTES
D:\ORADATA\BOSCHDB\USER123.DBF USER123 104857600
D:\ORADATA\BOSCHDB\EXAMPLE01.DBF EXAMPLE 104857600
D:\ORADATA\BOSCHDB\USERS01.DBF USERS 5242880
D:\ORADATA\BOSCHDB\SYSAUX01.DBF SYSAUX 304087040
D:\ORADATA\BOSCHDB\UNDOTBS01.DBF UNDOTBS1 26214400
D:\ORADATA\BOSCHDB\SYSTEM01.DBF SYSTEM 513802240
For logfile:
SQL> select group#||' '||member from v$logfile;
GROUP#||''||MEMBER
3 D:\ORADATA\BOSCHDB\REDO03.LOG
2 D:\ORADATA\BOSCHDB\REDO02.LOG
1 D:\ORADATA\BOSCHDB\REDO01.LOG
SQL> sho parameter %control%
NAME TYPE VALUE
control_file_record_keep_time integer 7
control_files string D:\ORADATA\BOSCHDB\CONTROL01.C
TL, D:\ORADATA\BOSCHDB\CONTROL
02.CTL, D:\ORADATA\BOSCHDB\CON
TROL03.CTL
Step 2: Shutdown the database (IMMEDIATE or NORMAL option):
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
Step 3: Use OS commands or utilities to copy the database datafiles and control files to your backup destination:
Note 1:Make sure this Backup destination is having enough space
Note 2:If you are doing in any unix flavour use command cp
D:\oradata\BoschDB>copy /b *.DBF D:\TESTDB_BACKUP
EXAMPLE01.DBF
SYSAUX01.DBF
SYSTEM01.DBF
TEMP01.DBF
UNDOTBS01.DBF
USER123.DBF
USERS01.DBF
7 file(s) copied.
D:\oradata\BoschDB>copy /b *.LOG D:\TESTDB_BACKUP
REDO01.LOG
REDO02.LOG
REDO03.LOG
3 file(s) copied.
D:\oradata\BoschDB>copy /b *.CTL D:\TESTDB_BACKUP
CONTROL01.CTL
CONTROL02.CTL
CONTROL03.CTL
3 file(s) copied.
Step 3. Startup the database.
SQL> startup
ORACLE instance started.
Total System Global Area 289406976 bytes
Fixed Size 1248600 bytes
Variable Size 130024104 bytes
Database Buffers 155189248 bytes
Redo Buffers 2945024 bytes
Database mounted.
Database opened.
Step 4:Verify your Backup.
D:\>cd TESTDB_BACKUP
D:\TESTDB_BACKUP>dir
Volume in drive D is PEACY_DATA
Volume Serial Number is 9CAF-C076
Directory of D:\TESTDB_BACKUP
02/25/2011 11:00 AM <DIR> .
02/25/2011 11:00 AM <DIR> ..
02/23/2011 12:15 PM <DIR> Archives
02/25/2011 10:53 AM 7,389,184 CONTROL01.CTL
02/25/2011 10:53 AM 7,389,184 CONTROL02.CTL
02/25/2011 10:53 AM 7,389,184 CONTROL03.CTL
02/25/2011 10:53 AM 104,865,792 EXAMPLE01.DBF
02/25/2011 10:53 AM 52,429,312 REDO01.LOG
02/25/2011 10:53 AM 52,429,312 REDO02.LOG
02/25/2011 10:53 AM 52,429,312 REDO03.LOG
02/25/2011 10:53 AM 304,095,232 SYSAUX01.DBF
02/25/2011 10:53 AM 513,810,432 SYSTEM01.DBF
02/10/2011 10:03 PM 20,979,712 TEMP01.DBF
02/25/2011 10:53 AM 26,222,592 UNDOTBS01.DBF
02/25/2011 10:53 AM 104,865,792 USER123.DBF
02/25/2011 10:53 AM 5,251,072 USERS01.DBF
13 File(s) 1,259,546,112 bytes
3 Dir(s) 2,820,775,936 bytes free
Hope it helps.
Best regards,
Rafi.
http://rafioracledba.blogspot.com -
Need clarification for cold backup and recovery
Hello Everyone ..
I have much confusion on cold backup and recovery topic.
Already i posted a scanario regarding this and i want to know some clarity points to understand.
1. I had cold backup two days before
2. I am creating an object *(EMP)* and inserting some records then issue log switch continiously.
3. Manually i removed all physical files (datafiles , control files , log files , redolog files ...)
4. then i issued STARTUP FORCE MOUNT;
5. here i am getting error identifying control file.
6. cold backup two days before all files restored
6. then i issue recover database using backup controlfile until cancel;
7. i am trying to issue select * from emp; i am getting error
select * from emp
*ERROR at line 1:
ORA-00942: table or view does not existMy QUESTION IS
After cold backup finished , i created emp table ..
when restoring old back " There is no emp table"
*- then , can i recover emp table ? - If so , please explain about this ..*
Note : REF - LINK https://forums.oracle.com/forums/message.jspa?messageID=11056341#11056341
- Above link says what i did ? . In this thread i am asking concept & logic ..
please do NOT consider as "*DUPLICATE*"When you recover the database using backup controlfile until cancel, you have to apply archived logs. Did you apply all of them?
If the create command was in the online redo, not yet archived, and you lost the online redo, then you won't have it. This is why you want to have redo multiplexed, it is a critical piece.
In some recovery scenarios, if you haven't lost the online redo, you need to specify those files as if they were archives.
It is normally easier to just be sure you have the latest controlfiles and let Oracle figure it out automatically (which is why you want to use online RMAN backups rather than cold backups). But yes, it is important to understand what is going on for different scenarios. I used to have manual standbys, and one of the disaster instruction sets explained to try to get online redo over to the standby to lose as few transactions as possible. That could still be useful for some snapshot hardware type scenarios, assuming the business is too cheap to do proper failovers. -
BISE1 database hangs on shutdown...
When trying to shutdown the BISE1 database via SQL Plus, it just hangs there and does nothing. Any ideas?
Where can I check?
Thank you!Do the following:
shutdown immediate
startup dba
shutdown
the startup dba is to keep other logons out. There are some process tring to logon... -
Hello All,
Application Version: 11.5.10
OS : Sun Solaris 5.9
Can you provide me information what should I include in my backup script?
e.g we have done some customized reports so we need to include that also into backup
So in case for hard disk failure we do not loose customization!!!.
e.g RDBMS Oracle Home , APPL_TOP
I am not sure how application spared
I want to map all required directory into one folder then I just include that one folder into my backup script.
Reg
Chirag Patel
KenyaChirag, all the files should be located under the directories listed above by John. Even for custom objects (forms, reports, packages, ..etc).
I want to map all required directory into one folder then I just include that one
folder into my backup scriptWhy would you need to include it all in one folder? Once you get the directory structure of your Application you can simply include all the root directories in your backup script. -
Hello friends;
I'm trying to run following script which I copied from somewhere using .sh file but the same is not running and showing errors:
Script:
#!/bin/sh
dy=`date +%D`
bk='/backup/test'
cm_oracle='tar -czhf '$bk'/'$dy'_db_bkp.tar.gz /TEST/oracle'
[oracle@visionerp ]$ sh cold_bkp.sh
: command not found:
: command not found:
: command not found:
OS Linux 5.8.
Regards
Aneel AhmedHi ,
I see this : ^M: bad interpreter. Can you vi your file and see if you have ^M character ?
you may need to remove this. Dont do it manually.
follow any of the links below :
https://www.google.co.in/search?q=remove+%5Em+linux&oq=remove+%5EM+&aqs=chrome.1.69i57j0l5.7360j0j7&sourceid=chrome&espv=210&es_sm=93&ie=UTF-8 -
If shutdown immediate hangs database waits one hour for shutdown abort
we have schedules cold backup for our 11g database on redhat 5.3.
there is a shell script written with shutdown immediate command.
If database hangs during shutdown immediate database waits one hour for auto shutdown abort.
but this happens once or twice in a month
can we do this auto shutdown abort earlier than one hour ??user13376823 wrote:
we have schedules cold backup for our 11g database on redhat 5.3.
Since you're shutting down the database for cold backup so ensure it should be shutdown properly by shutdown or shutdown immediate cmd not by abort cmd.
Consistent backup:-
A backup taken when the database is mounted (but not open) after a normal shutdown. The checkpoint SCNs in the datafile headers match the header information in the control file. None of the datafiles has changes beyond its checkpoint. Consistent backups can be restored without recovery.
http://docs.oracle.com/cd/B19306_01/backup.102/b14191/rcmconc1.htm#i1007616 -
Hi all,
May I know what to do when database hangs after shutdown immediate command perform? Can I use kill process command to stop Oracle process?Hello,
see documentation for details of immediate-clause:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/start.htm#sthref589
You can do an shutdown abort instead, but then sql is terminated. You can read details here: http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/start.htm#sthref595
Greets,
Hannibal -
Should we backup Archivelogs for ad-hoc Cold backups ?
B version: 11.2
OS version : Solaris 5.10
Below is the script we use for ad-hoc cold backups. Is there a need to take the backup of archivelogs when we do the cold backup ?
Sometimes archivelog backup piece's size is bigger than the backup piece containing the full backup of the DB itself ! So, too much disk space is wasted.
The script we use
run
allocate channel t1 type disk;
sql 'alter system archive log current';
shutdown immediate;
startup mount;
backup full database format='/mypath/ORCL_full_%U_%T.bkp' tag='ORCL_full';
backup archivelog all tag='arch_bkp' format='/mypath/ORCL_BKP/arch_%U_%T.bkp' delete input;
release channel t1;
}Hello;
A cold backup is a consistent state. So you don't have to back them up. No new archived logs generated during the backup either so you are still OK.
For other types of RMAN backup you ALWAYS want this. This guarantees that datafile backups taken during the command are recoverable to a consistent state.
Best Regards
mseberg -
Database cloning using cold backup
Hello Guys,
I am doing cloning of a database from cold backup for testing, actully one datafile has been croupted, so my issue is that, can i exclude tht datafile from controlfile when creating the controlfile and is that poosible that controlfile will created sucessfully and database will open sucessfully.
Please reply.
Thanks@asif, @ckpt
With humble, how all you know that corrupted datafile is not belonging to system and undo tablespace? If this case, then do you think we can restore that corrupted cold-backup ? Sorry, but this is not the way to just start providing help without asking OP :
1.Current Oracle Version ?
2.Where he want to restore i.e. restoring platform info Oracle version OS ?
3.After cold backup how he came to know that one datafile is corrupted ?
4.When and how datafile became corrupted ?
5.How he taken cold backup ? Was db running fine just before shut immediate for cold backing ?
6.What he has done so far to restore the cold backup ?
7.What error he is getting right now ?
Here problem is corrupted datafile. So, first let come problem clear from OP, ask all missing question in one go, and then start helping is the right way... (my personal opinion, may be wrong!).
Regards
Girish Sharma -
I need to develop a scripts that shuts down all databases on a server. One of my databases sometimes hangs after issuing "shutdown immediate" command, and I want to handle this situation in my script. What I am thinking is to add "shutdown abort" in the script if "shutdown immediate" does not work. However, I do not know how to determine the database is hanging during shutdown immediate. Can you advise me on how to handle the shutdown immediate hanging problem in my shell script? Or is there better way to handle this in the script?
Thank you very much for your help!As noted, if your shutdown immediate really hang because of rollback, then my method won't work either. The only different will be Oracle is going to do the rollback at next startup when doing instance recovery. In that case, the startup will appear to be hang.
Check this metalink doc,
What To Do and Not To Do When 'shutdown immediate' Hangs
Doc ID: Note:375935.1
There are cases where shutdown immediate hang because of bug.
Shutdown Immediate Hangs
Doc ID: Note:268884.1
Maybe you are looking for
-
How to create a purchase order for a purchase requisition
Dear Experts, Explain the steps for creating purchase order for a purchase requisition. and where can i find this purchase requisition field in PO creation.
-
Virtual Machine Failes to Start: Server execution failed (0x80080005).
Hi I have a Windows 8.1 (with updates) System which was upgraded from Windows 8.0 using a Clean Install. Recently Hyper-V has stopped running on my system. The Event log shows an error: 'CentOS65' failed to start worker process: Server execution fail
-
Call a JSP from applet and display the results in the browser
Hello All, I have written an applet which performs some functionality at the clinets browser. When the applets method finishes exectution, I would like to call a jsp. The results of the JSP should be displayed like a normal page in the browser. I tri
-
How to use the current view in script logic - %DIMENSIONNAME_SET% not work
Hello, I have the requirement to use the values from the current view in the script logic. User would like to use the members which were selected from the current view in the calculation. We are using SAP BPC 7.0 SP06 I have prepared the following sc
-
How do I manually recreate the site definition (.ste) for an existing site?
My iMac hard drive recently failed and had to be replaced. Though I had backed up my web site files, I don't have a backup of the site's Site Management (*.ste) file. Thus, I'm unable to manage this site in Dreamweaver (reinstalled on the new hard dr