SQL Server with Mr. Denny

March 5, 2009  10:59 AM

Steps to Troubleshoot Connections to your SQL Server

Denny Cherry Denny Cherry Profile: Denny Cherry

People ask all the time why they can’t connect to their SQL Server. Here are some thoubleshooting steps that they should take in order to find out what the problem is.

Please keep in mind that without knowledge of your specific problem I can only point you towards the right direction.

Windows XP Running Service Pack 2 and higher (This includes Vista and Windows 7)
Windows XP SP 2 and higher by default turns on the Personal Firewall Component of Windows XP. This will by default block your connection to your SQL Server. You will need to open the firewall to allow this traffic, or turn off the firewall.

There are several steps that I am going to lay out here to attempt to find the problem. We will be starting with the most basic, and working up to the more complex. Some of the more complex will involve people from network security, network engineering and/or your ISP.

1. Can you ping the server?
From a command prompt type:

ping {servername}

If you can not ping the server then you need to make sure that both you and the server are online. (This may not mean that either you or the server are offline. It may simply mean that someone has blocked ICMP packets from passing from you to the server for some reason.)

2. Can you telnet to the SQL Service port on the SQL Server?
From a command prompt type:

telnet {servername} 1433

If you get a black window with a flashing cursor that means that you have connected to the SQL Server. If you get an error message that means that something is blocking your connection to the SQL Server. Check for firewalls running on both machines, or on the network between you and the server. If the server is hosted by an ISP outside of your company’s control, check with them, and with your ISP to ensure that neither of them are blocking port 1433. If they are blocking access to the SQL Server they will have another way for you to access the SQL Server, probably a web based version of Enterprise Manager. There are several on the market, and they all work fairly well.

There are a couple of ways to check what port SQL Server is listening on.
2a (SQL 2000). Log on to the servers console, and open Enterprise Manager. Right click on the server and click properties. Click Network Configuration. Check the properties for TCP/IP. It will tell you what TCP port the SQL Server is listening on.

2b (SQL 2005/2008). Log onto the servers console and open the SQL Server Configuration Manager.  Navigate to the SQL Server 200n Network Configuration and select the “Protocols for MSSQLSERVER (or YourInstanceName if a named instance).  Open the TCP/IP protocol in the right hand pane.  On the IP Addresses tab the port number that SQL Server should be listening on is shown.

2c. Check the Current SQL Server Log (the ERRORLOG if your looking at the actual file). At the beginning of the log there should be one line for each IP on the server. Something like:

SQL server listening on 1433.

That’s the port that it’s listening on.

If these lines aren’t there, and you’ve checked the TCP/IP is turned on, then there is probably an error saying that the port couldn’t be opened. This means that something else was using the port at startup. Odds are what ever was using it no longer is, and a service restart will fix the problem.

3. Can you connect to the file share on the server?
If this is being blocked that could also explain why you can not get connected. By default SQL Server will use TCP/IP port 1433 as it’s default connection method, with named pipes as a backup. If you can’t connect to the Windows file share you won’t be able to connect to the SQL Server over named pipes.

4. Can you connect to the SQL server from another machine on the same network as the workstation that isn’t working? If so then the problem is probably with the nonworking workstation, or some setting on a router or firewall that is preventing this machines access.

5. Are there any firewalls or ACLs on your network preventing access?

At this point odds are you are either connected to the SQL Server or you know why you are not. If you still can’t connect post a question in one of the SQL Server forums and someone will do there best to help you. You will want to post the results of these questions so that they don’t ask you to try them again.

This post is a copy of an FAQ that I posted on tek-tips.com a while back.


March 3, 2009  7:02 PM

Photo’s from last night

Denny Cherry Denny Cherry Profile: Denny Cherry

A couple of people have posted pictures from last night. So far I’ve run across which Andrew Karcher and I were both in. Thanks to Pinal Dave for posting it.

As I run across more photo’s I’ll post links to them.


March 2, 2009  2:43 PM

Standalone SQL Agent Update 3/2/2009

Denny Cherry Denny Cherry Profile: Denny Cherry

I’ve been quiet about the Standalone SQL Agent for a while now.  I haven’t forgotten about the project, in fact I’ve been busily working on it in what little free time I have.  I’ve been working on phase 2 of the project which is adding in the UI to handle job management.  Needless to say, I forgot how much I hate building User Interfaces.  I much prefer building windows services which no one sees.

I’m trying to keep the UI as simple as possible while providing all the functionality that the native job management via SSMS provides; even if not all that functionality is supported by the Standalone SQL Agent at this time.

Even though you can’t download a client installer, or the source (since I haven’t checked and in yet) I figured that I’d post a few screenshots to show where I’m at and get some feedback on it.

Server Job List

The first screenshot here is the job list which comes up after you select the SQL Server instance you want to connect to (yes you can connect to a remote instance so that you can manage SQL Express machines remotely).  It shows the jobs, there current state as queried from the SQL Server, if they are enabled and the Next Run Time.  Currently I’m not getting the Last Run Time back from the SQL Server so that needs to be corrected.

The next screenshot is the Job Info job step info page.  This should look very similar to what you see in SQL Server Management Studio or SQL Server Enterprise Manager.

It has the job name, owner, category, and the date information.

The third screenshot (below) are the job steps for the selected job.Job Steps This screen should also look very similar to what is shown in SQL Server Management Studio and SQL Server Enterprise Manager.

I hope that this looks useful as I’m still plugging away at the UI (I hate making UIs).

I’ve also added in a command line application which will remove the three (so far) stored procedures which are placed within the msdb database.  The service puts these in place when the Agent is started, and I need a way to remove them easily during install, so I put them in a separate executable so that they could be easily removed if needed.


March 2, 2009  9:00 AM

FREE Seminar: Spend a Day with the Experts – Aliso Viejo, CA

Denny Cherry Denny Cherry Profile: Denny Cherry

Quest has put together a one day free seminar at the Quest Software office on Friday March 13, 2009.

Brent Ozar and myself will be presenting several presentations on SQL Server 2008.

For more information and to register for the event visit Quest webpage for this event.

I’ll be speaking on Spotlight on SQL Server Enterprise and Brent is doing a couple of presentations.


February 28, 2009  12:21 AM

WebEx and Windows 7

Denny Cherry Denny Cherry Profile: Denny Cherry

Apparently WebEx and Windows 7 doesn’t play nice very well.

I have been working from home recently and normally I just RDP into my workstation at the office.  Today I was working with Quest Tech Support and they setup a WebEx session for me.  When I fired it up on my workstation (like I’ve done on Vista and XP plenty of times) he was apparently looking at the actual console of my workstation, not the remote session that I was looking at.

Apparently either WebEX or Microsoft has some changes that need to be made (WebEx would be my bet) before Windows 7 goes live at the end of the year.


February 24, 2009  10:34 PM

Coffee and Code coming to Irvine

Denny Cherry Denny Cherry Profile: Denny Cherry

Recently I found the blog of Joey deVilla (@AccordionGuy on Twitter) who is the Developer Evangelist for Microsoft up in Toronto, Canada.  Joey has started doing something which I think is great for the IT comminity.  He picks a coffee shop in the area, tells everyone that he’ll be there and plants himself there for the part of the day talking with and assisting where he can the local IT Pros and Developers.

Personally I think this is a great idea, so I’ve decided to “borrow” his idea (can’t really say I’m stealing his idea, he told me I should do it) and start doing Coffee and Code days here in SoCal.

Since I know there are more IT Pros and IT Devs in Irvine, there here in Riverside I figure for the first one I’ll head over there.  So, Friday March 6th I’ll be at the Starbucks at the Tustin Market place (2959 El Camino Real Tustin, California) from 3pm until 7pm.  Feel free to come by for a few minutes, or for the afternoon.

The reason that I choose a Starbucks is that the Internet isn’t that expensive and if you have AT&T Internet at home (or on your cell phone I think) you can use the AT&T Hotspot at Starbucks for free.

Now if you go to Starbucks a lot, most of the time Costco has Starbucks gift cards for sale.  You get $100 worth of gift cards for $80.

So if you have some free time and want to come by and talk, code, and/or drink Coffee I’ll be there.  If you are going to be there, please remember to by something from Starbucks so they don’t yell at us for being there.  If need by we’ll move outside and take over some of the patio; weather permitting of course no one wants a wet laptop.  Joey has posted some tips for working outside of the office which I highly recommend for those who aren’t used to using a coffee shop or restaurant as your office.

I may have a spare power strip I can bring, I’ll dig around to see if I do, since they only have a couple of power outlets.

See you at Starbucks on the 6th.


February 23, 2009  11:00 AM

Surviving Layoffs

Denny Cherry Denny Cherry Profile: Denny Cherry

I was having Lunch with a friend of mine a few days ago, and we got talking about surviving layoffs.

With the current economic nightmare that is upon us we need to switch gears a little bit.  The traditional technique that IT folks use if be valuable, but not so valuable that you can’t be promoted.  In the current economy if you can be promoted you can also be laid off.

At come companies it simply may not be possible to avoid layoff rounds.  If the CEO (or other C level schmuck) says that your division isn’t needed any more HR will simply layoff everyone.  Sadly there isn’t much you can do about this.  However if the departments are told to start cutting 10% of the workforce you can do a few things which can help you avoid the ax.

Make yourself invaluable

Now isn’t the time to worry about if you aren’t going to be able to get moved up into that next position.  Most companies aren’t going to be promoting anyone any time soon. Now is the time to make yourself invaluable to the department and the company so that they feel like they can’t keep the company running without you.  In larger companies this can be harder to do, as the more people that the company has, the more redundancy there is.

Get to know the people above you

Get to know as many people in the food chain above you as possible.  If you don’t know your director or VP they will have no problem laying you off.  Why, because they don’t know you.  If they don’t know you there’s no emotional attachment which would make them think twice about laying you off.  Get to know them, say high to them, and make sure that they know you, and what you do for them, and how you make their job easier.  If they know that you make their job easier they’ll be less likely to lay you off, because their job will then be harder.

There is a downside to this, in that if you piss them off in some way, your screwed so use caution.

Schedule a mid year review

This one is going to sound a little funky, but bear with me.

Document what you’ve been doing for the company (just the good stuff) to save them money, and more importantly make them money.  Ask for boss (and if possible your bosses boss) if they have time to review some items with you.  This will give you a chance to remind them just how much you do for the company.  Anything you can bring with specific dollar figures on it will be great.  Make sure that you aren’t asking for a raise just that you want some constructive feedback so that you can help the company make it though these touch economic times.

When you setup the meeting let your bosses know that you aren’t asking them to bring anything formal to the meeting, since you are going to bring everything with you.  This is a time to get some extra face time with the bosses and give them a firm reminder that you are kicking ass and taking no prisoners.

Work overtime without compaint

If you get asked to work late for a project or a release, or to work on an issue (espeically by your boss, or someone higher up the chain) reminding them that you work 9-5 and that’s it probably isn’t the best technique.  If you aren’t willing to work overtime I’m sure someone there is willing to, and when it comes time to cut someone they squeeky wheel isn’t getting greased, its getting a pink slip.

Hopefully you’ll never have to use these tips for anything, but if you do its good to have more ammo in the bag.


February 23, 2009  11:00 AM

What exactly is a NULL?

Denny Cherry Denny Cherry Profile: Denny Cherry

NULL values are something that a lot of people just don’t understand the use off. Continued »

February 18, 2009  2:12 AM

Speaking at LA SQL Users Group March 19, 2009

Denny Cherry Denny Cherry Profile: Denny Cherry

For those of you in the LA area, I’ll be speaking at the LA SQL Users Group on March 19, 2009.  The presentation will be on Indexing SQL Server.  If you missed the my Indexing session at the Janunary 2009 SoCal Code Camp this will be a similar presentation, just longer since we won’t be quite so tight on time.

Map and directions on are the LA SQL Users Group website.  I believe that there is a parking free to park (it’s at UCLA) plus a few bucks at the meeting.

This is my first presentation at the LA SQL Users Group so I’ll probably get there early to be sure I can find the place.  If you want to get there early and hunt me down I’ll be happy to chat with anyone that shows.

See you there.


February 17, 2009  10:53 PM

My First Computer

Denny Cherry Denny Cherry Profile: Denny Cherry

I was tagged by Denis Gobo in his post What was your first computer….

My first PC was some Texas Instruments unit my dad bought.  It was pretty much a word processor, I don’t even remember if it had any games.  It hooked up to the TV like many units of the day.  We had a printer for it, so we must have had some sort of expansion slot for it.  I think we had the tape player for it as well.

TI 99/4A

Our first actual PC was an IBM 8080 cloan (the precursor to the 8086 that gave birth to the x86 line).  My parents spent a fortune on it.  It was upgraded to 640k of RAM, a single sided single density floppy drive (so 120k of data or something).  It had a 20 Meg hard drive and a 16 color VGA video card (I used the monitor for like 18 years before I got rid of it).  It came with DOS 3 something on it, and we kept it up through 6.2 I think.  File Manager for DOS was the best addition at the time.

I remember that we had a three button Logitech track ball that was rectangular.  I used that from the time I was 6 until I was 20 when I finely had to replace it (the monitor outlasted the trackball).

I remember that my dad bought be some programming kit for it when I was 8 or 9.  Probably VB for DOS or something like that.  It came with a bunch of games that you could tweak the code of and play.  I remember spending months making my own Brick Breaker levels (they called it something else) and playing them over and over.

The coolest upgrade my dad got for the machine was the modem and a Prodigy account.  I wasted who knows how many hours playing the games that Prodigy offered over a 300 bps external modem.

Since I’ve now told my story its time for some others to tell theirs.  Time to tag a couple of people I don’t normally.

T Jay Belt (@tjaybelt on Twitter)
Woody Pewitt (@woodyp on Twitter)


Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: