Post Installation Changes (data directories) with SQL Server 2012

  • If SQL Server 2012 is installed with all defaults selected, is there a way (post installation) to change the data directories settings?

    Thanks in advance, Kevin

  • USE [master]

    GO

    EXEC xp_instance_regwrite

    N'HKEY_LOCAL_MACHINE',

    N'Software\Microsoft\MSSQLServer\MSSQLServer',

    N'DefaultData',

    REG_SZ,

    N'C:\ new data file path...'

    GO

    EXEC xp_instance_regwrite

    N'HKEY_LOCAL_MACHINE',

    N'Software\Microsoft\MSSQLServer\MSSQLServer',

    N'DefaultLog',

    REG_SZ,

    N'C:\ new log file path...'

    GO

    EXEC xp_instance_regwrite

    N'HKEY_LOCAL_MACHINE',

    N'Software\Microsoft\MSSQLServer\MSSQLServer',

    N'BackupDirectory',

    REG_SZ,

    N'C:\ new backup path...'

    GO

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • SQL Server Management Studio, Server Properties, Database Settings

  • Thanks you OPC.Three and Paul Ross.

  • also, i you can go to the facets for the server, and modify the same paths opc.three posted, but via the GUI instead:

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 5 posts - 1 through 4 (of 4 total)

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