Changing locaton of data and logs for the database and server

  • I know how to move file using Windows exp,i thought it is another way under OS. I think there is another process on moving system db from one location to another then I was giving here.

    Are you saying it is the same process on system db and regular db moving from one location to another?

    Is this valid path?

    E:\MSSQL\MSSQL.5\MSSQL\Data\MSCS_Admin

  • Krasavita (8/21/2009)


    I think there is another process on moving system db from one location to another then I was giving here.

    Yes, there is.

    Are you saying it is the same process on system db and regular db moving from one location to another?

    No, I did not say that. I said consult Books Online for the details of how to move system databases.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • GilaMonster (8/21/2009)


    Krasavita (8/21/2009)


    1.How to - move the files at OS level?

    Are you serious? Do you not know how to move a file using window explorer?

    2.Do you have a link how to move system db? Is master db has a different process?

    Google is your friend. So is Books Online. The full details are in Books online and available on the msdn site.

    Edit: "E:\MSSQL\DEV_OLP & MSCS_Admin.ldf" doesn't look like a valid path....

    Gail has given you directions on where to lookup how to move system files. I suggest you follow the directions given and read those documents. Yes, moving system databases is different than moving user databases - and if not done correctly, you'll find that SQL Server will not start.

    The above path is a perfectly valid path on Windows - but, I don't think it is valid for what you want to do. I think you mis-interpreted the message and where the original said:

    select 'alter database [' +db.name + '] modify file (name = ' + al.name + ', filename = ''' +

    'PUT PATH & FILENAME HERE' + ''')' + char(13) + char(10)

    You replaced 'PUT PATH' with the path (folder) - left in the ' & ' and replaced 'FILENAME HERE' with the file name. What you should have done is replace:

    'PUT PATH & FILENAME HERE' with the valid path and filename you want, as in: E:\MSSQL\DEV_OLP\MSCS_Admin.ldf

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Krav

    seriously, if you are not comfortable moving files at the OS level you should leave well alone and seek extra help first. Beware also, that whatever path and filename you supply to the alter database statement will be accepted by SQL Server and will be used next time the database starts. If it don't exist the database won't start. YOU HAVE BEEN WARNED!!!

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • hmm .... problems doing a os level file move ?? .... scary !!:unsure:

    here's an article regarding moving database files...

    http://www.mssqltips.com/tip.asp?tip=1604

    Be sure you know what you do or you may get into big troubles for that instance/db !

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

Viewing 5 posts - 16 through 19 (of 19 total)

You must be logged in to reply to this topic. Login to reply