EppesConsulting Blog

The Random Tech Stuff I Run Into Every Day

Browsing Posts in band-aid

It threw me for a loop when a Cisco CallManager version of a SQL server was on an
abnormal port (not 1433).  It took me a while to find it, but if you want to
connect to a non-standard TCP/IP port from SQL Management Studio, simply connect to
the hostname then a comma with the port number.

Example:  MySqlServer.MyDomain.com,3821

I stole this information from here.

I used to run Trillian from my USB drive under U3.  Then I got a laptop with
a built-in SD card reader, so I wanted to run all my apps without having a USB
drive sticking out the side of the computer.  As far as I know, you can’t get
a U3 SD card (wouldn’t make sense at all).  Also, there is not a “portable” version
of Trillian other than U3.  I found a way to use the U3 version of Trillian
as a truly portable application.

Trillian U3 on a standard
USB drive

Instructions copied here for convenience sake:

First you will need access to a U3 drive.

  1. Download and install Trillian for U3 on to the U3 Drive.
  2. Copy the U3P file from the system\apps folder to a temporary location.
        i.e. U:\System\Apps\58EA136C-7E57-4416-B59E-394C46DD505B\Trillian-v3.11-b1028.u3p
  3. Rename the u3p file you just copied to a zip file. i.e. Trillian-v3.11-b1028.zip
  4. You can now uninstall Trillian from the U3 drive if you wish.
  5. Extract the zip file.
  6. Copy the Data\Users folder to the Host folder
  7. Delete the Data folder, delete the Exec folder, delete the manifest folder
    Optional: Rename the host folder to Trillian
  8. Copy to your usb drive
  9. Run Trillian

 

Have you ever needed to get the output of a program into an environment variable so
another program can read it?  It’s really easy to do in a Linux shell, but how
about in DOS?  I’ve found this program to be invalueable:

XSET

The best way to restart a Windows machine from C# code:

restart
computer using c# code

I wanted to had an application I was developing alert our systems administrator to
events like being unable to contact a database.  I usually use a class that catches
an exception and emails it out, but what happens when the problem is with the SMTP
server?  I landed on using SysLog and having the alert pushed over to the actual
monitoring server. 

This is very down-and-dirty code (creates the connection and packet directly instead
of calling a SysLog library), but it worked like a charm for what I needed it to do.

A Low-Overhead SysLog Message
Sender Class

My Windows Update kept wanting me to install KB971092 for VS 2k8 over and over again. 
After a few minutes of Googling, I found the work-around.  It sounds like the
installer was checking for C++ to be installed and I didn’t have it, but it was trying
to update it anyway.

https://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=478117

This is an interesting article about moving large data sets into Amazon S3:

http://www.allthingsdistributed.com/2009/05/amazon_import_export.html

How do you transfer logins from one SQL server to another:

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

 

How do you fix orphaned SQL server users:

http://www.fileformat.info/tip/microsoft/sql_orphan_user.htm

Ever been annoyed that your LINQ connection string isn’t stored in the web.config
file?  Here’s how to fix that:

http://blog.newguid.net/post/Linq-to-Sql-Change-connectionstring-to-load-from-Webconfig.aspx

To me, this is almost a necessity to make applications deployable between environments.

Ever wondered how to bulk script data for a database?  This would be really handy
for default table data during an install, or to copy a database you only have user
level access to.  Enter sp_generate_inserts:

http://vyaskn.tripod.com/code.htm