Problem accessing SQL server from Navision

Hi all, I have a silly problem.

For various reasons I have just installed SQL2005 and Navision 4sp3 on two different Laptops.

The first was Vista Home (don’t ask) I installed SQL first, then Navision, then copied an existing SQL mdf to the local drive, then using SQL management studio I attached to the mdf, then installed the extended procedure, ran Navision, and all worked fine.

Now today I did similar, and Navision can not see SQL. But there are differnces:

1/ OS is XP media edition. Not Vista home.
2/ I installed Navision BEFORE I installed SQL. First time I installed SQL first.
3/ I set SQL to mixed mode security. First time was just Windows logins.

I am 99% certain that everything else was exactly the same, but now if I even try to create a new navision db, it simply can not see the SQL server. I am guessing that this is a security issue, and I would assume I can just ninstall everythign and start again, but I would really like to know for sure what I did wrong.

Any comments at all are appreciated.

Btw it looks like its now impossible to buy XP Pro anymore, that was one damn fast death.

Hi David

It could be several things that mean you can not see the SQL server, the order you have installed things should not make any difference but I would look at these.

  1. Don’t look up the SQL server as they don’t always apear always just type in the server name.

  2. If you are trying to connect to a remote server check the windows firewall

  3. Check the surface area configuration in the configuration tools as all protocols are not always allowed and remote conections are also sometimes restricted.

Paul Baxter

Thanks Paul,

1/ sounds like it.

I was able to create a new database by just typing in the server name and selecting windows logins. So that gets me to step one.

But now if I connect to the old database using windows logins, it tells me I have the wrong users id/password combination. So I guess that is more to me selecting mixed mode. And I don’t have an SA user in navision, so that wont work for DB logins. [:(]

By the way this is all local installs on the same machine its just a laptop test setup.

I could reinstall SQL without Mixed logins, but really don’t want to do that.

Selecting mixed mode should not affect the ability to log in with a windows login, so that’s not the cause. Most likely is that you need to synch security. You should be able to log into the NAV database with the SA account even though that’s not a database login in NAV.

The reason you don’t see the server with the lookup is probably because you installed a named instance of SQL Server. I’ve had that happen a couple of times. Like you found out yourself, all you need to do is type the server and you should be fine.

Have a look and see if the service “SQL Server Browser” is running sucessfully. Try re-starting it and make sure it starts back up okay.

/TH

Tony is right about heving the SQL Server Browser not running being the reason for the lookup to SQL not working. In fact the SQL Server Browser is used for three things.

  • Browsing a list of available servers

  • Connecting to the correct server instance

  • Connecting to Dedicated Administrator Connection (DAC) endpoints
    if you only have a single instance of SQL installed I would not run it for a few reasons.

  1. It is yet another service that is using system resources

  2. It broadcasts over the network you are on “Hay SQL server here look at me”, and if you are like me and on site often then that is the last thing you want.

  3. I don’t bother to look up SQL servers as even when they have the browser server running it can take a loooooonnnnnnnnggggggg time to fill the list.
    You should have the service running if

  4. It is a production server and you want to give users as much help to find it as possible.

  5. You are running more than one instance of SQL on a server and are connecting to them over the network using tcp. If you are then it is not enough to use SERVERNAME/INSTANCE name if the service is not running and you have to use SERVERNAME:TCPPORT.

Paul Baxter

Thanks everyone for all the input. It was just a local test system, and not critical, but I was interested to work out what was going on. But I have been extremely busy, and no chance to get back. So anyway.

The whole thing is very odd. Firstly the two issues (browsing and windows logins) were unrelated.

Browsing: As Tony said, browser services were not running, but they were not running on the old machine either. Now oddly enough, browsing has started to work, and the only change I have made, is that I installed Zone Alarm, which I can not see as affecting this. I am just putting it down to an odd netwrok issue. Though oddly sometimes I see the SQL server as “HP” the name of this machine, and sometimes as “[local]” .

The log in is odd also. I basically copied the DB and log from an external drive to my local drive, then used Enterprise manager to attach to the DB. This is the same thing I did the first time, but now I relize that on this machine when I was trying this, I did not have a user and passsword on the computer, so my guess is that there was no way for Windows logins to work. I did as Daniel Said, and managed to generate windows log ins and get in.