Options

Restore wizard -- location of mdf and ldf

colbycolby Posts: 30
edited May 29, 2008 4:21AM in SQL Backup Previous Versions
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

Comments

  • Options
    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
    
    Jerry Hung
    DBA, MCITP
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    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.
Sign In or Register to comment.