[SQL SERVER] Error trying to start SQL SERVER AGENT

I know this is not a SQL forum, but perhaps someone had the same problem…
I installed SQL server 2012 according to the instruction in the tutorial, everything ent great, except that I isntalled two instances because I made a sintax error during installation…

I defined everything in SAMBA and all is up and running,

The problem came when I decided to uninstall ONE instance (the one we were not using) of SQL. It did it great, but after uninstall I noticed that SQL server agent of the good SQL instance was not running anymore.
Everything points to a permission problem, but I have NO clue where to start. I have searched that in the internet and the pages allways says that the problems is a permission problem, but they dont helped me much.

If anyone knows where I can start I would appreciate it very much!!!



Sounds like the system account created for SQL server is missing. Is there any specific error messages?

You could try

Run services.msc
Go to SQL Server( your instance), and change the account to Local System.
Start the service.

If that doesn’t work, then you will need to copy your database files, completely remove SQL Server, then reinstall. Finally copy back your database files.

OK!! sorry did not answer yesterday…
I already have tried to change to a local account, but does not work…


copy databases, uninstall and install… crap…
any easy way to do that?



  • Find your SambaSettings.txt file whuch is usually in here

    In the settings file is a <ConnectionString> which is your Data Connection String for SambaPOS. Keep this file safe - copy it to another location *** Do Not Delete ***.

  • Your database files should be here - but exact location does depend on the SQL Instance name. Mine is SAMBAPOS

    C:\Program Files\Microsoft SQL Server\MSSQL11.SAMBAPOS\MSSQL\DATA
    Find your database files. They will probably be

    If you had setup a different Database Name, it should be shown in the ConnectionString - that is the files YOU MUST COPY. If in doubt copy all files from the above SQL directory.

  • Once you have your database files in a safe place, completely remove all SQL Server 2012 programs via Control Panel - I mean anything that has Microsoft SQL Server 2005/2008/2012 in its name - there will be around 5 programs.

  • Restart the computer.

  • Check to see if C:\Program Files\Microsoft SQL Server\ directory exists - if it does remove it.

  • Install SQL Server 2012.

  • Create a new SQL Instance the same name as before with the same password (just keeping it the same stops confusion)

  • Stop the SQL Server through SQL Server Configuration Manager.

  • Copy your SQL Database files (just the SambaPOS database files - nothing else) back into the newly created C:\Program Files\Microsoft SQL Server\MSSQL11.SAMBAPOS\MSSQL\DATA, again depending on your SQL Instance Name.

  • Start the SQL Server.

  • Run SambaPOS.

There are a few variances in naming depending on how you set things up. But this will work to get SQL Server going again.

If in doubt, ask before deleting/uninstalling anything.

Is SambaPOS working ?

I just read you original post again.
SQL Server Agent will never run on SQL Server Express - its not supported. Its for administrative functions that only the full SQL Server supports.

yes sqlexpress, and SAMBAPOS “WAS” working great.
I wrotewas because I uninstalled everything… now i am installing again, cross your fingers so the backup can restore all my work…


Well, I managed to SCREW EVERYTING… I desintalled all, first I did a backup of my data.
Now trying to install sql server again, fresh (at least that is what i think) the last step, start th db engine, fails… so… no sql running now… @#$%@#$%!@#$!@#$#@$%

Will try again…


Are you using these instructions http://sambapos.org/wiki/doku.php/en/installing_sql_express_2012_for_sambapos_v3

yes, I used those ones, the first time worked GREAT… then I started to mess around since I did not know that the sql server agent does not work in EXPRESS, and after messing around nothing esle worked, jajajajajajajajjaja. so I uninstalled sql and started again… but for some strange reason the database engine service would not start, not for any instance… so, I decide to clear everything… deinstall all… restart the machine… and now I will start a supossed fresh SQL EXPRESS install…


OK @JohnS, SQL SERVER 2012 up and running, SAMBAPOS database restored fine!!!

Before all the confusion I had the message server green message “CONNECTED”, now is red and “NOT CONNECTED”, what could I possible change to do that?

I have also to figure out why is the client machine not connecting to the sql server… seems a nightmare, jajajajajajajjaja



Not connected is the Message Server is not running or your settings are wrong.

Did you follow the SQL install instructions exactly? Did you make the required changes in SQL Server Configuration ?

Hi @JohnS.
I followed the instructions and it was working before uninstalling sql. Tought that it should work again since i did not mess with samba config.

Port samba server 8383
Port samba client 8383 and auto start client

Server service running

Tcp ip sql port tried 1433 and 8383

I am lost now.


Message Server has nothing to do with SQL Server.
Lets fix one thing at a time.

SambaPOS Message Server

Hold down the Windows Key & press R.
Type CMD & press enter.
Type sc query SambaPOS4-MessagingServer | find "STATE"
and press enter.
The result should be STATE : RUNNING

If not, you need to run C:\Program Files (x86)\SambaPOS4\Samba.MessagingServerServiceTool.exe, make sure the port is set to 8383 and click Install Service & click Start.
Do above test again.

I’ve tried different error messages but it seems message server error still confuses a lot of people. Can anyone think a short alternative error message?

The messages are OK, it’s more the problem of knowing if the service is configured or working properly.

I think we need a tutorial on setting it up again.

OK I’ll try to prepare one after 4.1.18 release.

Found the problem… After a windows update, firewall was again activated…

I deativated and everything works