Eaho Laula (xterminal) wrote in sqlserver,

SQL Server Agent started and then stopped?

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?
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your IP address will be recorded  

  • 8 comments

xterminal

September 12 2008, 20:19:54 UTC 4 years ago

[sigh] I love Microsoft. If 99% of the people hiring near me didn't use it, I'd switch back to Cache and SharpDevelop in a second, but since I'm trying to hone my skills for professional use...

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 csharp instead of you guys.)

ennor

September 13 2008, 09:11:09 UTC 4 years ago

Yes, there is no Agent in MSDE\Express SKU, that's by design. If you do need some kind of a scheduler with Express, you may use a Windows built-in one, for example.

started having problems connecting from C#
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?..

xterminal

September 13 2008, 19:45:17 UTC 4 years ago

What kind of problems, exactly?

I was going to complain about this over at csharp, but if you're offering an invitation...

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...

ennor

September 14 2008, 10:51:35 UTC 4 years ago

The Data Source COnnection Wizard never addresses instance name
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?

xterminal

September 18 2008, 02:10:53 UTC 4 years ago

Sorry about the delay, I was dealing with an altogether weirder problem. Finally got it fired up and back to the wizard again to check the connection string, and... I can't get to it. The box where you can get a look at the connection string is on the Data Source Connection dialog box. In order to get back to that, I need to be able to either hit OK or successfully test the connection in the Add Connection dialog box. I cannot do either, and so I'm left with cancel-- which wipes out whatever connection string it's building.

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...

ennor

September 14 2008, 11:01:26 UTC 4 years ago

Oh, and another one: if you are using TCP/IP as a transport, there was a kind of mess with dynamic port allocation, if turned on. Not sure about this feature, though - I forgot how to write client apps several years ago...

xterminal

September 18 2008, 02:12:14 UTC 4 years ago

It looks like it's defaulting to Shared Memory. It should be defaulting to Shared Memory. But at this point I'm scared to turn anything off, you know?