How can we help you today? How can we help you today?

Restore wizard -- location of mdf and ldf

Need your help

I am rebuilding a new server and am restoring backups from an old server to this new server and have some questions.

a) When I use the wizard to "create" database approach, why does the wizard not know where are the SQL server defined default database locations. It seems to put them in the install default folders and not the SQL server defined folders. Why I "can not" change the location of the databases?

b) When I use the "replace" database approach again why does the wizard not know where are the SQL defined default locations? Why "can" I then change the location?

In either approach I need for it to install in the defined SQL location and have the option to change the location if needed.

c) Is there a preferred approach to use?

thanks

Colby
colby
0

Comments

2 comments

  • jerryhung
    I agree, SQL Backup doesn't read from SQL 2005's default Database file paths that's configured in Server Properties

    but either way, I just copy & paste SQL Backup's restore script, and modify it on my own (find & replace)
    EXECUTE master..sqlbackup N'-SQL "RESTORE DATABASE [XXX]  FROM DISK = ''D:\Backups\XXX.sqb'' WITH RECOVERY, MOVE ''XXX'' TO ''D:\SQLData\XXX.mdf'', REPLACE"'
    GO
    
    jerryhung
    0
  • Brian Donahue
    Hi guys,

    Somewhere along the line SQL Backup had been changed to use default data and log folders configured in the SQL Server area of the registry. I'd assume that this was done to prevent restoring to an invalid folder. At any rate, the information about how to set your default data and log folders is in our knowledge base.
    Brian Donahue
    0

Add comment

Please sign in to leave a comment.