Posts

Showing posts from May, 2009

SQLDIAG and PSSDIAG

Most of the time I work with SQL Server 2005 when I need to collect statistics and create a nice looking html document with #PerfMon stats. In that case I run SQLDIAG with detailed statistics enabled. Command at the prompt is: SQLDIAG /i SD_Detailed.XML. This time around I was asked to run a performance report on a SQL 2000 Server. It's been a long time since I've done any work of this type so here are a few things I've learned from working with it. Apparently SQL 2000 doesn't support SQLDIAG. In that case I need to run PSSDIAG. You may ask why do I need to run either one, there are other tools available. Well, SQLDIAG and PSSDIAG create a .BLG file that I can feed into PAL tool that will create a really good html formatted document with plenty of information on performance. Well, my problems started right away. It is not as flexible as SQLDIAG and I stopped taking 2005 for granted after I've messed around with PSSDIAG for 2000. Apparently I need XML parser SP2 to r

Update on get-process | kill

Got replies on #twitter by @jsnover, @r_keith_hill re: get-process | kill command. It is fixed in #powershell v.2, will only kill user- specific processes. Will test in Windows 7, also was told to use -whatif tag. -whatif tag tells you what the command you're about to run will do. Now that's neat! Thank you fine gentlemen for your help. Twitter is a wonderful tool! --Artem

Never do this in PowerShell!

I was playing with #powershell the other day and found this "neat" trick. If you type "get-process | kill", it will reboot your box i.e. kill all running processes. Goes to show how important it is to know what you're doing with #shell. Use at your own risk! -- Artem

New feature in Ubuntu 9.04 Jaunty Jackalope

If you go to Terminal in #Ubuntu 9.04, and type "screen" no quotes, you will get quick info on CPU, Memory and some other info. Pretty neat! I heard this on LinuxOutlaws podcast. -- Artem

Run Powershell Inside Cygwin

Image
#Cygwin in simpler terms is a bash shell for #Windows.  You can run all your favorite bash tools like #rsync, #ssh, etc in cygwin. Turns out, you can run #powershell also. Yes powershell! Simply type “powershell” in cygwin, no quotes, and you will enter a powershell environment. Else, you can type a full command like this >powershell “get-eventlog System”. At the end you will be brought back to bash shell. In the first example you will stay in powershell. One caveat though, I don’t see tab completion in cygwin and file names are case sensitive, so you must specify the names exactly how they’re defined. ______________________________________________________________________