all groups > sql server msde > april 2006 >
You're in the

sql server msde

group:

syntax error using osql backup database cmd


syntax error using osql backup database cmd Orthos.Pandaman NO[at]SPAM gmail.com
4/14/2006 10:56:16 AM
sql server msde:
We are trying to move our Sharepoint MSDE database from our C: to a new
local drive P:
The KB article 833797 has a walkthru but we keep getting incorrect
syntax errors. We've tried to nest using the ' character in many ways
but always get a syntax error near the "-" or "STS_mySrv00-c01n2_1" in
the statement.

I suspect it has something to do with the "-" in the servername but
can't figure out a way to wildcard or encase it.

Any help would be greatly appreciated.

Server: mySrv00-C01N2\SharePoint
Database: STS_mySrv00-c01n2_1

Syntax used:

C:\>osql -S mySrv00-C01N2\SharePoint -E

1> backup database STS_mySrv00-c01n2_1 To Disk =
P:\SharePointBackup\STS_mySrv00-01n2_1
2> go
Msg 170, Level 15, State 1, Server mySrv00-C01N2\SHAREPOINT,
Line 1
Line 1: Incorrect syntax near '-'.

1> backup database 'STS_mySrv00-c01n2_1' To Disk =
'P:\SharePointBackup\STS_mySrv00-01n2_1'
2> go
Msg 170, Level 15, State 1, Server mySrv00-C01N2\SHAREPOINT,
Line 1
Line 1: Incorrect syntax near 'STS_mySrv00-c01n2_1'.


names have been changed to protect the innocent :)
Re: syntax error using osql backup database cmd Andrea Montanari
4/14/2006 10:32:28 PM
hi,
[quoted text, click to view]
did yo try
backup database [STS_mySrv00-c01n2_1] To Disk
='P:\SharePointBackup\STS_mySrv00-01n2_1'
?
--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtm http://italy.mvps.org
DbaMgr2k ver 0.18.0 - DbaMgr ver 0.62.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
--------- remove DMO to reply

Re: syntax error using osql backup database cmd Orthos.Pandaman NO[at]SPAM gmail.com
4/18/2006 11:01:05 AM
that worked - Thank you for your help.
AddThis Social Bookmark Button