Tuesday, February 20, 2007

SQL server (2005) data types

For those, like me, that do not use SQL everyday, a simple guide for data types is invaluable.
Thankfully Teratrax posted a perfect guide

Exact numerics

Type From To
bigint -9,223,372,036,854,775,808 9,223,372,036,854,775,807
int -2,147,483,648 2,147,483,647
smallint -32,768 32,767
tinyint 0 255
bit 0 1
decimal -10^38 +1 10^38 –1
numeric -10^38 +1 10^38 –1
money -922,337,203,685,477.5808 +922,337,203,685,477.5807
smallmoney -214,748.3648 +214,748.3647

numeric and decimal are Fixed precision and scale data types and are functionally equivalent.

Approximate numerics

Type From To
float -1.79E + 308 1.79E + 308
real -3.40E + 38 3.40E + 38

datetime and smalldatetime

Type From To
datetime (3.33 milliseconds accuracy) Jan 1, 1753 Dec 31, 9999
smalldatetime (1 minute accuracy) Jan 1, 1900 Jun 6, 2079

Character Strings

Type Description
char Fixed-length non-Unicode character data with a maximum length of 8,000 characters.
varchar Variable-length non-Unicode data with a maximum of 8,000 characters.
varchar(max) Variable-length non-Unicode data with a maximum length of 231 characters (SQL Server 2005 only).
text Variable-length non-Unicode data with a maximum length of 2,147,483,647 characters.

Unicode Character Strings

Type Description
nchar Fixed-length Unicode data with a maximum length of 4,000 characters.
nvarchar Variable-length Unicode data with a maximum length of 4,000 characters.
nvarchar(max) Variable-length Unicode data with a maximum length of 230 characters (SQL Server 2005 only).
ntext Variable-length Unicode data with a maximum length of 1,073,741,823 characters.

Binary Strings

Type Description
binary Fixed-length binary data with a maximum length of 8,000 bytes.
varbinary Variable-length binary data with a maximum length of 8,000 bytes.
varbinary(max) Variable-length binary data with a maximum length of 231 bytes (SQL Server 2005 only).
image Variable-length binary data with a maximum length of 2,147,483,647 bytes.

Other Data Types

  • sql_variant: Stores values of various SQL Server-supported data types, except text, ntext, and timestamp.
  • timestamp: Stores a database-wide unique number that gets updated every time a row gets updated.
  • uniqueidentifier: Stores a globally unique identifier (GUID).
  • xml: Stores XML data. You can store xml instances in a column or a variable (SQL Server 2005 only).
  • cursor: A reference to a cursor.
  • table: Stores a result set for later processing.

Sunday, February 18, 2007

Site to Site VPN using Linksys RVS4000: BAD

I purchased two Linksys RVS4000 routers, all the right features are there but they do not work together in harmony.

I'll explain

I have a customer that has two offices, both with dynamic IP's. This router supports the DYNDNS.com feature. It also supports site to site VPN's (AKA gateway to gateway). However it does not support site to site using dynamic IP's. For that you need the next model (RV042).

The irony is if you are using the RV042 are more likely to have a static IP's anyway.

So bottom line; An OK router though not exactly a polished product.

Bye Bye Comcast; Hello Verizon

Well after six months of Comcast, they are no longer offering the 19.95/m rate and are bumping me up to the 57.95 package (I do not have any cable TV). I said no thanks and switched to verizon.
Even though I had an bad experience way back here, this time the price won out (34.99 vs. 57.95) So I prepared myself for an ugly setup and major headaches. Boy was I surprised.

When I first went to the online sign up, Verizon recognized that i did not have a normal POTS line in place and displayed pricing for a 'dry-loop' only. Good.
I finish all the forms, hit submit and sat back for the wait. Two days later UPS drops off a Westell modem. Good.
Service is not slated to begin till 02/20/07, but i figure ill plug it in, see what happens.
Supprise, the service is live 02/14/07. YAY
I do the dance to register for a username and password, not bad, it worked.
Then i do a speed test and compare with comcast. that was a shocker. Comcast was horrible
see for you self


Speed test statistics - Comcast
---------------------
Download speed: 260720 bps
Upload speed: 350808 bps
Quality of service: 12 %
Download test type: socket
Upload test type: socket
Maximum download pause: 874 ms
Average download pause: 90 ms
Minimum round trip time to server: 212 ms
Average round trip time to server: 243 ms

VoIP test statistics
--------------------
Jitter: you --> server: 16.0 ms
Jitter: server --> you: 17.8 ms
Packet loss: you --> server: 0.0 %
Packet loss: server --> you: 0.1 %
Packet discards: 0.0 %
Packets out of order: 0.0 %
Number of supported VoIP lines: 4
Estimated MOS score: 3.7


Speed test statistics -
Comcast
---------------------
Download speed: 343360 bps
Upload speed: 361752 bps
Quality of service: 35 %
Download test type: socket
Upload test type: socket
Maximum download pause: 743 ms
Average download pause: 70 ms
Minimum round trip time to server: 217 ms
Average round trip time to server: 262 ms

VoIP test statistics
--------------------
Jitter: you --> server: 17.2 ms
Jitter: server --> you: 30.9 ms
Packet loss: you --> server: 0.0 %
Packet loss: server --> you: 0.1 %
Packet discards: 0.0 %
Packets out of order: 0.0 %
Number of supported VoIP lines: 5
Estimated MOS score: 3.6



Speed test statistics -
Comcast
---------------------
Download speed: 170632 bps
Upload speed: 363208 bps
Quality of service: 44 %
Download test type: socket
Upload test type: socket
Maximum download pause: 902 ms
Average download pause: 116 ms
Minimum round trip time to server: 247 ms
Average round trip time to server: 254 ms

VoIP test statistics
--------------------
Jitter: you --> server: 12.4 ms
Jitter: server --> you: 17.1 ms
Packet loss: you --> server: 0.0 %
Packet loss: server --> you: 0.0 %
Packet discards: 0.0 %
Packets out of order: 0.0 %
Number of supported VoIP lines: 2
Estimated MOS score: 3.8


Speed test statistics -
Comcast
---------------------
Download speed: 2678640 bps
Upload speed: 358032 bps
Quality of service: 1 %
Download test type: socket
Upload test type: socket
Maximum download pause: 737 ms
Average download pause: 9 ms
Minimum round trip time to server: 55 ms
Average round trip time to server: 60 ms

VoIP test statistics
--------------------
Jitter: you --> server: 7.4 ms
Jitter: server --> you: 2.8 ms
Packet loss: you --> server: 0.0 %
Packet loss: server --> you: 0.0 %
Packet discards: 0.0 %
Packets out of order: 0.0 %
Number of supported VoIP lines: 6
Estimated MOS score: 3.9


Verizon on the other hand...


Speed test statistics - Verizon
---------------------
Download speed: 2841488 bps
Upload speed: 675160 bps
Quality of service: 98 %
Download test type: socket
Upload test type: socket
Maximum download pause: 20 ms
Average download pause: 3 ms
Minimum round trip time to server: 58 ms
Average round trip time to server: 68 ms

VoIP test statistics
--------------------
Jitter: you --> server: 3.0 ms
Jitter: server --> you: 4.0 ms
Packet loss: you --> server: 0.0 %
Packet loss: server --> you: 0.0 %
Packet discards: 0.0 %
Packets out of order: 0.0 %
Number of supported VoIP lines: 11
Estimated MOS score: 4.0


EDIT - The above result are from
Visualware



Friday, February 09, 2007

Analyze MEMORY.dmp

from Vittorio Pavesi's blog...

Install and launch Windbg then:

  1. Load the dump file
  2. Type .symfix
  3. Type .reload
  4. Type !Analyze
  5. Read the Bugchek Analysis Report

Thursday, February 08, 2007

Math prodigy corrects museum exhibit error

ORIGINAL PROBLEM

A jelly bean has a volume of about 1 cubic cm.This container is half a pyramid.

Its base measures 46 cm by 23 cm and its height is 72 cm.

Here's the formula to find the volume: 1/3 x base area x height.

Now divide your answer by 2 since this is half a pyramid.

Now multiply your answer by 0.9 to account for spaces between the jelly beans.

The answer should be 22,853.

THE ERROR

The base measurements given were already for half the pyramid, so there was no need to divide the answer by 2.

Wednesday, February 07, 2007

Silence a ringing blackberry (7100 series)

This is trivial I know, but I could not find this anywhere.

Using trial and error I figured out that in order to silence a blackberry you have to roll the trackwheel. Pressing the red "ignore" button while the phone is ringing sends the call right away to voice mail, and the caller no doubt feels snubbed. Whereas if you roll the trackwheel it quiets the phone but still "rings" for the caller.
Sweet

EDIT- I called it a scroll wheel (sorry) its supposed to be called the Trackwheel. Fixed.

Web Admin Tool on SBS

Had to install the admin tools for active sync. Apparently for SBS you have to make sure to do the following
  1. Download the Mobile Admin pack here: http://www.microsoft.com/downloads/details.aspx?FamilyID=e6851d23-d145-4dbf-a2cc-e0b4c6301453&DisplayLang=en
  2. Backup the metabase in IIS (right click the servername in IIS -> all tasks -> backup/restore -> create backup)
  3. TEMPORARILY set the default website to “all unassigned” (if it is not already)
  4. Run MobileAdmin.exe that you downloaded in step 1.
  5. Reset IIS back to the way it was before step 3, if applicable
  6. Open the properties for the ExAdmin virtual directory under the default website -> directory security -> Edit for Secure Communications and uncheck “Require SSL”
  7. Restart the IIS Admin service
thanks to official SBS blog

Thursday, February 01, 2007

Annoying Yahoo Email "feature"

I have had an account at yahoo, for a very very long time. My account name is only four charectars. Thats how long. However recently when i sent an email to two people (reply all) I get thisHonestly, what are the chances that I will be sending spam. Yahoo, is that really the best you can do?