--sql2012還原sql2008語句
--選擇master數據庫,新建查詢 輸入下面sql語句
--選擇兼容模式(sql 2008)創建數據庫db
RESTORE DATABASE db
FROM DISK = 'd:db20130725.bak'
with replace,
MOVE 'db' TO 'F:安裝軟件目錄sql2012MSSQL11.MSSQLSERVERMSSQLDATAdb.mdf',
MOVE 'db_log' TO 'F:安裝軟件目錄sql2012MSSQL11.MSSQLSERVERMSSQLDATAdb_log.ldf'