October 28, 2008
@ 06:38 PM

In case you missed it, it looks like Microsoft is making videos of the PDC sessions available on the Microsoft PDC site available within 24 hours of them occurring, which is pretty cool. It's not particularly easy to figure out where the heck the videos are hiding. They are being posted on the Channel 9 site but it's the same thing - good luck finding them all (at least it wasn't clear to me on how to find them).

However, if you go to the agenda timeline page you can click on a session. At the bottom there is a "View Session Details" link - click on that to view the session. They have one camera view on the speaker, the other on the slides.

Check it out.

Links:

http://www.microsoftpdc.com
http://channel9.msdn.com
http://sessions.microsoftpdc.com/public/timeline.aspx


 
Categories: Conference

October 28, 2008
@ 06:30 PM

I posted some info last night about how to move the TempDB database in SQL Server. That morning I had made the changes and just needed to restart SQL Server for the changes to take effect. This morning I restarted the SQL Server service and after it restarted, tried to log into our website (since it's the main interface to the data in SQL). I received a network connection error from ASP.NET which wasn't surprising, so I reset IIS (IISRESET from a DOS prompt). After it restarted, which only took 10 seconds or so, I tried hitting the site again. And nothing. The page sat there attempting to connect and finally timed out.

Uh oh, not good.

I still had Management Studio open so I tried a few test queries, which seemed to work OK. I opened up the Activity Monitor and didn't see any connections from ASP.NET. OK, so SQL Server is probably denying the connection or blocking for some reason. I took in a look in the new tempdb location and SQL had recreated the mdf/ldf files like I expected, so what's up?

I opened up the Event Viewer and saw a number of entries about the various databases starting up, which was good. Hey, what's that "Failure Audit" entry?

sqleventlog

"Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. [CLIENT: 192.168.1.8]".

Hmmm...192.168.1.8 is the web server. What user does SQL Server run under? I opened up Services, found "SQL Server" and double clicked on it. Then I went to the "Log on" tab. It runs under NT AUTHORITY\NetworkService. Could it be??? I opened Explorer and right-clicked on the folder where tempdb was located and selected "Sharing and Security" then went to the Security tab. Sure enough, "NETWORK SERVICE" wasn't listed. I went ahead and added it to the folder level then test the site again.

Success!

What was really strange about this was that most of our SQL databases are (and have been) located in this same folder. I'm guessing the permissions for those was set on the file level, which is why they've been working OK. The other weird thing was that it was even able to create the tempdb files at all.


 
Categories: SQL

I run across this from time to time and can never remember the specifics, so I figured I'd document it here:

To move a SQL database from one drive to another drive (or just move it to a new folder):

Inside of Microsoft SQL Management Studio execute this script (of course, replace "NameOfDatabase" with the real database name):

  USE master
  GO
  sp_detach_db 'NameOfDatabase'
  GO

Copy the database (usually NameOfDatabase.MDF and NameOfDatabase_log.LDF, assuming they haven't been renamed) to the new location.

  NOTE: The paths are relative to the server SQL Server is running on.

  USE master
  GO
  sp_attach_db 'NameOfDatabase', 'E:\SQLServerDataFolder\NameOfDatabase.mdf', 'E:\SQLServerDataFolder\NameOfDatabase_log.ldf'
  GO

To move the TempDB system database to a new location:

USE master
  GO
  ALTER DATABASE tempdb modify file (name = tempdev, filename = 'E:\SQLServerDataFolder\tempdb.mdf')
  GO
  ALTER DATABASE tempdb modify file (name = templog, filename = 'E:\SQLServerDataFolder\templog.mdf')

Restart SQL Server for the changes to take effect. One it's restarted you can delete the tempdb.mdf and templog.mdf from the old location.

Some instructions for shrinking the tempdb database:

http://support.microsoft.com/kb/307487


 
Categories: SQL

October 21, 2008
@ 09:48 PM

I mentioned a number of default Intellisense scripts I normally set-up in VFP a while back. Since I just set VFP 9 back up on my Vista 64 machine I've been living without them for a while - I was too lazy to follow my own post and add them back in. It's been making me crazy tonight while I try to get some code written so I finally just wrote a quick PRG to add them in (so next time it's even more painless).

It's not particularly smart so don't run it more than once, it will duplicate them.

Download the Intellisense PRG.

Edit: Hmm...It looks like my download code isn't setting the correct filetype when you download it (it's saving as a "HTM" file when it's actually a PRG). Just rename it and I'll fix the download code at some point. This should be fixed.


 
Categories: VFP

October 12, 2008
@ 07:49 PM

How much money is here?

moneypic

 

No cheating! Scroll down when you're ready to guess.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

If you:

  1. Looked at the pile of money for about 15 seconds then said to yourself, "I don't know, maybe $10,000 - $15,000".

Then you're probably not a geek.

If you:

    1. Opened the picture up in a paint program so you could zoom in and see the denominations (or used one of the various magnifying glass apps).
    2. Then counted the number of piles.
    3. Tried to estimate how thick each pile of money was based off of some other aspect of the picture.
    4. Then did a Google search to figure out how thick a dollar bill is (or went old school and grabbed a micrometer and did some tests).
    5. Finally calculated the total.

Then you're a geek.

If you're still not sure whether you're a geek or not...

 

If you're annoyed that I haven't told you how much money is there, or you just don't care, then you're not a geek.

If you're annoyed that I haven't told you how much money is there because you want to know whether you're estimate was right or wrong, or if you just don't care because you've already answered the question, then you're a geek.


 
Categories: Other