Recover Database Package Object
Hi, i accidently replace my package in my schema on last friday, how i gonna recover it back? my company is running a full backup of the database, and do not open up flashback function in that database. How I just recover only one object without causing the all data recovery?
Please help.. urgent.
vincent.
kiddoo_81 wrote:
my company's oracle version is 9iR2....i use the command create or replace package...... command, unfortunately, there are one package is the same name as mine... so i replace the old package with my new one... after 3 days... user came to me and complain that some of the old program cannot open.
that is the situation. is my mistake thought... sob..
vincent.Have you tried to use the method I've provided to you?
Why don't you use supervision?
How much the size of the database? If it's not so big, why don't you want to perform a disaster recovery (restore and recover the database on the different server) and get back the package you've lost?
Similar Messages
-
Unable to recover database after rman recovery and database open resetlogs
I am running Oracle 10.2.0.5 on OpenSUSE 9. I have been trying to upgrade the database to 11g, through dbua. I was getting stuck at one point during the Oracle Server install and the upgrade failed and I was forced to restore the database to an earlier backup.
Below is the current place that I am stuck. As you can see I opened the database multiple times and reset the logs. Now I am afraid that my controlfile and redo log backups are out of sync and i can't get them back on track. Before when I actually got the database recovered RMAN would immediately throw:
RMAN-06900: WARNING: unable to generate V$RMAN_STATUS or V$RMAN_OUTPUT row
RMAN-06901: WARNING: disabling update of the V$RMAN_STATUS and V$RMAN_OUTPUT rows
OPA-00600: ORA-00600: internal error code, arguments: ...
The database would open with ALTER DATABASE RESETLOGS but any query on non-system tables would fail and throw:
ORA-04045: errors during recompilation/revalidation of LCRS_DEV1.FACILITY_REF
ORA-00600: internal error code, arguments: [17069], [0x1158ED180], [], [], [],
I hope I have not dug myself into too deep of a hole here.
Here is the trace from my most recent attempt.
RMAN> startup nomount;
connected to target database (not started)
Oracle instance started
Total System Global Area 3070230528 bytes
Fixed Size 2099424 bytes
Variable Size 301991712 bytes
Database Buffers 2751463424 bytes
Redo Buffers 14675968 bytes
RMAN> list incarnation of database;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of list command at 08/02/2011 15:49:04
ORA-01507: database not mounted
RMAN> restore controlfile from autobackup;
Starting restore at 02-AUG-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
recovery area destination: /opt/oracle/flash_recovery_area
database name (or database unique name) used for search: LCRSDEV
channel ORA_DISK_1: autobackup found in the recovery area
channel ORA_DISK_1: autobackup found: /opt/oracle/flash_recovery_area/LCRSDEV/autobackup/2011_08_02/o1_mf_s_758129928_73jr2s7p_.bkp
channel ORA_DISK_1: control file restore from autobackup complete
output filename=/opt/oracle/oradata/LCRSDEV/control01.ctl
output filename=/opt/oracle/oradata/LCRSDEV/control02.ctl
output filename=/opt/oracle/oradata/LCRSDEV/control03.ctl
Finished restore at 02-AUG-11
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> list incarnation of database;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
1 1 LCRSDEV 756543625 PARENT 1 22-OCT-05
2 2 LCRSDEV 756543625 PARENT 525876 20-JAN-11
3 3 LCRSDEV 756543625 PARENT 92348137 18-JUL-11
4 4 LCRSDEV 756543625 PARENT 95654931 01-AUG-11
5 5 LCRSDEV 756543625 PARENT 95675699 01-AUG-11
6 6 LCRSDEV 756543625 PARENT 95676699 02-AUG-11
7 7 LCRSDEV 756543625 PARENT 95676700 02-AUG-11
8 8 LCRSDEV 756543625 CURRENT 95676701 02-AUG-11
RMAN> restore database until scn 95676700;
Starting restore at 02-AUG-11
Starting implicit crosscheck backup at 02-AUG-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
Crosschecked 6 objects
Finished implicit crosscheck backup at 02-AUG-11
Starting implicit crosscheck copy at 02-AUG-11
using channel ORA_DISK_1
Finished implicit crosscheck copy at 02-AUG-11
searching for all files in the recovery area
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/autobackup/2011_08_02/o1_mf_s_758129928_73jr2s7p_.bkp
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 08/02/2011 15:52:04
RMAN-20208: UNTIL CHANGE is before RESETLOGS change
RMAN> restore database;
Starting restore at 02-AUG-11
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /opt/oracle/oradata/LCRSDEV/system01.dbf
restoring datafile 00002 to /opt/oracle/oradata/LCRSDEV/undotbs01.dbf
restoring datafile 00003 to /opt/oracle/oradata/LCRSDEV/sysaux01.dbf
restoring datafile 00004 to /opt/oracle/oradata/LCRSDEV/users01.dbf
restoring datafile 00005 to /opt/oracle/oradata/LCRSDEV/LCRS_TBS.dbf
channel ORA_DISK_1: reading from backup piece /opt/oracle/flash_recovery_area/LCRSDEV/backupset/2011_07_22/o1_mf_nnndf_TAG20110722T111922_72m8rc5x_.bkp
channel ORA_DISK_1: restored backup piece 1
piece handle=/opt/oracle/flash_recovery_area/LCRSDEV/backupset/2011_07_22/o1_mf_nnndf_TAG20110722T111922_72m8rc5x_.bkp tag=TAG20110722T111922
channel ORA_DISK_1: restore complete, elapsed time: 00:23:36
Finished restore at 02-AUG-11
RMAN> recover database until scn 95676700;
Starting recover at 02-AUG-11
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 08/02/2011 16:16:28
RMAN-20208: UNTIL CHANGE is before RESETLOGS change
RMAN> recover database;
Starting recover at 02-AUG-11
using channel ORA_DISK_1
starting media recovery
archive log thread 1 sequence 90 is already on disk as file /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_90_72ml85v3_.arc
archive log filename=/opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_08_02/o1_mf_1_1_73jr20qc_.arc thread=1 sequence=1
unable to find archive log
archive log thread=1 sequence=1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 08/02/2011 16:25:04
RMAN-06054: media recovery requesting unknown log: thread 1 seq 1 lowscn 95676701Thanks for the reply Hemant. I have reset the database for the controlfile that I am using as backup and now I am not able to recover until the correct SCN. I am thinking that my recovery catalog is bad. If I mount with the current controlfile I have this list of incarnations:
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
*1 1 LCRSDEV 756543625 PARENT 1 22-OCT-05*
*2 2 LCRSDEV 756543625 PARENT 525876 20-JAN-11*
*3 3 LCRSDEV 756543625 PARENT 92348137 18-JUL-11*
*4 4 LCRSDEV 756543625 PARENT 95654931 01-AUG-11*
*5 5 LCRSDEV 756543625 PARENT 95675699 01-AUG-11*
*6 6 LCRSDEV 756543625 PARENT 95676699 02-AUG-11*
*7 7 LCRSDEV 756543625 PARENT 95676700 02-AUG-11*
*8 8 LCRSDEV 756543625 PARENT 95676701 02-AUG-11*
*9 9 LCRSDEV 756543625 CURRENT 95676702 02-AUG-11*
However if I restore the controlfile to the earlier version I am getting the following output from the process:
RMAN> startup nomount;
connected to target database (not started)
Oracle instance started
Total System Global Area 3070230528 bytes
Fixed Size 2099424 bytes
Variable Size 301991712 bytes
Database Buffers 2751463424 bytes
Redo Buffers 14675968 bytes
RMAN> restore controlfile from '/opt/oracle/flash_recovery_area/LCRSDEV/autobackup/2011_07_22/o1_mf_s_757164997_72m9rqw3_.bkp';
Starting restore at 03-AUG-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
output filename=/opt/oracle/oradata/LCRSDEV/control01.ctl
output filename=/opt/oracle/oradata/LCRSDEV/control02.ctl
output filename=/opt/oracle/oradata/LCRSDEV/control03.ctl
Finished restore at 03-AUG-11
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> list incarnation of database;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
1 1 LCRSDEV 756543625 PARENT 1 22-OCT-05
2 2 LCRSDEV 756543625 PARENT 525876 20-JAN-11
3 3 LCRSDEV 756543625 CURRENT 92348137 18-JUL-11
RMAN> restore database until scn 92348137;
Starting restore at 03-AUG-11
Starting implicit crosscheck backup at 03-AUG-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
Crosschecked 1 objects
Finished implicit crosscheck backup at 03-AUG-11
Starting implicit crosscheck copy at 03-AUG-11
using channel ORA_DISK_1
Finished implicit crosscheck copy at 03-AUG-11
searching for all files in the recovery area
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_08_01/o1_mf_1_1_73g3hn6o_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_08_01/o1_mf_1_2_73g3hnxq_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_08_01/o1_mf_1_1_73g0rts6_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_134_72v9gv4s_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_138_72v9p4b4_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_120_72v8wwg0_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_121_72v8x5ty_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_131_72v9cnrv_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_139_72v9q5ok_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_137_72v9n4t5_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_136_72v9l88q_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_123_72v8ytm8_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_132_72v9dcxd_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_124_72v8zkg0_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_128_72v96qm1_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_135_72v9jqmx_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_129_72v98q3r_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_125_72v91g3b_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_118_72v8v8r4_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_127_72v9626w_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_130_72v9bqtb_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_141_72vncy6g_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_122_72v8ycd4_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_126_72v94cns_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_133_72v9fb17_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_140_72vn6wgo_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_25/o1_mf_1_119_72v8v9hf_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_08_02/o1_mf_1_1_73j3wo01_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_08_02/o1_mf_1_2_73josgf1_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_08_02/o1_mf_1_1_73jr20qc_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_08_02/o1_mf_1_2_73jh223h_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_08_02/o1_mf_1_1_73josflf_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_08_02/o1_mf_1_1_73jvqdqs_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_08_02/o1_mf_1_3_73josh91_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_08_02/o1_mf_1_1_73j91rh9_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_91_72mqlnx9_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_111_72mrdr5m_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_96_72mqx958_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_114_72mrgsf9_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_94_72mqs6gj_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_102_72mr3893_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_99_72mr2h6c_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_104_72mr5hfm_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_109_72mrc83z_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_98_72mr080w_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_93_72mqq36m_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_97_72mqz0mm_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_116_72mrk268_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_101_72mr31yv_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_110_72mrddhg_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_95_72mqv3hp_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_105_72mr5vq4_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_115_72mrjd2s_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_106_72mr7hnt_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_100_72mr2qfc_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_112_72mrfc5j_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_107_72mr909t_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_103_72mr4pol_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_113_72mrfsb9_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_117_72mrl5mf_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_108_72mrb13l_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_90_72ml85v3_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_22/o1_mf_1_92_72mqnxz1_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_26/o1_mf_1_143_72y6ww71_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_26/o1_mf_1_144_72ybybps_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_26/o1_mf_1_142_72xt10j7_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/archivelog/2011_07_26/o1_mf_1_145_72yccy5z_.arc
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/autobackup/2011_08_01/o1_mf_s_758043324_73g3jfxx_.bkp
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/autobackup/2011_08_01/o1_mf_s_758035850_73fw6vrc_.bkp
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/autobackup/2011_08_02/o1_mf_s_758133684_73jvr5px_.bkp
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/autobackup/2011_08_02/o1_mf_s_758127608_73jot9x0_.bkp
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/autobackup/2011_08_02/o1_mf_s_758109276_73j3xfom_.bkp
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/autobackup/2011_08_02/o1_mf_s_758129928_73jr2s7p_.bkp
File Name: /opt/oracle/flash_recovery_area/LCRSDEV/autobackup/2011_07_22/o1_mf_s_757164997_72m9rqw3_.bkp
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 08/03/2011 12:53:19
RMAN-20208: UNTIL CHANGE is before RESETLOGS change
Edited by: K Doyle on Aug 3, 2011 10:22 AM -
Multiple SQL task objects inside a package object is not generating proper DTSX
I am programmatically adding multiple ExecuteSQLtask objects inside a package. I am specifying all the required properties to the ExecuteSQLtask objects. However, when I save the package object to dtsx, the package looses the properties of some
of the ExecuteSQLtask object.
In the below example, I have created 3 ExecuteSQL task objects using the function AddSqlTask. However, once you run it, one of the objects will loose its properties. What makes it more weird is the fact that sometimes, object 1 looses the properties,
some times, its object number 2. Its random. I know that these objects are COM objects. Is there something I need to careful of when setting the properties ? Why are the values lost when I save them to DTSX ?
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Timers;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Tasks.FileSystemTask;
using Microsoft.SqlServer.Dts.Tasks.BulkInsertTask;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Pipeline;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask;
using Microsoft.SqlServer.Dts.Tasks.ExecutePackageTask;
namespace PackageCreator
class Program
static void Main(string[] args)
#region Package 1
Package package1 = new Package();
#region ConnectionString
AddSqlConnection(
package1,
ConfigurationManager.AppSettings["ServerHostName"],
ConfigurationManager.AppSettings["SqlServerDefaultDB"]
#endregion
AddSqlTask(package1, "P1 - Task1");
AddSqlTask(package1, "P1 - Task2");
AddSqlTask(package1, "P1 - TaskFinal");
#region Add Dependencies
package1.PrecedenceConstraints.Add(
package1.Executables[0] as TaskHost,
package1.Executables[1] as TaskHost
package1.PrecedenceConstraints.Add(
package1.Executables[1] as TaskHost,
package1.Executables[2] as TaskHost
#endregion
#endregion
#region Package 2
Package package2 = new Package();
#region ConnectionString
AddSqlConnection(
package2,
ConfigurationManager.AppSettings["ServerHostName"],
ConfigurationManager.AppSettings["SqlServerDefaultDB"]
#endregion
AddSqlTask(package2, "P2 - TaskFinal");
#region ExecutePackageTaskClass
Executable exec1 = package2.Executables.Add("STOCK:ExecutePackageTask");
TaskHost th = exec1 as TaskHost;
ExecutePackageTask myTask = th.InnerObject as ExecutePackageTask;
myTask.PackageID = package1.ID;
#endregion
#region Add Dependencies
package2.PrecedenceConstraints.Add(
package2.Executables[0] as TaskHost,
package2.Executables[1] as TaskHost
#endregion
#endregion
//new Ispac(package1, package1.ID).DeployAndRun();
SavePackage(package1);
SavePackage(package2);
var packageList = new List<Package>();
packageList.Add(package1);
packageList.Add(package2);
new IspacPackageCollections(packageList).DeployAndRun();
Console.Read();
private static void AddSqlTask(Package package, string component)
//Thread.Sleep(5000);
package.Executables.Add("STOCK:SQLTask");
ExecuteSQLTask executeSQLTask = (package.Executables[package.Executables.Count - 1]
as TaskHost).InnerObject
as ExecuteSQLTask;
executeSQLTask.Connection = package.Connections[0].ID;
executeSQLTask.SqlStatementSource = "insert into [dbo].[SupersetPackageDependencies] (Component) values ('" +
component + @"')";
private static void SavePackage(Package package)
string packageNetworkLocation = @""
+ ConfigurationManager.AppSettings["packageNetworkLocation"]
+ @"\" + package.ID + ".dtsx";
new Application().SaveToXml(
packageNetworkLocation,
package,
null
//new Application().SaveToSqlServer(
// package,
// null,
// "ANUPN8470P",
// null,
// null
#region AddConnectionManager
private static ConnectionManager AddSqlConnection(Package package, string server, string database)
return AddConnection(
package,
"OLEDB",
String.Format(
CultureInfo.InvariantCulture,
"Provider=SQLOLEDB.1;Data Source={0};Persist Security Info=False;Initial Catalog={1};Integrated Security=SSPI;",
server,
database)
private static ConnectionManager AddConnection(Package package, string type, string connectionString)
ConnectionManager manager = package.Connections.Add(type);
manager.ConnectionString = connectionString;
manager.Name = String.Format(
CultureInfo.InvariantCulture,
"{0} Connection",
type);
return manager;
#endregion
public static void AddExecuteSqlTask(
Package _package,
string _componentId
_package.Executables.Add("STOCK:SQLTask");
// Get the task host wrapper
ExecuteSQLTask executeSQLTask = (_package.Executables[_package.Executables.Count - 1]
as TaskHost).InnerObject
as ExecuteSQLTask;
#region Set required properties
executeSQLTask.Connection = _package.Connections[0].ID;
executeSQLTask.SqlStatementSource = "insert into [dbo].[SupersetPackageDependencies] (Component) values ('" +
_componentId + @"')";
#endregion
//return executeSQLTask;Why you do not tell what properties get lost?
And why is the same get repeated (you want parallel?):
package1.Executables[0] as TaskHost,
package1.Executables[1] as TaskHost
package1.PrecedenceConstraints.Add(
package1.Executables[1] as TaskHost,
package1.Executables[1]
And why not to add them
like
package1.PrecedenceConstraints.Add(
package1.Executables[0] as TaskHost);,
package1.PrecedenceConstraints.Add( package1.Executables[1] as TaskHost
Arthur
MyBlog
Twitter -
Recover Database in RMAN vs SQL*PLUS
Hello,
Oracle 11.2.0.1, Oracle Linux 5.5 UEK.
I recently did a "recover database" in sql*plus, but an attempt to open the database gave ORA-01113, complaining the system tablespace requried more recovery. Then I used RMAN (nocatalog) and after the same "recover database" command I was able to open the database.
It seems there are differences between SQL*PLUS and RMAN "recover database" command. I have not been able to locate the chapter in the Oracle documentation that explains the difference. I have some ideas, but...
Thanks.
h3. Solution Summary:
The recover command in RMAN compared to SQL*Plus implements a more user friendly processing logic based on the current detected scenario. For instance, a RMAN recover database command may actually perform a "recover database using backup controlfile until cancel" and automatically apply all archived and online redo logs if available. The same can be achieved with the recover command in SQL*plus, but will have to be done manually.
Edited by: Dude on Jan 7, 2011 12:30 PMDude wrote:
I did not remove any datafiles or redo logs. it is the same restore operation as before, and again RMAN "recovery database" succeeds, whereas SQL recover has trouble. This tells me something is different between the two methods. For one, RMAN does not requrie to specify "using backup controlfile".
Maybe someting about "resetlogs" that that RMAN recover can handle and SQL recover not?No,problem is there.If you using rman execute RECOVER DATABASE it also will apply online logs(if available) also and as result you will get complete recovery however you must open database with resetlogs option due to you recovered database using backup controlfile.So also you can recover and open database applying this online logs.After executing RECOVER DATABASE USING BACKUP CONTROLFILE you have to pass full path of online log then press ENTER so log will apply and you can open database with RESETLOGS.See below
C:\Documents and Settings\chinar>rman target sys/sm
Recovery Manager: Release 10.2.0.1.0 - Production on Fri Jan 7 17:47:49 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
RMAN> startup nomount;
Oracle instance started
Total System Global Area 138412032 bytes
Fixed Size 1247708 bytes
Variable Size 71304740 bytes
Database Buffers 58720256 bytes
Redo Buffers 7139328 bytes
RMAN> restore controlfile from 'D:\oracle\product\10.2.0\flash_recovery_area\T\B
ACKUPSET\2011_01_07\O1_MF_NCSNF_TAG20110107T171001_6LG48JR5_.BKP'
2> ;
Starting restore at 07-JAN-11
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=157 devtype=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
output filename=D:\ORACLE\PRODUCT\10.2.0\ORADATA\T\CONTROL01.CTL
output filename=D:\ORACLE\PRODUCT\10.2.0\ORADATA\T\CONTROL02.CTL
output filename=D:\ORACLE\PRODUCT\10.2.0\ORADATA\T\CONTROL03.CTL
Finished restore at 07-JAN-11
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> restore database;
Starting restore at 07-JAN-11
Starting implicit crosscheck backup at 07-JAN-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
Crosschecked 1 objects
Finished implicit crosscheck backup at 07-JAN-11
Starting implicit crosscheck copy at 07-JAN-11
using channel ORA_DISK_1
Finished implicit crosscheck copy at 07-JAN-11
searching for all files in the recovery area
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\T\BACKUPSET\2011_01_07\O
1_MF_NCSNF_TAG20110107T171001_6LG48JR5_.BKP
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\T\SYSTEM01.DBF
restoring datafile 00002 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\T\UNDOTBS01.DBF
restoring datafile 00003 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\T\SYSAUX01.DBF
restoring datafile 00004 to D:\ORACLE\PRODUCT\10.2.0\ORADATA\T\USERS01.DBF
channel ORA_DISK_1: reading from backup piece D:\ORACLE\PRODUCT\10.2.0\FLASH_REC
OVERY_AREA\T\BACKUPSET\2011_01_07\O1_MF_NNNDF_TAG20110107T171001_6LG45BXS_.BKP
channel ORA_DISK_1: restored backup piece 1
piece handle=D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\T\BACKUPSET\2011_01_07
\O1_MF_NNNDF_TAG20110107T171001_6LG45BXS_.BKP tag=TAG20110107T171001
channel ORA_DISK_1: restore complete, elapsed time: 00:01:04
Finished restore at 07-JAN-11
RMAN> recover database;
Starting recover at 07-JAN-11
using channel ORA_DISK_1
starting media recovery
archive log thread 1 sequence 7 is already on disk as file D:\ORACLE\PRODUCT\10.
2.0\ORADATA\T\REDO02.LOG
archive log filename=D:\ORACLE\PRODUCT\10.2.0\ORADATA\T\REDO02.LOG thread=1 sequ
ence=7
media recovery complete, elapsed time: 00:00:03
Finished recover at 07-JAN-11
RMAN> exit
Recovery Manager complete.
C:\Documents and Settings\chinar>sqlplus sys/sm as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jan 7 17:51:31 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> alter database open;
alter database open
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
SQL> alter database open resetlogs;
Database altered.
SQL> And above you see lines as
archive log thread 1 sequence 7 is already on disk as file D:\ORACLE\PRODUCT\10.
*2.0\ORADATA\T\REDO02.LOG*
archive log filename=D:\ORACLE\PRODUCT\10.2.0\ORADATA\T\REDO02.LOG thread=1 sequ
ence=7
It means RMAN apply these.So you can apply these using SQLPLUS ALSO.In additionally you can see that from alert log as
alter database recover if needed
start until cancel using backup controlfile
Media Recovery Start
parallel recovery started with 2 processes
ORA-279 signalled during: alter database recover if needed
start until cancel using backup controlfile
Fri Jan 07 17:50:34 2011
alter database recover logfile 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\T\REDO02.LOG'
Fri Jan 07 17:50:34 2011
Media Recovery Log D:\ORACLE\PRODUCT\10.2.0\ORADATA\T\REDO02.LOG
Fri Jan 07 17:50:34 2011
Incomplete recovery applied all redo ever generated.
Recovery completed through change 665263
Completed: alter database recover logfile 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\T\REDO02.LOG'And finally you see clearly that even if you execute RECOVER DATABASE from RMAN it actually execute RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE (from alert.log start until cancel using backup controlfile)
And these is not any difference.
Hope that help you and you got answer. -
Are ADF BC4J based on database package procedures?
Hi all!
Is it possible to create ADF BC4J components base on database package procedures like building ORACLE FORMS blocks on case generated module api?
If yes, how can I achieve this? In the wizards I only see tables, views an so on!
regardsRead capital "26.4 Basing an Entity Object on a PL/SQL Package API" in "Oracle® Application Development Framework
Developer’s Guide For Forms/4GL Developers" -
11g p2 / bug - select in navigator from database offline object editor
It is no more possible to use the context menu "Select in Navigator" from the database offline object editor (a package body in my case). I got a message "Command not handled".
This appear in all my packages and body.
After restarting JDev and test again I got this message "Error encountered:
The Offline Database file is missing. Please recreate Offline Database "1" with the correct settings.
This object in file ADMINPROCTABLE.type will be unavailable."
Is it a way to correct this ?I completely reinstall JDev and set it to use subversion ... that resolve the problem and i'm no more in a position to reproduce it.
-
hi gems..
By mistake one developer has deleted an important package from the development database schema without takig the backup.
Is there any way to recover that package...
please help..thanks in advanceok, it depends on your undo size, configuration and database load;
But, if you still have available undo, for example to recover the package source as I was 20 minutes ago, you can do the following;
select text from dba_source
as of timestamp systimestamp - interval '20' minute
where name='<Your Package Name>' order by line; -
Forms 11gR1 with Database Package
Hi everyone,
I'm asking this here, i need to know what i'm doing wrong.
I have a database package that contains pipiled record.
I want to use it in a form with forms builder.
if i do
select * from table(mypackage.myfunction());
in PL/SQL Developper, i get all what i except (list of record)
if i try to use this select in a CURSOR inside my form, i get error about SQL type not authorised
with my from table();
but if i use it with a populate_group_with_query, everything works perfectly.
So, there's a way i can use my package inside a form program unit?
Thanks for your help.No, working with collection is not like the POPLUATE_GROUP_WITH_QUERY built-in because you have to write the code to process the rows and columns of the collection. A collection, in Oracle, is essentially an Array.
To work with a collection, you have to create an object in your trigger PL/SQL to store the collection. To do this you create a user defined TYPE and then create an object based on this type. Take a look at the article, https://sites.google.com/site/craigsoraclestuff/oracle-forms---how-to-s/forms-procedure-based-block for an example of how to write a database package the uses a collection as the source of data for a Forms data block.
Base on this article, in your Forms trigger you would then create an object typed off of the package type T_EMPLOYEE. Next, you call your database package and assign the collection to your trigger object. Finally, you loop through the collection to perform the needed action on each row. Here is an example of the basic code using the article above as an example:
/* sample code - for demonstration purposes */
/* code is untested */
DECLARE
rec_employees EMPLOYEE.T_EMPLOYEE;
BEGIN
EMPLOYEE.EMP_SELECT(rec_employees);
FOR idx in 1 .. rec_employees.COUNT LOOP
-- now do something with each column in the row...
rec_employees(idx).empno ...
rec_employees(idx).ename ...
rec_employees(idx).job ...
etc...
END LOOP;
END;
Hope this helps.
Craig... -
Can't drop database table objects on a EJB Diagram.
JDeveloper 10.1.3 EA.
When I drop a database table object on a EJB Diagram the error below occurs. Also dropping components from the Component Palette doesn't work. A wizard opens, but after completing that, nothing is on the EJB Diagram.
However, after dropping a table and a restart of JDeveloper, there is an empty 'tablename EJB' on the EJB Diagram, but a click with the mouse on it generates the same error as the drop did.
Simular errors occur with JDeveloper 10.1.2, so writing this I realize that this might be a database version problem. I'm using 9i! I'll try 10g and see what happens.
Message
BME-99003: An error occurred, so processing could not continue.
Cause
The application has tried to de-reference an invalid pointer. This exception should have been dealt with programmatically. The current activity may fail and the system may have been left in an unstable state. The following is a stack trace.
java.lang.NullPointerException
at oracle.jdevimpl.xml.DescriptorNode.getWhitespaceHandler(DescriptorNode.java:349)
at oracle.jdevimpl.xml.DescriptorNodeDomIO.load(DescriptorNodeDomIO.java:164)
at oracle.jdeveloper.xml.BindingIO.load(BindingIO.java:43)
at oracle.jdevimpl.xml.DescriptorNode.getNewDescriptorImpl(DescriptorNode.java:506)
at oracle.jdevimpl.xml.DescriptorNode.getDescriptor(DescriptorNode.java:140)
at oracle.jdeveloper.xml.oc4j.ejb.OrionEjbJarNode.getOrionEjbJar(OrionEjbJarNode.java:145)
at oracle.jdeveloper.ejb.BaseEjbModuleContainer.getOrionEjbJar(BaseEjbModuleContainer.java:476)
at oracle.jdeveloper.ejb.modeler.diagram.dropHandler.TableDropEJB21Handler.isAvailable(Unknown Source)
at oracle.bm.diagrammer.ui.DropChooserPanel.populateOptions(Unknown Source)
at oracle.bm.diagrammer.ui.DropChooserPanel.createComponents(Unknown Source)
at oracle.bm.diagrammer.ui.DropChooserPanel.<init>(Unknown Source)
at oracle.bm.diagrammer.dropHandler.AbstractChooserDropHandler.createPanel(Unknown Source)
at oracle.bm.diagrammer.dropHandler.AbstractChooserDropHandler.processObjects(Unknown Source)
at oracle.bm.addinUtil.IDEAppContext$4.performAction(Unknown Source)
at oracle.bm.diagrammer.LockMonitor.performLockedAction(Unknown Source)
at oracle.bm.diagrammer.BaseDiagram.performDiagramLockedAction(Unknown Source)
at oracle.bm.addinUtil.IDEAppContext.dropNavigatorNodeLater(Unknown Source)
at oracle.bm.addinUtil.IDEAppContext$5.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Action
If further errors occur, you should restart the application.
Also, report the problem on the JDeveloper forum on otn.oracle.com, or contact Oracle support, giving the information from this message.
________________________________________________________________________________Hi lisa, you've said that the problem does not occur in the 10.1.3 build but I have almost the same problem with the BME-99003 error message.
I used the same workaround "changing the regional settings from BE to US" and the BME-99003 problem disappears :-)
Here is the error message that I receive while I add a table into the EJBDiagram. I'm using
windows XP SP2
ADF Business Components 10.1.3.34.12
Java Platform 1.5.0_04
Oracle IDE 10.1.3.34.12
Struts Modeler Version 10.1.3.34.12
UML Modelers Version 10.1.3.34.12
Versioning Support 10.1.3.34.12
Abdelkrim BOUJRAF
Message
BME-99003: An error occurred, so processing could not continue.
Cause
The application has tried to de-reference an invalid pointer. This exception should have been dealt with programmatically. The current activity may fail and the system may have been left in an unstable state. The following is a stack trace.
java.lang.NullPointerException
at oracle.jdevimpl.xml.DescriptorNode.getWhitespaceHandler(DescriptorNode.java:349)
at oracle.jdevimpl.xml.DescriptorNodeDomIO.load(DescriptorNodeDomIO.java:164)
at oracle.jdeveloper.xml.BindingIO.load(BindingIO.java:43)
at oracle.jdevimpl.xml.DescriptorNode.getNewDescriptorImpl(DescriptorNode.java:506)
at oracle.jdevimpl.xml.DescriptorNode.getDescriptor(DescriptorNode.java:140)
at oracle.jdeveloper.xml.oc4j.ejb.OrionEjbJarNode.getOrionEjbJar(OrionEjbJarNode.java:145)
at oracle.jdeveloper.xml.oc4j.ejb.OrionEjbJarHelper.findOrionEjbJar(OrionEjbJarHelper.java:82)
at oracle.jdeveloper.xml.oc4j.ejb.OrionEjbJarHelper.findOrCreateOrionEjbJar(OrionEjbJarHelper.java:73)
at oracle.jdeveloper.ejb.modeler.diagram.dropHandler.TableDropEJBCommonHandler.processTableNodes(Unknown Source)
at oracle.jdeveloper.ejb.modeler.diagram.dropHandler.TableDropEJB21Handler.processTableNodes(Unknown Source)
at oracle.bm.typemodel.dropHandler.TableDropSubHandler.processDBObjectNodes(Unknown Source)
at oracle.bm.typemodel.dropHandler.DBObjectDropSubHandler.processObjects(Unknown Source)
at oracle.bm.diagrammer.dropHandler.AbstractChooserDropHandler.processObjectsImpl(Unknown Source)
at oracle.bm.diagrammer.dropHandler.AbstractChooserDropHandler.processObjects(Unknown Source)
at oracle.bm.addinUtil.IDEAppContext$4.performAction(Unknown Source)
at oracle.bm.diagrammer.LockMonitor.performLockedAction(Unknown Source)
at oracle.bm.diagrammer.BaseDiagram.performDiagramLockedAction(Unknown Source)
at oracle.bm.addinUtil.IDEAppContext.dropNavigatorNodeLater(Unknown Source)
at oracle.bm.addinUtil.IDEAppContext$5.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Action
If further errors occur, you should restart the application.
Also, report the problem on the JDeveloper forum on otn.oracle.com, or contact Oracle support, giving the information from this message. -
Show Database Get "Object was not found"error
Hi there,
I have a weird situation here.
I created Data Guard Broker setup and show configuration return good result.
It is running for quite a while, and I can see if I switch log file on Primary, the Max Seq# is matched between Primary and Standby. Also do a lot of other test query all return good result.
But today when I happen to run Show Database command it says the DB object not found,
and there is no error in DRCxxx.log file.
Did I miss something? Any suggestions are appreciated.
===============Script===================
--Standby
mkdir log1/dgbroker
mkdir log1/dgbroker/XXXPRD2R
mkdir log2/dgbroker
mkdir log2/dgbroker/XXXPRD2R
--Primary
mkdir log1/dgbroker
mkdir log1/dgbroker/XXXPRD2
mkdir log2/dgbroker
mkdir log2/dgbroker/XXXPRD2
-- primary
alter system set dg_broker_config_file1='/oracle/log1/dgbroker/XXXPRD2/dg1XXXPRD2.dat' scope=both;
alter system set dg_broker_config_file2='/oracle/log2/dgbroker/XXXPRD2/dg2XXXPRD2.dat' scope=both;
-- standby
alter system set dg_broker_config_file1='/oracle/log1/dgbroker/XXXPRD2R/dg1XXXPRD2R.dat' scope=both;
alter system set dg_broker_config_file2='/oracle/log2/dgbroker/XXXPRD2R/dg2XXXPRD2R.dat' scope=both;
-- primary
alter system set dg_broker_start=true scope=both;
-- standby
alter system set dg_broker_start=true scope=both;
-- primary
dgmgrl /
create configuration 'dg_XXXPRD2' as primary database is 'XXXPRD2' connect identifier is 'XXXPRD2';
add database 'XXXPRD2R' as connect identifier is 'XXXPRD2R' maintained as physical;
enable configuration;
===============Script===================
DGMGRL> show configuration
Configuration - dg_XXXPRD2
Protection Mode: MaxAvailability
Databases:
XXXPRD2 - Primary database
XXXPRD2R - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS
DGMGRL> SHOW DATABASE XXXPRD2
Object "XXXPRD2" was not found
DGMGRL> show database XXXPRD2R
Object "XXXPRD2R" was not found
-----------------------------------------------Hello;
What I have noticed is sometimes single quotes count and sometime they don't.
Try :
SHOW DATABASE 'XXXPRD2';
Test
Welcome to DGMGRL, type "help" for information.
Connected.
DGMGRL> show database standby
Object "standby" was not found
DGMGRL> show database 'standby';
Object "standby" was not found
DGMGRL> show database 'STANDBY';
Database - STANDBY
Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: (unknown)
Apply Lag:
Real Time Query: OFF
Instance(s):
STANDBYSo getting the case matters too.
DGMGRL> SHOW DATABASE STANDBY;
Object "standby" was not found
DGMGRL> Best Regards
mseberg
Edited by: mseberg on Jan 18, 2013 2:21 PM -
Recover database from archive log: Time based recovery
Hi,
Could you pelase help regarding the following:
I have power outage in my machine running oracle 9i on Solaris OS 9
Oracle is mounted but failed to open
Once it is started showing the error message
SQL> startup;
ORACLE instance started.
Total System Global Area 9457089744 bytes
Fixed Size 744656 bytes
Variable Size 3154116608 bytes
Database Buffers 6291456000 bytes
Redo Buffers 10772480 bytes
Database mounted.
ORA-01113: file 4 needs media recovery
ORA-01110: data file 4: '/opt/oracle/oradata/sysdb/indx/indx01.dbf'
So I tried to recover the database
SQL> recover database;
ORA-00279: change 1652948240 generated at 12/03/2007 13:09:08 needed for thread
1
ORA-00289: suggestion : /opt/oracle/oradata/nobilldb/archive/1_183942.dbf
ORA-00280: change 1652948240 for thread 1 is in sequence #183942
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
ORA-00279: change 1652948816 generated at 12/03/2007 13:09:19 needed for thread
1
ORA-00289: suggestion : /opt/oracle/oradata/nobilldb/archive/1_183943.dbf
ORA-00280: change 1652948816 for thread 1 is in sequence #183943
ORA-00278: log file '/opt/oracle/oradata/nobilldb/archive/1_183942.dbf' no
longer needed for this recovery
The power outage at 16:00pm and the recovery archive log file '/opt/oracle/oradata/nobilldb/archive/1_183942.dbf' at 11 am
Always I am applying the next sequence it is giving the same message and asking the next sequence. I have more than 900 archive log from 11am to 4pm and each of them having the size of 100mb and it take 1 minute to get back from each to provide this error message.
How I can start my recovery from say 15:45 onwards until 16:15?
I have all archive logs in the proper destination.
Still my database is not opened and it is starts applying archive log since 5 hours back, please help me regarding this
Thanks in advanceWrong forum. Post your question in the following forum:
General Database Discussions -
What order are Archive logs restored in when RMAN recover database issued
Ok, you have a run block that has restored your level-0 RMAN backup.
Your base datafiles are down on disc.
You are about to start recovery to point in time, lets say until this morning at 07:00am.
run { set until time "TO_DATE('2010/06/08_07:00:00','YYYY/MM/DD_HH24:MI:SS')";
allocate channel d1 type disk;
allocate channel d2 type disk;
allocate channel d3 type disk;
allocate channel d4 type disk;
recover database;
So the above runs, it analyses the earlies SCN required for recovery, checks for incremental backups (none here), works out the archivelog range
required and starts to restore the archive logs. All as expected and works.
My question: Is there a particular order that RMAN will restore the archive logs and is the restore / recover process implemented as per the run block.
i.e Will all required archive logs based on the run block be restored and then the database recovered forward. Or is there something in RMAN that says restore these archive logs, ok now roll forwards, restore some more.
When we were doing this the order of the archive logs coming back seemed to be random but obviously constrained by the run block. Is this an area we need to tune to get recoveries faster for situations where incrementals are not available?
Any inputs on experience welcome. I am now drilling into the documentation for any references there.
ThanksHi there, thanks for the response I checked this and here are the numbers / time stamps on an example:
This is from interpreting the list backup of archivelog commands.
Backupset = 122672
==============
Archive log sequence 120688 low time: 25th May 15:53:07 next time: 25th May 15:57:54
Piece1 pieceNumber=123368 9th June 04:10:38 <-- catalogued by us.
Piece2 pieceNumber=122673 25th May 16:05:18 <-- Original backup on production.
Backupset = 122677
==============
Archive log sequence 120683 low time: 25th May 15:27:50 Next time 25th May 15:32:24 <-- lower sequence number restored after above.
Piece1 PieceNumber=123372 9th June 04:11:34 <-- Catalogued by us.
Piece2 PieceNumber=122678 25th May 16:08:45 <-- Orignial backup on Production.
So the above would show that if catalogue command you could influence the Piece numbering. Therefore the restore order if like you say piece number is the key. I will need to review production as to why they were backed up in different order completed on production. Would think they would use the backupset numbering and then piece within the set / availability.
Question: You mention archive logs are restored and applied and deleted in batches if the volume of archivelogs is large enough to be spread over multiple backup sets. What determines the batches in terms of size / number?
Thanks for inputs. Answers some questions. -
Can I use RECOVER database command evenif there is no MEDIA FAILURE? [b]Urg
I need an urgent help from all the big guns out there?
My database is up and running, but still I want to recover the deletion of data that has been done on FRIDAY/SATURDAY/SUNDAY/MONDAY/TUESDAY/WEDNESDAY in other words I want the FRIDAY's state of the database.
Can I do it using the
"RECOVER DATABASE UNTIL TIME '2005-28-06-00:00:00' command?
Please guide me.
Thanks in advanceHi,
i assume you running your database in archive log mode and using rman to accomplish you task.i would say that you can recover your database even if there is no media faliur occurs,no doubt you can use this.i think you want to recover your database to the fridays state prior to the table deletion,so you get the tables back in your database.so what's a problem execut following.
run {
SET UNTIL TIME "TO_DATE('apr 03 2005 01:17:13','MON DD YYYY HH24:MI:SS')";
restore database ;
recover database ;
asuume in this example that you want to recover your database up to date aprail 3 and prior to 01pm time.
change the code according to your requirement.
thanks. -
Recover database in NOarchivelog mode :)
Hi all. How to recover a database wich is in noarchivelog mode? B-)
Suppose,
I have 3 redolog groups (with two members in each, the second members are located on another drive ). When first redo log group was 1/2 full I took a full backup. Then there were 2 switches from first to second and from second to third. Now the currnet redolog group - 3 (just started). At this point we faced media failer. How to roll forward changes using backup + online redologs?
Edited by: Junior Oracle DBA on Oct 16, 2008 1:53 PMRestore your database cold backup (excluding redo logs).
Then issue this command :
RECOVER DATABASE USING BACKUP CONTROLFILE
provide the names of the last ACTIVE / CURRENT Redo Logs in the database when Oracle prompts for an ArchiveLog.
When Oracle has finished recovery to a consistent point in time, it will return to the command prompt without any error.
Now issue this command :
ALTER DATABASE OPEN RESETLOGS
You would have a Complete Recovery.
This is provided that Oracle had NOT cycled through all the Online Redo Logs since the time when the Cold Backup was taken. (If Oracle had cycled through all the Online Redo Logs, it would have overwrriten the oldest log because it wasn't in ArchiveLog mode).
Hemant K Chitale
http://hemantoracledba.blogspot.com -
Problem with database schema objects in the entity object wizard
Hi All,
When creating a new entity object, I am facing a problem with database schema objects in the entity object wizard, database schema objects (check boxes for tables,synonyms...) are disabled. Actually I am using a synonym but I am not able to select the synonym check box.
Can any of you folks tell me how to enable the database schema objects (check boxes for tables,synonyms...).
Thanks in Advance.
Raja.MMake sure your using rite version of jdeveloper..
Make sure your using apps schema and check whether your able perform DML operations in the schema vis sql developer.
--Prasanna
Maybe you are looking for
-
How to include Abbreviations in Dimensional Model
Dear All, The question is basically related to modelling but as I am using OWB for this, I am posing the question here. I have to migrate a HR database from relational model to dimensional model. I have the following situation. There is a table which
-
Hi, I have MAc which is upgraded to OS lion. Strangely download speed on system is very less. for a small 22mb file its taking close to 3 hours. Any suggestions. Thanks dhargv
-
Other members of my family are able to access my ".me" e-mail account. How do I set my account so that only I am able to access that account?
-
Customer has input from remote senor via radio rtu, they want to enter a setpoint then compare it to existing flow rate, then automatically set gate motor to achieve flow rate. Gate motor is controlled by digital output. I need to update or change le
-
Record saving problem - help please
Hi, I'm having a problem with saving a set of records. I want to do this. I have a HTML form which generates a list of candidates who are selected from the interview. Here is that code: <%@ page language="java" import="java.util.*"%> <%@ page import=