How to move a specific tablespace datafile from one directory to another

Database: 10.2.0.1
OS : Generic
Problem Description : How to move a specific tablespace datafile from one directory to another considering that the database is on Oracle Dataguard setup
** Oracle is working on this issue, but in parallel is opening the topic to the Community so that Community members can add their perspective, experience or knowledge. This will further enhance all knowledge bases including My Oracle Support and My Oracle Support Communities **
Edited by: ram_orcl on 16-Aug-2010 21:21

Dear ram_orcl,
Please follow the procedures here;
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14239/manage_ps.htm#i1034172
8.3.4 Renaming a Datafile in the Primary Database
When you rename one or more datafiles in the primary database, the change is not propagated to the standby database. Therefore, if you want to rename the same datafiles on the standby database, you must manually make the equivalent modifications on the standby database because the modifications are not performed automatically, even if the STANDBY_FILE_MANAGEMENT initialization parameter is set to AUTO.
The following steps describe how to rename a datafile in the primary database and manually propagate the changes to the standby database.
   1.
      To rename the datafile in the primary database, take the tablespace offline:
      SQL> ALTER TABLESPACE tbs_4 OFFLINE;
   2.
      Exit from the SQL prompt and issue an operating system command, such as the following UNIX mv command, to rename the datafile on the primary system:
      % mv /disk1/oracle/oradata/payroll/tbs_4.dbf
      /disk1/oracle/oradata/payroll/tbs_x.dbf
   3.
      Rename the datafile in the primary database and bring the tablespace back online:
      SQL> ALTER TABLESPACE tbs_4 RENAME DATAFILE      2> '/disk1/oracle/oradata/payroll/tbs_4.dbf'
        3>  TO '/disk1/oracle/oradata/payroll/tbs_x.dbf';
      SQL> ALTER TABLESPACE tbs_4 ONLINE;
   4.
      Connect to the standby database, query the V$ARCHIVED_LOG view to verify all of the archived redo log files are applied, and then stop Redo Apply:
      SQL> SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
      SEQUENCE# APP
      8 YES
      9 YES
      10 YES
      11 YES
      4 rows selected.
      SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
   5.
      Shut down the standby database:
      SQL> SHUTDOWN;
   6.
      Rename the datafile at the standby site using an operating system command, such as the UNIX mv command:
      % mv /disk1/oracle/oradata/payroll/tbs_4.dbf /disk1/oracle/oradata/payroll/tbs_x.dbf
   7.
      Start and mount the standby database:
      SQL> STARTUP MOUNT;
   8.
      Rename the datafile in the standby control file. Note that the STANDBY_FILE_MANAGEMENT initialization parameter must be set to MANUAL.
      SQL> ALTER DATABASE RENAME FILE '/disk1/oracle/oradata/payroll/tbs_4.dbf'
        2> TO '/disk1/oracle/oradata/payroll/tbs_x.dbf';
   9.
      On the standby database, restart Redo Apply:
      SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE
        2> DISCONNECT FROM SESSION;
If you do not rename the corresponding datafile at the standby system, and then try to refresh the standby database control file, the standby database will attempt to use the renamed datafile, but it will not find it. Consequently, you will see error messages similar to the following in the alert log:
ORA-00283: recovery session canceled due to errors
ORA-01157: cannot identify/lock datafile 4 - see DBWR trace file
ORA-01110: datafile 4: '/Disk1/oracle/oradata/payroll/tbs_x.dbf'Hope That Helps.
Ogan

Similar Messages

  • How to Move or Copy the Tables from One Database to Another Database ?

    HI,
          Can any one help me on this, How i can move or copy the tables from one database to another database in SQL server 2005 by using SQL query. Hope can anyone provide me the useful and valuable response.
    Thanks
    Gopi

    Hello,
    Maybe these links help you out
    http://www.microsoft.com/downloads/en/details.aspx?familyid=56E5B1C5-BF17-42E0-A410-371A838E570A&displaylang=en
    http://www.suite101.com/content/how-to-copy-a-sql-database-a193532
    Also, you can just detach the database make a copy and move it to the new server.

  • How to move only subset of data from one database to another?

    Both source & destination are Oracle11g databases.
    The requirement details are as below,
    1) The database contains static as well as transactional data for telecom domain.
    2) We have to move region-wise data from one database to another.
    3) There are around 10 regions.
    4) The region wise data extraction from source db is based on around 40 to 50 tables. Rest of the tables contains
    static data & it will not change.
    5) The volume is around 1 million subscribers per region.
    6) The migration is required because
    a) The client is upgrading its base product which uses this database
    b) There is a change in structure of static tables
    c) Hardware upgrade
    d) The client want to start with single region on new database & rest of the regions will be operated from old
    database.
    7) Keep execution time to very minimum.
    I am thinking to have solution as below,
    1) Create destination database with upgraded db structure (as mentioned in 6b)
    2) Create database links to access source db in destination db.
    3) Write SQL queries to fetch data from all the respective tables for a specific region
    4) Write separate PL/SQL blocks for each table to fetch data from source db & insert into respective table in
    destination db
    a) Use FOR ALL & bulk collect to improve the performance
    b) Divide table data into multiple chunks & execute parallel batches (around 10) to insert the data
    5) Validate pre & post counts to verify the success of migration
    Is there any other better way?
    Regards,
    Sandeep

    How to move only subset of data from a partiular table by using transportable tablespace?
    E.g. SUB table using SMP_SUB tablespace contains subscriber data in source database.
    The indexes defined on SUB table are under SMP_IDX_SUB tablespace
    The subscribers data can be categorized by different regions, say region_id column. Then how to move data & indexes of SUB table from source db to destination db?
    any specific example would be helpful.

  • How to move the pages and reports from one dashboard to another

    hi all
    can please any one tel me hw to copy the reports along with pages from one dashboard to another
    Thanks

    Hi,
    Go to Administrator->Manage Presentation Catalg->Click on Group folder under which the dashboard and reports are present
    1)Create one folder and copy the reports which are present in the dashboard pages you want(reports will be under some specific folder,open and copy one after the other to the newly created folder).Do this if you want other set of same reports for new dashboard that you are creating
    2)Click on _portal and create a new folder(new dashboard)
    3)Click on dashboad that is to be copied
    4)copy the pages one after the other into new dashboard folder
    If you are not keeping new set of reports then no need to point reports in pages,if reports are placed under new folder then go to each page and pull those reports from newly created folder.
    Regards,
    Srikanth

  • How to copy a Specific Font Style from one instance to another?

    I am using RoboHelp HTML V.7.
    I need to change multiple instances of one style to another. Is there a way to assign a specific font style from one instance of the style to another location (like MS Word style painter), or add the specific style to a shortcut key, or add the specific style the toolbar, or any other suggestions which may expedite my plight?

    Identify the "class=MyStyle" string in the MTML code, and use the Multi-File Find and Replace feature to step through each topic and change the specific instances to "class=MyOtherStyle." (I doubt that you'll want to "Replace All".)
    Sorry, there's no silver bullet!
    Good luck,
    Leon

  • How to move worksheet saved on database from one instance to another?

    Hi Every one,
    How to move worksheet or workbook saved on database from Discoverer plus from one instance to other instance?
    Is there any way to save a workbook or work sheet on to local drive from discoverer plus.?
    Thanks
    santhosh

    Hi,
    You have 2 options: use Discoverer Administrator to export/import the workbook; or use Discoverer Desktop to save the workbook to the local drive.
    You cannot save a workbook to the local drive using Discoverer Plus.
    Rod West

  • How to move set of FND Message from one server to another server

    Hi,
    I am having a request need to transfer all customized FND MESSAGES from one server(developing server) to another server (client server). Tell me the possible ways to do this in Oracle R12.
    Thanks
    Vivek
    Edited by: 912882 on 4 Aug, 2012 2:54 PM

    This is a two step process. but for this you need to ensure that all your custom messages were created in custom application say XXC
    download all the mesages by typing the below command from the developing server unix box
    FNDLOAD apps/$CLIENT_APPS_PWD 0 Y DOWNLOAD $FND_TOP/patch/115/import/afmdmsg.lct XXC_CUSTOM_MESG.ldt APPLICATION_SHORT_NAME='XXC'once this command is successful you will get the definition and data in file XXC_CUSTOM_MESG.ldt.
    Place this file in the main server unix box and run the below command :
    FNDLOAD  apps/$CLIENT_APPS_PWD 0 Y UPLOAD $FND_TOP/patch/115/import/afmdmsg.lct XXC_CUSTOM_MESG.ldt - CUSTOM_MODE=FORCE

  • How to move iphoto albums or slideshows from one computer to another

    I have iphoto running both on my desktop ('08 = 7.1.5) and on my laptop ('09 = 8.1.2). The libraries contain a lot of the same images but they are not identical (and I don't want them to be). I create albums or slideshows or books on each of my machines and would like to then transfer them to the other one for keeps - without replacing the albums etc. in that library. How do I do that?
    Sorry if this is a dumb question that's been dealt with many times. I couldn't easily find an answer.

    You can move albums and their photos between libraries but not books, slideshows, cards, etc. So you will have to recreate those items in the other library.
    If you are able to get the library with the books, etc. up to speed as far as having all of the photos from the other library you can then copy that full library to the other computer so you will have the book and other keepsakes in both libraries.
    I suggest to create a separate library for the book and copy it between Macs as needed. It will be small enough to make the copying process quicker. You can add additional photos to the book library as needed from either of your other libraries.
    This tutorial may be of some help if you decide to go that route: Old Toad's Tutorial #9a - Archiving an iPhoto 7(08)/8(09) Book for Editing and/or Ordering at a Later Date.
    OT
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier versions) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    NOTE: this is not the same as routinely backing up your entire iPhoto library folder to protect your photos. It only protects the loss of your organizational efforts that the database file contains.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. There are versions that are compatible with iPhoto 5, 6, 7 and 8 libraries and Tiger and Leopard. Just put the application in the Dock and click on it whenever you want to backup the dB file. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    NOTE: The new rebuild option in iPhoto 09 (v. 8.0.2), Rebuild the iPhoto Library Database from automatic backup" makes this tip obsolete.

  • How to move a selected row data from one grid to another grid using button click handler in flex4

    hi friends,
    i am doing flex4 mxml web application,
    i am struck in this concept please help some one.
    i am using two seperated forms and each form having one data grid.
    In first datagrid i am having 5 rows and one button(outside the data grid with lable MOVE). when i am click a row from the datagrid and click the MOVE button means that row should disable from the present datagrid and that row will go and visible in  the second datagrid.
    i dont want drag and drop method, i want this process only using button click handler.
    how to do this?
    any suggession or snippet code are welcome.
    Thanks,
    B.venkatesan.

    Hi,
    You can get an idea from foolowing code and also from the link which i am providing.
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
    width="613" height="502" viewSourceURL="../files/DataGridExampleCinco.mxml">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.binding.utils.BindingUtils;
    [Bindable]
    private var allGames:ArrayCollection;
    [Bindable]
    private var selectedGames:ArrayCollection;
    private function initDGAllGames():void
    allGames = new ArrayCollection();
    allGames.addItem({name: "World of Warcraft",
    creator: "Blizzard", publisher: "Blizzard"});
    allGames.addItem({name: "Halo",
    creator: "Bungie", publisher: "Microsoft"});
    allGames.addItem({name: "Gears of War",
    creator: "Epic", publisher: "Microsoft"});
    allGames.addItem({name: "City of Heroes",
    creator: "Cryptic Studios", publisher: "NCSoft"});
    allGames.addItem({name: "Doom",
    creator: "id Software", publisher: "id Software"});
    protected function button1_clickHandler(event:MouseEvent):void
    BindingUtils.bindProperty(dgSelectedGames,"dataProvider" ,dgAllGames ,"selectedItems");
    ]]>
    </mx:Script>
    <mx:Label x="11" y="67" text="All our data"/>
    <mx:Label x="10" y="353" text="Selected Data"/>
    <mx:Form x="144" y="10" height="277">
    <mx:DataGrid id="dgAllGames" width="417" height="173"
    creationComplete="{initDGAllGames()}" dataProvider="{allGames}" editable="false">
    <mx:columns>
    <mx:DataGridColumn headerText="Game Name" dataField="name" width="115"/>
    <mx:DataGridColumn headerText="Creator" dataField="creator"/>
    <mx:DataGridColumn headerText="Publisher" dataField="publisher"/>
    </mx:columns>
    </mx:DataGrid>
    <mx:FormItem label="Label">
    <mx:Button label="Move" click="button1_clickHandler(event)"/>
    </mx:FormItem>
    </mx:Form>
    <mx:Form x="120" y="333">
    <mx:DataGrid id="dgSelectedGames" width="417" height="110" >
    <mx:columns>
    <mx:DataGridColumn headerText="Game Name" dataField="name" width="115"/>
    <mx:DataGridColumn headerText="Creator" dataField="creator"/>
    <mx:DataGridColumn headerText="Publisher" dataField="publisher"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:Form>
    </mx:Application>
    Link:
    http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/ae9bee8d-e2ac-43 c5-9b6d-c799d4abb2a3/
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

  • How to move multi select rows(records)from one datagrid to another datagrid completelly in flex4

    hi friends,
    I  am doing mxml flex 4 wep application i am using 2 forms, each form i am using datagrid,i am struck in this place,
    my proplem is, in first form i am having a grid with 10rows and columns,i am having 10 records and one move button. Next form also having a datagrid,
    need:
    IF i am doing multi select(2records) from the first datagrid and click move button means that records will show in the second datagrid and will also delete
    from the first data grid again it wont show the records in same datagrid.
    how to do this?
    any useful suggession or snippet code.
    thanks in advance,
    Cheers,
    B.venkatesan.

    One solution could be:
    Source to data grid is an Array collection
    1.> In first data grid extraxct the rows using, grid.selecteditem
    2.>Add it to the arraycollection attached to next grid, use arraycollection addItemat api if rows needed to ve added at particular index
    3.>Use removeitemat api to remove the items from arraycollection attached to first datagrid
    4.>call invalidate on bothe of the datagrids

  • How to move Software componet and product from One SLD to another

    Hi Experts,
    I want to move the software component that i created in the development SLD and the product from dev system to Prod system SLD. Our development and the quality share the same SLD so i didnt have to do anything. How do i export the software component and the Product form dev SLd to Prod SLD Or what steps do we need to follow to move the Software component from SLD -> SLD.
    I am new to PI and this is the 1st time in am doing this activity. Request you help.
    BR Heth.

    Hi,
    Please ensure to read note #[1540435 |http://service.sap.com/sap/support/notes/1540435]and to decide which update strategy/scenario you
    need and in the "[SLD Planning Guide|http://www.sdn.sap.com/irj/sdn/nw-sld?rid=/library/uuid/e0a1a8fb-0527-2a10-f781-8b67eab16582]".
    You should ensure that your CIM Model and CR Content on your SLD are updated as
    per SAP note [669669 |http://service.sap.com/sap/support/notes/669669]on both SLDs.
    Regards,
    Aidan

  • ?'s Regarding ProDesignTools article "How to Move or Upgrade Adobe CS6 from One Computer to Another"

    I have read this article: http://prodesigntools.com/move-adobe-cs5-between-computers-or-windows-to-mac.html and have the following questions:
    I have an older Windows laptop and would like to purchase a box version of CS6. If my Windows laptop crashes or begins to malfunction, I would like to purchase a MacBook.
    If, at that time, CS7 has not yet been released, is it true that all I would need to do would be to deactivate the software on my Windows computer and install on my MacBook, using the same registered serial number, in a "crossgrade"?
    I understand that there would be an available free 30-day trial of CS6 on the MacBook as I install and activate on it. Would it be possible then for a Mac version of CS6 to be sent to me?
    I would likely not have to purchase another CS6 under these circumstances, correct?
    If, at that time, CS7 has already been released, I would have to do the aforementioned as well as purchase an upgrade to CS7, correct?

    You got it all wrong. No, you cannot simply use your Win serial on a Mac. All this stuff requires a proper platform swap, which is free for current versions, but can only be done once. And you don't get physical media unless you explicitly request it. It's simply a download. If and when CS7 is available, you simply buy the upgrade and switch platforms.
    Mylenium

  • How can I move the ODI Work Repository from one server to another server?

    How can I move the ODI Work Repository from one server to another server?

    Hi,
    If you would like to move your source models, target models and project contents from Work repository 1 to another work repository.
    I.e. Dev. server to Prod Server.
    1. Firstly, replicate the master repository connections i.e. with same naming conventions manually
    2. Go to Dev. Server work repository -> File Tab -> Click on Export work repository (save it in a folder)
    3. After exporting, you can view the xml files in the folders.
    4. Now, Open the Prod. server and make sure you already replicated mas. rep. details.
    5. Now, right click on model and import source model in synonym mode insert_update (select source model from the folder where your xml file located)
    6. Similarily, import again target then Project.
    Now, check. It should work.
    Thank you.

  • How do i move a file from one directory to another?

    Can anyone help me in moving a file from one directory to another?
    The following code just does not work!!
    File source_file = new File(source_file);
    if(source_file.exists())
    File dest_file = new File(destination_file);
    if(!dest_file.exists())
    boolean moved = source_file.renameTo(dest_file);
    System.out.println("moved.."+moved);
    The varirable moved is always false.
    Can anyone tell me whts wrong in this code?

    The problem in your code is you used file object as argument when you create a new File. I changed a little bit codes and it should be fine now.
    String source_file1="test111.txt";
    String destination_file1="test222.txt";
    try{
         File source_file = new File(source_file1);
         if(source_file.exists())
              File dest_file = new File(destination_file1);
              if(!dest_file.exists())
                   boolean moved = source_file.renameTo(dest_file);
                   System.out.println("moved.."+moved);
    catch(Exception e){
               e.printStackTrace();
    }

  • HT3819 How do I transfer my entire library from one computer to another?

    How do I transfer my entire library from one computer to another?

    Refer to this article to move your Music and library:
    iTunes: How to move your music to a new computer
    http://support.apple.com/kb/HT4527

Maybe you are looking for