Learn from my stupid mistakes

I’ve been playing around with scripted installed for SharePoint 2010.  Given the install process is lengthy, tedious and very easy to bugger up, having a script that performs a least-privilege install automatically is pretty attractive.

Over at Codeplex they’ve got AustoSPInstaller, which is on v2 of the 2010 script.   This takes an XML config file with your service account passwords and so on and goes through all the punishment of a manual install in your behalf.

Great!  Except the powershell script kept getting access denied errors.  That’s odd.  I opened up regedit and had a look at the permissions.  OK script is running as me, I’m in the local domain user’s group, admins have full rights.  WTF?

Now, it’s been a while since I’ve done anything with scripts other than fool around with the filesystem, AD or a compliant SharePoint install, and I’ve only worked on this machine once before.  Luckily I’ve banged my head against this particular wall before.

I’m an administrator… but I still need to ‘run as administrator’ the script.

Much better now.

Of course, on the first run the script found the development database server is full and punched out.  Oh well.

 

MOSS/SharePoint Upload fails with file error 0x80070021

More upload nonsense!  Now we can upload large files, and all is well until a user turns up trying to upload a 173MB video file off a DVD-R.  It keeps failing and I assume it’s the DVD but it copies to my machine OK, but fails to upload to the document library.

OK, I open up the library in explorer view and drag and drop.  That gives a file locking error with the code 0x80070021.  Goggling didn’t do much good as this error apparently pops up most frequently with Outlook *.pst files.
Luckily my colleague is a SharePoint veteran and I asked him if he’d seen this error before.  Within a few minutes he’d concluded that the database was full.  As it turned out, truncating the log file did the trick.
Here’s the script to do that:
BACKUP LOG wss_content_go_snap_undp_org WITH TRUNCATE_ONLY
go
DBCC SHRINKFILE (2,1, TRUNCATEONLY)
GO