a friend of mine complained that SQL managment studio ex开发者_开发知识库press is prohibited by some security setting set by his system admin. i recommended to use OSQL
my question is
i need some basic orders like best way to attach, detach and deal with SQL express databases. any ideas?
MSDN is always the best source.
osql on MSDN (with examples).
However, microsoft will remove this utility in future versions, so you should start using sqlcmd
instead.
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.
精彩评论