解决方法
你需要使用:
sqlcmd Utility
The sqlcmd utility lets you enter
Transact-sql statements,system
procedures,and script files at the
command prompt,in Query Editor in
sqlCMD mode,in a Windows script file
or in an operating system (Cmd.exe)
job step of a sql Server Agent job.
This utility uses OLE DB to execute
Transact-sql batches.
然后使用CREATE DATABASE (Transact-SQL)进行连接,使用sp_detach_db (Transact-SQL)进行分离. sp_attach_db (Transact-SQL)将在未来版本的Microsoft sql Server中删除.