nerds:~ #

1May/100

SQL 2008 Installation Failure on Reporting Services

Recently, SQL Server 2008 was uninstalled from a Windows 2008 Server machine due to some configuration issues with Reporting Services. Attempts to re-install SQL Server with the Reporting Services option would fail. I was tasked with the re-install and as always, I welcome this type of work because there is something to learn nearly every time. Before the installation began, I went to "Programs and Features" and uninstalled anything referencing SQL Server. The Native Client installation was still listed, so I removed that. There was also a reference to SQL Server 2008 itself, but attempts to remove it failed instantly saying it was already uninstalled. Red flag number 1.

An installation summary was provided from a previous failed attempt and it provided an exception link with the following information:

Product: SQL Server
ID: 50000
Source: setup.rll
Version: 10.0
Component: SQL Server Native Client
Message: A network error occurred while attempting to read from the file '%.*ls'.

The page went on to explain that an attempt was made to install (or update) SQL Server Native Client on a computer where SQL Server Native Client is already installed, and where the existing installation was from an MSI file that was not named sqlncli.msi.

Having just removed the SQL Server Native Client, I was confident that my next installation attempt would be successful. To make a long story short, my installation failed again when trying to install Reporting Services with the same exact error. Ok, so we must be dealing with a registry key issue, so I decided to run regclean to clean up the system. I would caution to do this at your own risk. In my case, there was nearly nothing else installed on the server and if anything drastic happened, I would have been able to get a file system restore or having the system rebuilt without losing anything major. I reviewed the undo reg file that was created by regclean and found references to Reporting Services.

Attempt 2! I was confident yet again that it would work and to make another long story short - it failed. At the same point, with the same error! Ok, now it's time to go through the error log a little bit closer. And for those of you who don't care about all the steps and only the solution, you should have skipped down to this part.

After the installation failure, the setup directed me to a summary log file. In the log file, there was a path to another log containing the failure information:

C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20100428_094920\sql_rs_Cpu64_1.log

I opened this file and located the following line:

MSI (s) (3C:80) [09:57:00:939]: Specified instance {2453DBC8-ACC4-4711-BD03-0C15353AA3D8} via transform :InstID01.mst;:InstName01.mst is already installed. MSINEWINSTANCE requires a new instance that is not installed.

Fire up RegEdit and search for the instance ID specified in the log. In my case it was {2453DBC8-ACC4-4711-BD03-0C15353AA3D8}.

Delete the registry keys that match up with that ID. You will notice that some of the values contained in that key folder reference Reporting Services and the initial installation path. In my case, I knew it was the right place to be because the previous install was done from a different location than where I was installing from.

After deleting the registry keys, I launched my Setup and added Reporting Services successfully. I was unable to choose the default configurations, however. My only option was to install without configuring. Once the installation was completed, I had to launch Reporting Services Configuration Manager and set up the new ReportServer databases. You have the option to create new databases or use existing ones.

This methodology would probably come in handy in any type of SQL Server 2008 installation failure where you suspect bad registry entries.

Posted by: Brandon   Filed under: SQL Server, Windows No Comments
27Jan/102

Setup WebDAV in Apache2 on SuSE Linux to Support Windows (XP/Vista/7) Clients

Earlier today, a colleague told me that she doesn't like using my servers because I don't have FTP setup thus, she couldn't map my server as a drive. Well, I showed her. I stand firmly against using FTP as any type of web-related solution and thus, decided on WebDAV to address my colleague's demanding needs.

Initially, I set the virtual host up for Basic Authentication but was unable to get Windows 7 and Windows XP to map the drive. Windows complained that "The network path could not be found." I tried mapping the drive from both the command line and from Windows Explorer with no luck. Then I read that theWindows webDAV client does not support Basic Authentication. If this server were on my domain, I'd use Kerberos without a second thought, but it's an Internet web server so that is out of the question. Digest Authentication it is.

I went enable mod_dav, mod_dav_fs, and mod_auth_digest in YaST under Network Services >> HTTP Server >> Server Modules and I restarted the service. I then created the folder /var/davlock, gave it the proper permissions and added the following to httpd.conf

<Ifmodule mod_dav.c>
  DAVLockDB /var/davlock/DAVlock
</IfModule>


Then I added the new host, sample.acme.com to my vhosts.conf file and restarted the service.

<VirtualHost *:80>
    ServerAdmin nobody@localhost
    ServerName sample.acme.com
    DocumentRoot /www/wordpress/sample
    ErrorLog /var/log/apache2/sample-error_log
    CustomLog /var/log/apache2/sample-access_log combined
    UseCanonicalName Off

<Directory "/www/wordpress/sample">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
DAV On

#Auth in the house
AuthType Digest
AuthName "sample"
AuthDigestAlgorithm MD5
AuthDigestDomain http://sample.acme.com
AuthDigestNcCheck Off
AuthDigestNonceLifetime 0
AuthDigestQop auth
AuthDigestProvider file
AuthUserFile /etc/apache2/.htdigest
AuthGroupFile /dev/null
<LimitExcept GET HEAD OPTIONS POST>
require valid-user
</LimitExcept>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>


Notice AuthUserFile /etc/apache2/.htdigest. That file was created using htdigest2 (or on most other systems, htdigest).

htdigest2 -c /etc/apache2/.htdigest sample acmeuser

The -c switch creates the file, "sample" correlates with the AuthName directive and acmeuser is the username of my demanding colleague. Also take note that the way I used LimitExcept allows all non-webDAV users to have anonymous access to the site, while any webDAV activity requires a username and password.

Next, I mapped a drive in Windows with the two methods I am familiar with. First, via the command line

W:\>net use * http://sample.acme.com
Enter the user name for 'sample.acme.com': acmeuser
Enter the password for sample.acme.com:
Drive X: is now connected to http://sample.acme.com.


And then via Windows Explorer (My Computer >> Map Network Drive [be sure to click "Connect Using Different Credentials"]). Both worked flawlessly. And of course, this is all better if you can do it over HTTPS, which I plan to setup when I have time. But for now, my servers are totally in style and ready for use by people who aren't fans of vi ;) .

Posted by: Chrissy   Filed under: Apache, Linux, Security, Windows 2 Comments
23Jan/107

Solved: Missing Hard Drive Space in Windows Server 2008

Tonight, I uninstalled Exchange Server 2007 from a development server and was surprised to see that, after the uninstall was complete (and not without a few workarounds), only 50GB of an 80GB hard drive remained. Explorer showed 25GB free, but only 25GB had been used. Where was the remaining 30GB? Poking around the net didn't help -- most of other people's issues revolved around System Restore and Volume Shadowing but I had disabled all of that.

Ultimately, I used a free tool called windirstat not only to find the missing space, but to delete the offending files as well. As I suspected, there were some super hidden files @ C:\Program Files\Microsoft\Exchange Server that took up nearly 30GB. I tried deleting them in Explorer (which showed me that the Exchange folder was 0kb in size) which resulted in FAIL. Windirstat, however, allowed me to right click and quickly delete the multitude of large log files.

Exchange was my issue, but your server may have another -- some people mentioned anti-viruses causing issues. In any case, using windirstat will shed some light on where to find missing drive space.

Phewf! Now to install SQL Server 2008 R2 on that server...

Posted by: Chrissy   Filed under: Exchange, Windows 7 Comments
8Oct/093

Windows 7: Setup was unable to create a system partition or locate an existing partition.

Over the past week, I've installed Windows 7 and OS X more times than I can count. In attempting to figure out the easiest way to dual boot Windows 7 and OS X, I've also partitioned my drive a good 30+ times. So.. after messing up with an EFI bootloader, I was suddenly unable to re-install Windows 7. I encountered the error: Setup was unable to create a system partition or locate an existing partition. I also ran into the error: Windows cannot be installed on disk 0 partition 1.

I used Gparted to repartition my drive, and even used Disk Utility but repeatedly encountered the above errors.

As it turns out, I had another System disk attached (OS X on a USB drive) to my laptop and once I unplugged it, I was able to successfully install Windows 7.

Posted by: Chrissy   Filed under: Windows 3 Comments
5Oct/094

Windows 7: Disable Unnecessary Services on a Domain Workstation

I finally took the plunge and installed Windows 7 on my Dell Netbook (Inspiron mini iM10-008B). I originally bought the Dell to make it into a Hackbook but after I realized how time-intensive the initial setup may be, I looked to installing Win 7 for instant newness gratification.

Initially, I was going to install the Enterprise version of Win 7 like I had done with Vista, but I decided on Ultimate since Ultimate is essentially the "Enterprise version for consumers" and I didn't have to have a local Key server around to validate my install.

The Netbook I purchased came with only 1GB RAM so it's especially important that I keep it running as efficiently as possible. I performed the basic tweak of setting Win 7 for Best Performance and then began checking out which services I could disable. I found Black Viper's Service Configurations page and used that as a guide to modifying my own services. His recommendations appeared more geared towards machines that are not on a domain, so my setup is a bit different from his. I have a Windows 2008-based domain and, while I know it offers a lot of Vista/7 specific features, I don't have time to explore them right all so my setup is geared towards a basic domain membership.

Ultimately, I was able to reduce initial memory usage to 480 MB. That's a lot, but better than the ~600MB or so used by default. There are 144 services that I reviewed, including the AVG firewall service. So without further ado...

Posted by: Chrissy   Filed under: Active Directory, Networking, Windows Continue reading
14Dec/085

MS Defender Error: “Mallware Signeture Download” Appears Legitimate (Unfortunately).

Ow, the other day I was infected by the the Vundo trojan. I believe the trojan came in through an infected webpage and attacked a Java vulnerability on my machine. During the cleanup, I installed a variety of anti-malware software, including Microsoft Windows Defender. Although I don't believe things can be 100% clean after such an infection, I *really* don't want to reformat that workstation. That said, I was extremely suspicious today when a Dr. Watson/Microsoft Error Reporting error pops up with obvious misspellings (picture taken after report submission):



"Mallware Signeture Download"

I immediately went to Google and found that other people experienced the error and were also suspicious of the spelling errors, since such errors are common in actual malware. Feeling adventurous, I decided to allow the software to send the reports that I didn't bother looking at because if it's malware, it would be a setup anyway, right? Immediately after the data submission, I brought up a command window and typed netstat -b which listed the following:

Active Connections

  Proto  Local Address          Foreign Address        State           PID
  TCP    MYWORKSTATION:1332       watson.microsoft.com:http  ESTABLISHED     2728
  [DW20.EXE]

After going to http://watson.microsoft.com and receiving a Directory Listing Denied error, I pinged watson.microsoft.com and noted the IP resolved to 65.55.22.252. Using Sam Spade, I then asked ARIN who owns that IP block and sure enough, the IP is owned by Microsoft.

12/14/08 15:35:18 IP block 65.55.22.252
Trying 65.55.22.252 at ARIN
Trying 65.55.22 at ARIN

OrgName:    Microsoft Corp
OrgID:      MSFT
Address:    One Microsoft Way
City:       Redmond
StateProv:  WA
PostalCode: 98052
Country:    US

NetRange:   65.52.0.0 - 65.55.255.255

Now, I was pretty confident that the pop-up was indeed legitimate. But I became completely convinced after I found a posting by "Dude" on pcreview.co.uk that shows the string can be found within the program files, themselves.

$ cd "$PROGRAMFILES/Windows Defender"
$ for file in *; do strings -t x -e l $file | grep Mallware | grep Signeture
&& echo $file ; done
10cdc Mallware Signeture Download
MSASCui.exe
26fc Mallware Signeture Download
MpSigDwn.dll

Having such spelling errors in an anti-virus program is unacceptable. Hopefully Microsoft will address it soon so that IT pros can stop wasting their time researching its legitimacy. However, seeing that the problem has been around since at least 11/2006, a fix doesn't really seem likely.

Posted by: Chrissy   Filed under: Security, Windows 5 Comments
23May/0751

Vista: Net Send is Gone; Use msg console Instead.

Update: If you receive "access denied" when attempting to use msg, do the following: Terminal Services Configuration (tscc.msc) -> Open up the properties of the RDP-TCP connection object -> Permissions tab -> Advanced -> Edit the entry you are interested in changing. Thanks to TP at winserverkb.com for that info.

Update 2:Check out Adriano's comment below, it's pretty thorough. Thanks Adriano!

Today, I needed to net send a message to myself, but soon realized that it disappeared and is no longer supported in Vista. Then I found a a post on MSDN tipped me off to use msg instead. Msg is usually used for sending messages to terminal services users but, remembering that the console session has an ID of 1, I decided to try sending a message to the console user. As it turns out, msg 1 test worked both locally and remotely in Vista.

Then, I tried running the command on an XP machine, only to realize that XP's terminal services console ID was 0 and not 1. In order to msg the console in XP, I had to run msg 0 test. So what is session 0 in Vista? Well, according to the query session command, "services" use the ID of 0 in terminal services. Whoops. It appears that the best way for this to work across XP and Vista machines would be to use "msg console test" or "msg * test" or "msg username test". If you'd like to message remote machines, you can do so by pointing to a file that contains the names of multiple machines or by using the /SERVER switch ie. msg /SERVER:computername console "Message goes here".

If you need additional options or help, check out the TechNet article for more information.

Update: For those of you receiving the error message "error 5 getting session names", this appears to be a permissions error. Unlike "net send," you must be on the same Windows domain to send msgs to other computers. This is a good thing -- it means that msg is not prone to being abused by spammers.

Posted by: Chrissy   Filed under: Windows 51 Comments
23May/073

Scheduling Tasks from a Command Line in Windows Vista and XP

I'd like to start this post with a warning: I'm only 29 years old but already have permanent damage to my shoulder caused by overusage while working/playing on the computer. Two years ago, I had to claim workman's comp because I was disabled for a few weeks, barely being able to even stand because of an excruciating pain in my shoulder - even gravity put too much pressure on it. I didn't know what was happening at first, I thought it just needed to "pop" but as it turned out, I had tendonitis/bursitis from repetitive mouse/keyboard usage. While the damage was permanent, the pain went away after a terribly painful cortisone shot was injected right into my shoulder. By that time, calcium had built up and I heard the needle crush right through it. Ugh, even with lots of Vicodin and some other topical pain killer, it was still unbelievably painful.

To stop the problem from recurring, I had my desk evaluated by an ergonomic specialist and ended up buying a new chair and a new keyboard tray. I also moved my mouse in closer to my body so that I wouldn't have to reach so far out. I got tips on how to sit, stretch, mouse, etc. I suggest that if you haven't had an ergo eval recently, ask your company to schedule one with a professional. The time I've invested at physical therapy, at the doctor's office, icing my shoulder, figuring out how to clean/cook with a bum shoulder, buying new backpacks, etc could have been avoided if I got into a healthy posture habit when I first started working on computers. So now.. I ice, take lots of ibuprofin and perform stretches.

Everyone, not just fools like me with bum shoulders, should stretch at least once an hour while on their computer. I'm pretty forgetful but even if I wasn't, I don't think its possible to remember to stretch every hour on the hour without some help. And this is where the command line task scheduling fun comes in.

Often times, I've scheduled tasks in both Windows and Unix from the command line using at. Today while researching creating a stretch task, I learned that Microsoft replaced at with schtasks and Apple replaced at with launchd. Works for me, Windows' at doesn't really support hourly tasks while schtasks does. Below is a scheduled task that I'm running in order to prevent further injury to my shoulder:

schtasks /create /tn StretchReminder /tr "msg console Stretch!" /sc HOURLY

Using this command, I've created a task to run once an hour which sends me a simple message that reads "Stretch!" You may wonder why I'm not using net send. The reason is that net send is no longer supported in Vista and msg is supported in both XP and Vista.

Here's hoping my shoulder gets better and yours never starts acting up.

Posted by: Chrissy   Filed under: Windows 3 Comments
1May/076

WSUS 3.0 Now Available for Download

Microsoft Windows Server Update Services 3.0 is now available for download.

I updated 4 of my servers from WSUS 2.0 to 3.0 today with no apparent problems - the install was very smooth. The biggest difference so far is the move from WSUS Administration being web-based to being an MMC 3.0 snap-in.

If you'd like to administer your WSUS 3.0 install from a workstation, just double click WSUS3Setupx86.exe and select Administration Console Only when prompted. Once installed, the snap-in can be found under Administrative Tools -> Microsoft Windows Server Update Services 3.0. I thought of just yanking the wsus.msc module itself but it seems the Console_install switch installs not only that file but also 230+ of its friends. According to the Microsoft employee who left a comment below, you must install the entire package for the msc to work.

TechNet also added a section for Server-Side management on Windows Update Server. The current scripts include:
- Delete Empty Target Groups
- Re-index the WSUS 3.0 Database
- Server Status for Approved Updates
- Server Status Summary for All Computers and Updates
- Start Server Synchronization

WSUS 3.0 also allows administration from the command line using both wsutil and Powershell via the WSUS 3.0 API.

Posted by: Chrissy   Filed under: Windows 6 Comments
1May/0720

5 Ways To Stop Windows Vista/XP/2003 From Beeping

This came up twice in the past week at work so I decided to post it. Here's a few ways to disable the annoying beep in Windows. Works especially well to hush Terminal Services Beeping. I ran this on the clients but it may work for the server as well.

1. local machine: sc stop beep && sc config beep start= disabled
2. remote machine: sc \remoteMachine stop beep && sc \remoteMachine config beep start= disabled
3. requires reboot: Device Manager -> View -> Show Hidden Devices -> Non Plug and Play -> Beep -> Disable
4. requires reboot: net stop beep
5. use TweakUI: General > Settings -> Uncheck the Beep on Errors

Sources: tech-recipes, sonhaysytem.com and JSI FAQ.

Posted by: Chrissy   Filed under: Windows 20 Comments