0

I'm trying to set up transactional replication in SQL Server 2012 using AdventureWorks 2012. And right at the end of the publications setup i get the following error:

SQL Server could not start the Snapshot Agent. Additional Information: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) SQL ServerAgent is not currently running so it cannot be modified of this action. Changed database context to 'AdventureWorks2012'.(Microsoft SQL Server,Error 22022)

I'm guessing this error isn't allowing me to execute the following code:

USE ADRepl;
SELECT * FROM Person.BusinessEntity

As every time I do execute this I get the following error:

Msg 208, Level 16, State 1, Line 2 Invalid object name 'Person.BusinessEntity'.

Nathan Tuggy
  • 2,237
  • 27
  • 30
  • 38
  • Did you start the SQL server agent and see if that fixes the problem? N.B. Cheers, Thanks, etc is not necessary. – vsnyc Apr 17 '15 at 01:07
  • That made snapshot agent start but I'm still getting the error for Person.BusinessEntity – JaiUdit Dipikar Apr 17 '15 at 01:22
  • Did you verify in SQL server studio if the table got replicated and if there were any errors? There is a replication monitor which will tell you the status and if there were any errors – vsnyc Apr 17 '15 at 01:29
  • The error I get is: the process could not execute 'sp_replcmds' – JaiUdit Dipikar Apr 17 '15 at 01:37
  • 1
    Check this answer http://stackoverflow.com/questions/2723061/ – vsnyc Apr 17 '15 at 01:41
  • Oof. No offense meant, but if you can't troubleshoot a table missing, you're not up to setting up and troubleshooting replication. Walk before you run, padawan. – Ben Thul Apr 17 '15 at 03:03

2 Answers2

0

Make your sql agent property as automatic.

Vishe
  • 3,383
  • 1
  • 24
  • 23
0

Set the SQL server agent service Automatically.

  • Press windows key+R

  • type services.msc

  • right Click on sql server agent

  • properties >> startup >> select automatically.

Stevy
  • 3,228
  • 7
  • 22
  • 38