+ Post New Thread
Results 1 to 8 of 8
MIS Systems Thread, move sims db and log files to different partitions in Technical; Hello i want to move the database and the log files onto a different partition on the sims server, i ...
  1. #1
    ful56_uk's Avatar
    Join Date
    Mar 2008
    Location
    Essex
    Posts
    554
    Thank Post
    105
    Thanked 23 Times in 21 Posts
    Rep Power
    17

    move sims db and log files to different partitions

    Hello

    i want to move the database and the log files onto a different partition on the sims server, i used dbattch to detach the database then i moved thhe log files and database to were i want them, then used sql management studio to re attach the db but it appears it has lost logins, lucky enough i snap shot it first

    whats the correct way of doing this?

    mark
    Last edited by ful56_uk; 15th April 2011 at 09:53 PM.

  2. #2

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,808
    Thank Post
    272
    Thanked 1,135 Times in 1,031 Posts
    Rep Power
    349
    you will need to reinstall sql to the partition you require - for example if you need to install sql on the E: drive AFAIK - so follow the migration guides on the Supportnet its the same process although you don't actually move server just reinstall sql to the other drive.

  3. #3

    Join Date
    Mar 2011
    Location
    Bournemouth
    Posts
    280
    Thank Post
    16
    Thanked 74 Times in 64 Posts
    Rep Power
    21
    You won't need to reinstall SQL to move it at all.

    All you need to do is execute the following statement:

    Code:
    USE Master
    ALTER DATABASE sims MODIFY FILE ( NAME = sims_log, FILENAME = 'E:\SQL Logs\sims\sims_log.ldf' )
    GO
    Where 'sims' is the name of the database, 'sims_log' is the logical name of the database file, and the path is obviously the full path to the log file. Make sure you check these values are correct for your install.
    After that shutdown the SQL services, move the log file to the new location (and ensure the file name is correct) and the start the SQL services again.

    For more information see:

    Moving User Databases

  4. #4

    vikpaw's Avatar
    Join Date
    Sep 2006
    Location
    Saudi Arabia
    Posts
    5,851
    Thank Post
    672
    Thanked 1,383 Times in 1,145 Posts
    Rep Power
    350
    Yep, just need to run the right commands.
    Attaching the database will only copy it back to the default location (allocated when SQL instance was installed). However if you need to detach the DB....
    PLEASE USE DBATTACH TO DETACH AND ALSO REATTACH THE DB FILES. It does special magic with the logins.
    Not using it might be the reason for losing logins. If you had restored a file it would have been fine and any logins stored in the db previously should still work. Not sure what happens when you just attach using management studio.

  5. #5

    jinnantonnixx's Avatar
    Join Date
    Mar 2011
    Location
    In the Calamatorium.
    Posts
    1,970
    Thank Post
    113
    Thanked 490 Times in 336 Posts
    Blog Entries
    2
    Rep Power
    283
    If you're just moving the database files, the logins won't be affected as long as you keep the database name the same, so no need for the magic commands!

  6. #6

    matt40k's Avatar
    Join Date
    Jun 2008
    Location
    Ipswich
    Posts
    4,406
    Thank Post
    368
    Thanked 639 Times in 521 Posts
    Rep Power
    158
    I assume your recovery model is FULL?

  7. #7

    GREED's Avatar
    Join Date
    Mar 2008
    Location
    Portsmouth
    Posts
    3,033
    Thank Post
    374
    Thanked 367 Times in 299 Posts
    Blog Entries
    8
    Rep Power
    176
    Quote Originally Posted by vikpaw View Post
    PLEASE USE DBATTACH TO DETACH AND ALSO REATTACH THE DB FILES. It does special magic with the logins.
    As per previous lengthy discussions!

  8. #8

    matt40k's Avatar
    Join Date
    Jun 2008
    Location
    Ipswich
    Posts
    4,406
    Thank Post
    368
    Thanked 639 Times in 521 Posts
    Rep Power
    158
    Or just run SIMS_Transfer_Logins.exe before creating a backup.

SHARE:
+ Post New Thread

Similar Threads

  1. Copy or move files by extension
    By rocknrollstar in forum Windows
    Replies: 3
    Last Post: 27th December 2012, 05:55 AM
  2. Replies: 23
    Last Post: 12th October 2010, 02:59 PM
  3. [Fedora] Move to own partitions
    By Gatt in forum *nix
    Replies: 9
    Last Post: 27th October 2009, 12:15 PM
  4. Replies: 2
    Last Post: 17th October 2009, 03:55 PM
  5. Replies: 5
    Last Post: 20th August 2009, 12:53 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •