none
How to relocate instance in 2008R2

    Question

  • I have a stand alone SQL Server 2008 R2 host running a named instance, call it INT1.

    All of the data files for this instance are on a seperate LUN and the drive letter is F: (On shared stoarage array, not local disk)

    The SQL Server bineries are on a D: OS is on C:

    I want to shutdown the databases on INT1 and unmount the LUN and represent the LUN to another host.

    The 2nd host also has C: and D: like the first host.. I want to start INT1 on the new host now that it has the F: drive that has all the datafiles etc.. 

    How can this be done..?

    -Ken

    Wednesday, February 22, 2012 5:52 PM

Answers

All replies

  • Ken

    Have not done that personally, but see no reason why not.


    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/

    Wednesday, February 22, 2012 6:01 PM
  • But how?  What do you have to do on the 2nd host to mount the instance?

    -Ken

    Wednesday, February 22, 2012 6:46 PM
  • If I get it correctly,

    you have one machine A where you have Lun represening C D and F drives. And, you have another machine with the same drive letters(beforehand) and now you want detach the LUN from machine A and put it on machine B(may be some new drive letters) . If this is the scenario, then you will have to install a new instance and attach the files manually.

    and if the scenario is like: -

    you have one machine A where you have Lun represening C D and F drives. And, you have another new machine where you want to detach the LUN from machine A and put it on machine B and with the same letters keeping everything same.  In this scenario, if everything goes well it logically should work correctly (again - haven't tried it personally yet) 


    Kind regards| Harsh Chawla | Personal Blog:- SQL-blogs
    |Team Blog:- Team Blog


    Thursday, February 23, 2012 10:21 AM
  • Sorry for not being clearer.. 

    C: D: and F: are all seperate LUNS... F: has the data... 

    I just want to relocate F: from one host to another.

    So it sounds sorta like your first case...

    Is there a good example of "installing a new instance and attache the files manually?" 

    I assume you woudl have to login to the system DB and run commands to create new iinstance on the B side and attached the files?

    If so ... i would just need a decent reference point.. 

    Also .. once that was done and now the F: was on B and running from there... what if I wanted to present it back to A?  is there anything that has to be done or just start?

    Thanks for the help.

    -Ken

    Thursday, February 23, 2012 1:42 PM
  • Hi Ken,

    Move the SQL Server instance to another server is not supported. But if you want to move the SQL Server database, you can detach and attach the database files.
    Install a new instance in a new server, and run T-SQL Script to attach and detach database as this blog mentioned.

    For more information, please see:

    How to move SQL Server databases to a new location by using Detach and Attach functions in SQL Server

    Detaching and attaching Database


    Best Regards,
    Iric
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by yaphets Friday, March 02, 2012 10:05 AM
    • Marked as answer by Iric WenModerator Monday, March 05, 2012 9:48 AM
    Friday, February 24, 2012 6:49 AM
  • Hi Riktl, one question, are your system databases remaining on the same physical file paths? From what you say it sounds to me as though all your system dbs and user dbs are located on the F drive LUN. Is that correct? Secondly you simply want a like for like instance name right?

    Regards,
    Mark Broadbent.

    Contact me through (twitter|blog)

    Please click "Propose As Answer" if a post solves your problem
    or "Vote As Helpful" if a post has been useful to you

    Sunday, February 26, 2012 3:16 PM
  • Ken

    And that another host has SQL Server installed? Same version, same edition?


    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/

    Monday, February 27, 2012 5:56 AM
  • I think I still don't get the problem... You have all DB data/log files on F: and want to move those DBs to a new server...

    That's easy: Install the new server with the same SQL version. Mount the LUN to that new server. Then add all DBs to the new instance using sp_attach_db. No rocket science there...

    Tuesday, February 28, 2012 7:29 PM