Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
joanne
Starting Member
46 Posts |
Posted - 2005-11-13 : 09:37:26
|
| i need your help, please!I have this code:DECLARE @DBName SYSNAME DECLARE @filename VARCHAR(200) declare @path varchar (100)set @path='E:\SQL_DATA_DUMP\'set @DBName = 'DBMMI' -- Build the .BKP path and file name SELECT @filename = @path + @DBName + '\' + @DBName + '_full' + '.BKP'--restore databaserestore database @DBNamefrom disk = @filenamewith MOVE DBMMI_Data to 'e:\sqldata\MSSQL\data\DBMMI_Data.MDF',MOVE DBMMI_Log to 'e:\sqldata\MSSQL\data\DBMMI_Log.LDF',STANDBY =@path + @DBName + '\' + @DBName + '_undo.dat' and this is the error when the code runs:Server: Msg 170, Level 15, State 1, Line 16Line 16: Incorrect syntax near 'DBMMI_Data'.thanks a lot for your help! |
|
|
nr
SQLTeam MVY
12543 Posts |
|
|
joanne
Starting Member
46 Posts |
Posted - 2005-11-13 : 10:50:24
|
| Hi nr,Many thanks for the link (it’s that I need now) and for ......quotes. |
 |
|
|
|
|
|