开发者

URL to make SSMS start and connect to a db?

It would be nice to have a bunch of reference links somewhere, that could also be used to start SSMS.

Is this possible? and get it to use an already open instance?

e.g. sqlwb -E -S Server\instance

but I'm not sure if you can do this开发者_JAVA技巧 in the form of a URL

i.e. how to make a URL run CMD


Right click on your shortcut for SSMS (or copy existing one),i.e. that thing on which you click to open SSMS.

Open Properties --> tab Shortcut.
Add options to target text box

For ex., I have: "D:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe" -nosplash -S localhost -d _A
to avoid splash, to connect automatically to database __A, etc.

URL to make SSMS start and connect to a db?

You will get help by adding non-existent option

URL to make SSMS start and connect to a db?

, pressing OK, double-click shortcut

URL to make SSMS start and connect to a db?


I'm not sure you can do this in a URL directly, but you could certainly create URLs to .cmd batch files (in the form of a UNC path) which contained the relevant commands.


To make a "url" run a cmd file, format it in this way:

file:///c:\folder path\myfile.cmd

If you want to embed one of these file links in a document (like Word or email) then you may need to add angle brackets around it:

<file:///c:\folder path\myfile.cmd>

and the editor will make it into a link automatically. (alternatively you could just highlight some text, right click and create a file hyperlink using the first syntax).


Launching executables from URL is a very bad idea and a security hole. I advise to avoid doing this for many reasons.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜