How to create new database from backup.
Hi !
i have backup of a database, i do not want to restore, i want to create new database from the backup.
i am using oracle 11g xe.
yours sincerely
If the Location of the datafiles is similar to that of source database then you can consider below steps
Create Oracle Service using oradim
set ORACLE_SID=NEWDB
oradim -new -sid NEWDB -intpwd passwordofthesys -startmode M
Connect to the RMAN
rman>rman target /
restore spfile/pfile and control file from backup
rman>restore spfile to pfile '_localtion of the initNEWDB.ora_' from '_location of the SPFILE Backuppiece_';
rman>startup nomount pfile='localtion of the initNEWDB.ora';
rman>restore controlfile from 'file location of the controlfile Backuppiece';
rman>alter database mount;
Catalog the RMAN backuppiece of source database
rman>catalog backuppiece '_location of the rman backuppiece of source database_ ';
resotore & recover database
rman>restore database;
rman>recover database;
open the database with reset logs
rman>alter database open resetlogs;
rman>create spfile from pfile;
rman>shutdown immediate;
rman>startup;
==================
If you have access to source database then you can clone using below rman command:
+rman target _<source database>_ auxiliary _<new database>_+
rman>duplication target database to _<your new database name>_;
==========
If the location of the datafiles and logfiles are different from source database then you need to add db_file_name_convert and log_file_name_convert to the pfile before starting the recovery process.
Similar Messages
-
How to Create new database from cold backup files.
Dear Experts,
I have an oracle 10g databae on windows 2003 server.
The database is in Archive log mode and backup strategy is Taking cold backup ever night.
Backup steps:
shut down database.
copy data files, control files, redo logs, archive logs and parameter files to safe location.
Startup.
I have taken a backup at Tuesdaay 1AM and I have archive logs also.
On Wednesday, I want to Create a new database on another server with the available cold backup files and archive logs. I want to recover the database upto 4PM Wednesday. How can I do this.
I am not using control file auto backup or control file backup to trace.
Please help me how can I do this. I am new to oracle database Administration.
--ThanksThe steps :
shut down database.
copy data files, control files, redo logs, archive logs and parameter files to safe location -- you mean the alternate location for the new databaseare correct (except that I would say "alternate location for the new database").
If you do not have controlfile backups, you cannot either OPEN the database or RECOVER the database until and unless you CREATE the Controlfiles. You have to generate a CREATE CONTROLFILE script using a BACKUP CONTROLFILE TO TRACE from the Production serer and create the controlfile on the new server.
BEFORE the Startup, I would use
RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;The "using backup controlfile" tells Oracle to continue attempting Recovery -- ie doing a RollForward -- till the last archivelog made available to it.
For the Recover command, you then keep applying the ArchiveLogs from the Tuesday 1am ColdBackup upto Wednesday 4pm.
Once you have applied the last ArchiveLog, you do an
ALTER DATABASE OPEN RESETLOGS;Here are my notes of doing a RollForward "Recovery" from a Cold Backup :
http://hemantoracledba.blogspot.com/2007/05/rollforward-from-cold-backup.html
If you are attempting all these steps on a different server from your current Production database, you should be safe.
Once you OPEN the database, you can use CREATE CONTROLFILE or the NID utility to rename the database.
If you are attempting to create the new database on the same server there are many other precautions you have to take and unless you have experience with cloning databases, I would advice you against doing so (only the RMAN DUPLICATE DATABASE command has a safer method of cloning a database).
Hemant K Chitale
http://hemantoracledba.blogspot.com -
How to create new database on Oracle 10g
Hi All,
Can any one tell me how to create new database on oracle 10g.
Thanks in Advance for your help.again some confusion here.....
u said u need a new database in your first post and now you saying u need a new schema..
one database has many schemas(users)..... ex: scott,sys,system are few of them...
now it depends you need seperate database for test,dev environment - this is in the case u have many schemas under each database and many tables(objects) under each schema.
OR
You just need a separate schema (in same db) for test,dev environment...where in you will have multiple tables in each schema...U need to know the dba credentials of the db to create a new schema.
ideally u need to have different database...You can create one with out sys/system(oracle users) password as these passwords are db dependent.
what you need is access to the any machine where server is installed(can be the same mc where you have your dev db or a diff machine) and that will be the machine where your db will be installed (can do it through database configuration assistance),ofcourse you will need windows authentication for this.
so you login to the same machine or access it from your machine using remote login.
I hope that is clear.Hope i am not listing things that you already know..Just did it coz of confusion between db and schema
Message was edited by:
coolguy -
How to create a database from dfj zip file
Hi,
I have created a database template via DCA from PC-1 which has got oracle 9i and it has produced a file with extention dfj.
I am trying to create a new database using this dfj file on a different pc which has oracle 10g.
1- How can i use dfj file to create a new database?
2- Can i use Oracle 9i templates in Oracle 10g?-in dbca you have the option to create the database from existing template
-not sure if we can simply use 9i template in 10g but you may try, chances are less. -
How to create new solution from Existing solution in integration services on TFS project?
Hi,
I am working on SSIS Project and it is created in VS 2008 .I opened the solution in VS 2010 and it is upgraded and unfortynately i don't have the back up to re open it in VS 2008.I am thinking of creating new solution from the existing one and open the new
solution in VS 2008.I was struck how can we copy existing solution to new solution on TFS.
Please let me know will this process work? and also how can we create a new solution without losing any files.
Any help is appreciated.Hi moh1kumr,
As Joost said, you can try to revert the changes back for the checked in files in TFS. For more information, please see:
http://msdn.microsoft.com/en-us/library/ee371161(v=expression.40).aspx
http://stackoverflow.com/questions/2694644/how-to-revert-roll-back-a-checkin-in-tfs-2010
If it doesn’t work, I am afraid you have to design the package in VS 2008 from scratch.
Regards,
Mike Yin
TechNet Community Support -
How to create new database with rman backup
hi,
i took a rman backup with nocatelog. can i make a new database with that rman backup.
if yes then how ? i m using oracle 9i.
thxs'NEW' doesn't seem to be the right word here, but you can DUPLICATE (clone) an existing database or restore it to a new host:
http://download.oracle.com/docs/cd/B10501_01/server.920/a96566/toc.htm
Werner -
How to create new Database With existing Backup
hi all
my Scenario is
i have full backup of my database(11g r2 64)
i formatted my system and reinstall
h3. Windows 7 ultimate 64
how to create the same Database as it was earliar?
i have
h3. Oracle 11g r2 same as backedUp 64
h3. Full Backup Through eterprise manager
Thanks to all
Edited by: Rajneesh on Sep 27, 2011 10:53 PMYou can create a clone database using DUPLICATE DATABASE command as it's shown in the following video tutorial:
http://kamranagayev.com/2010/06/25/rman-video-tutorial-series-creating-duplicate-and-standby-database-using-rman/
Or perform disaster recovery using backup files using the following video tutorial:
http://kamranagayev.com/2010/03/29/rman-video-tutorial-series-performing-disaster-recovery-with-rman/ -
How to create new database?
In the "Oracle ODBC Test" client app, when I try to create a database with ...
create database swett
... I get the error "ORA-01100: database already mounted" error.
Why? I can create a table with:
create table mytable ....
and it builds it in the SYS database. I can insert rows into it and select rows out of it OK.
I just don't know how to create a new database via ODBC. (There are probably ways to create a database via interactive GUI, but I need to do it via SQL statements for my app.)
My connection is with user "internal" into SID ORCL.
I'm using Oracle 8 Server on Netware 5 and the Windows 95 client on a Windows 98 machine.
nullHi,
I hope, below stored procedure is useful for your scenario.
CREATE PROC Create_New_Database
( @DBNAME VARCHAR(550)
)AS
Test : Exec [Create_New_Database] @DBNAME='DB20122013'
BEGIN TRY
SET NOCOUNT ON
DECLARE @sql VARCHAR(MAX), @DBNAME_NEW VARCHAR(550),@num int
IF EXISTS(SELECT 1 FROM sys.databases WHERE name=@DBNAME) AND ISNUMERIC(RIGHT(@DBNAME,4))=1
BEGIN
SELECT @num= RIGHT(@DBNAME,4)
SELECT @DBNAME_NEW='DB'+CAST(@num AS VARCHAR(10))+''+CAST(@num+1 AS VARCHAR(10))
IF EXISTS(SELECT 1 FROM sys.databases WHERE name=@DBNAME_NEW)
BEGIN
SELECT @DBNAME_NEW+' database already exists'
END
ELSE
BEGIN
SET @sql='USE '+@DBNAME+' '+' backup database '+@DBNAME+' to disk = ''C:\'+@DBNAME+'.bak'' '
+' restore database '+@DBNAME_NEW+' from disk = ''C:\'+@DBNAME+'.bak'''
+' with move '''+@DBNAME+''' to ''C:\'+@DBNAME+'_data.mdf'' ,
move '''+@DBNAME+'_log'' to ''C:\'+@DBNAME+'_log.log'''
EXEC (@sql)
SET @sql=''
SET @sql=' USE '+@DBNAME_NEW+' IF EXISTS(SELECT 1 FROM SYS.TABLES WHERE NAME=''Dailytemp'')
BEGIN DROP TABLE Dailytemp END IF EXISTS(SELECT 1 FROM SYS.TABLES WHERE NAME=''DailyMain'')
BEGIN DROP TABLE DailyMain END '
EXEC (@sql)
END
END
ELSE
BEGIN
SELECT 'Database is now found or Database name does not mach the scenario'
END
SET NOCOUNT OFF
END TRY
BEGIN CATCH
DECLARE @ErrorMessage NVARCHAR(4000)
DECLARE @ErrorSeverity INT
DECLARE @ErrorState INT
SELECT @ErrorMessage = ERROR_MESSAGE(), @ErrorSeverity = ERROR_SEVERITY(),@ErrorState = ERROR_STATE()
RAISERROR (@ErrorMessage,@ErrorSeverity,@ErrorState )
END CATCH;
GO
Regards,
RAMBHARATH -
Please follow the scenario:
using C#
1) current database file name is DB20122013.
when user click on new year button
2)Create backup copy of current database
3)New database should create with all table(excluding table "Dailytemp" and "DailyMain") with data and database name as DB20132014.
Musakkhir Sayyed.Hi,
I hope, below stored procedure is useful for your scenario.
CREATE PROC Create_New_Database
( @DBNAME VARCHAR(550)
)AS
Test : Exec [Create_New_Database] @DBNAME='DB20122013'
BEGIN TRY
SET NOCOUNT ON
DECLARE @sql VARCHAR(MAX), @DBNAME_NEW VARCHAR(550),@num int
IF EXISTS(SELECT 1 FROM sys.databases WHERE name=@DBNAME) AND ISNUMERIC(RIGHT(@DBNAME,4))=1
BEGIN
SELECT @num= RIGHT(@DBNAME,4)
SELECT @DBNAME_NEW='DB'+CAST(@num AS VARCHAR(10))+''+CAST(@num+1 AS VARCHAR(10))
IF EXISTS(SELECT 1 FROM sys.databases WHERE name=@DBNAME_NEW)
BEGIN
SELECT @DBNAME_NEW+' database already exists'
END
ELSE
BEGIN
SET @sql='USE '+@DBNAME+' '+' backup database '+@DBNAME+' to disk = ''C:\'+@DBNAME+'.bak'' '
+' restore database '+@DBNAME_NEW+' from disk = ''C:\'+@DBNAME+'.bak'''
+' with move '''+@DBNAME+''' to ''C:\'+@DBNAME+'_data.mdf'' ,
move '''+@DBNAME+'_log'' to ''C:\'+@DBNAME+'_log.log'''
EXEC (@sql)
SET @sql=''
SET @sql=' USE '+@DBNAME_NEW+' IF EXISTS(SELECT 1 FROM SYS.TABLES WHERE NAME=''Dailytemp'')
BEGIN DROP TABLE Dailytemp END IF EXISTS(SELECT 1 FROM SYS.TABLES WHERE NAME=''DailyMain'')
BEGIN DROP TABLE DailyMain END '
EXEC (@sql)
END
END
ELSE
BEGIN
SELECT 'Database is now found or Database name does not mach the scenario'
END
SET NOCOUNT OFF
END TRY
BEGIN CATCH
DECLARE @ErrorMessage NVARCHAR(4000)
DECLARE @ErrorSeverity INT
DECLARE @ErrorState INT
SELECT @ErrorMessage = ERROR_MESSAGE(), @ErrorSeverity = ERROR_SEVERITY(),@ErrorState = ERROR_STATE()
RAISERROR (@ErrorMessage,@ErrorSeverity,@ErrorState )
END CATCH;
GO
Regards,
RAMBHARATH -
How to restore a database from backup taken in standby database
Its our environment standard to run backup in standby database.
Now we have to perform refresh production database to UAT database.
I have performed normal refresh/duplicate. Is there any additional procedures need to be followed to perform refresh from standby database backupRMAN Restoration to New Server with Different Directory and New Database Name
In this case, I have an existing production database with RMAN Level 0 backup:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'C:\flash_recovery_area\galaxy\backupsets\autobackup\SAMSUNG-ctl_%F';
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'C:\flash_recovery_area\galaxy\backupsets\level0\level0-%d-%T-%U' MAXPIECESIZE 4G;
DELETE NOPROMPT ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE - 7';
SHOW ALL;
REPORT SCHEMA;
LIST BACKUP OF DATABASE;
REPORT NEED BACKUP;
REPORT UNRECOVERABLE;
LIST EXPIRED BACKUP BY FILE;
LIST ARCHIVELOG ALL;
REPORT OBSOLETE;
CROSSCHECK BACKUP DEVICE TYPE DISK;
CROSSCHECK COPY OF ARCHIVELOG ALL;
DELETE NOPROMPT EXPIRED BACKUP DEVICE TYPE DISK;
DELETE NOPROMPT OBSOLETE DEVICE TYPE DISK;
RUN {
sql 'alter system archive log current';
BACKUP INCREMENTAL LEVEL 0 DATABASE PLUS ARCHIVELOG DELETE INPUT;
LIST BACKUP OF DATABASE;
REPORT NEED BACKUP;
REPORT UNRECOVERABLE;
LIST EXPIRED BACKUP BY FILE;
LIST ARCHIVELOG ALL;
REPORT OBSOLETE;
CROSSCHECK BACKUP DEVICE TYPE DISK;
CROSSCHECK COPY OF ARCHIVELOG ALL;
DELETE NOPROMPT EXPIRED BACKUP DEVICE TYPE DISK;
DELETE NOPROMPT OBSOLETE DEVICE TYPE DISK;
The backupsets will be restored into a new server with different file structure. The database will also be different. In the new server, I have created a blank database (SID or CUSTOM database with the name DBGRID). This is easier so I won't have to create any directories, user ORADIM or create new PWFile.
This document assumes that a blank (starter) database has been created in the new server. The RDBMS version is the same as the source database.
In this example, the source database name is GALAXY and the target database name is DBGRID.
Let me know if you have any feedback or comments. All I want is to share these steps with you and make it better so we can help other DBA's as well.
Steps start here
-->
ORIGINAL DATABASE: GALAXY
DUPLICATE DATABASE: DBGRID
FROM THE SOURCE DATABASE (GALAXY)
1. Backup the database using RMAN incremental backups.
2. Check the RMAN logs generated and look for the result of the command:
C:\Users\Administrator>set ORACLE_SID=GALAXY
C:\Users\Administrator>rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Wed Aug 1 06:55:08 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: GALAXY (DBID=3578870300)
RMAN> report schema;
using target database control file instead of recovery catalog
Report of database schema for database with db_unique_name GALAXY
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
1 680 SYSTEM *** C:\ORACLE\ORADATA\GALAXY\SYSTEM01.DBF
2 510 SYSAUX *** C:\ORACLE\ORADATA\GALAXY\SYSAUX01.DBF
3 140 UNDOTBS1 *** C:\ORACLE\ORADATA\GALAXY\UNDOTBS01.DBF
4 5 USERS *** C:\ORACLE\ORADATA\GALAXY\USERS01.DBF
5 106 EXAMPLE *** C:\ORACLE\ORADATA\GALAXY\EXAMPLE01.DBF
6 2048 ALLINDEX *** C:\ORACLE\ORADATA\GALAXY\ALLINDEX01.DBF
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
1 29 TEMP 32767 C:\ORACLE\ORADATA\GALAXY\TEMP01.DBF
This command shows all the physical database files that will be backed-up by the current RMAN job.
List the online redolog files:
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER IS_
3 ONLINE C:\ORACLE\ORADATA\GALAXY\REDO03A.LOG NO
3 ONLINE C:\ORACLE\ORADATA\GALAXY\REDO03B.LOG NO
2 ONLINE C:\ORACLE\ORADATA\GALAXY\REDO02A.LOG NO
2 ONLINE C:\ORACLE\ORADATA\GALAXY\REDO02B.LOG NO
1 ONLINE C:\ORACLE\ORADATA\GALAXY\REDO01A.LOG NO
1 ONLINE C:\ORACLE\ORADATA\GALAXY\REDO01B.LOG NO
6 rows selected.
3. Since the target server has different structure, it is easier to use a pfile to startup the database rather than restoring the spfile from backup.
C:\Users\Administrator>set ORACLE_SID=GALAXY
C:\Users\Administrator>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Aug 1 06:56:14 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create pfile='C:\TEMP\initGALAXYrman.ora' from spfile;
File created.
4. Edit the pfile to have the following parameters:
(These parameters has been edited to fit the target database requirements)
galaxy entries has been changed to dbgrid. Directories has been corrected as well.
dbgrid.__db_cache_size=192937984
dbgrid.__java_pool_size=4194304
dbgrid.__large_pool_size=4194304
dbgrid.__oracle_base='D:\app\Administrator'#ORACLE_BASE set from environment
dbgrid.__pga_aggregate_target=281018368
dbgrid.__sga_target=524288000
dbgrid.__shared_io_pool_size=0
dbgrid.__shared_pool_size=301989888
dbgrid.__streams_pool_size=4194304
*.audit_file_dest='D:\app\Administrator\admin\DBGRID\adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='D:\oradata\DBGRID\control01.ctl','D:\oradata\DBGRID\control02.ctl'
*.db_block_size=8192
*.db_domain=''
Leave as it is for now --> *.db_name='GALAXY'
*.db_recovery_file_dest='D:\fra\backupsets\duplicate'
*.DB_RECOVERY_FILE_DEST_SIZE=4G
*.diagnostic_dest='D:\app\Administrator'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=DBGRIDXDB)'
*.job_queue_processes=1000
*.log_archive_dest_1='location=D:\fra\backupsets\archs'
*.log_buffer=10485760
*.memory_target=805306368
*.open_cursors=300
*.processes=800
*.remote_login_passwordfile='EXCLUSIVE'
*.session_cached_cursors=300
*.sessions=885
*.undo_tablespace='UNDOTBS1'
Make sure that all the directory values in this edited pfile are existing in the target server.
5. Copy all the RMAN backup pieces generated in the source database. Transfer the edited pfile as well. Make sure that all directories presented in the pfile exists in the target server.
In this example, RMAN backupsets are located at:
Backupsets:
Level0 and Level1 = D:\fra\backupsets\duplicate\level0 , D:\fra\backupsets\duplicate\level1
Controlfile and Spfile Autobackup = D:\fra\backupsets\duplicate\autobackup
Edited pfile initGALAXYrman= C:\TEMP\initDBGRIDnew.ora
FROM THE TARGET DATABASE (DBGRID)
6. Connect to RMAN and perform database duplication using RMAN backup restoration
C:\Users\Administrator>rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Wed Aug 1 07:26:45 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database (not started)
RMAN> set dbid = 3578870300; --> THIS IS THE DBID OF THE SOURCE DATABASE!
executing command: SET DBID
RMAN> startup nomount pfile='C:\TEMP\initDBGRIDnew.ora'; -->restore the edited pfile
Oracle instance started
Total System Global Area 535662592 bytes
Fixed Size 1375792 bytes
Variable Size 327156176 bytes
Database Buffers 192937984 bytes
Redo Buffers 14192640 bytes
RMAN> restore controlfile from 'D:\fra\backupsets\duplicate\autobackup\SAMSUNG-CTL_C-3578870300-20120801-00'; -->restore the correct controlfile
Starting restore at 01-AUG-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
output file name=D:\ORADATA\DBGRID\CONTROL01.CTL
output file name=D:\ORADATA\DBGRID\CONTROL02.CTL
Finished restore at 01-AUG-12
RMAN> alter database mount; -->mount the database
database mounted
released channel: ORA_DISK_1
RMAN> catalog start with "D:\fra\backupsets\duplicate";
--> catalog the location of the backup pieces to make it known to the control file
Starting implicit crosscheck backup at 01-AUG-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK
Crosschecked 3 objects
Finished implicit crosscheck backup at 01-AUG-12
Starting implicit crosscheck copy at 01-AUG-12
using channel ORA_DISK_1
Finished implicit crosscheck copy at 01-AUG-12
searching for all files in the recovery area
cataloging files...
no files cataloged
searching for all files that match the pattern D:\fra\backupsets\duplicate
List of Files Unknown to the Database
=====================================
File Name: D:\FRA\BACKUPSETS\duplicate\autobackup\SAMSUNG-CTL_C-3578870300-20120801-00
File Name: D:\FRA\BACKUPSETS\duplicate\level0\LEVEL0-GALAXY-20120801-01NHGTGV_1_1
File Name: D:\FRA\BACKUPSETS\duplicate\level0\LEVEL0-GALAXY-20120801-02NHGTIA_1_1
File Name: D:\FRA\BACKUPSETS\duplicate\level0\LEVEL0-GALAXY-20120801-03NHGTMT_1_1
Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: D:\FRA\BACKUPSETS\duplicate\autobackup\SAMSUNG-CTL_C-3578870300-20120801-00
File Name: D:\FRA\BACKUPSETS\duplicate\level0\LEVEL0-GALAXY-20120801-01NHGTGV_1_1
File Name: D:\FRA\BACKUPSETS\duplicate\level0\LEVEL0-GALAXY-20120801-02NHGTIA_1_1
File Name: D:\FRA\BACKUPSETS\duplicate\level0\LEVEL0-GALAXY-20120801-03NHGTMT_1_1
RMAN> list backup summary; -->check your backup they are now known
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
1 B A A DISK 01-AUG-12 1 2 NO TAG20120801T011054
2 B 0 A DISK 01-AUG-12 1 2 NO TAG20120801T011137
3 B A A DISK 01-AUG-12 1 2 NO TAG20120801T011405
RMAN> list archivelog all; -->list you archivelog for point in time recovery
List of Archived Log Copies for database with db_unique_name GALAXY
=====================================================================
Key Thrd Seq S Low Time
26 1 29 A 01-AUG-12
Name: D:\FRA\BACKUPSETS\ARCHS\ARC0000000029_0785167457.0001
Perform database restoration and recovery. The sequence number is Seq+1 for complete recovery, so that will be 29 + 1 = 30. You can also do recovery via SCN or time based recovery.
Remember in the previous step: RMAN> REPORT SCHEMA;
Each datafile has a corresponding datafile number.
Follow the format to convert them into their respective new restoration directory in the target server.
SET NEWNAME has the format:
SET NEWNAME FOR DATAFILE [FILE NUMBER IN THE REPORT SCHEMA COMMAND] TO
‘[NEW LOCATION AND FILENAME OF THE DATAFILES]’;
RMAN> run {
2> SET UNTIL SEQUENCE 30 THREAD 1;
3> set newname for datafile 1 to 'D:\oradbgrid\oradata\SYSTEM01.DBF';
4> set newname for datafile 2 to 'D:\oradbgrid\oradata\SYSAUX01.DBF';
5> set newname for datafile 3 to 'D:\oradbgrid\oradata\UNDOTBS01.DBF';
6> set newname for datafile 4 to 'D:\oradbgrid\oradata\USERS01.DBF';
7> set newname for datafile 5 to 'D:\oradbgrid\oradata\EXAMPLE01.DBF';
8> set newname for datafile 6 to 'D:\oradbgrid\oradata\ALLINDEX01.DBF';
9> restore database;
10> switch datafile all;
11> recover database;
12> }
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 01-AUG-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to D:\oradbgrid\oradata\SYSTEM01.DBF
channel ORA_DISK_1: restoring datafile 00002 to D:\oradbgrid\oradata\SYSAUX01.DBF
channel ORA_DISK_1: restoring datafile 00003 to D:\oradbgrid\oradata\UNDOTBS01.DBF
channel ORA_DISK_1: restoring datafile 00004 to D:\oradbgrid\oradata\USERS01.DBF
channel ORA_DISK_1: restoring datafile 00005 to D:\oradbgrid\oradata\EXAMPLE01.DBF
channel ORA_DISK_1: restoring datafile 00006 to D:\oradbgrid\oradata\ALLINDEX01.DBF
channel ORA_DISK_1: reading from backup piece D:\FRA\BACKUPSETS\DUPLICATE\LEVEL0\LEVEL0-GALAXY-20120801-02NHGTIA_1_1
channel ORA_DISK_1: piece handle=D:\FRA\BACKUPSETS\DUPLICATE\LEVEL0\LEVEL0-GALAXY-20120801-02NHGTIA_1_1 tag=TAG20120801T011137
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:02:06
Finished restore at 01-AUG-12
Starting recover at 01-AUG-12
using channel ORA_DISK_1
starting media recovery
archived log for thread 1 with sequence 29 is already on disk as file D:\FRA\BACKUPSETS\ARCHS\ARC0000000029_0785167457.0001
archived log file name=D:\FRA\BACKUPSETS\ARCHS\ARC0000000029_0785167457.0001 thread=1 sequence=29
media recovery complete, elapsed time: 00:00:01
Finished recover at 01-AUG-12
Log in to SQL*Plus to recreate the redolog files.
Format:
ALTER DATABASE RENAME FILE ‘[OLD REDOLOG LOCATION]’ TO ‘[NEW REDOLOG LOCATION]’;
C:\Users\Administrator>sqlplus "/ as sysdba"
SQL*Plus: Release 11.2.0.1.0 Production on Wed Aug 1 08:54:27 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select instance_name, status from v$instance;
INSTANCE_NAME STATUS
dbgrid MOUNTED
SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\ORADATA\GALAXY\REDO03A.LOG' TO 'C:\oracle\oradata\dbgrid\REDO03A.LOG';
Database altered.
SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\ORADATA\GALAXY\REDO03B.LOG' TO 'C:\oracle\oradata\dbgrid\REDO03B.LOG';
Database altered.
SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\ORADATA\GALAXY\REDO02A.LOG' TO 'C:\oracle\oradata\dbgrid\REDO02A.LOG';
Database altered.
SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\ORADATA\GALAXY\REDO02B.LOG' TO 'C:\oracle\oradata\dbgrid\REDO02B.LOG';
Database altered.
SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\ORADATA\GALAXY\REDO01A.LOG' TO 'C:\oracle\oradata\dbgrid\REDO01A.LOG';
Database altered.
SQL> ALTER DATABASE RENAME FILE 'C:\ORACLE\ORADATA\GALAXY\REDO01B.LOG' TO 'C:\oracle\oradata\dbgrid\REDO01B.LOG';
Database altered.
Open the database in resetlogs option. Create spfile from the edited pfile then bounce the database.
RMAN> alter database open resetlogs;
database opened
SQL> create spfile from pfile='C:\TEMP\initDBGRIDnew.ora';
File created.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 535662592 bytes
Fixed Size 1375792 bytes
Variable Size 327156176 bytes
Database Buffers 192937984 bytes
Redo Buffers 14192640 bytes
Database mounted.
Database opened.
SQL> select instance_name, status from v$instance;
INSTANCE_NAME STATUS
dbgrid OPEN
Create a new TEMP tablespace, make this as the new default temporary tablespace. Drop the old TEMP tablespace. Restart the database.
SQL> CREATE TEMPORARY TABLESPACE TEMP01 TEMPFILE 'D:\oradbgrid\oradata\TEMP0101.dbf' SIZE 200M;
Tablespace created.
SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP01;
Database altered.
SQL> drop tablespace TEMP including contents and datafiles;
Tablespace dropped.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance sta -
How to create OO Database from class diagrams?
I am new to use JDeveloper. I create UML class diagrams (using Entity Object) in JDeveloper, which has inheritances and associations, and then choose Create Database Objects... try to create oo database, but it only create some tables in the database, not any object types ... .
What do I missed? Or I have to create those oo database objects manually?
Thanks.If the Location of the datafiles is similar to that of source database then you can consider below steps
Create Oracle Service using oradim
set ORACLE_SID=NEWDB
oradim -new -sid NEWDB -intpwd passwordofthesys -startmode M
Connect to the RMAN
rman>rman target /
restore spfile/pfile and control file from backup
rman>restore spfile to pfile '_localtion of the initNEWDB.ora_' from '_location of the SPFILE Backuppiece_';
rman>startup nomount pfile='localtion of the initNEWDB.ora';
rman>restore controlfile from 'file location of the controlfile Backuppiece';
rman>alter database mount;
Catalog the RMAN backuppiece of source database
rman>catalog backuppiece '_location of the rman backuppiece of source database_ ';
resotore & recover database
rman>restore database;
rman>recover database;
open the database with reset logs
rman>alter database open resetlogs;
rman>create spfile from pfile;
rman>shutdown immediate;
rman>startup;
==================
If you have access to source database then you can clone using below rman command:
+rman target _<source database>_ auxiliary _<new database>_+
rman>duplication target database to _<your new database name>_;
==========
If the location of the datafiles and logfiles are different from source database then you need to add db_file_name_convert and log_file_name_convert to the pfile before starting the recovery process. -
How to create NEW Pdf from SELECTED pages?! thought this would be so easy!
I am finding it hard to believe how much time I've sunk into trying to figure this out. I thought it would be as simple as me selecting different pages, right clicking, and then finding "new document from selection," or something like that.
I have a PDF with about 300 pages. I have a list of page numbers that I need in a NEW PDF. What is the easiest way to do this? Thanks so much.
-EricI created a tool that does just that (only you will need to enter the page numbers as text, it does not work by selecting them):
Acrobat -- Extract Non-Sequential Pages: http://try67.blogspot.com/2011/04/acrobat-extract-non-sequential-pages.html -
How to create new database in oracle 9i
how to create database in oracle 9i and create all table, trigger and fun/stored procedure in it?
one more thing is that how to assign connection with JSP. i need code if possible.Roop.IT.Tech wrote:
how to create database in oracle 9i and create all table, trigger and fun/stored procedure in it?Read the docs that come along with the database. This has nothing to do with JDBC.
one more thing is that how to assign connection with JSP. i need code if possible.Create a DAO class which does all the JDBC task. Then create a servlet class which has an instance of the DAO class. In the doGet() or the doPost() do your DAO thing, store the result in the request scope and forward the request to a JSP. In the JSP file use JSTL/EL to display the data to the world. -
How to Create SQL "Databases" from LV?
Is there a way to create SQL Databases (not just tables) from inside LabVIEW??? This sould be fairly easy...
All I know is what is in the SQL Server help file. There is the SQL command "CREATE DATABASE". An example is:
USE master
GO
CREATE DATABASE Sales
ON
( NAME = Sales_dat,
FILENAME = 'c:\program files\microsoft sql server\mssql\data\saledat.mdf',
SIZE = 10,
MAXSIZE = 50,
FILEGROWTH = 5 )
LOG ON
( NAME = 'Sales_log',
FILENAME = 'c:\program files\microsoft sql server\mssql\data\salelog.ldf',
SIZE = 5MB,
MAXSIZE = 25MB,
FILEGROWTH = 5MB )
GO
You have to have the correct permissions in order to do this and the server itself has to exist. I'm assuming that you already have the Database Connectivity Toolkit, LabSQL (http://www.jeffreytravis.com/lost/labsql.html), or are using your own ADO routines. -
How to create new page from EBS
Hi
I want to create new page through EBS
is that possible
and
how?HI
Now page is run successfully
but when it opens then It gives an error like:
Exception Details. >oracle.apps.fnd.framework.OAException: Application: ICX, Message Name: Could not find the specified responsibility.
at oracle.apps.fnd.framework.CreateIcxSession.getEncryptedSessId(Unknown Source)
at oracle.apps.fnd.framework.CreateIcxSession.createSession(Unknown Source)
at runregion.jspService(_runregion.java:132)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
at java.lang.Thread.run(Thread.java:595)
Maybe you are looking for
-
How do I move all my files from one User Profile (account) into another? I needed to create a new account and want all of my files accessible in the new one.
-
How to send email externally in the RTF format
Hello, I have quite strange problem, and I am bit afraid whether SAP supports or not? which i thought will support by default. I need to send email out of SAP, but I need the body of the EMAIL to be formatted in RTF. Please note we are able to conver
-
Transfer from old iMac Blueberry 266 to MacBook
A shiny new MacBook is about to arrive, replacing my 2nd Mac in the household, an older iMac 266 Rev C. The older iMac does not have a firewire port, so I can not use the SetUp/Migration Asssitant to transfer files/info. I do have a Crossover cable,
-
Call WS from stored procedure (Oracle)
Hi All I have scenario: JDBC - XI - RFC. It works fine. Now I want to change it to SOAP - XI - RFC. I can take wsdl url in Sender Agreement. I can test it from Web Services Navigator - it is ok. Can I send message from Oracle using soap_api? Give me
-
Security and permissions issue
I don't know if what happened with me is a problem or just a normal thing! I have Windows Server 2003, PCs, and MACs, the following scenario happening: 1-A Mac (MacBook) bind (Joined) the domain (Windows Server 2003). 2-Log in to the Mac using networ