Okay, this is new...
SQL Server Express Edition 2008. Brand-new install. For some reason SQL Server Agent was listed as Disabled in the agents listing, so I set it to automatic and started it. It worked. I restarted the computer (for an unrelated reason) and started having problems connecting from C#, so I checked the agent again. It was again listed as disabled. I switched it once again to Automatic and hit Start, at which point I received the following message:
"The SQL Server Agent (SKINGAWEE) service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service."
SkingaWee (the instance name) is currently running, I have it open in Management Studio. Thus, it would seem Agent would have something to do. Anyone know why this might be occurring and, more importantly, how I can fix it?
September 12 2008, 19:40:40 UTC 4 years ago
Meh
September 12 2008, 20:19:54 UTC 4 years ago
This does, however, raise another question: if Agent doesn't run in 2008 and MS is aware of this (and doesn't plan to fix it), does this mean my problems connecting to the database in C# come from something other than a disabled agent? (At which point, naturally, I will go pester
September 13 2008, 09:11:09 UTC 4 years ago
Looks like some settings have been applied after a restart.
What kind of problems, exactly? Are you able to connect to server via other applications (SSMS)? Does all network protocols that you use in your client app are enabled on the server side for listening (it's an Express, after all, and does not accept remote connections by default)? Do you use correct DAL that's aware of 2008? Maybe something wrong with a firewall or MSSQL surface area configuration?..
September 13 2008, 19:45:17 UTC 4 years ago
I was going to complain about this over at
It's the usual "cannot reach server" error with the remote access message. Let me bring it up again and get the exact wording...
"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections." The Data Source COnnection Wizard never addresses instance name, so I assume that's not the problem, and both SQL Server and C# are loaded on the same box, so I assume it's not a remote-connections error.
Are you able to connect to server via other applications (SSMS)?
Yes, I have it open now and an accessing it (just added a new tableadded the table to the diagram, and changed a primary key in another table, all worked fine).
Does all network protocols that you use in your client app are enabled on the server side for listening (it's an Express, after all, and does not accept remote connections by default)?
Yes. Originally, only Shared Memory was enabled. I would have thought that sufficient, but I enabled Named Pipes and TCP/IP just to make sure that wasn't the problem.
Do you use correct DAL that's aware of 2008?
I can't imagine it would be unaware of 08, since I'm using both SQL Server Express 2008 and VC# 2008 SP1.
Maybe something wrong with a firewall or MSSQL surface area configuration?..
No firewall involved. And some of my research on the web pointed to surface area configuration as a possible problem when this error cropped up in 2005 (I should note I never had problems in 2005, but SQL 2008 required the removal of SQL 2005-- which I found very odd), but I went looking, and there doesn't seem to be a surface area configuration tool in 2008, and I don't see anything offhand that looks like a cognate, so I'm not entirely sure where to check that in this version.
Man, I hope it's something that simple...
September 14 2008, 10:51:35 UTC 4 years ago
AFAIK, Express cannot be installed as a default instance; its default instance name is SQLEXPRESS.
And, just to be sure, may you show your connection string?
September 18 2008, 02:10:53 UTC 4 years ago
For the record, since I'd never tried it before: I changed back to SQL Server Compact (the default) and tried to connect to the Northwind sample that comes with SQL compact (which was installed with C# 2008). This time the connection succeeds with no problem. The entire connection string is
Data Source=C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Samples\Northwind.sdf
I guess as a workaround I'll just recreate the database in Compact Edition. I wonder what sort of functionality I'll be giving up while trying to figure this out...
September 14 2008, 11:01:26 UTC 4 years ago
September 18 2008, 02:12:14 UTC 4 years ago