创建恢复数据库
alter procedure pro_restoredatabase(@fname varchar(1000)) as /* execute pro_restoredatabase 'd:\admin2013817-0人.bak' */ begin
--RESTORE FILELISTONLY from disk=@fname if db_id('YLBXTemp') is null begin create database YLBXTemp end restore database YLBXTemp from disk=@fname with replace, move 'YLBX' to 'd:\YLBXTemp.mdf', move 'YLBX_log' to 'd:\YLBXTemp._log.ldf'
end