3

我的一个朋友抱怨他的系统管理员设置的某些安全设置禁止了 SQL 管理 Studio Express。我建议使用 OSQL

替代文字

我的问题是

我需要一些基本命令,例如附加、分离和处理 SQL Express 数据库的最佳方式。有任何想法吗?

4

2 回答 2

6

MSDN 永远是最好的来源。

MSDN 上的osql(带有示例)。

但是,微软将在未来的版本中删除sqlcmd此实用程序,因此您应该开始使用。

于 2010-12-17T12:36:02.217 回答
1

If you are familiar with normal query syntax, it may be easier for you to write queries to .SQL files (edit in notepad and change the extension), then call from osql with either < filename.sql or -i filename.sql. Then you also only have to write out the commands once and can reuse them.

于 2010-12-17T13:53:28.283 回答