Restore database to different drive

I need to move an XE database from one machine to another. The original installation is on drive D: the new machine only has a drive C:. Is there a way of restoring a backup to an XE installation on a different drive ?
I have tried copying the flash_recovery_area files across to the new machine. When I try to restore the backup, I get RMAN-04014: startup failed: ORA-02778: Name given for the log directory is invalid
I presume this is because the log directory in the backed up database is D:
Other things I have tried:
* Copy the .dbf files - but the data file names for the tablespaces are all wrong, so the database gives ORA-01157 "cannot identify or lock file" for each tablespace.
* Use RMAN set NEWNAME for datafile in conjunction with a
* Use expdp/impdp to move the database, but I have wrapped PL/SQL functions and packages and expdp/impdp corrupts them [at least it does with Oracle SE 10.2.0.3 - I haven't checked with XE yet]
I could perhaps use the orginal imp/exp, although I have had problems with my Oracle Advanced Queueing queues with it
So my question is, how do I restore a backup or set of files from a shut down database from a drive D: XE installation onto a drive C: XE installation?

* Copy the .dbf files - but the data file names for
the tablespaces are all wrong, so the database gives
ORA-01157 "cannot identify or lock file" for each
tablespace.This can be the way, but you have to rename files. Once files have been copied to new destination, you can do as follows :
1. Mount the DB
SQL> startup mount
2. Rename each datafile, tempfile and redo log :
SQL> alter database rename file '<old path>' to '<new path>';
3. Open the DB
SQL> alter database open;

Similar Messages

  • Move Lync 2010 database in different drive in same sql instance

    Hi,
    I am using Lync 2010 enterprise version and Lync database in SQL cluster.
    I have to move lync 2010 database files in different drive due to some space issue in the drive.
    Thanks

    Hi Deepak Srivastava,
    As far as I know, I recommend that you move databases by using the ALTER DATABASE planned relocation procedure .
    In simple terms, the steps are following:
    1. Backup the Database.
    2. Stop the services on Lync Servers.
    3. Move the database, and you could refer to this article:
    Move System Databases
    http://msdn.microsoft.com/en-us/library/ms345408.aspx
    4. Start the services on Lync Servers.
    5. Test the Lync feature.
    Hope it can be helpful.
    Best regards,
    Eric

  • Error while restoring database with different name on subscriber

    Hi all,
    I am using merge replication in sql server 2008R2. Yesterday I wanted to create a test environment, so
    I did:
    1. on publisher I restored from backup production db with another name ( lets call it TEST and new files
    .mdf, .ldf and no switch KEEP_REPLICATION). After this step original replication between production
    dbs worked fine.
    2. on subscriber I did the same: restore as new db TEST with new
    files .mdf, .ldf and no switch KEEP_REPLICATION.
    Unfortunately I noticed, that after second step replication stopped. SQL agent replication job on Subscriber
    is gone.
    Why restoring db with new name did affect original replication?
    Finally the most important: replication was set up by external company and I have to bring it to live now
    but I don't know this subject so good. How can I do it?
    Assuming, that there is no data change on subscriber in replicated tables is it enough when I select ‘reinitialize’
    on Publisher and Subscriber?
    Thanks in advance
    Artur

    Hello,
    Sorry for late response, but I was out of the office during last week.
    Regarding problem 1: restoring replication. I contacted guy who made originally our replication and he recreated subscription agent. So this is solved.
    problem 2: why did it happen?
    Lydia, in link which you provided I found only info about restoring db in replication, but I didn't want to restore replication.
    I checked SQL Server and Server Agent logs and there were no entries on that time. The only entries are regarding db restoring. Below:
    09/11/2014 12:45:59,Backup,Unknown,Database was restored: Database: Logik_ATData_TEST<c/> creation date(time): 2012/04/27(13:55:41)<c/> first LSN: 21392:66:267<c/> last LSN: 21392:227:1<c/> number of dump devices: 1<c/> device information: (FILE=1<c/> TYPE=DISK: {'D:\MSSQLBackup\Dzienny\Logik_ATData_PROD\Logik_ATData_PROD_backup_2014_09_10_231001_6391536.bak'}). Informational message. No user action required.
    09/11/2014 12:45:59,Backup,Unknown,Restore is complete on database 'Logik_ATData_TEST'. The database is now available.
    09/11/2014 12:45:59,spid72,Unknown,CHECKDB for database 'Logik_ATData_TEST' finished without errors on 2012-04-26 22:50:05.490 (local time). This is an informational message only; no user action is required.
    09/11/2014 12:44:53,spid72,Unknown,Recovery is writing a checkpoint in database 'Logik_ATData_TEST' (13). This is an informational message only. No user action is required.
    09/11/2014 12:44:53,spid72,Unknown,Starting up database 'Logik_ATData_TEST'.
    09/11/2014 12:44:51,spid72,Unknown,The database 'Logik_ATData_TEST' is marked RESTORING and is in a state that does not allow recovery to be run.
    09/11/2014 12:44:51,spid72,Unknown,Starting up database 'Logik_ATData_TEST'.
    In Windows application log there were also no other entries, besides these above.
    I also could not check job history, because the job was gone in SSMS jobs list, while the subscription was present in SSMS Replication with info, that last successful synchronization was at 12:42 (there is a 5 min. sync period).
     I also don't understand how the job was deleted, because according this manual (http://www.mssqltips.com/sqlservertip/1803/auto-alert-for-sql-agent-jobs-when-they-are-enabled-or-disabled/) I have 2 triggers in sysjobs table and every time, when
    job is deleted/disabled I got @ notification. In this case I got no @.
    My SQL Server version:
    Product_Version Product_Level Edition
    10.50.2550.0 SP1 Standard Edition (64-bit)
    Any idea what happened?
    Thanks,
    Artur

  • Restore database to different host

    Hi
    Suppose, I have a full rman backup of a database called "orcl" in the tape.
    Can I restore this backupset to another host with database and instance name "test" ?
    I will first restore controlfile and datafiles respectively.
    In other words, is it necessary to have same database name and instance name if I want to do restore ?

    Hi!
    If you can connect from the target host to the source host than you can use the "DUPLICATE DATABASE" with "SET NEW NAME" option in rman. This is the easiest way:
    [http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmdupdb.htm#BRADV169]
    [http://download.oracle.com/docs/cd/B19306_01/backup.102/b14194/rcmsynta028.htm#RCMRF126]
    If the connection is not allowd from the target host to the source host than you can simply restore and recover the ORCL database on the target host and rename it with NID (DBNEWID) utility:
    [http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/dbnewid.htm#SUTIL014]
    [http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/dbnewid.htm#sthref1868]
    If this post was usefull please mark it as HELPFULL or CORRECT answer!
    Best Regards
    Norbert

  • SQL Server 2012 restoring database from backup file

    Hi All,
    1. I was restoring the database from PROD box to DEV box with the deferent name.
    For Ex: Both PROD and DEV boxes are having "A" database. Now I am refreshing database"A" from PROD bot to DEV box with name "B". Now while restoring in SQL server 2012 I used GUI and took database name as "A" by default.
    by mistake I executed the request. before completing I notice that "A" database in DEV Box went to restoring mode.
    Now, in middle I stopped the query but still I am seeing database "A" is in restoring state.
    Please guide me is there any way to bring database online with current data?
    2. Why sql server 2012 takes tail log backup of the existing database while restoring database with different name?

    Hi,
    check this link for the same issue and solutions:
    http://stackoverflow.com/questions/520967/sql-server-database-stuck-in-restoring-state
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]

  • What are the steps to move Webtools database to a different drive

    The current drive is running out of space for our web tools live database so I am planning to transfer it to another drive which has sufficient space.
    It would be helpful if any one can suggest the safer way and steps how to move the DB to another drive with out any problem since the site is live please?
    Mohan
    Edited by: Mohanakrishnan T on Mar 13, 2008 10:32 AM

    Hi Martin,
    Thanks for this!
    To move the database to a different drive, Can I do the following?
    1. Close the webshop at a appropriate time for a few minutes.
    2. Stop IIS, Sync Manager etc etc that may access the web tools database.
    3. Backup the WebShop database.
    4. Drop the WebShop database.
    5. Then Restore the WebShop database. When doing this configure the database and transaction logs (.mdf and .ldf) to be placed in the F: drive.
    6. Now start the sync manager, IIS etc.
    As my Colleague have moved SAP B1 databases using the above procedure. So can I assume Webtools database should be no different.
    We have not tried the detach and attach procedure as of now
    Mohan

  • Rman restore to windows server with different drive layout

    I'm restoring to a server with a different drive layout. I'm using the set newname for the datafiles and it's working fine. However. My redo logs show that they are on the f: drive and the f: drive doesn't exist on the new server (recovery). so when I'm all done I get an error saying that it cant find the redo02.log. Any ideas?
    TIA
    Dave

    no problem, thanks for the reply.
    Here's what I tried in the init.ora
    LOG_FILE_NAME_CONVERT=('F:\ORADATA\ORCQA08','D:\ORADATA\ORCQA08')
    I didn't even create the spfile I figured I could do that later.
    The datafiles alll go to the correct drive, here's my restore statement:
    run
    allocate channel disk_channel1 type disk;
    allocate channel disk_channel2 type disk;
    SET NEWNAME for datafile 1 to 'd:\ORADATA\ORCQA08\SYSTEM01.DBF';
    SET NEWNAME for datafile 2 to 'd:\ORADATA\ORCQA08\SYSAUX01.DBF';
    SET NEWNAME for datafile 3 to 'e:\ORADATA\ORCQA08\UNDOTBS01.DBF';
    SET NEWNAME for datafile 4 to 'd:\ORADATA\ORCQA08\USERS01.DBF';
    SET NEWNAME for datafile 5 to 'e:\ORADATA\ORCQA08\PLATDATA.DBF';
    SET NEWNAME for datafile 6 to 'd:\ORADATA\ORCQA08\PLATHISTDATA.DBF';
    SET NEWNAME for datafile 7 to 'd:\ORADATA\ORCQA08\TS_MV.DBF';
    SET NEWNAME for datafile 8 to 'e:\ORADATA\ORCQA08\PLATNDX.DBF';
    SET NEWNAME for datafile 9 to 'd:\ORADATA\ORCQA08\POADATA.DBF';
    SET NEWNAME for datafile 10 to 'd:\ORADATA\ORCQA08\POABDATA.DBF';
    SET NEWNAME for datafile 11 to 'd:\ORADATA\ORCQA08\POANDX.DBF';
    SET NEWNAME for datafile 12 to 'd:\ORADATA\ORCQA08\TS_REPORT_DATA.DBF';
    restore database;
    release channel disk_channel1;
    release channel disk_channel2;
    i then do a switch database to copy and this registers the datafiles under the correct drive BUT when I try to open the database this is what i get:
    ORA-00280: change 15613734 for thread 1 is in sequence #861
    ORA-00278: log file
    'D:\oracle\flash_recovery_area\ORCQA08\ARCHIVELOG\2012_08_03\ARC0000000860_07815
    80447.0001' no longer needed for this recovery
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    cancel
    Media recovery cancelled.
    SQL> alter database open resetlogs;
    alter database open resetlogs
    ERROR at line 1:
    ORA-00344: unable to re-create online log 'F:\ORADATA\ORCQA08\REDO01.LOG'
    ORA-27040: file create error, unable to create file
    OSD-04002: unable to open file
    O/S-Error: (OS 3) The system cannot find the path specified.
    You can see that it's still looking on the f: drive for the redo log. Is my syntax correct?? - - LOG_FILE_NAME_CONVERT=('F:\ORADATA\ORCQA08','D:\ORADATA\ORCQA08')
    I can get rid of the other redo logs by dropping them and recreating under the proper drive but 01 is the active log.
    any other ideas?
    Dave

  • Add a DB2 database file in different drive

    Dear all,
    I would like to add a DB2 database file in different drive which is added recently.
    eg: existing DB folders in drive H, now we need to add new data folder from drive J
    please help me on this step by step procedure, looking for the earliest reply
    regards
    sathish
    65 96724662

    Hi,
    what you have to do is to extend your tablespace with new containers on the new drive and AVOID REBALANCING !!!
    Do do that, you can either use the "alter tablespace" command with the "begin new stripe set" clause, or use
    the DBACOCKPIT to extend your tablespace and specify
    a new stripe set there.
    For details on the "alter tablespace" command see:
    http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.doc/welcome.htm
    and search for "alter tablespace"
    kind regards
    Thomas

  • Moving Configuration Manager Database to a Different Drive

    Hello,
    Is there a way to move the Configuration Manager database to a different drive in the same machine?  We are using Configuration Manager SP1 and SQL Server 2008 R2.  We are running out of disk space in drive C:  Please advise what would be
    the possible solution for this.  Thanks so much.
    Regards,
    Joann

    Yes, follow the SQL Server documentation for moving database files.
    http://technet.microsoft.com/en-us/library/ms345483.aspx
    In general, I have an easier time when I have stopped the ConfigMgr services and the IIS websites first.
    Usually, then I will run the "Relocation for Scheduled Disk Maintenance" procedure.
    Regards,
    Nash
    Nash Pherson, Senior Systems Consultant
    Now Micro -
    My Blog Posts
    If you've found a bug or want the product worked differently,
    share your feedback.
    <-- If this post was helpful, please click "Vote as Helpful".

  • RMAN restore database from another backup of different database in the same host

    Hi Experts,
    I have taken FULL Database Backup using RMAN , now I want to Restore and Recover the same database on different instance on Same Host.
    Could u suggest any document or Steps to achieve this task.....
    Thanks,
    Mouni.

    No Problem.
    Please check this :
    http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmdupdb.htm#BRADV420
    ORACLE-BASE - Duplicate a Database Using RMAN in Oracle Database 11g Release 2
    Ensure you follow what Mr. Hemant has mentioned.
    Regards
    Karan

  • 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

  • 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

  • Backup and restore a database in different computers

    Hi,
    I´m newer in Oracle and Oracle 10g.
    I have a database in a computer with some procedures, triggers, tables... and I need to transfer this database to another computer. It´s my problem.
    I know it can be made with RMAN. How can I do ?
    Thanks.
    And sorry (about my English).

    In Oracle 10g, its possible use Transportable Tablespaces feature, to restore backups in different plataforms.
    And, depending of the db size, use the datapump feature (expdp/impdp).

  • Can "Backup /  Restore Database " be ulized on two Different Platform

    I've been developing on Windows and now would lile port Database scheme/data /table
    "Everything" to a Linux Server.....
    Can I ftp the backup copy to Lunix were I just install same version of Oracle 10g express and run Restore Database...This would be easier then dumping application then tables then data ...etc and then importing
    CAN THIS WORK ..SHORT ON TIME
    Message was edited by:
    user518110

    Hello Hans,
    However, if you have environment-specific things,
    they will fail. I am not aware of any issues when moving Apex installations from one server to another. I have walked a user through this process of restoring an apex installation from a full database backup on a different server. There seem to be no server related references stored in the Apex repository.
    APEX seems to have some environment-dependant areas (OS file system mapping
    comes to mind) and that may cause grief. In a normal Apex installation (standalone) it has only references to the virtual directory /i/. This needs to be defined on the target server as well.
    This is even less a problem with regard to XE since the mapping it automatically available as the files are all stored in the XML DB.
    Regards,
    ~Dietmar.

  • Restoring iMovie from a TM backup to a different drive.

    My hard drive containing all my media failed today and I want to restore everything from a Time Machine backup to a different drive. Can someone tell what is the best way to do this for iMovie so that iMovie keeps all the links intact?

    This happened to me last week, but it was slightly different. OSX warned me that the drive was failing so I was able to get most of the Projects off before it finally failed.
    I think this will work for you.
    First you need an external drive that will hold your Projects and Events from the failed drive. It must be formatted as Mac OS Extended (Journaled). You can format it in Disk Utility if you need to.
    Note: Since you have a Mac Pro, you probably have an extra internal drive, which is fine, too. Just don't put it on your boot drive.
    Open Time Machine, and navigate to the failed drive.
    The failed drive is no longer attached so it will not show up in the Time Machine finder view. You will need to click on the top line under "Devices". It should be named something like "MagicPony's Mac Pro". Under this heading, if you go back in time before your drive failed, you should see the drive.
    Now, having found the last good version of your Projects and Events, you can restore them to the open drive.
    Select the iMovie Projects folder, and click the gear icon in the top bar. Select Restore iMovie Projects to... and navigate to your open drive.
    Now do the same thing with your iMovie Events folder.
    When you are done, the iMovie Projects folder and the iMovie Events folder should be at the top level of the target drive.
    This should work. As long as the Events and Projects are on the same drive, I think iMovie will find them. If you have other Events on a different drive, that is OK too, because they are still at the same path.
    You will have to start (or restart) iMovie for it to see the Projects.
    If you have trouble, let me know.

Maybe you are looking for