February 2010
1 post
January 2010
4 posts
Extremely high volume of whales
twitterstatus:
We are experiencing an outage due to an extremely high number of whales. Our on-call team is working on a fix.
its not like twitter actually does anything else; where is the scaling issue coming from at this point?
Gaps
One feature I wish SQL Management Studio had is Paste and increment number. I frequently have to populate tables of lists with a integer reference code. If i have a code string of:
Insert into MyTable Select 1, ‘EN’, …
It would be great if i could paste in the value and have it change the 1 to a 2.
Changing SQL Server collation without DTS
If you find yourself needing to change collation on databases when you restore them; you can DTS the data but that is fraught with risk. the fantastic script here
http://www.db-staff.com/index.php/microsoft-sql-server/69-change-collation
can do it in one pass without changing the objects in the database :)
Lonely Planet iPhone Content List 12/1/10
Taken from the Buy Guides feature of the Lonely Planet iPhone application; as there doesn’t seem to be a list anywhere else. The application came with Mexican Phrasebook and San Francisco City Guide pre installed.
Amsterdam City Guide
Arabic Phrasebook
Auckland City Guide
Bangkok City Guide
Barcelona City Guide
Beijing City Guide
Belfast City Guide
Berlin City Guide
Boston City...
December 2009
3 posts
Regex - Simple Example for wildcard users
I can’t sit down and write regex; as i use it so infrequently. SQL Management studio’s support for wildcards provides support for most things I need. Sourcesafe doesn’t have that same search facility and required me to use regex. Figured that text*text was a standard thing to use it for; only couldn’t find any examples on the web. What i came up with was Text.*Text
Windows XP / Remote Desktop Connection Woes
“Unable to log you in because of an account restriction” This means you need to set a password on the Account and by default Windows XP requires one for remote desktop connections. Set a password and all should be well.
Enable xp_cmdshell in SQl 2008
If you need to call xp_cmdshell you need to allow it; this script enables it.
EXEC sp_configure ‘show advanced options’, 1
GO
RECONFIGURE
GO
EXEC sp_configure ‘xp_cmdshell’, 1
GO
RECONFIGURE
GO
November 2009
4 posts
Terminal Services Licensing Work Around
Found myself dialing onto a terminal server for admin that i rarely use this morning; only to get the dreaded your license to use this has expired message. If you want to clear that you need to delete a registry key.
The Key is
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing\
Delete that whole key including all subfolders. When you go back into terminal services client it is recreated. If you...
SQL 2008 Upload Files from Folder into Table
In the dark days there was a simple exe for uploading files into a database; that has gone. Found myself working on a data import and need to upload my files into blob;s openquery is my friend. You need to enable cmd shell or find another way of getting the file names into SQL Server but this will let you pick up all the files in a folder in one hit. Its quick too 10k RTF / Word Files on my test...
Remove a user from All Databases
When i restore a database i often have to remove users out as they don’t exist on the SQL Server. This script deletes all occurrences of a username in all databases on a server.
sp_msforeachdb ‘use [?]; drop user yourusername’
Quick Repository for SQL Scripts
I don’t have a blog; and keep writing scripts i think others might find useful; so now i do…