Wednesday, March 7, 2012

data base name

I have to migrate one data base from sqlserver 7 to
another sql server 7. the data base name was 'Item CS'
there is a blank in the name (between Item and CS).
I used the restore command to restore from backup copy
but it got a syntax error.
RESTORE DATABASE Item CS FROM c:\backup\Item CS.BAK
This command gave an error because a 'blank' between Item
CS
How can we get around to use the restore command for a
data base with this kind of name ?
Thanks
VanTry:
RESTORE DATABASE [Item CS]
FROM DISK='c:\backup\Item CS.BAK'
--
Hope this helps.
Dan Guzman
SQL Server MVP
--
SQL FAQ links (courtesy Neil Pike):
http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
--
"VanHo" <vanho@.ispwest.com> wrote in message
news:08f301c378eb$e5b70390$a301280a@.phx.gbl...
> I have to migrate one data base from sqlserver 7 to
> another sql server 7. the data base name was 'Item CS'
> there is a blank in the name (between Item and CS).
> I used the restore command to restore from backup copy
> but it got a syntax error.
> RESTORE DATABASE Item CS FROM c:\backup\Item CS.BAK
> This command gave an error because a 'blank' between Item
> CS
>
> How can we get around to use the restore command for a
> data base with this kind of name ?
> Thanks
> Van

No comments:

Post a Comment