Skip to main content

Posts

Showing posts from December, 2012

Query to Set MSSQL Database Owner

This resolves an error encountered disabling the ability to view database properties via SQL Management Studio:  "Property Owner is not available for Database '[DB_name]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo)"  And a related error:  "The database owner SID recorded in the master database differs from the database owner SID recorded in database 'XYZ'. You should correct this situation by resetting the owner of database 'XYZ' using the ALTER AUTHORIZATION statement." Where !DBNAME= database name, and the default System Administrator remains 'sa':  use !DBNAME EXEC dbo.sp_changedbowner @loginame = N'sa', @map = false GO

Remove Single User Mode From Your MSSQL Database

***This guide is valid for MSSQL 2000, MSSQL 2005, MSSQL 2008 and MSSQL 2012.  Is your database stuck in single user mode? Irritating isn't it? Use the following command to restore it to normal service, where DBNAME is the name of the database: exec sp_dboption 'DBNAME', 'single user', 'FALSE' go

MSSQL .NET sysobjects Cheatsheet - Viewing and Creating Sysobjects

The following in formation should be valid for MSSQL 2005 and 2008. Sysobject creation is best handled using the GUI available at $WINDOWS\Microsoft.NET\Framework\$version_number\aspnet_regsql.exe. Under some circumstances, this may not be possible or preferable. In those circumstances, the following queries can assist you. To view all installed sysobjects for the database, run the following query, replacing DBNAME with the name of the relevant database: use DBNAME go select * from sysobjects where xtype ='P' and name like 'aspnet_%' Sysobject creation scripts are specific to the object. The script below will create aspnet_SchemaVersions: CREATE PROCEDURE [dbo].aspnet_CheckSchemaVersion    @Feature                   nvarchar(128),    @CompatibleSchemaVersion   nvarchar(128) AS BEGIN IF (EXISTS( SELECT  *                FROM dbo.aspnet_SchemaVersions                WHERE   Feature = LOWER( @Feature ) AND                        CompatibleSchemaVersion =

For Your Consideration, Neutron the Atomic Superman vs. the Death Robots

DIY Boards

I may be a bit late to this party, but I am excited to get my hands on the Arduino Board , a small, open-source everything hardware hacking platform (psst I get no kickbacks from these people and have no relationship with the corporation I just think you might like it). The only downer is, I have 0 experience with Arduino. They are going for about $10-$15 though, which is cheaper than your average programming language manual, so this would be a cool way to learn. This reminds me of the time I set a server on fire trying to attempt power conversion for a very unique SCSI hard drive while attempting forensics without proper tools (remember before SAS became cool and how every SCSI device seemed to have its own pinout?). I may have to post about that soon.

Google's Disavow Links Function

I am still doing a bit of research on this function (and have plans to update this page appropriately), but this should be of considerable interest if you are anything like me and have a website that is somewhat frequently the target of hackers and spammers. The Google Disavow Links tool, part of their Webmaster Tools, will allow you to remove links from Google's algorithm, and hopefully you can successfully strike back at spammers and link farmers who would damage your website's rep.

What Math Can Teach Us About Juggling, and What The Math of Juggling Can Teach Us About Everything Else

Computers represent humanity's greatest achievement along the border of the analytic and the pragmatic. I have always been interested in where mathematics and the 'real world' meet. The question that seems to drive the latest heights of human understanding wherever I turn is - how can we use mathematics to better understand our environment, more efficiently complete tasks or provide more sophisticated and beautiful solutions to problems that are half-understood but widely believed to be resolved? This interest has informed my career, from an amateur interest in cryptography and network security as a youngster, to the study of logic at university, and now to networking and administration (I also think its why I've had more of a capacity for the discrete side of things and have floundered in calculus). This intersection in computing is widely accepted, but in more common tasks the mathematical approach to problem solving is often discarded for the obscurantism of 'c

The Secret Tool Exposed! Also, Blogger's Spam Reporting Page

Some site that calls itself "The Secret Tool" (without a hint of irony) has started linking to my site and sending junk traffic my way. Its maintained on Blogger and apparently I'm not the only one to be dismayed by the sudden rush of hits being had by these Spam-holes. While I was reading through the reports of others who have found their web traffic sullied by The Secret Tool, I found a recurring theme - folks are having difficulty finding where they can report naughty behavior like this to Google. Here is the link. Just type in the name of the blaaaag in question to produce an alert that will be delivered directly to the Trash Bin of a Google administrator: http://support.google.com/blogger/bin/request.py?contact_type=spam&blog_ID=&blog_URL=

An Astounding Surprise at the Gun Show

On my way to do some grocery shopping, I came across a gun show at the local fairgrounds. With not much else going on, I decided to check it out. There were some cool stuff at the show - my favorite was an impeccably restored Thompson sub machine gun with gold trim. What really caught my eye though, and what I ended up purchasing, had nothing to do with weapons. I found a set of 10 original Astounding Science Fictions magazines. Not in the best of condition, but certainly readable and with the unmistakable Old Book Smell that leads me to despise things like Keendles. Some of the less interesting covers (seriously) For those of you without retainers, can breath through their nose and that have girl friends, Astounding Science Fiction was a pop sci fi serial that ran from 1938 to 1960 (when it became Analog magazine, itself a great read). Isaac Asimov and Robert Heinlein were both regular contributors who published some of their earliest work there. This man's side burns co

Sunday Funday Video Game / B Movie Time

Sunday is a busy day for me. It starts with getting up early to go to the local game store and see how many video games I can get for $20. Today's haul was good, and I brought home eight games for that princely sum. I've gone through different periods with my Xbox 360, but for the moment I have decided to rebuild a game library on the cheap and not sell them or trade them back in. I've also made the commitment to spend no more than $10 on any one game during this process, and if possible, I keep it to $2 per game.  You might think that limits me to horrific schlock, but you would be wrong .  Here is what I got today: Fallout 3 Fallout: New Vegas Il-2 Sturmovik The Elder Scrolls IV: Oblivion Quake 4 Afro Samurai Too Human Afro Samurai Replaying Fallout 3 and New Vegas has lead me to reading some great articles by the original game's lead designer that are  definitely worth checking out .  After video games, I have scheduled a nap. After w

The Origins of "Fallout"

Check out this amazing article written by R. Scott Campbell , on his years working at Interplay and the inside scoop on the creation of Fallout, one of the best videogames of all time (90's Interplay was a dream factory - remember Wasteland and Battle Chess?)

Oh, George

This is an image from the Star Wars Holiday Special. The special is quite possibly the worst thing ever committed to film. I cite the image above as evidence. May it sear itself onto your brain as it has mine. You're welcome.

How to Fix MSSQL Error 15023: "User already exists in current database" and Stored Procedures for Preventing MSSQL Orphan Users

Whether you are using MSSQL 2005, MSSQL 2008 or MSSQL 2012, orphaned users are common when restoring a database. It happens like this: you restore the database successfully. Being a thorough and awesome database administrator, you check the user mappings for the owner/primary database user assigned to the database, and see that the user exists in your server instance, but is no longer assigned the correct mappings. You attempt to restore the mappings, but when you do, the MSSQL server responds with the error below  Error 15023: "User already exists in current database" Below are a series or commands that can be used to immediately resolve errors like this, followed by a series of stored procedures that can be used in a number of ways to keep your MSSQL instance orphan-free on a more long-term basis. The scripts below assume a number of variables. Keep these in mind and replace them with the correct values before executing the respective queries. The $ character i

Simple T-SQL Script to Kill All Connections to a MSSQL Database

When restoring an MSSQL database, it is common to receive an error similar to this one:  " The database could not be exclusively locked to perform the operation ." Msg 5030, Level 16, State 12, Line 1   This error can occur in MSSQL  2005, 2008 or 2012. There are a number of workarounds for this. Some will tell you to disable the website's application pool in IIS, but this doesnt help if someone remotely is connected using SQL Management Studio. You can go into Performance Monitor and manually kill each process, but often the processes jump up faster than you can disable them by hand.  Where that is the case, perform the following procedure. Assuming your restore job task window is properly configured and just open, keep it open. You can right click on the database server and select New Query without closing the restore job task window, which wastes time when you must recreate it. Then, enter the following script into the query menu (be sure to update the

How To Fix MSSQL Error 3219

You've done everything right with your MSSQL database restore. All of your versions match. All connections to the database have been killed. Your BAK file is valid, you have adequate permissions to both it and the proposed MDF and LDF file paths. And yet, when you attempt to restore using MSSQL 2005 or 2008, the task fails with the following: The file or filegroup X cannot be selected for this operation. RESTORE DATABASE is terminating abnormally. (Microsoft SQL Server, Error: 3219) Often the most infuriating problems are the one's with the easiest solution. To fix this, simply perform "Restore Database" instead of "Restore Files".

How To Fix NTPClient Syncronization Errors - Event ID 29, 38, 47

Working on a server yesterday, I noticed the following error in Event Viewer: " The time provider NtpClient is configured to acquire time from one or more time sources, however none of the sources are currently accessible. No attempt to contact a source will be made for 15 minutes. NtpClient has no source of accurate time. For more information, see Help and Support Center at http://support.microsoft.com. " You might experience errors like the following, as well: "Time Provider NtpClient: No valid response has been received from manually configured peer  IPAddressoftheNTPServer  after 8 attempts to contact it. This peer will be discarded as a time source and NtpClient will attempt to discover a new peer with this DNS name. For more information, see Help and Support Center at http://support.microsoft.com." or "The time provider NtpClient cannot reach or is currently receiving invalid time data from  NTP_server_IP_Address . For more information, se

LinkedIn's Who To Follow Page - Condescending, Nauseating, Stupid

It bills itself with Get updates from thought leaders - right on your homepage . Let's leave aside disturbing questions like Why do I need or want someone to lead my thoughts?  and just illustrate the content. It includes deep ruminations on things like "Web 2.0", "How a Healthier Lifestyle Will Reduce the Deficit", "Responsible Social Media" and "5 Cocktail Recipes to Start Your Friday Night". These are the thoughts we are being lead to. Finally, I present to you examples of Thought Leaders, as expressed by LinkedIn: "The State of California requires me to notify you that I am a registered sex offender" "Jeff if you keep making that face one day its just going to.... oh." Author of such notables as "Dumpster Diving for Interview Clothing" and "A Single Lady's Guide to Caring for One Dozen Cats or More" Sure, Don's Forehead has been used as a reflective surface by NASA, bu

Phishing Alert - NACHA Spam with BONUS: How to Read Headers to Identify the Source of Fraudulent Email

A few million of the emails below are making the rounds. The phishing emails attempt to be from NACHA, an ACH trade organization, and tell readers that a recent direct deposit was declined and to just DOWNLOAD THIS SOFTWARE to CLAIM YOUR FREE CASH NOW!!!11! NACHA itself is aware of the tomfoolery: The From: and Reply To: headers are both forged in this email. Because of this, I suspect that jamnaytac.com, who is included in the Reply To: but now the From: is going to be receiving some grief / spam complaints that have nothing to do with them. So who is responsible for this? Below I have included the email headers for this spam message. This one is mildly interesting because it makes some shallow attempts at being deceptive to a lazy reader. When reading headers, what we are interested in mostly are the Received: lines. Almost every other item (mouth breathers: note the almost) can be forged. Received: lines can be forged to, but only by adding lines that should not be

Navel Gazing - The Bot to Human Ratio

Wouldn't be interesting to know what percentage of total global TCP/IP traffic is being produced by human users and consumers, and what percentage is being used for spam, spiders, bots and all of the other automated software that clogs the airways? I don't care about throughput or bandwidth as much as I do the number of connections. Looking at throughput I would think that humans use way more than bots do - humans stream, send monstrous attachments on their emails, and decades later still have yet to achieve global competency in the dark, mysterious art of file compression. Bots fake clicks and hits and unique visits. I wonder how the human to bot ratio has changed over time as more and more people are able to afford and become interested in adopting the use of TCP/IP. Are there more people to bots? More bots to people? Are the bots growing faster than people? With these questions I won't even hazard an a priori, but it seems like a great experiment. What do you think? Do

Best to Hush on the Bus - Cities Across the US Install Surveillance Equipment on Public Transit

This IP camera with microphone , the Safety Vision SVC2200, is being installed on buses in San Francisco, California; Eugene, Oregon; Traverse City, Michigan; Columbus, Ohio; Baltimore Maryland; Hartford, Connecticut; and Athens, Georgia. The microphones are sensitive enough to record conversations audibly. This leads one to wonder what such technology could possibly be used for. Cameras can be used for evidence in cases of violent crime. Recordings are not nearly as important in establishing proof of violence as they are in assisting with more subversive forms of surveillance. No doubt this information is headed in a roundabout way to your local DHS "Fusion Center", where it will be shuffled, cataloged and shuffled again. The IP cameras are listed as supporting the following protocols: IPv4/v6, TCP/IP, UDP, RTP, RTSP, HTTP, HTTPS, ICMP, FTP, SMTP, DHCP, PPPoE, UPnP, IGMP, SNMP, QoS & ONVIF, although one wonders in what capacity they 'support' QoS ... a few of t

$cat | grep adorable

For your enjoyment, feline in flagrante.

Finally, Truth in Advertising (Just Kidding)

Wow what a deal! Thats ... Not What The Ad Said! Click for code-related citation! [other than clicking on this ad, my blog and I have no relationship with Network Solutions]

#1 on Google Forever

A Virus is Being Circulated in Forum Posts with Content from This Website

Someone is creating forum posts with content from this website and links back to this website. Embedded in the forum post is a download to an executable called ares.exe, designed to look like a P2P client installer that is actually part of the Agobot family of worms (aka gaobot or gaobot.ee). My website will never have executables available for download. Few people reading this website would be inclined to download a virus this stupidly designed. More likely the point of this attack is to associate links to my site with malicious software in order to stop traffic to the site. To the attacker: Agobot is designed for idiots. You are an idiot. Even Wikipedia thinks you are an idiot. Here's from the article on Ago, which gave me a laugh - " Agobot is an example of a Botnet that requires little or no programming knowledge to use. " Its been 48 hours and you've been caught. Maybe targeting network engineers isn't the brightest idea? Here is an example of a forum

"About Me" Page Has Been Updated

You can tell from the subject line this is going to be exciting stuff! The About Me section of the site has been updated with new contact information. I have also added a fairly comprehensive statement concerning the ethics and finances of the site. What it amounts to is: feel free to reproduce anything you see here as long as you're not using it to break the law or spam. I won't take money to write a post, and I will always clarify my relationship to companies discussed in a post, when one exists. I lose money on this site (hosting is free, but my time is not), and I will continue to lose more money as the site continues to grow (we are right at the point where Blogger and free hosting in general won't cut it with our traffic). Also - everything that I write on this site is my own opinion and no one else's. The opinions on this site do not reflect those of my current or previous employers. Finally, if you ever have any concerns about something posted on the site, if