TRUNCATE TABLE master..sysdatabases

...and other neat SQL Server tricks
posts - 55, comments - 60, trackbacks - 14

Command Line SQL Server

I've set up a new category on my blog where I plan to post some articles about using command-line utilities to perform various tasks for, or in support of, SQL Server. I'll go over the basics like bcp, osql, DOS commands, and hopefully go more in-depth on some other utilities from the Unix/Linux world that are incredibly useful. I'm hoping to even post a full case study where an existing monolithic, mission-critical VB app is replaced with command-line utilities (depends upon workload and office politics though) I won't post all of them in the main SQL Team blog page, so you should check the above link periodically if you're interested.

I've recently finished converting one small process from 140 lines of SQL down to about 30 combined lines of SQL and command-line scripting. I hope to have it written up over the weekend (1/16/05) so if you don't see it by then, make sure to harass me about it. :) And if you have any ideas, requests, or questions that you think might make a good topic please feel free to share. Worst case, you get a little free consulting.

Just a note, I'm going to use a standard admonition to "read the previous articles" for anything in this series of articles on command-line utilities. So if you see a "Part 2", "Part 3", "Part 18" and you don't remember reading the earlier parts, scroll down and read them first. :) Most of them will be cumulative.

Another note: I will be using the terms "DOS commands/prompt", "command-line/command prompt", and "Unix utilities" interchangeably. Regardless of the term, ALL of the utilities listed in this series are available for and will work on Windows platforms. Win2000, XP, and 2003 definitely, and perhaps even NT, WinME and Win98 too (I haven't tested them).

I should also point out that a command prompt can be utilized in Windows by using the Run... item on the Start menu, and putting "cmd" in the command box. cmd is the command-line interpreter for Windows.

Print | posted on Wednesday, January 12, 2005 10:02 PM | Filed Under [ Coolness Command Line ]

Powered by:
Powered By Subtext Powered By ASP.NET