Database restore on a different server
I have a database ORADB1 running on unix server and I took a hot backup using a script and restored it on the same server as ORADB2 and opened the database to verify it comes up and then shut it down.
Now I have to restore ORADB2 into a different server and bring it up as ORADB1 and I can't take another backup due to performance issue on the server, can someone tell me the steps involved in this?
Thanks
Yes - this would be no different than the way you created ORADB2 from ORADB1 to begin with.
Use the same process by modifying the initialization file. If you use a different directory structure you will need to modify the control file since it specifies the location of the datafiles. You can execute
alter database backup controlfile to traceto put a 'text' copy of the binary control file in a trace file. Then extract the text to a a new file and modify the directory paths for the datafiles.
Just remember that your new ORADB1 will not contain the same data as your original ORADB1 since users have been making changes this entire time.
Similar Messages
-
Backup few partitions from a database and restore them on different server
I have a Database called Datamart. Datamart database has multiple partitioned tables and the database has different filegroups and partitions. I would split the database on to three servers with one-third of the database on each.
If the database has 1500 partitions, then 0-499 on server1 Datamart database, 500-999 on server2 Datamart database and 1000-500 on server3 Datamart database.
See
http://aboutsqlserver.com/2014/06/24/partial-database-backup-and-piecemeal-restore-in-microsoft-sql-server/
http://msdn.microsoft.com/en-us/library/ms177425.aspx
http://msdn.microsoft.com/en-us/library/ms190984.aspx
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Can rman backups be used to restore to a different server
We are using R12 with 10gr2 database
If i take Rman backups, can they be used to restore on some other test server for cloning and bringing that test server upto date like the production.
I am confues and dont know and This is the only reason i dont use rman for backups, instead take cold backups manually every night as they are used every week to clone some other server for testing purpose
Please advice
ThanksHi..
1. Copy the pfile to the new server.
2. startup nomount the database using the pfile.
3. Open a new RMAN session and connect to this database
4. Restore the controlfile, this will bring the database in mount stage
5. Once step 4 is completed, restore and recover the database.
NOTE:-- These are the steps for restoring the database when the RMAN backup pieces are copied to the same location as they are on the main server.If you copy the rman backup to some different location, then you will have to use the CATALOG BACKUPPIECE 'location' command before restoring the database.
Go through [http://download.oracle.com/docs/cd/B10500_01/server.920/a96566/rcmdupdb.htm]
HTH
Anand
Edited by: Anand... on Dec 23, 2008 8:13 PM Added link -
SQL2012 System Databases Restore on a different environment
So While I was playing around I wondered if it was possible for me to setup a similar version of SQL 2012 on a different environment and restore it quickly.
Master Env
SQL 2012 - 3 databases , 2 SSIS packages , 2 Sql Agent jobs and 1 report.
The idea would be to copy this on another Server altogether.
Slave Env
So the first thing I thought was the system database should go across before all else. Now it states that both versions have to be the same which I confirmed using;
Use Master
Go
SELECT
SERVERPROPERTY
('ProductVersion
')ASProductVersion,
SERVERPROPERTY
('ProductLevel')ASProductLevel,
SERVERPROPERTY
('ResourceVersion')ASResourceVersion,
SERVERPROPERTY
('ResourceLastUpdateDateTime')ASResourceLastUpdateDateTime,
SERVERPROPERTY
('Collation')ASCollation;
Both showing the same. Having backed up both system databases on both sides the restoring of the model and msdb databases where straight forward.
The master was a different ball game and is one I still cant get past
1. Stopped the SQL SERVER on the Slave Env
2. Open Command shell
3. Net Start MSSQLServer /m”SQLCMD”
4. sqlcmd -S. -E
5. RESTORE DATABASE master FROM DISK = 'D:\SQL\Backups\master.bak' WITH REPLACE
Go
what this will do is restore the master database from the live to the slave and this is where the problems begin because once you do that restart the SQL server and get out of single user mode you cant logon .
Question
Assuming the Master has different windows logons to the Slave is there any way once this restore has been done to negate this or do you create a user straight after the restore?
Also with ReportingServices and Integrated Services are they straight forward Db restores ?
Any Help one this would be great!!
As I really want to know how quickly I can jump from one environment to another.So While I was playing around I wondered if it was possible for me to setup a similar version of SQL 2012 on a different environment and restore it quickly.
Master Env
SQL 2012 - 3 databases , 2 SSIS packages , 2 Sql Agent jobs and 1 report.
The idea would be to copy this on another Server altogether.
Not very simple. Requires DBA skills.
The standby (secondary) server usually refreshed through database mirroring or log shipping.
BOL: " About Log Shipping (SQL Server)
SQL Server Log shipping allows you to automatically send transaction log backups from a primary database on a primary server instance to one or more secondary databases on separate secondary server instances. The transaction log backups are
applied to each of the secondary databases individually. An optional third server instance, known as the monitor server, records the history and status of backup and restore operations and, optionally, raises alerts if these operations fail to occur as scheduled.
Benefits
•Provides a disaster-recovery solution for a single primary database and one or more secondary databases, each on a separate instance of SQL Server.
•Supports limited read-only access to secondary databases (during the interval between restore jobs).
•Allows a user-specified delay between when the primary server backs up the log of the primary database and when the secondary servers must restore (apply) the log backup. A longer delay can be useful, for example, if data is accidentally changed on the
primary database. If the accidental change is noticed quickly, a delay can let you retrieve still unchanged data from a secondary database before the change is reflected there. "
LINK: http://msdn.microsoft.com/en-us/library/ms187103.aspx
Kalman Toth Database & OLAP Architect
SQL Server 2014 Database Design
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
RMAN backup restoration on a different server under ASM .
Hello Experts,
This is regarding new installation of Oracle RAC 11gR2 on AIX 6.1 . Its a two node cluster setup , using ASM . As i am newbie for RMAN , I would like to know how i can restore my rman backup to another uat server which has standby database again cofigured under asm .
Thanks for your kind help .Hi ,
Thanks for reply
1) I performed the full database backup on source .
2) Source (prod) and target remote database (uat) are in ASM and have same DG for datafiles .
3) I have transfered the backup from production to UAT . I have already running uat database
do i need to drop it before i start the restoration ? My final purpose is just to refresh target with production backup . Kindly advice the steps from here to proceed with .
Thank you -
We have a three server farm. (SPWebTest, SPAppTest, SPDBTest)
We have added an additional database server (SPDBRMTest) and an additional application server (SPAPPRMTest).
Today I created a new Crawl Database on SPDBRMTest and a new Crawler on SPAPPRMTest.
I create a distribution rule to all crawling activity for 1 web application to the new crawl database on SPDBRMTest.
This web application was part of the original crawl and had no errors or issues. We are trying to scale our Search to improve performance but when a full crawl is executed against this content source I get the following crawl error:
"The account password was not specified. Specify the password."
I have tried re-entering the "Default Content Access Account" but the issue continues.Hi Brian,
when you add the crawl rules, do the account that is provided have the permission to read the content at the web application?
http://technet.microsoft.com/en-us/library/jj219686(v=office.15).aspx
please disable the loopback check, perhaps it may help:
http://support.microsoft.com/kb/896861
Regards,
Aries
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. -
Recreating the database on a different server-NOCATALOG
Hi
I've the following scenario.
I'm taking the RMAN backup of my database using NOCATALOG. Due to some hardware failure I lost the server and now I've only the RMAN backup copies with me. I want to restore the database on a different new server. Can someone provide me the steps for doing so.
Thanks
BalajiRMAN Restore database NOCATALOG on a different server
rman nocatalog target=/
RMAN> startup nomount
RMAN> set dbid 2438346378;
RMAN> restore controlfile from '/u103/data/ASAP/ASAPTST/c-2438346378-20070212-0';
RMAN> startup mount
RMAN> restore database;
RMAN> recover database;
RMAN> alter database open;
RMAN> alter database open resetlogs; -
Spfile restore from RMAN Tape backup to different server
Hi All,
First of all let me thank you to the forum from which I keep updating my knowledge on oracle.
I am having issues when trying to restore spfile from controlfile autobackup to different server. Problem and other details are below:
Target version : 10.2.0.2
Netbackup : 6.5.6
Taken the tape backup through rman on server ABC and trying to restore the spfile from controlfile autobackup to server XYZ. Tape backup has been taken today morning and trying restore now.
Both servers ABC and XYX have been added (as clients) to netbackup policy.
Below is the syntax I used for restoring spfile and getting error as mentioned.
RMAN> run {
2> set controlfile autobackup format for device type 'SBT_TAPE' to '%F';
3> allocate channel ch00 device type 'sbt_tape'
4> parms='ENV=(NB_ORA_SERV=Mediaserver,NB_ORA_CLIENT=XYZ)';
5> restore spfile to pfile '/oracle/product/10g/dbs/inittest.ora' from
6> autobackup maxseq 5 maxdays 3;
7> }
executing command: SET CONTROLFILE AUTOBACKUP FORMAT
allocated channel: ch00
channel ch00: sid=36 devtype=SBT_TAPE
channel ch00: Veritas NetBackup for Oracle - Release 6.5 (2010042405)
Starting restore at 03-AUG-2011
channel ch00: looking for autobackup on day: 20110803
channel ch00: looking for autobackup on day: 20110802
channel ch00: looking for autobackup on day: 20110801
channel ch00: no autobackup in 3 days found
released channel: ch00
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 08/03/2011 14:03:26
RMAN-06172: no autobackup found or specified handle is not a valid copy or piece
Not sure where I am doing wrong. The same can be restored onto same host (I.E ABC) without any issues .
Request your help and guidance.
Thanks,
SSSI don't know whether you can restore to a different server. The easier way should be
RMAN> restore spfile to pfile 'YOUR_PFILE_NAME' from autobackup;
then copy this to the new host.
Check this link
restore spfile to another host
Hope this helps -
We have implemented our own way of logshipping by backing up the transaction logs of all our non-system databases every hour. Then we transfer the backups (before SQL Server 2008 R2 with additional zip and unzip steps) to the second environment where we
restore them only during the night on databases in standby-state (Like this, our developers can access the databases without disturbing the productive system and we can restore the t-logs during night, so not shutting out the developers during the day).
Now since we replaced our hardware in the productive environment, we replaced the hardware in the second environment with the servers from previous productive environment. Same SQL Server 2008 R2, same Service Pack (SP2), same installation procedure. But
since then the SQL Server in the second environment behaves different:
- When the logs of some database "A" are restored, I cannot access the properties of any database, i.e. database "B", I only get the error message "Cannot show requested dialog. (SqlMgmt) Database 'A' cannot be opened. It is in the
middle of a restore. (Microsoft SQL Server, Error: 927)"
- Our logshipping runs multiple instance at the same time, so restoring multiple databases' logs. But since the change, two of the instances fail restoring of datatbases, i.e. "B" and "C" with the error message "Database 'A' cannot
be opened. It is in the middle of a restore.". The jobs guarantee to restore only logs of the database they need to restore, they have strictly separated sets of target databases and only try to restore the databases of their sets.
Before the new installations, we did not have these strange behaviours. But as said, it is the same SQL Server version, the same service pack, and we followed the same installation document but maybe with the small changes in settings. The user the jobs
are running under is a domain admin, the login they use has dbcreator, processadmin, db_owner and db_backupoperator roles. My login on the SQL Server has sysadmin rights and as described similar problems.
Is this problem known or does somebody have an idea where to go looking for?
Thanks, ChrisHi Christar,
According to your description, after you configuring Log shipping between two database, you remove the hardware from production environment to dev environment, in this hardware, there are saved the transaction logs of your database.
When restoring your database, there will occurs error 927, right?
SQL Server Log shipping allows you to automatically send transaction log backups from a
primary database on a primary server instance to one or more
secondary databases on separate secondary server instances. It consists of three operations:
1.Back up the transaction log at the primary server instance.
2.Copy the transaction log file to the secondary server instance.
3.Restore the log backup on the secondary server instance.
Since you want to move your hardware avoiding copy job, we need to verify if .mdf and .ldf file are not saved in your hardware, or else,
if you move your hardware, you could not open your database in your Primary Server. I recommend you can refer to the following steps.
Full back up your primary database and restore it into the secondary database. It would have been set up as WITH STANDBY ,the databases would read StandBy/ Read Only.
Perform transaction log backups via a SQL Server Agent job running on the primary server instance, save them in your hardware.
In night, you move hardware to your dev environment, you can manually restore these transaction log backups or set up a SQL Server Agent job to restoring them from your hardware.
There is detail about how to configure log shipping in SQL Server 2008R2 step by step, you can review it.
http://mostafaelmasry.wordpress.com/2013/01/02/log-shipping-in-sql-server-2008r2-step-by-step/
Regards,
Sofiya Li
Sofiya Li
TechNet Community Support -
what permission is needed for a login to access the restored database(backup from different server)
frequently reach the situation, when vendor restores a database, but he cannot access it unless I remap or add his login to the restored database. What permssion can grant the vendor so that he can but only can access the database he restored, not all other
databases.Hi George,
According to your description, When you move a database from one server that is running SQL Server to another server that is running SQL Server, a mismatch may occur between the security identification numbers (SIDs) of the logins in the master database
and the users in the user database. As other post, you can use the sp_change_users_login stored procedure to map SQL Server logins. Also , you can use the following statement after doing the restore database. It will
fix the mis-mapped SID inside the restored DB.
ALTER USER <username> WITH LOGIN = <username>
For more information, you can review the following article.
http://blogs.lessthandot.com/index.php/DataMgmt/DBAdmin/MSSQLServerAdmin/do-you-still-use-sp_change_users_login/
Regards,
Sofiya Li
Sofiya Li
TechNet Community Support -
Restoring RMAN backup on a different server
Hi oracle gurus
i have following scenario
i have a compressed backup set of a database
i want to restore that rman backup on to a different server.
both the server have same version of oracle.and both the server are of 32 bit.
please reply if any more info is required.RESTORE AND RECOVERY PROCEDURE OF PRODUCTION DATABASE BACKUP ON TEST SERVERS
As part of disaster recovery exercise or to test the validity of a RMAN backup, a full restore and recovery of databases can be performed on scratch or test servers utilising the production RMAN backups which have been restored from the tape backups on these test or scratch servers.
This note will illustrate the above procedure by detailing the steps required to restore the backup of a production database (prod1) on a test server linux01 .
The following assumptions are made in this note:
The RMAN backups have been restored from tape backups to the same backup location on the test server as the production server where the backup was originally taken
The identical directory structure as is present on production has been created on the test server. This will apply to not only the location of the database files (data, control files, redo log files), but also to the bdump,cdump, udump and adump locations.
Controlfile autobackup has been enabled. This is important.
Overview
Restore the spfile from the autobackup
Restore the controlfile from the autobackup
Restore the data files
Recover by applying archived redo log files
Open the database with resetlogs
Restore the SPFILE
[oracle@linux01 prod1]$ rman target /
connected to target database (not started)
RMAN> set dbid=4266928631
executing command: SET DBID
RMAN> startup force nomount;
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/10.2.0/dbs/initprod1.ora'
starting Oracle instance without parameter file for retrival of spfile
Oracle instance started
Total System Global Area 159383552 bytes
Fixed Size 2039056 bytes
Variable Size 67109616 bytes
Database Buffers 83886080 bytes
Redo Buffers 6348800 bytes
RMAN> run
2> {SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u02/backup/prod1/%F';
3> restore spfile from autobackup;
4> }
RMAN> shutdown immediate;
Restore the Control File
In this case, the instance is now being started with the restored spfile. We can create a pfile as well from this spfile is so required.
RMAN> startup nomount
connected to target database (not started)
Oracle instance started
RMAN> set dbid=4266928631
executing command: SET DBID
RMAN> run
2> {SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u02/backup/prod1/%F';
3> restore controlfile from autobackup;
4> }
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
Restore the database
RMAN> restore database;
Recover the database
The recovery will fail at a point where it cannot restore any more archived redo log files.
In this case the last archived log file which has been backed up is sequence 613.
This information can be obtained by issuing a LIST BACKUP OF ARCHIVELOG ALL command.
So RMAN will fail when it tries to apply sequence 614 ….
RMAN> recover database
[oracle@linux01 PROD1]$ rman target /
connected to target database: PROD1 (DBID=4266928631, not open)
RMAN> sql 'alter database open resetlogs';
RMAN>
reference: http://gavinsoorma.com/recovery-scenarios/ -
Database Restore on another Server
Could someone please explain to me (or point me in the right direction) the procedure (How-To) on how to restore a database to another server?
please understand I'm just learning oracle and this is all new to me.
e.g., I have good backups of a database. I restore those database files (control files, dbf, redo logs) to another server. What are the steps in bringing that database up online on a different server?
...thanksRead thread
how to clone a database
Always serach forum.oracle.com, beofre open new thread.
Cheer,
Virag Sharma -
Restoring Database from tape to another server
Hi
What are the environment changes or other related changes that need to be made if we have to restore an oracle database to another server.
Like, we have one Oracle database on linux server XYZ and it is backed up to Tape using RMAN. And we need to restore the same database to server ABC.Do we need to modify any environment variables and such so that restore is done ? Or does it work straight away in this different server too ?Hello,
Please have a look into the document 372996.1 MOS.
and the thread: http://www.dbasupport.com/forums/showthread.php?t=56236
Good luck! -
Post Author: fabu1971
CA Forum: .NET
I could pass the database logon in Reports with subreports but the reports with subreports with different server name I can not pass the logon information . Do you have any idea how I can do that to pass the database logon with different database or server name ?Post Author: quafto
CA Forum: .NET
You can use the Subreports collection of the ReportDocument object to access all the subreports in your main report. These are returned as ReportDocument objects. Once you have your subreport as a ReportDocument you can loop through your Tables collection and set the ConnectionProperties to your appropriate Server/Database. For example here is some pseudo code: ConnectionInfo boConnectionInfo = new ConnectionInfo();boConnectionInfo.ServerName = "serverName";boConnectionInfo.DatabaseName = "databaseName";boConnectionInfo.UserID = "username";boConnectionInfo.Password = "yourpassword"; foreach(ReportDocument boSubreport in mainReport.Subreports){ foreach(Table boTable in boSubreport.Database.Tables) { TableLogOnInfo boTableLogOnInfo = boTable.LogOnInfo; boTableLogOnInfo.ConnectionInfo = boConnectionInfo; boTable.ApplyLogOnInfo(boTableLogOnInfo); boTable.Location = "newtablelocation"; }} -
Trying to restore a database with RMAN in new server
Hello,
Database: Oracle 10gR2
O/S: Windows Server 2003
My RMAN backuppieces are stored in a network drive:
\\old_location\FULL
and
\\old_location\INC
I'm trying to restore a whole database with RMAN in another server from my FULL backup.
For that, I copy all backuppieces files
from: \\old_location\FULL
to new server: D:\new_location\
Also I created the relevant folder hierarchy under <ORACLE_BASE> directory, as follows:
a. Create BDUMP, CDUMP, and UDUMP directories under '<ORACLE_ BASE>\admin' directory
b. Create <DATABASE_NAME> directory under '<ORACLE_BASE>\oradata' directory
c. pfile.ora and controlfile (CTL_MTDPROD_2308_20120401_1.CTL) are backup from original database and they are in D:\new_location\
d. I copied pfile.ora and controlfile to folder: C:\oracle\product\10.2.0\db_1\database\
I started creating an instance in new server from scratch:
C:\>oradim -new -sid MTDPROD -intpwd mtdprod
C:\> SET ORACLE_SID=MTDPROD
C:\> rman
RMAN> connect target sys
RMAN> SET DBID=21692876873
RMAN> STARTUP force nomount PFILE=C:\oracle\product\10.2.0\db_1\database\init_mtdprod.ora
RMAN> restore controlfile from 'C:\oracle\product\10.2.0\db_1\database\CTL_MTDPROD_2308_20120401_1.CTL';
RMAN> alter database mount;
#Since I want to read my backuppieces from D:\new_location and not from \\old_location\FULL then I catalog and restore like:
RMAN> catalog start with 'D:\new_location\';
RMAN> restore database;
Starting recover at 25/04/12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=541 devtype=DISK
channel ORA_DISK_1: starting incremental datafile backupset restore
channel ORA_DISK_1: specifying datafile copies to recover
recovering datafile copy fno=00003 name=D:\BD_MTDPROD\CONTROLFILES\SYSAUX01.DBF
recovering datafile copy fno=00004 name=D:\BD_MTDPROD\CONTROLFILES\USERS01.DBF
recovering datafile copy fno=00007 name=D:\BD_MTDPROD\DATAFILES_DATA\MSE.ORA
recovering datafile copy fno=00010 name=D:\BD_MTDPROD\DATAFILES_DATA\EXPEDIENTES2.ORA
channel ORA_DISK_1: reading from backup piece \\old_location\FULL\FULL_MTDPROD_20120401_2304_1.BAK
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: failover to piece handle=D:\new_location\FULL\FULL_MTDPROD_20120401_2304_1.BAK tag=TAG20120401T190004
.....(continues)
Questions:
1. RMAN still reads from old_location. The only way to avoid that would be deleting all files from \\old_location\FULL ?
2. The message "failover to piece handle=D:\new_location\...." indicates that that file is not usefull? I just copy them from old_location to new_location... how can they get useless?
I suspect there is something in controlfile that redirects to \\old_location\FULL\ and doesn't let to read from D:\new_location\
Please, advice.user521219 wrote:
Questions:
1. RMAN still reads from old_location. The only way to avoid that would be deleting all files from \\old_location\FULL ?
2. The message "failover to piece handle=D:\new_location\...." indicates that that file is not usefull? I just copy them from old_location to new_location... how can they get useless?
I suspect there is something in controlfile that redirects to \\old_location\FULL\ and doesn't let to read from D:\new_location\Is this a cold backup? Did you change the location of control file in your PFILE or is it still pointing to old location?
You may want to check the output of RESTORE DATABASE PREVIEW command, which will just report which backup files it uses without actually restoring thhe DB.
Maybe you are looking for
-
IMac won't boot, won't start in safe mode
I'm at my wits end. My 17" iMac G4 won't boot. I just get the Apple logo, with the spinning progress wheel. I get the same thing when I try to boot in safe mode -- it just sits there with the progress wheel spinning. (I waited an hour, just to make s
-
How can i transfer the balance of iTunes form one to another if i haven't spent?
how can i transfer the balance of iTunes form one to another if i haven't spent?
-
Hi, I am new to Firewroks CS4 and keen to learn to use it right but I am having difficulty understanding the whole slicing and exporting mechanism, so that I can also use in Dreamweaver CS4. Basically, I am unsure how to do the following and if anyon
-
Hi experts I am trying to load master data 0MATERIAL ATTR, there is no error when load into PSA but when I did load into IO it shows error as below: Too many error records - update terminated Example: Record 1 :0MATERIAL : Data record 1 ('00000002000
-
Service degradation with Mifi 2200/early termination fee
We use our Mifi to provide Internet access to my rural house that is about five miles from the nearest DSL connection. The Mifi replaced HughesNet in February 2011 -- and we've been very pleased with the service up until this month. We pretty consist