Wednesday, November 10, 2010

Restoring SQL Server 2005 Administrator Password

Never delete your Domain Admin account.  It will only make your life miserable when needing to access SQL 2005 and 2008 databases. :)

Here is how I was able to re-enable my new domain account (same name, different SID) on SQL 2005.

  1. Stop the SQL Server (OFFICESERVERS) service.
  2. Double-click on the service and copy the path to the executable
  3. Start the Command Prompt in Administrator mode
  4. Right-click to paste the executable and add -m to the end of the line to start the server in single user
    1. "c:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\sqlservr.exe" -sOFFICESERVERS -m
  5. Start another Command Prompt in Administrator mode
  6. Run SQLCMD.EXE (I wasn't able to connect to the OFFICESERVERS instance using any command line switches)
    1. At the first line type :connect servername\OFFICESERVERS
    2. If you don't succeed, look at the other command prompt to see if another service grabbed the only available session/ login.
    3. If something else grabbed your session, stop the sqlservr.exe with a CTRL-C and then Y
      1. Press up and restart the same sqlserver with the same -m switch
      2. Move faster on the second command line
  7. Once connected to the SQL instance you want do these steps:
    1. 1>create login [domainname\username] from windows;
    2. 2>exec sp_addsrvrolemember 'domainname\username', 'sysadmin';
    3. 3>go
    • Make sure that you put the domainname\username in square braces [] on line 1 and single quotes in line 2
    • Also note that the go command does not have a semi-colon
  8. Now stop the sqlserver from the command line with CTRL-C and answer Y to the question.
  9. Start the SQL Server (OFFICESERVERS) service like normal
The differences on SQL 2008 R2 is a little different but similar.  You need to start the sqlserver.exe with a trace flag 7806 so that it looks like this:
  • "c:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\sqlservr.exe" -sMSSQLSERVER -t 7806 -m
Since this instance on SQL Server used the default instance of MSSQLSERVER, then you don't need to use the :connect command after starting SQLCMD.
  1. Start the Command Prompt in Administrator mode
    1. "c:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\sqlservr.exe" -sMSSQLSERVER -t 7806 -m
  2. Run SQLCMD.EXE 
    1. If you don't succeed, look at the other command prompt to see if another service grabbed the only available session/ login.
    2. If something else grabbed your session, stop the sqlservr.exe with a CTRL-C and then Y
      1. Press up and restart the same sqlserver with the same -m switch
      2. Move faster on the second command line
  3. Once connected to the SQL instance you want do these steps:
    1. 1>create login [<<DOMAIN\USERNAME>>] from windows;
    2. 2>EXEC sys.sp_addsrvrolemember @loginame = N'<<DOMAIN\USERNAME>>', @rolename = N'sysadmin';
    3. 3>GO
Two sites that helped me keep this all straight:

Thursday, October 21, 2010

Attended the Minneapolis Sprint 4G Launch Yesterday

I ended up attending the Sprint 4G launch for Minneapolis on Wednesday.  It was very interesting to participate in a big presentation.  We had noticed Sprint testing 4G a few months ago and noticed when it became live in Minneapolis.

It was nice to get a chance to play around with the equipment although I think that Sprint did a poor job explaining why WiMax was going to succeed over LTE.  In fact Sprint was trying to communicate that 4G on other carriers was still a pipe dream or at least a first generation product for all other companies.

I was able to see my first Samsung Tablet which looked beautiful and I got a little excited seeing a new Medical Tele-presence device that might fit nicely at our hospital instead of sending nurses or providers out to people's houses.  Quick link for those interested: AmericanTeleCare

Saved Me From Wordpress.com

This article saved me from Wordpress.com -- I have been trying for a couple of months to move my blog from http://jeffrasmussen.wordpress.com to http://www.jeffrasmussen.org Under Wordpress.com, that would have cost me $12 a year but under Blogger, it is free. (I already had the domain registered)

I put up with Wordpress for a long time and to be fair, they were quite nice to me. My biggest hurdle since joining with them from the begining was not being able to add Google AdSense to my blog but since I was never writing this for the money :) I just ignored the minor irritation. Later, when micro-blogging became popular, I wanted a way to use my domain name to keep my posts under my own control.

Anyways, I am very happy to try this new platform -- for me.

Man Versus Technology: Overcome the bX-tjg9ds Blogger Import Error: "Importing a xml file from another blog into Blogger is a very easy and convenient way of moving from one blogging platform to another. What ..."

Friday, March 12, 2010

Checking Exchange 2007 for Spam

I had a user say that they believed that our spam filter flushed an expected email down the spam chute. I had to find a way to search through a log to verify the mail wasn't rejected by spam or why was it rejected.

Get-AgentLog -startdate "3/9/2010 8:30:00 am" | where {$_.recipients -like "" }

Wednesday, February 3, 2010

HTC Ozone Haret Notes

Welcome, this is HaRET pre-0.5.3-20091217_191025 running on WindowsCE v5.2
Minimal virtual address: 0x10000, maximal virtual address: 0x7fffffff
Detected machine Generic ARM v6/generic (Plat='SmartPhone' OEM='CEDA100')
CPU is ARM ARM arch 6 stepping 2 running in system mode

I was able to connect with my HTC ozone from Linux using Haret on port 9999. I'm not really sure what to do next but I'll put my notes on this page.

Thursday, January 28, 2010

Troubleshooting WSUS

I was getting errors when trying to update a new Windows Server 2008 computer in our empty forest root domain.  We don't use resources very often and from time to time setting up connections doesn't work very easily.

I was getting Windows Update Error Code:  80244021

To troubleshoot, I went to http://<servername>/selfupdate/wuident.cab to see if I could connect to a file.  When the security trust page came up I quickly realized that I needed to add the WSUS server as a trusted site.

Tuesday, January 26, 2010

Problems with SCCM 2007 After Upgrade

After upgrading from SMS 2003 SP3 to SCCM 2007 we had problems with our agents. It seemed as if the agents were upgraded and working but some functions were failing subtilly (sp?)

Android OS Has Jumped The Shark

New Survey Shows Android OS Roiling the Smart Phone Market.

It is too early to say that Android OS has done anything more than made a drastic increase in marketshare and mindshare.  However, what I would like to point out is that the Android adoption curve roughly follows all open source software and is a testimate to the open source development process more than to a particular handset or operating system.

When I started using Firefox it was called firebird 0.8.  Since then, Firefox has improved exponentially every year/ release until around version 3.0 when all major features seemed to incorporated.

I'm now using the chromium-browser (related to Google Chrome) exclusively because this browser seems to have a different set of features.  Chromium's focus is different than Firefox's and for me, it seems better but not as compatible.  (I've left 'being better' purposely vague and difficult to define.)  For me Chromium is faster and less obtrusive letting me move around the web quicker, however I miss things like a refined Delicious extension and either NTLM authentication or intranet webservers are purposely not delivering webpages to 'non-standard' browsers. (remember Firefox used to be considered non-standard)

The same pattern seems to follow my use of these other open source projects: Debian and Ubuntu; the GIMP and Inkscape.  It seems that open source development starts out slowly until the masses jump onboard then development happens very fast until all envisioned features are implemented and then project becomes popular and works on security and compatibility.

Open source projects seem to have a difficult time integrating new features once they are popular.  When Firebird/Firefox was young, they could throw away significant sized API's which would break tons of relying technologies but would allow for fast and interesting developments.  WINE is a good example of this because WINE has been able to replicate Windows API's on Linux and other OS's but you would easily understand why WINE has been eternally in the beta stage because they would have to dump historical compatibility in order to give better features and in WINE's case better Windows compatibility.

I am very excited about Android's future opportunity.  I believe it will bowl over most of the competition and Apple's iphone will continue being a higher end device for a small number of users just like the Mac.