0 Members and 1 Guest are viewing this topic.

AuthorTopic: Restore database with change path  (Read 1511 times)

Online admin

  • Administrator
  • Hero Member
  • *****
  • Posts: 847
  • Total Like : 0
    • https://www.facebook.com/pages/Phuket-ITcom/148070628616802
    • https://www.youtube.com/channel/UCq5x3hDkhcqJU4QXOE5adTQ
    • Email
« on: 27, 08, 2013, 10:49:01 »


New query from database name: master

Code: [Select]
RESTORE DATABASE <database_name>
FROM DISK = 'd:\MSSQL\BACKUP\<backup_name>.bak'
WITH MOVE '<database_name>' TO 'd:\MSSQL\DATA\<database_name>.mdf',
MOVE '<database_name>_Log' TO 'd:\MSSQL\DATA\<database_name>_Log.ldf',
REPLACE,
STATS=10
GO

ref: http://stackoverflow.com/questions/7994788/restore-database-and-change-the-location-for-mdf-file
« Last Edit: 06, 09, 2013, 12:09:46 by admin »